Commit d9d64890 authored by bpandey's avatar bpandey

remove single quote from emp code


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99876 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0b6287ab
......@@ -65,8 +65,6 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
conn = connDriver.getConnectDB(dataSourceName);
connDriver = null;
rowData = new JSONObject();
SimpleDateFormat gridDateFormat = new SimpleDateFormat( "dd-MMM-yy");
convertToDbDate = new SimpleDateFormat(genericUtility.getDBDateFormat());
......@@ -112,7 +110,6 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
rs = null;
/* End Foe Opening Request * */
sql = "select count(1) as rece_dur_prd from ser_request where req_date between ? and ? and emp_code__assign = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, frmDateInTs);
......@@ -630,7 +627,7 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
convertToDbDate = new SimpleDateFormat(genericUtility.getDBDateFormat());
System.out.println("In Management Dashboard Work Allocation: ");
dashboardUtility = new DashboardUtility();
empCode = dashboardUtility.getCommaSeparated(empCode);
simpleDateFormat = new SimpleDateFormat( genericUtility.getApplDateFormat());
if((fromDate==null) ||(fromDate.equals("")) && (toDate==null) || (toDate.equals("")))
{
......@@ -651,11 +648,12 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
frmDateInTs = java.sql.Timestamp.valueOf(convertToDbDate.format(simpleDateFormat.parse(fromDate)).toString() + " 00:00:00.0");
toDateInTs = java.sql.Timestamp.valueOf(convertToDbDate.format(simpleDateFormat.parse(toDate)).toString() + " 00:00:00.0");
dateInpute =" and h.TRAN_DATE >= ? AND h.TRAN_DATE <= ?;
dateInpute =" and h.TRAN_DATE >= ? AND h.TRAN_DATE <= ?";
}
if( (empCode!=null && empCode.trim().length()>0) )
{
empCode = dashboardUtility.getCommaSeparated(empCode);
sql = " SELECT E.EMP_FNAME || ' ' || E.EMP_LNAME EMPLOYEE ,I.REQ_ID, I.DTL_DESCR AS REQ_DESCR, "
+" I.CUST_CODE, I.CUST_NAME, SUM(I.TIME_SPENT) as time_spent ,SUM(I.EMP_TIME_SPENT) as emp_time_spent , I.PLAN_START_DATE,I.ACT_START_DATE, "
+" I.PLAN_END_DATE,I.STD_TIME,I.ACTION_DETL FROM (select d.emp_code, r.req_id, "
......@@ -684,9 +682,9 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
+" where d.action_id = h.action_id "
+" and r.req_id = h.req_id "
+" AND R.CUST_CODE = C.CUST_CODE "
+" AND ((d.emp_code in (select emp_code FROM EMPLOYEE START WITH EMP_CODE = '"+empCode+"' "
+" AND ((d.emp_code in (select emp_code FROM EMPLOYEE START WITH EMP_CODE = "+empCode+" "
+" CONNECT BY PRIOR EMP_CODE = REPORT_TO AND REPORT_TO IS NOT NULL "
+" AND ( RELIEVE_DATE IS NULL OR RELIEVE_DATE >= SYSDATE ))) OR (d.emp_code='"+empCode+"')) "
+" AND ( RELIEVE_DATE IS NULL OR RELIEVE_DATE >= SYSDATE ))) OR (d.emp_code="+empCode+")) "
+ dateInpute
+" group by d.emp_code, r.req_id, c.cust_code, c.cust_name, r.dtl_descr,d.STD_TIME,d.ACTION_DETL "
+" ) i, employee e WHERE I.EMP_CODE = E.EMP_CODE "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment