Commit e1d48320 authored by sshinde's avatar sshinde

Modify sql for pending request dashboard.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99205 ce508802-f39f-4f6c-b175-0d175dae99d5
parent dc699007
...@@ -83,16 +83,16 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -83,16 +83,16 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
toDateInTs = java.sql.Timestamp.valueOf(convertToDbDate.format(simpleDateFormat.parse(toDate)).toString() + " 00:00:00.0"); toDateInTs = java.sql.Timestamp.valueOf(convertToDbDate.format(simpleDateFormat.parse(toDate)).toString() + " 00:00:00.0");
System.out.println("getPendingReqSummary Date : From Date: "+frmDateInTs+" To Date: "+toDateInTs); System.out.println("getPendingReqSummary Date : From Date: "+frmDateInTs+" To Date: "+toDateInTs);
} }
/* Foe Opening Request * */ /* For Opening Request * */
if((frmDateInTs!=null && frmDateInTs.toString().length()>0) if((frmDateInTs!=null && frmDateInTs.toString().length()>0)
&& (toDateInTs!=null && toDateInTs.toString().length()>0) && (toDateInTs!=null && toDateInTs.toString().length()>0)
&& (empCode!=null && empCode.trim().length()>0) ) && (empCode!=null && empCode.trim().length()>0) )
{ {
sql = "select count(1) opening_request from ser_request where req_date between ? and ? and emp_code__assign = ? and comp_stat <> 'C'"; sql = "select count(1) opening_request from ser_request where req_date < ? and emp_code__assign = ? and comp_stat <> 'C'";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, frmDateInTs); pstmt.setTimestamp(1, frmDateInTs);
pstmt.setTimestamp(2, toDateInTs); // pstmt.setTimestamp(2, toDateInTs);
pstmt.setString(3, empCode); pstmt.setString(2, empCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) if (rs.next())
{ {
...@@ -160,7 +160,7 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas ...@@ -160,7 +160,7 @@ public class ManagmentDashboard implements ManagmentDashboardLocal, ManagmentDas
// --- 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 EXP_END_DATE is null";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode); pstmt.setString(1, empCode);
......
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