From 63944b0b61b1cf8abc4acd488f21a1125a6e7656 Mon Sep 17 00:00:00 2001 From: pradeep-egov Date: Fri, 13 Sep 2024 19:32:03 +0530 Subject: [PATCH] Revert "removed billDate for update consumer" --- .../egov/wscalculation/service/DemandService.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/DemandService.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/DemandService.java index ebf7d78cc..9ed9349a3 100644 --- a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/DemandService.java +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/DemandService.java @@ -971,10 +971,10 @@ private List updateDemandForCalculation(RequestInfo requestInfo, List billNumbers = fetchBill(demands, waterConnectionRequest.getRequestInfo()); -// Long billDate = fetchBillDate(demands,waterConnectionRequest.getRequestInfo()); -// billDate =billDate + 1296000000l; -// LocalDate billDateLocal = Instant.ofEpochMilli(billDate).atZone(ZoneId.systemDefault()).toLocalDate(); -// String paymentDueDate = billDateLocal.format(dateTimeFormatter); + Long billDate = fetchBillDate(demands,waterConnectionRequest.getRequestInfo()); + billDate =billDate + 1296000000l; + LocalDate billDateLocal = Instant.ofEpochMilli(billDate).atZone(ZoneId.systemDefault()).toLocalDate(); + String paymentDueDate = billDateLocal.format(dateTimeFormatter); /*if(isOnlinePaymentAllowed(requestInfo,tenantId)) { if(fetchTotalBillAmount(demands,requestInfo).signum()> 0) { sendPaymentSMSNotification(requestInfo,tenantId,owner,waterConnectionRequest,property,demandDetails,calculation.getConnectionNo(),demands,true,businessService,billCycle,billNumbers,paymentDueDate); @@ -1326,10 +1326,7 @@ public Long fetchBillDate(List demandResponse, RequestInfo requestInfo) log.error("Fetch Bill Error", ex); } } - if(!CollectionUtils.isEmpty(billDate)) - return billDate.get(0); - else - return null; + return billDate.get(0); } /**