Commit 97be1e50 authored by manohar's avatar manohar

work allocation and efficiency sql changed to include all team members


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99199 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 8f8325f4
...@@ -197,7 +197,12 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -197,7 +197,12 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
//--- Total man hours spent on completed request //--- Total man hours spent on completed request
//--- Estimated man hours for the completed request //--- Estimated man hours for the completed request
sql = " select nvl(fn_feedbk_time(sum(d.time_spent)),'0') as time_spent,nvl(r.STD_COMP_TIME,'0') as STD_COMP_TIME from ser_request r, SER_REQ_FEEDBKDTL d,SER_REQ_FEEDBK h where d.feedbk_id = h.feedbk_id and r.req_id = h.req_id and r.COMP_STAT_DT between ? and ? and r.emp_code__assign = ? and r.comp_stat = 'C' group by r.STD_COMP_TIME "; sql = " select nvl(fn_feedbk_time(sum(d.time_spent)),'0') as time_spent,nvl(r.STD_COMP_TIME,'0') as STD_COMP_TIME "
+ " from ser_request r, SER_REQ_FEEDBKDTL d,SER_REQ_FEEDBK h "
+ " where d.feedbk_id = h.feedbk_id "
+ " and r.req_id = h.req_id "
+ " and r.COMP_STAT_DT between ? and ? "
+ " and r.emp_code__assign = ? and r.comp_stat = 'C' group by r.STD_COMP_TIME ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, frmDateInTs); pstmt.setTimestamp(1, frmDateInTs);
pstmt.setTimestamp(2, toDateInTs); pstmt.setTimestamp(2, toDateInTs);
...@@ -638,9 +643,9 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -638,9 +643,9 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
+" where d.action_id = h.action_id " +" where d.action_id = h.action_id "
+" and r.req_id = h.req_id " +" and r.req_id = h.req_id "
+" AND R.CUST_CODE = C.CUST_CODE " +" AND R.CUST_CODE = C.CUST_CODE "
+" AND ((r.emp_code__assign 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 " +" 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 )) "
+ dateInpute + dateInpute
+" group by d.emp_code, r.req_id, c.cust_code, c.cust_name, r.dtl_descr,d.STD_TIME,d.ACTION_DETL " +" 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 " +" ) i, employee e WHERE I.EMP_CODE = E.EMP_CODE "
...@@ -804,9 +809,9 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -804,9 +809,9 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
+" and ah.req_id = r.req_id " +" and ah.req_id = r.req_id "
+" AND E.EMP_CODE = ad.EMP_CODE " +" AND E.EMP_CODE = ad.EMP_CODE "
+" and r.comp_stat_dt >= ? and r.comp_stat_dt <= ? "//--? +" and r.comp_stat_dt >= ? and r.comp_stat_dt <= ? "//--?
+" AND ((r.emp_code__assign in (select emp_code FROM EMPLOYEE START WITH EMP_CODE = "+empCode+" " +" AND ad.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 " +" CONNECT BY PRIOR EMP_CODE = REPORT_TO AND REPORT_TO IS NOT NULL "
+" AND ( RELIEVE_DATE IS NULL OR RELIEVE_DATE >= SYSDATE )) ) or ad.emp_code="+empCode+" ) " +" AND ( RELIEVE_DATE IS NULL OR RELIEVE_DATE >= SYSDATE )) "
+" group by r.req_id,r.dtl_descr, ad.action_detl, r.COMP_STAT,e.emp_fname || ' ' || e.emp_lname, ad.STD_TIME ,r.comp_stat_dt " + +" group by r.req_id,r.dtl_descr, ad.action_detl, r.COMP_STAT,e.emp_fname || ' ' || e.emp_lname, ad.STD_TIME ,r.comp_stat_dt " +
" order by r.comp_stat_dt desc "; " order by r.comp_stat_dt desc ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
......
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