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

Commit

Permalink
Merge pull request #809 from egovernments/ISTE-44-pendingIssuesFix
Browse files Browse the repository at this point in the history
ISTE-44-pending issue: added chnages asked by anniket for bill genrat…
  • Loading branch information
pradeepkumarcm-egov authored Jun 14, 2024
2 parents 0749c5d + 0d997a6 commit 9ab94c2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ public void listenDeadLetterTopic(final List<Message<?>> records) {
*/
private void generateDemandInBatch(CalculationReq request, Map<String, Object> masterMap, String errorTopic,
boolean isSendMessage) throws Exception {
for (CalculationCriteria criteria : request.getCalculationCriteria()) {
/*for (CalculationCriteria criteria : request.getCalculationCriteria()) {
Boolean genratedemand = true;
wsCalulationWorkflowValidator.applicationValidation(request.getRequestInfo(), criteria.getTenantId(),
criteria.getConnectionNo(), genratedemand);
}
}*/
System.out.println("Calling Bulk Demand generation connection Number" + request.getCalculationCriteria().get(0).getConnectionNo());
wSCalculationServiceImpl.bulkDemandGeneration(request, masterMap);
/*String connectionNoStrings = request.getCalculationCriteria().stream()
Expand Down Expand Up @@ -517,7 +517,6 @@ private void generateDemandAndSendnotification(RequestInfo requestInfo, String t

public void generateDemandInBulk(CalculationReq calculationReq, String billingCycle, Map<String, Object> masterMap,
boolean isSendMessage,String tenantId) {
log.info("masterMap:"+masterMap);
try {
if(!tenantId.equals(config.getSmsExcludeTenant())) {
generateDemandInBatch(calculationReq, masterMap, billingCycle, isSendMessage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -937,12 +937,12 @@ private List<Demand> updateDemandForCalculation(RequestInfo requestInfo, List<Ca
String businessService = configs.getBusinessService();
WaterConnectionRequest waterConnectionRequest = WaterConnectionRequest.builder()
.waterConnection(calculation.getWaterConnection()).requestInfo(requestInfo).build();
Property property = wsCalculationUtil.getProperty(waterConnectionRequest);
/*Property property = wsCalculationUtil.getProperty(waterConnectionRequest);
String tenantId = calculation.getTenantId();
User owner = property.getOwners().get(0).toCommonUser();
if (!CollectionUtils.isEmpty(waterConnectionRequest.getWaterConnection().getConnectionHolders())) {
owner = waterConnectionRequest.getWaterConnection().getConnectionHolders().get(0).toCommonUser();
}
}*/

List<DemandDetail> demandDetails = new LinkedList<>();
calculation.getTaxHeadEstimates().forEach(taxHeadEstimate -> {
Expand Down Expand Up @@ -1028,7 +1028,7 @@ private List<Demand> updateDemandForCalculation(RequestInfo requestInfo, List<Ca
}*/


if (isForConnectionNo) {
/*if (isForConnectionNo) {
WaterConnection connection = calculation.getWaterConnection();
if (connection == null) {
List<WaterConnection> waterConnectionList = calculatorUtils.getWaterConnection(requestInfo,
Expand All @@ -1050,7 +1050,7 @@ private List<Demand> updateDemandForCalculation(RequestInfo requestInfo, List<Ca
// demand.setPayer(owner);
// }
}
}*/

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ public Calculation getCalculation(RequestInfo requestInfo, CalculationCriteria c
@SuppressWarnings("unchecked")
List<String> billingSlabIds = estimatesAndBillingSlabs.get("billingSlabIds");
WaterConnection waterConnection = criteria.getWaterConnection();
Property property = wSCalculationUtil.getProperty(
WaterConnectionRequest.builder().waterConnection(waterConnection).requestInfo(requestInfo).build());
/*Property property = wSCalculationUtil.getProperty(
WaterConnectionRequest.builder().waterConnection(waterConnection).requestInfo(requestInfo).build());*/

String tenantId = null != property.getTenantId() ? property.getTenantId() : criteria.getTenantId();
String tenantId = criteria.getTenantId();


/*Map<String, TaxHeadCategory> taxHeadCategoryMap = ((List<TaxHeadMaster>) masterMap
Expand Down

0 comments on commit 9ab94c2

Please sign in to comment.