From 9c5ed8cc9a669d9e60dc345f8d7d152e093d22e8 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Mon, 3 Jun 2024 17:30:04 +0530 Subject: [PATCH] ISTE-163: added changes to mode the load master data outside for loop --- .../egov/wscalculation/consumer/DemandGenerationConsumer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/consumer/DemandGenerationConsumer.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/consumer/DemandGenerationConsumer.java index 19471617b..2e4ba9cfc 100644 --- a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/consumer/DemandGenerationConsumer.java +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/consumer/DemandGenerationConsumer.java @@ -298,6 +298,8 @@ private void generateDemandAndSendnotification(RequestInfo requestInfo, String t previousToDate.add(Calendar.MONTH, -1); int max = previousToDate.getActualMaximum(Calendar.DAY_OF_MONTH); previousToDate.set(Calendar.DAY_OF_MONTH, max); + Map masterMap = mDataService.loadMasterData(requestInfo, + tenantId); String assessmentYear = estimationService.getAssessmentYear(); ArrayList failedConnectionNos = new ArrayList(); @@ -309,8 +311,6 @@ private void generateDemandAndSendnotification(RequestInfo requestInfo, String t CalculationReq calculationReq = CalculationReq.builder().calculationCriteria(calculationCriteriaList) .requestInfo(requestInfo).isconnectionCalculation(true).isAdvanceCalculation(false).build(); - Map masterMap = mDataService.loadMasterData(calculationReq.getRequestInfo(), - calculationReq.getCalculationCriteria().get(0).getTenantId()); Set consumerCodes = new LinkedHashSet(); consumerCodes.add(connectionNo);