Commit 3cc22894 authored by sshinde's avatar sshinde

In the where clause of all dashboard's sql remove the following filters :-

and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG'
and include the following :-
ser_request.REQ_TYPE <> 'GENSUPP'


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@100002 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2a3954aa
......@@ -109,9 +109,14 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
/* [START] Modify SQL By sachin on 20-JAN-16 For Adding Ticket data*/
sql=" select sum (opening_request) as opening_request from (select count(1) opening_request from ser_request " +
" where req_date < ? and emp_code__assign = ? and req_id <>'9999999999' and (comp_stat <> 'C' or " +
" comp_stat_dt >=?) and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' union all " +
" comp_stat_dt >= ?) " +
//" and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG'" +
" and REQ_TYPE <> 'GENSUPP' "+
" union all " +
" select count(1) opening_request from service_complaint where TICKET_DATE < ? and submitted_to2 = ? " +
" and (status <> 'C' or Resolve_date1>= ?))";
" and (status <> 'C' or Resolve_date1 >= ?))";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, frmDateInTs);
......@@ -155,11 +160,13 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
/* [START] Modify SQL By sachin on 20-JAN-16 For Adding Ticket data*/
sql="select sum(rece_dur_prd) as rece_dur_prd from ( select count(1) as rece_dur_prd from ser_request where req_date between ? and ? and emp_code__assign = ? " +
" and req_id <>'9999999999' and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' union all select count(1) as rece_dur_prd from service_complaint " +
" and req_id <>'9999999999' and " +
//"req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' " +
" REQ_TYPE <> 'GENSUPP' "+
" union all select count(1) as rece_dur_prd from service_complaint " +
" where ticket_date between ? and ? and submitted_to2 = ? )";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, frmDateInTs);
pstmt.setTimestamp(2, toDateInTs);
......@@ -195,7 +202,9 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
/* [START] Modify SQL By sachin on 20-JAN-16 For Adding Ticket data*/
sql="select sum(proms_dur_prd) proms_dur_prd from ( select count(1) as proms_dur_prd from ser_request where EXP_END_DATE between ? and ? and emp_code__assign = ? and req_id <>'9999999999' " +
" and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' union all select count(1)" +
//" and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' " +
" and REQ_TYPE <> 'GENSUPP'" +
" union all select count(1)" +
" as proms_dur_prd from service_complaint where resolve_date1 between ? and ? and submitted_to2 = ? )" ;
pstmt = conn.prepareStatement(sql);
......@@ -234,10 +243,14 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
/* [START] Modify SQL By sachin on 20-JAN-16 For Adding Ticket data*/
sql = " select sum( del_dur_prd) as del_dur_prd from (select count(1) as del_dur_prd from ser_request where " +
" COMP_STAT_DT between ? and ? and emp_code__assign = ? and comp_stat = 'C' and req_id <>'9999999999' " +
" and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' union all" +
//" and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG'" +
" and REQ_TYPE <> 'GENSUPP'" +
" union all" +
" select count(1) as del_dur_prd from service_complaint where Resolve_date1 between ? and ? and submitted_to2 = ? " +
" and status = 'C' )";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, frmDateInTs);
pstmt.setTimestamp(2, toDateInTs);
......@@ -273,9 +286,12 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
/* [START] Modify SQL By sachin on 20-JAN-16 For Adding Ticket data*/
sql = "select sum(cnt_wit_prom) AS cnt_wit_prom from (select count(1) as cnt_wit_prom " +
" from ser_request where emp_code__assign = ? and EXP_END_DATE is null and req_id <>'9999999999' and " +
" comp_stat <> 'C' and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG'" +
" comp_stat <> 'C' and" +
//" req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG'" +
" REQ_TYPE <> 'GENSUPP'" +
" union all select count(1) as cnt_wit_prom from service_complaint where submitted_to2 = ? and resolve_date1 is null " +
" and status <> 'C' )";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode);
pstmt.setString(2, empCode);
......@@ -313,10 +329,14 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
/* [START] Modify SQL By sachin on 20-JAN-16 For Adding Ticket data*/
sql = " SELECT count(DISTINCT cnt_wrk_gng) as cnt_wrk_gng FROM ( select r.req_id as cnt_wrk_gng from ser_req_feedbk f ," +
" ser_request r WHERE f.req_id = r.req_id AND r.emp_code__assign = ? AND f.EXECUT_DT BETWEEN ? AND ? AND r.comp_stat <> 'C' " +
" and r.req_id <>'9999999999' and R.req_id not like 'CO%' and lower(R.dtl_descr) not like 'client sup%' AND R.ITEM_SER <>'TRG' " +
" and r.req_id <>'9999999999' and" +
//" R.req_id not like 'CO%' and lower(R.dtl_descr) not like 'client sup%' AND R.ITEM_SER <>'TRG' " +
" R.REQ_TYPE <> 'GENSUPP'" +
" union all select s.ticket_no as cnt_wrk_gng from ser_req_feedbk f ,service_complaint s WHERE f.ticket_no = s.ticket_no " +
" AND s.submitted_to2 = ? AND f.EXECUT_DT BETWEEN ? AND ? AND s.status <> 'C' )";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode);
pstmt.setTimestamp(2, frmDateInTs);
......@@ -360,10 +380,12 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
sql = " SELECT nvl(fn_feedbk_time(sum(time_spent)), '0') AS time_spent ,nvl(STD_COMP_TIME, '0') AS STD_COMP_TIME from " +
" (select d.time_spent ,r.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' and r.req_id <>'9999999999' " +
" and r.req_id not like 'CO%' and lower(r.dtl_descr) not like 'client sup%' AND r.ITEM_SER <>'TRG' union all select d.time_spent ,0 as std_comp_time FROM " +
//" and r.req_id not like 'CO%' and lower(r.dtl_descr) not like 'client sup%' AND r.ITEM_SER <>'TRG'" +
" and r.REQ_TYPE <> 'GENSUPP'" +
" union all select d.time_spent ,0 as std_comp_time FROM " +
" service_complaint s ,SER_REQ_FEEDBKDTL d ,SER_REQ_FEEDBK h WHERE d.feedbk_id = h.feedbk_id AND s.ticket_no = h.ticket_no AND s.resolve_date1" +
" BETWEEN ? AND ? AND s.submitted_to2 = ? AND s.status = 'C' ) group by STD_COMP_TIME";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, frmDateInTs);
pstmt.setTimestamp(2, toDateInTs);
......@@ -418,15 +440,25 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
*/
//--- Closing Opening + received - delivered
/* [START] Modify SQL By sachin on 20-JAN-16 For Adding Ticket data*/
sql = "SELECT sum(no_request) AS no_req FROM ( SELECT count(1) AS no_request FROM ser_request WHERE req_date < ? AND emp_code__assign = ? AND ( comp_stat <> 'C' OR comp_stat_dt >= ? ) " +
" and req_id <>'9999999999' and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' UNION ALL SELECT count(1) AS no_request FROM " +
" ser_request WHERE req_date BETWEEN ? AND ? AND emp_code__assign = ? and req_id <>'9999999999' and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' " +
" AND ITEM_SER <>'TRG' UNION ALL SELECT - 1 * count(1) AS no_request FROM ser_request WHERE COMP_STAT_DT BETWEEN ? AND ? AND emp_code__assign = ? " +
" AND comp_stat = 'C' and req_id <>'9999999999' and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' UNION ALL SELECT count(1) " +
sql = " SELECT sum(no_request) AS no_req FROM ( SELECT count(1) AS no_request FROM ser_request WHERE req_date < ? AND emp_code__assign = ? AND ( comp_stat <> 'C' OR comp_stat_dt >= ? ) " +
" and req_id <>'9999999999' " +
//" req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' " +
" and REQ_TYPE <> 'GENSUPP'" +
" UNION ALL SELECT count(1) AS no_request FROM " +
" ser_request WHERE req_date BETWEEN ? AND ? AND emp_code__assign = ? and req_id <>'9999999999' " +
//" req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' " +
" and REQ_TYPE <> 'GENSUPP'" +
" UNION ALL SELECT - 1 * count(1) AS no_request FROM ser_request WHERE COMP_STAT_DT BETWEEN ? AND ? AND emp_code__assign = ? " +
" AND comp_stat = 'C' and req_id <>'9999999999' and " +
//" req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' " +
" REQ_TYPE <> 'GENSUPP'" +
" UNION ALL SELECT count(1) " +
" AS no_request FROM service_complaint WHERE ticket_date < ? AND submitted_to2 = ? AND ( status <> 'C' OR Resolve_date1 >= ? ) UNION ALL SELECT count(1) AS no_request " +
" FROM service_complaint WHERE ticket_date BETWEEN ? AND ? AND submitted_to2 = ? UNION ALL SELECT - 1 * count(1) AS no_request FROM service_complaint WHERE Resolve_date1 " +
" BETWEEN ? AND ? AND submitted_to2 = ? AND status = 'C' ) ";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, frmDateInTs);
pstmt.setString(2, empCode);
......@@ -585,10 +617,14 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
/* [START] Modify SQL By sachin on 20-JAN-16 For Adding Ticket data*/
sql=" select sum (opening_request) as opening_request from (select count(1) opening_request from ser_request " +
" where req_date < ? and emp_code__assign = ? and req_id <>'9999999999' and (comp_stat <> 'C' or " +
" comp_stat_dt >=?) and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' union all " +
" select count(1) opening_request from service_complaint where TICKET_DATE < ? and submitted_to2 = ? " +
" and (status <> 'C' or Resolve_date1>= ?))";
" where req_date < ? and emp_code__assign = ? and req_id <>'9999999999' and (comp_stat <> 'C' or " +
" comp_stat_dt >= ?) " +
//" and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG'" +
" and REQ_TYPE <> 'GENSUPP' "+
" union all " +
" select count(1) opening_request from service_complaint where TICKET_DATE < ? and submitted_to2 = ? " +
" and (status <> 'C' or Resolve_date1 >= ?))";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, frmDateInTs);
......@@ -628,8 +664,12 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
*/
/* [START] Modify SQL By sachin on 20-JAN-16 For Adding Ticket data*/
sql="select sum(rece_dur_prd) as rece_dur_prd from ( select count(1) as rece_dur_prd from ser_request where req_date between ? and ? and emp_code__assign = ? " +
" and req_id <>'9999999999' and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' union all select count(1) as rece_dur_prd from service_complaint " +
" where ticket_date between ? and ? and submitted_to2 = ? )";
" and req_id <>'9999999999' and " +
//"req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' " +
" REQ_TYPE <> 'GENSUPP' "+
" union all select count(1) as rece_dur_prd from service_complaint " +
" where ticket_date between ? and ? and submitted_to2 = ? )";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, frmDateInTs);
......@@ -662,10 +702,13 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
pstmt.setTimestamp(2, toDateInTs);
pstmt.setString(3, empCode);
*/
sql="select sum(proms_dur_prd) proms_dur_prd from ( select count(1) as proms_dur_prd from ser_request where EXP_END_DATE between ? and ? and emp_code__assign = ? and req_id <>'9999999999' " +
" and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' union all select count(1)" +
" as proms_dur_prd from service_complaint where resolve_date1 between ? and ? and submitted_to2 = ? )" ;
//" and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' " +
" and REQ_TYPE <> 'GENSUPP'" +
" union all select count(1)" +
" as proms_dur_prd from service_complaint where resolve_date1 between ? and ? and submitted_to2 = ? )" ;
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, frmDateInTs);
pstmt.setTimestamp(2, toDateInTs);
......@@ -701,10 +744,13 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
/* [START] Modify SQL By sachin on 20-JAN-16 For Adding Ticket data*/
sql = " select sum( del_dur_prd) as del_dur_prd from (select count(1) as del_dur_prd from ser_request where " +
" COMP_STAT_DT between ? and ? and emp_code__assign = ? and comp_stat = 'C' and req_id <>'9999999999' " +
" and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' union all" +
//" and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG'" +
" and REQ_TYPE <> 'GENSUPP'" +
" union all" +
" select count(1) as del_dur_prd from service_complaint where Resolve_date1 between ? and ? and submitted_to2 = ? " +
" and status = 'C' )";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, frmDateInTs);
pstmt.setTimestamp(2, toDateInTs);
......@@ -741,10 +787,13 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
/* [START] Modify SQL By sachin on 20-JAN-16 For Adding Ticket data*/
sql = "select sum(cnt_wit_prom) AS cnt_wit_prom from (select count(1) as cnt_wit_prom " +
" from ser_request where emp_code__assign = ? and EXP_END_DATE is null and req_id <>'9999999999' and " +
" comp_stat <> 'C' and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG'" +
" comp_stat <> 'C' and" +
// " req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG'" +
" REQ_TYPE <> 'GENSUPP'" +
" union all select count(1) as cnt_wit_prom from service_complaint where submitted_to2 = ? and resolve_date1 is null " +
" and status <> 'C' )";
pstmt = conn.prepareStatement(sql);
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode);
pstmt.setString(2, empCode);
/* [END] Modify SQL By sachin on 20-JAN-16 For Adding Ticket data*/
......@@ -778,10 +827,12 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
/* [START] Modify SQL By sachin on 20-JAN-16 For Adding Ticket data*/
sql = " SELECT count(DISTINCT cnt_wrk_gng) as cnt_wrk_gng FROM ( select r.req_id as cnt_wrk_gng from ser_req_feedbk f ," +
" ser_request r WHERE f.req_id = r.req_id AND r.emp_code__assign = ? AND f.EXECUT_DT BETWEEN ? AND ? AND r.comp_stat <> 'C' " +
" and r.req_id <>'9999999999' and R.req_id not like 'CO%' and lower(R.dtl_descr) not like 'client sup%' AND R.ITEM_SER <>'TRG' " +
" union all select s.ticket_no as cnt_wrk_gng from ser_req_feedbk f ,service_complaint s WHERE f.ticket_no = s.ticket_no " +
" AND s.submitted_to2 = ? AND f.EXECUT_DT BETWEEN ? AND ? AND s.status <> 'C' )";
" ser_request r WHERE f.req_id = r.req_id AND r.emp_code__assign = ? AND f.EXECUT_DT BETWEEN ? AND ? AND r.comp_stat <> 'C' " +
" and r.req_id <>'9999999999' and" +
//" R.req_id not like 'CO%' and lower(R.dtl_descr) not like 'client sup%' AND R.ITEM_SER <>'TRG' " +
" R.REQ_TYPE <> 'GENSUPP'" +
" union all select s.ticket_no as cnt_wrk_gng from ser_req_feedbk f ,service_complaint s WHERE f.ticket_no = s.ticket_no " +
" AND s.submitted_to2 = ? AND f.EXECUT_DT BETWEEN ? AND ? AND s.status <> 'C' )";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode);
......@@ -820,7 +871,9 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
sql = " SELECT nvl(fn_feedbk_time(sum(time_spent)), '0') AS time_spent ,nvl(STD_COMP_TIME, '0') AS STD_COMP_TIME from " +
" (select d.time_spent ,r.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' and r.req_id <>'9999999999' " +
" and r.req_id not like 'CO%' and lower(r.dtl_descr) not like 'client sup%' AND r.ITEM_SER <>'TRG' union all select d.time_spent ,0 as std_comp_time FROM " +
//" and r.req_id not like 'CO%' and lower(r.dtl_descr) not like 'client sup%' AND r.ITEM_SER <>'TRG'" +
" and r.REQ_TYPE <> 'GENSUPP'" +
" union all select d.time_spent ,0 as std_comp_time FROM " +
" service_complaint s ,SER_REQ_FEEDBKDTL d ,SER_REQ_FEEDBK h WHERE d.feedbk_id = h.feedbk_id AND s.ticket_no = h.ticket_no AND s.resolve_date1" +
" BETWEEN ? AND ? AND s.submitted_to2 = ? AND s.status = 'C' ) group by STD_COMP_TIME";
......@@ -881,17 +934,22 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
//--- Closing Opening + received - delivered
/* [START] Modify SQL By sachin on 20-JAN-16 For Adding Ticket data */
sql = "SELECT sum(no_request) AS no_req FROM ( SELECT count(1) AS no_request FROM ser_request WHERE req_date < ? AND emp_code__assign = ? AND ( comp_stat <> 'C' OR comp_stat_dt >= ? ) " +
" and req_id <>'9999999999' and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' UNION ALL SELECT count(1) AS no_request FROM " +
" ser_request WHERE req_date BETWEEN ? AND ? AND emp_code__assign = ? and req_id <>'9999999999' and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' " +
" AND ITEM_SER <>'TRG' UNION ALL SELECT - 1 * count(1) AS no_request FROM ser_request WHERE COMP_STAT_DT BETWEEN ? AND ? AND emp_code__assign = ? " +
" AND comp_stat = 'C' and req_id <>'9999999999' and req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' UNION ALL SELECT count(1) " +
" AS no_request FROM service_complaint WHERE ticket_date < ? AND submitted_to2 = ? AND ( status <> 'C' OR Resolve_date1 >= ? ) UNION ALL SELECT count(1) AS no_request " +
" FROM service_complaint WHERE ticket_date BETWEEN ? AND ? AND submitted_to2 = ? UNION ALL SELECT - 1 * count(1) AS no_request FROM service_complaint WHERE Resolve_date1 " +
" BETWEEN ? AND ? AND submitted_to2 = ? AND status = 'C' ) ";
" and req_id <>'9999999999' " +
//" req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' " +
" and REQ_TYPE <> 'GENSUPP'" +
" UNION ALL SELECT count(1) AS no_request FROM " +
" ser_request WHERE req_date BETWEEN ? AND ? AND emp_code__assign = ? and req_id <>'9999999999' " +
//" req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' " +
" and REQ_TYPE <> 'GENSUPP'" +
" UNION ALL SELECT - 1 * count(1) AS no_request FROM ser_request WHERE COMP_STAT_DT BETWEEN ? AND ? AND emp_code__assign = ? " +
" AND comp_stat = 'C' and req_id <>'9999999999' and " +
//" req_id not like 'CO%' and lower(dtl_descr) not like 'client sup%' AND ITEM_SER <>'TRG' " +
" REQ_TYPE <> 'GENSUPP'" +
" UNION ALL SELECT count(1) " +
" AS no_request FROM service_complaint WHERE ticket_date < ? AND submitted_to2 = ? AND ( status <> 'C' OR Resolve_date1 >= ? ) UNION ALL SELECT count(1) AS no_request " +
" FROM service_complaint WHERE ticket_date BETWEEN ? AND ? AND submitted_to2 = ? UNION ALL SELECT - 1 * count(1) AS no_request FROM service_complaint WHERE Resolve_date1 " +
" BETWEEN ? AND ? AND submitted_to2 = ? AND status = 'C' ) ";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, frmDateInTs);
//pstmt.setTimestamp(2, toDateInTs);
......@@ -1063,8 +1121,11 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
" iih.req_id = r.req_id ) time_spent ,( SELECT fn_feedbk_time(sum(iiid.time_spent)) AS dd FROM SER_REQ_FEEDBKDTL iiid ,SER_REQ_FEEDBK iiih " +
" WHERE iiid.feedbk_id = iiih.feedbk_id AND iiih.req_id = r.req_id AND iiid.action_id = h.action_id AND iiid.action_code = d.action_code AND" +
" iiih.emp_code = d.emp_code ) emp_time_spent FROM 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 r.req_id <>'9999999999' and r.req_id not like 'CO%' and lower(r.dtl_descr) not like 'client sup%' " +
" AND r.ITEM_SER <>'TRG' AND ( ( d.emp_code IN ( SELECT emp_code FROM EMPLOYEE START WITH EMP_CODE = "+empCode+" CONNECT BY PRIOR EMP_CODE = REPORT_TO AND" +
" r.req_id = h.req_id AND r.comp_stat <> 'C' and r.req_id <>'9999999999' and " +
/*" r.req_id not like 'CO%' and lower(r.dtl_descr) not like 'client sup%' " +
" AND r.ITEM_SER <>'TRG'" +*/
" r.REQ_TYPE <> 'GENSUPP'" +
" 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 ,d.STD_TIME ,d.ACTION_DETL UNION " +
" ALL SELECT d.emp_code ,r.ticket_no AS req_id ,r.cust_code ,r.TICKET_DETAIL AS dtl_descr ,d.STD_TIME ,d.ACTION_DETL ," +
......@@ -1083,6 +1144,7 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
" 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 ," +
" I.STD_TIME ,I.ACTION_DETL ORDER BY e.emp_fname || ' ' || e.emp_lname ,i.req_id ";
/** End Modify Sql Add Ticket Condition by sachin on 20-Jan-16**/
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