|
|
@ -6,15 +6,16 @@ import java.sql.PreparedStatement; |
|
|
import java.sql.ResultSet; |
|
|
import java.sql.ResultSet; |
|
|
import java.sql.ResultSetMetaData; |
|
|
import java.sql.ResultSetMetaData; |
|
|
import java.sql.SQLException; |
|
|
import java.sql.SQLException; |
|
|
|
|
|
import java.sql.Statement; |
|
|
import java.util.ArrayList; |
|
|
import java.util.ArrayList; |
|
|
|
|
|
import java.util.Collections; |
|
|
import java.util.HashMap; |
|
|
import java.util.HashMap; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
import java.util.Map; |
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection; |
|
|
import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection; |
|
|
|
|
|
import in.gov.chennaicorporation.gccoffice.pgr.dto.DtoAgeAnalysisDaskboard; |
|
|
|
|
|
|
|
|
@Service |
|
|
@Service |
|
|
public class AgeAnalysisDaskboards { |
|
|
public class AgeAnalysisDaskboards { |
|
|
@ -25,6 +26,52 @@ public class AgeAnalysisDaskboards { |
|
|
public String sFrDate =""; |
|
|
public String sFrDate =""; |
|
|
public String sToDate =""; |
|
|
public String sToDate =""; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<DtoAgeAnalysisDaskboard> getAlldtoageanalysisDaskboard() { |
|
|
|
|
|
List<DtoAgeAnalysisDaskboard> complaintdept = new ArrayList<>(); |
|
|
|
|
|
Connection con = DBConnection.getConnection(); |
|
|
|
|
|
Statement stmt = null; |
|
|
|
|
|
ResultSet rs = null; |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
stmt = con.createStatement(); |
|
|
|
|
|
rs = stmt.executeQuery(getdtoageanalysisdaskboardQuery()); |
|
|
|
|
|
|
|
|
|
|
|
while (rs.next()) { |
|
|
|
|
|
DtoAgeAnalysisDaskboard dtoageanalysisdaskboard = new DtoAgeAnalysisDaskboard(); |
|
|
|
|
|
dtoageanalysisdaskboard.setId(rs.getString("id_dept")); |
|
|
|
|
|
dtoageanalysisdaskboard.setName(rs.getString("dept_name")); |
|
|
|
|
|
complaintdept.add(dtoageanalysisdaskboard); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return complaintdept; |
|
|
|
|
|
} catch (SQLException e) { |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
} finally { |
|
|
|
|
|
try { |
|
|
|
|
|
if (rs != null) { |
|
|
|
|
|
rs.close(); |
|
|
|
|
|
} |
|
|
|
|
|
if (stmt != null) { |
|
|
|
|
|
stmt.close(); |
|
|
|
|
|
} |
|
|
|
|
|
if (con != null) { |
|
|
|
|
|
con.close(); |
|
|
|
|
|
} |
|
|
|
|
|
} catch (SQLException e) { |
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return Collections.emptyList(); // Return an empty list if there's an error |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private String getdtoageanalysisdaskboardQuery() { |
|
|
|
|
|
return "SELECT Distinct id_dept, dept_name " |
|
|
|
|
|
+ "FROM EG_DEPARTMENT@ERP " |
|
|
|
|
|
+ "ORDER BY id_dept"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String getgenlysisdaskboardQuery(String DEPT_NAME) { |
|
|
public String getgenlysisdaskboardQuery(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, " |
|
|
@ -134,7 +181,4 @@ public class AgeAnalysisDaskboards { |
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |