Commit 5a2e8cd8 authored by sshinde's avatar sshinde

Modify WorkAllocation anD missing Feedback Dashboard SQL


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99894 ce508802-f39f-4f6c-b175-0d175dae99d5
parent bbce9966
......@@ -826,8 +826,9 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
/**Change Sql For Emp Unit time by sachin on 13-Jan-16**/
sql="select e.emp_fname || ' ' || e.emp_lname Employee ,i.req_id, i.dtl_descr,i.cust_code, cc.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 from ( select d.emp_code, r.req_id," +
" r.cust_code,r.dtl_descr, (select min(di.PLANSTDATE) from ser_req_act_detl di, ser_req_act hi where hi.action_id = di.action_id " +
" 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," +
" r.cust_code,r.dtl_descr, d.STD_TIME, d.ACTION_DETL , (select min(di.PLANSTDATE) from ser_req_act_detl di, ser_req_act hi where hi.action_id = di.action_id " +
" and hi.req_id = r.req_id and di.emp_code = d.emp_code ) plan_start_date, (select min(fd.START_DATE_ACTUAL) from SER_REQ_FEEDBKDTL " +
" fd, SER_REQ_FEEDBK fh where fd.feedbk_id = fh.feedbk_id and fh.req_id = r.req_id and fh.emp_code = d.emp_code) act_start_date," +
" (select max(di.PLANENDDATE) from ser_req_act_detl di, ser_req_act hi where hi.action_id = di.action_id and hi.req_id = r.req_id " +
......@@ -838,9 +839,9 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
" ser_request r, ser_req_act h, ser_req_act_detl d where d.action_id = h.action_id and r.req_id = h.req_id and r.comp_stat <> 'C' " +
" 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+")) " + dateInpute +
" group by d.emp_code, r.req_id, r.cust_code, r.dtl_descr,d.action_code,h.action_id ) i, employee e, customer cc" +
" group by d.emp_code, r.req_id, r.cust_code, r.dtl_descr,d.action_code,h.action_id,d.STD_TIME,d.ACTION_DETL ) i, employee e, customer cc" +
" where i.emp_code = e.emp_code and cc.cust_code = i.cust_code group by e.emp_fname || ' ' || e.emp_lname,i.req_id, i.dtl_descr," +
" i.cust_code, cc.cust_name, i.plan_start_date,i.act_start_date, i.plan_end_date order by e.emp_fname || ' ' || e.emp_lname,i.req_id" ;
" i.cust_code, cc.cust_name, i.plan_start_date,i.act_start_date, i.plan_end_date ,I.STD_TIME,I.ACTION_DETL order by e.emp_fname || ' ' || e.emp_lname,i.req_id" ;
/**Change Sql For Emp Unit time by sachin on 13-Jan-16**/
......@@ -1022,7 +1023,7 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
+" from ser_request r, ser_req_act ah, ser_req_act_detl ad, employee e "
+" where ah.action_id = ad.action_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 ='C' "
+" and r.comp_stat_dt >= ? and r.comp_stat_dt <= ? "//--?
+" 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 "
......@@ -1445,7 +1446,7 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
+" 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 ";*/
sql = "SELECT r.comp_stat_dt,r.COMP_STAT,R.REQ_ID,R.DTL_DESCR, AD.ACTION_DETL, E.EMP_FNAME || ' ' || E.EMP_LNAME EMP_NAME, "
sql = " SELECT r.comp_stat_dt,r.COMP_STAT,R.REQ_ID,R.DTL_DESCR, AD.ACTION_DETL, E.EMP_FNAME || ' ' || E.EMP_LNAME EMP_NAME, "
+" AD.STD_TIME as STD_TIME ,max((SELECT FN_FEEDBK_TIME(SUM(FD.TIME_SPENT)) FROM SER_REQ_FEEDBKDTL FD, "
+" SER_REQ_FEEDBK FH WHERE FD.FEEDBK_ID = FH.FEEDBK_ID AND FH.REQ_ID = R.REQ_ID "
+" AND FD.ACTION_ID = AD.ACTION_ID "
......@@ -1476,24 +1477,7 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
totDeviation=totDeviation+deviation;
totStdTime=totStdTime+stdTime;
totActTime=totActTime+actTime;
/*rowData.put("employee", checkNull(rs.getString("EMP_NAME")));
rowData.put("req_id", checkNull(rs.getString("REQ_ID")));
rowData.put("descr", checkNull(rs.getString("DTL_DESCR")));
rowData.put("act_descr", checkNull(rs.getString("ACTION_DETL")));
rowData.put("est_man_hour", checkNull(rs.getString("STD_TIME")));
rowData.put("act_man_hour", checkNull(rs.getString("ACTUAL_TIME")));
rowData.put("deviation", ""+deviation);
rowData.put("req_status",checkNull(rs.getString("COMP_STAT")));
String comp_stat_dt=checkNull(rs.getString("comp_stat_dt"));
if(!comp_stat_dt.equals(null) && comp_stat_dt.trim().length()>0)
{
rowData.put("dlv_date", simpleDateFormat.format(convertToDbDate.parse(comp_stat_dt)));
}
else
{
rowData.put("dlv_date",checkNull(rs.getString("comp_stat_dt")));
}*/
if(deviation==0.0)
{
onTimeCtr++;
......
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