Commit 52893129 authored by vvengurlekar's avatar vvengurlekar

resultset and prepared statement closed


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@106238 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9737273f
...@@ -159,11 +159,11 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -159,11 +159,11 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
rowData.put("openingrequest", 0); rowData.put("openingrequest", 0);
} }
/*End modify Code by sachin on 13-Jan-16*/ /*End modify Code by sachin on 13-Jan-16*/
pstmt.close();
pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close();
pstmt = null;
/*Receive Opening Request * */ /*Receive Opening Request * */
// sql = "select count(1) as rece_dur_prd from ser_request where req_date between ? and ? and emp_code__assign = ?"; // sql = "select count(1) as rece_dur_prd from ser_request where req_date between ? and ? and emp_code__assign = ?";
...@@ -202,10 +202,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -202,10 +202,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
} }
/*End modify Code by sachin on 13-Jan-16*/ /*End modify Code by sachin on 13-Jan-16*/
pstmt.close();
pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close();
pstmt = null;
//Promised during this period //Promised during this period
//sql = "select count(1) as proms_dur_prd from ser_request where EXP_END_DATE between ? and ? and emp_code__assign = ?"; //sql = "select count(1) as proms_dur_prd from ser_request where EXP_END_DATE between ? and ? and emp_code__assign = ?";
...@@ -242,10 +242,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -242,10 +242,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
rowData.put("promceduringprd", 0); rowData.put("promceduringprd", 0);
} }
/*End modify Code by sachin on 13-Jan-16*/ /*End modify Code by sachin on 13-Jan-16*/
pstmt.close();
pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close();
pstmt = null;
//--- Delivered during this period //--- Delivered during this period
//sql = "select count(1) as del_dur_prd from ser_request where COMP_STAT_DT between ? and ? and emp_code__assign = ? and comp_stat = 'C'"; //sql = "select count(1) as del_dur_prd from ser_request where COMP_STAT_DT between ? and ? and emp_code__assign = ? and comp_stat = 'C'";
...@@ -285,10 +285,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -285,10 +285,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
} }
/*End modify Code by sachin on 13-Jan-16*/ /*End modify Code by sachin on 13-Jan-16*/
pstmt.close();
pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close();
pstmt = null;
// --- Count without a promised date // --- Count without a promised date
System.out.println("***** SQL Start for Count without a promised date**** "); System.out.println("***** SQL Start for Count without a promised date**** ");
...@@ -322,10 +322,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -322,10 +322,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
rowData.put("cntwitpromise", 0); rowData.put("cntwitpromise", 0);
} }
/*End modify Code by sachin on 13-Jan-16*/ /*End modify Code by sachin on 13-Jan-16*/
pstmt.close();
pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close();
pstmt = null;
//--- Count on which work going on //--- Count on which work going on
//sql = "select count(distinct 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 ? "; //sql = "select count(distinct 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 ? ";
...@@ -371,10 +371,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -371,10 +371,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
rowData.put("cntwrkgoing", 0); rowData.put("cntwrkgoing", 0);
} }
/*End modify Code by sachin on 13-Jan-16*/ /*End modify Code by sachin on 13-Jan-16*/
pstmt.close();
pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close();
pstmt = null;
//--- 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
...@@ -429,11 +429,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -429,11 +429,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
} }
/*End Added Code by sachin on 13-Jan-16*/ /*End Added Code by sachin on 13-Jan-16*/
pstmt.close();
pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close();
pstmt = null;
//--- Closing Opening + received - delivered //--- Closing Opening + received - delivered
...@@ -511,10 +510,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -511,10 +510,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
{ {
rowData.put("noreq", 0); rowData.put("noreq", 0);
} }
pstmt.close();
pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close();
pstmt = null;
rowDataPendingTaskJson.put(Integer.valueOf(0), rowData); rowDataPendingTaskJson.put(Integer.valueOf(0), rowData);
System.out.println(" getPendingReqSummary json is =" + rowDataPendingTaskJson); System.out.println(" getPendingReqSummary json is =" + rowDataPendingTaskJson);
...@@ -665,10 +664,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -665,10 +664,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
rowDataPendingTaskJson.put(count, rowData); rowDataPendingTaskJson.put(count, rowData);
count++; count++;
} }
pstmt.close();
pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close();
pstmt = null;
/* End Foe Opening Request * */ /* End Foe Opening Request * */
...@@ -705,10 +704,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -705,10 +704,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
count++; count++;
} }
pstmt.close();
pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close();
pstmt = null;
//Promised during this period //Promised during this period
/* sql = "select count(1) as proms_dur_prd from ser_request where EXP_END_DATE between ? and ? and emp_code__assign = ?"; /* sql = "select count(1) as proms_dur_prd from ser_request where EXP_END_DATE between ? and ? and emp_code__assign = ?";
...@@ -743,10 +742,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -743,10 +742,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
count++; count++;
} }
pstmt.close();
pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close();
pstmt = null;
//--- Delivered during this period //--- Delivered during this period
/* /*
...@@ -786,10 +785,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -786,10 +785,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
count++; count++;
} }
pstmt.close();
pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close();
pstmt = null;
// --- Count without a promised date // --- Count without a promised date
// sql = "select count(1) cnt_wit_prom from ser_request where emp_code__assign = ? and COMP_STAT_DT is null"; // sql = "select count(1) cnt_wit_prom from ser_request where emp_code__assign = ? and COMP_STAT_DT is null";
...@@ -823,10 +822,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -823,10 +822,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
count++; count++;
} }
rs.close();
rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
rs.close();
rs = null;
//--- Count on which work going on //--- Count on which work going on
// sql = "select count(distinct 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 ? "; // sql = "select count(distinct 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 ? ";
...@@ -868,10 +867,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -868,10 +867,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
count++; count++;
} }
rs.close();
rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
rs.close();
rs = null;
//--- 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
...@@ -924,10 +923,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -924,10 +923,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
rowDataPendingTaskJson.put(count, rowData); rowDataPendingTaskJson.put(count, rowData);
count++; count++;
pstmt.close();
pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close();
pstmt = null;
/* sql = " select sum(no_request) as no_req from (select count(1) as no_request from ser_request where " + /* sql = " select sum(no_request) as no_req from (select count(1) as no_request from ser_request where " +
//" req_date between ? and ? " +// commented by swati 05 Dec 2016 //" req_date between ? and ? " +// commented by swati 05 Dec 2016
" req_date < ? "+ // added by swati 05 Dec 2016 " req_date < ? "+ // added by swati 05 Dec 2016
...@@ -1010,10 +1009,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -1010,10 +1009,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
count++; count++;
} }
pstmt.close();
pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close();
pstmt = null;
} }
} catch (Exception e) } catch (Exception e)
...@@ -1275,6 +1274,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -1275,6 +1274,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
rowDataEmpWrkAllJson.put(Integer.valueOf(count), rowData); rowDataEmpWrkAllJson.put(Integer.valueOf(count), rowData);
count++; count++;
} }
rs.close();
rs = null;
pstmt.close();
pstmt = null;
} }
} catch (Exception e) } catch (Exception e)
{ {
...@@ -1490,6 +1493,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -1490,6 +1493,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
rowDataEmpReqEffJson.put(Integer.valueOf(count), rowData); rowDataEmpReqEffJson.put(Integer.valueOf(count), rowData);
count++; count++;
} }
rs.close();
rs = null;
pstmt.close();
pstmt = null;
/* rowData = new JSONObject(); /* rowData = new JSONObject();
rowData.put("employee", ""); rowData.put("employee", "");
rowData.put("req_id", ""); rowData.put("req_id", "");
...@@ -1984,6 +1991,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -1984,6 +1991,10 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
rowData.put("time_lag_descr", "Before Time"); rowData.put("time_lag_descr", "Before Time");
rowDataEmpReqEffJson.put(Integer.valueOf(count), rowData); rowDataEmpReqEffJson.put(Integer.valueOf(count), rowData);
} }
rs.close();
rs = null;
pstmt.close();
pstmt = null;
} }
} catch (Exception e) } catch (Exception e)
......
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