|
|
@ -24,8 +24,8 @@ public class ReopenZoneWiseDaskboards { |
|
|
@Autowired |
|
|
@Autowired |
|
|
DBConnection dbcon; |
|
|
DBConnection dbcon; |
|
|
|
|
|
|
|
|
public String sFrDate =""; |
|
|
|
|
|
public String sToDate =""; |
|
|
|
|
|
|
|
|
public String sFrDate ; |
|
|
|
|
|
public String sToDate ; |
|
|
public List<Dtoworeopen> getAlldtozwreopen() { |
|
|
public List<Dtoworeopen> getAlldtozwreopen() { |
|
|
List<Dtoworeopen> complaintdept = new ArrayList<>(); |
|
|
List<Dtoworeopen> complaintdept = new ArrayList<>(); |
|
|
Connection con = DBConnection.getConnection(); |
|
|
Connection con = DBConnection.getConnection(); |
|
|
@ -72,7 +72,7 @@ private String getdtozwreopenQuery() { |
|
|
+ "ORDER BY id_dept"; |
|
|
+ "ORDER BY id_dept"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public String getReopenZonewisedaskboardQuery(String DEPTID) { |
|
|
|
|
|
|
|
|
public String getReopenZonewisedaskboardQuery(String sFrDate,String sToDate,String DEPTID) { |
|
|
String sQry = "SELECT * FROM (SELECT a.deptid, " + |
|
|
String sQry = "SELECT * FROM (SELECT a.deptid, " + |
|
|
"nvl(sum(case when complainttype in (52,146) then 1 end),0) as \"NonBURSTLT\", " + |
|
|
"nvl(sum(case when complainttype in (52,146) then 1 end),0) as \"NonBURSTLT\", " + |
|
|
"nvl(sum(case when complainttype in (1,97) then 1 end),0) as \"REOFGAR\", " + |
|
|
"nvl(sum(case when complainttype in (1,97) then 1 end),0) as \"REOFGAR\", " + |
|
|
@ -99,7 +99,7 @@ private String getdtozwreopenQuery() { |
|
|
if (sToDate == null || sToDate.equals("")) { |
|
|
if (sToDate == null || sToDate.equals("")) { |
|
|
sToDate = sFrDate; |
|
|
sToDate = sFrDate; |
|
|
} |
|
|
} |
|
|
sQry += "trunc(complaintdate) BETWEEN to_date('" + sFrDate + "','dd/mm/yyyy') AND to_date('" + sToDate + "','dd/mm/yyyy') AND "; |
|
|
|
|
|
|
|
|
sQry += "trunc(complaintdate) BETWEEN to_date('" + sFrDate + "','yyyy/mm/dd') AND to_date('" + sToDate + "','yyyy/mm/dd') AND "; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
sQry += "a.complaintid = b.complaintid AND b.COMPLAINTSTATUSID IN (2,3,4) AND TRUNC(COMPLAINTDATE) >= trunc(sysdate-730) " + |
|
|
sQry += "a.complaintid = b.complaintid AND b.COMPLAINTSTATUSID IN (2,3,4) AND TRUNC(COMPLAINTDATE) >= trunc(sysdate-730) " + |
|
|
@ -125,7 +125,7 @@ private String getdtozwreopenQuery() { |
|
|
if (sToDate == null || sToDate.equals("")) { |
|
|
if (sToDate == null || sToDate.equals("")) { |
|
|
sToDate = sFrDate; |
|
|
sToDate = sFrDate; |
|
|
} |
|
|
} |
|
|
sQry += "AND trunc(complaintdate) BETWEEN to_date('" + sFrDate + "','dd/mm/yyyy') AND to_date('" + sToDate + "','dd/mm/yyyy') "; |
|
|
|
|
|
|
|
|
sQry += "AND trunc(complaintdate) BETWEEN to_date('" + sFrDate + "','yyyy/mm/dd') AND to_date('" + sToDate + "','yyyy/mm/dd') "; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (DEPTID != null && !DEPTID.equals("0")) { |
|
|
if (DEPTID != null && !DEPTID.equals("0")) { |
|
|
@ -144,11 +144,11 @@ private String getdtozwreopenQuery() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<Map<String, Object>> getReopenZonewisedashboardquery(String DEPTID) { |
|
|
|
|
|
|
|
|
public List<Map<String, Object>> getReopenZonewisedashboardquery(String sFrDate,String sToDate,String DEPTID) { |
|
|
Connection con = DBConnection.getConnection(); |
|
|
Connection con = DBConnection.getConnection(); |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
String query = getReopenZonewisedaskboardQuery(DEPTID); |
|
|
|
|
|
|
|
|
String query = getReopenZonewisedaskboardQuery(sFrDate,sToDate,DEPTID); |
|
|
|
|
|
|
|
|
PreparedStatement pstmt = con.prepareStatement(query); |
|
|
PreparedStatement pstmt = con.prepareStatement(query); |
|
|
|
|
|
|
|
|
|