Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
rahuldevgarg committed Oct 18, 2023
2 parents db0cc53 + 2afc573 commit cd654f8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ public WaterConnectionResponse getWaterConnectionList(SearchCriteria criteria, R
connectionResponse = WaterConnectionResponse.builder().waterConnection(waterConnectionList)
.totalCount(openWaterRowMapper.getFull_count()).build();
} else {

log.info("HouseHold Register Query",query);
log.info("Prepared Statement of household register ",preparedStatement.toArray());
waterConnectionList = jdbcTemplate.query(query, preparedStatement.toArray(), waterRowMapper);
Map<String, Object> counter = new HashMap();
if (criteria.getIsPropertyCount()!= null && criteria.getIsPropertyCount()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class WsQueryBuilder {
+ " conn.locality, conn.isoldapplication, conn.roadtype, document.id as doc_Id, document.documenttype, document.filestoreid, document.active as doc_active, plumber.id as plumber_id,"
+ " plumber.name as plumber_name, plumber.licenseno, roadcuttingInfo.id as roadcutting_id, roadcuttingInfo.roadtype as roadcutting_roadtype, roadcuttingInfo.roadcuttingarea as roadcutting_roadcuttingarea, roadcuttingInfo.roadcuttingarea as roadcutting_roadcuttingarea,"
+ " roadcuttingInfo.active as roadcutting_active, plumber.mobilenumber as plumber_mobileNumber, plumber.gender as plumber_gender, plumber.fatherorhusbandname, plumber.correspondenceaddress,"
+ " plumber.relationship, " + "{holderSelectValues}, " + "{pendingAmountValue}," + "{lastDemandDate}"
+ " plumber.relationship, " + "{holderSelectValues}, " + "{pendingAmountValue}," + "{taxamount}, "+ "{lastDemandDate}"
+ " FROM eg_ws_connection conn " + INNER_JOIN_STRING + " eg_ws_service wc ON wc.connection_id = conn.id"
+ LEFT_OUTER_JOIN_STRING + "eg_ws_applicationdocument document ON document.wsid = conn.id"
+ LEFT_OUTER_JOIN_STRING + "eg_ws_plumberinfo plumber ON plumber.wsid = conn.id" + LEFT_OUTER_JOIN_STRING
Expand Down Expand Up @@ -474,6 +474,10 @@ private String addPaginationWrapper(String query, List<Object> preparedStmtList,
}
finalQuery = finalQuery.replace("{pendingAmountValue}",
"(select sum(dd.taxamount) - sum(dd.collectionamount) as pendingamount from egbs_demand_v1 d join egbs_demanddetail_v1 dd on d.id = dd.demandid group by d.consumercode, d.status having d.status = 'ACTIVE' and d.consumercode = conn.connectionno ) as pendingamount");

finalQuery=finalQuery.replace("{taxamount}",
"(select sum(dd.taxamount) as taxamount from egbs_demand_v1 d join egbs_demanddetail_v1 dd on d.id=dd.demandid group by d.consumercode,d.status having d.status ='ACTIVE' and d.consumercode=conn.connectionno ) as taxamount");

finalQuery = finalQuery.replace("{lastDemandDate}",
"(select d.taxperiodto as taxperiodto from egbs_demand_v1 d where d.consumercode = conn.connectionno order by d.createdtime desc limit 1) as taxperiodto");
if (criteria.getLimit() == null && criteria.getOffset() == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public List<WaterConnection> extractData(ResultSet rs) throws SQLException, Data
additionalDetails.put(WCConstants.LOCALITY, rs.getString("locality"));
additionalDetails.put("collectionAmount", rs.getString("collectionamount"));
additionalDetails.put("collectionPendingAmount", rs.getString("pendingamount"));
additionalDetails.put("totalamount",rs.getString("taxamount"));
additionalDetails.put("lastDemandGeneratedDate", rs.getString("taxperiodto"));

currentWaterConnection.setAdditionalDetails(additionalDetails);
Expand Down

0 comments on commit cd654f8

Please sign in to comment.