|
|
@ -2,6 +2,7 @@ |
|
|
package in.gov.chennaicorporation.gccoffice.pgr.service; |
|
|
package in.gov.chennaicorporation.gccoffice.pgr.service; |
|
|
|
|
|
|
|
|
import java.sql.Connection; |
|
|
import java.sql.Connection; |
|
|
|
|
|
|
|
|
import java.sql.PreparedStatement; |
|
|
import java.sql.PreparedStatement; |
|
|
import java.sql.ResultSet; |
|
|
import java.sql.ResultSet; |
|
|
import java.sql.ResultSetMetaData; |
|
|
import java.sql.ResultSetMetaData; |
|
|
@ -66,14 +67,14 @@ public class AgeAnalysisDaskboards { |
|
|
return Collections.emptyList(); // Return an empty list if there's an error |
|
|
return Collections.emptyList(); // Return an empty list if there's an error |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private String getdtoageanalysisdaskboardQuery() { |
|
|
|
|
|
return "SELECT Distinct id_dept, dept_name " |
|
|
|
|
|
|
|
|
private String getdtoageanalysisdaskboardQuery() { |
|
|
|
|
|
return "SELECT id_dept, dept_name " |
|
|
+ "FROM EG_DEPARTMENT@ERP " |
|
|
+ "FROM EG_DEPARTMENT@ERP " |
|
|
|
|
|
+ "WHERE NVL(dept_name, '0') NOT LIKE 'F%' AND dept_name IS NOT NULL " |
|
|
+ "ORDER BY id_dept"; |
|
|
+ "ORDER BY id_dept"; |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public String getgenlysisdaskboardQuery(String DEPT_NAME) { |
|
|
|
|
|
|
|
|
public String getgenlysisdaskboardQuery(String sFrDate,String sToDate,String DEPT_NAME) { |
|
|
String sQry = "SELECT c.dept_name, a.deptid, a.days_90, a.days_90_pen, a.days_90_reopen, " |
|
|
String sQry = "SELECT c.dept_name, a.deptid, a.days_90, a.days_90_pen, a.days_90_reopen, " |
|
|
+ "a.days_61_90, a.days_61_90_pen, a.days_61_90_reopen, " |
|
|
+ "a.days_61_90, a.days_61_90_pen, a.days_61_90_reopen, " |
|
|
+ "a.days_31_60, a.days_31_60_pen, a.days_31_60_reopen, " |
|
|
+ "a.days_31_60, a.days_31_60_pen, a.days_31_60_reopen, " |
|
|
@ -115,7 +116,7 @@ private String getdtoageanalysisdaskboardQuery() { |
|
|
|
|
|
|
|
|
if (!sFrDate.equals("")) { |
|
|
if (!sFrDate.equals("")) { |
|
|
if (sToDate == null || sToDate.equals("")) sToDate = sFrDate; |
|
|
if (sToDate == null || sToDate.equals("")) sToDate = sFrDate; |
|
|
sQry += " AND trunc(a.complaintdate) BETWEEN to_date('" + sFrDate + "','dd/mm/yyyy') AND to_date('" + sToDate + "','dd/mm/yyyy') "; |
|
|
|
|
|
|
|
|
sQry += " AND trunc(a.complaintdate) BETWEEN to_date('" + sFrDate + "','yyyy/mm/dd') AND to_date('" + sToDate + "','yyyy/mm/dd') "; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!sComplainttype.equals("0")) { |
|
|
if (!sComplainttype.equals("0")) { |
|
|
@ -135,10 +136,10 @@ private String getdtoageanalysisdaskboardQuery() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<Map<String, Object>> getdashboardquery(String DEPT_NAME) { |
|
|
|
|
|
|
|
|
public List<Map<String, Object>> getdashboardquery(String sFrDate,String sTodate,String DEPT_NAME) { |
|
|
Connection con = DBConnection.getConnection(); |
|
|
Connection con = DBConnection.getConnection(); |
|
|
try { |
|
|
try { |
|
|
PreparedStatement pstmt = con.prepareStatement(getgenlysisdaskboardQuery(DEPT_NAME)); |
|
|
|
|
|
|
|
|
PreparedStatement pstmt = con.prepareStatement(getgenlysisdaskboardQuery(sFrDate,sTodate,DEPT_NAME)); |
|
|
|
|
|
|
|
|
if (DEPT_NAME != null && !DEPT_NAME.equals("0")) { |
|
|
if (DEPT_NAME != null && !DEPT_NAME.equals("0")) { |
|
|
// Set the parameter value for :deptName |
|
|
// Set the parameter value for :deptName |
|
|
|