From 97df349368201c78d385a86b9007a5c25f4b6442 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Tue, 21 May 2024 16:57:24 +0530 Subject: [PATCH 01/18] PFM-5638: Added the PenaltyApplicabledays from penalty master call. --- .../java/org/egov/wscalculation/service/DemandService.java | 6 ++++++ 1 file changed, 6 insertions(+) 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 4016f83e0..efb607432 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 @@ -285,6 +285,9 @@ private List createDemand(RequestInfo requestInfo, List cal .businessService(businessService).status(StatusEnum.valueOf("ACTIVE")).billExpiryTime(expiryDate) .build()); } + //TODO:Write logic to enter in new table + log.info("CREATE DEMAND REQ : "+demands.size()); + log.info("CREATE DEMAND REQ : "+demands); demandRes = demandRepository.saveDemand(requestInfo, demands); finalDemandRes.addAll(demandRes); @@ -945,7 +948,10 @@ private List updateDemandForCalculation(RequestInfo requestInfo, List billNumbers = fetchBill(demands, waterConnectionRequest.getRequestInfo()); From 2581ecc6e0ef04e7f08b3a4d66294719ca735a0e Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Wed, 22 May 2024 11:04:57 +0530 Subject: [PATCH 02/18] ISTE-44: Added demand change audit logs from ws-calculator service --- .../java/org/egov/wscalculation/service/DemandService.java | 3 +++ 1 file changed, 3 insertions(+) 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 efb607432..bb1368666 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 @@ -890,6 +890,9 @@ public List updateDemands(GetBillCriteria getBillCriteria, RequestInfoWr // Call demand update in bulk to update the interest or penalty if(!isGetPenaltyEstimate) { if(demandsToBeUpdated.size() > 0) { + //TODO: add the data + log.info("DEMAND UPDATE FROM UPDATE DEMAND CALL : " +demandsToBeUpdated.size()); + log.info("demandsToBeUpdated : " +demandsToBeUpdated); DemandRequest request = DemandRequest.builder().demands(demandsToBeUpdated).requestInfo(requestInfo).build(); repository.fetchResult(utils.getUpdateDemandUrl(), request); return res.getDemands(); From a676686d76a50b9233967d235e2a54a94a641842 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Wed, 22 May 2024 14:11:35 +0530 Subject: [PATCH 03/18] ISTE-44: Added demand change audit logs from ws-calculator service --- .../config/WSCalculationConfiguration.java | 7 +- .../repository/DemandAuditSeqBuilder.java | 24 +++++ .../wscalculation/service/DemandService.java | 88 +++++++++++++------ .../service/WSCalculationServiceImpl.java | 33 ++++--- .../models/WsDemandChangeAuditRequest.java | 29 ++++++ .../src/main/resources/application.properties | 4 + 6 files changed, 143 insertions(+), 42 deletions(-) create mode 100644 municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/repository/DemandAuditSeqBuilder.java create mode 100644 municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequest.java diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/config/WSCalculationConfiguration.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/config/WSCalculationConfiguration.java index 005fa4286..75be0fb6c 100644 --- a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/config/WSCalculationConfiguration.java +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/config/WSCalculationConfiguration.java @@ -249,5 +249,10 @@ public class WSCalculationConfiguration { @Value("${sms.exclude.tenant}") private String smsExcludeTenant; - + + @Value("${is.save.demand.audit.enabled}") + private boolean isSaveDemandAuditEnabled; + + @Value("${egov.save.demand.audit.from.wsservice}") + private String saveDemandAudit; } diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/repository/DemandAuditSeqBuilder.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/repository/DemandAuditSeqBuilder.java new file mode 100644 index 000000000..8a416f438 --- /dev/null +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/repository/DemandAuditSeqBuilder.java @@ -0,0 +1,24 @@ +package org.egov.wscalculation.repository; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Component; +import org.springframework.stereotype.Repository; + +@Component +@Slf4j +@Repository +public class DemandAuditSeqBuilder { + + @Autowired + private JdbcTemplate jdbcTemplate; + + public static final String SELECT_NEXT_SEQUENCE_USER = "select nextval('seq_eg_ws_demand_auditchange')"; + + public Long getNextSequence() { + return jdbcTemplate.queryForObject(SELECT_NEXT_SEQUENCE_USER, Long.class); + } + + +} 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 bb1368666..3eae1e548 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 @@ -43,6 +43,7 @@ import org.egov.wscalculation.config.WSCalculationConfiguration; import org.egov.wscalculation.constants.WSCalculationConstant; import org.egov.wscalculation.producer.WSCalculationProducer; +import org.egov.wscalculation.repository.DemandAuditSeqBuilder; import org.egov.wscalculation.repository.DemandRepository; import org.egov.wscalculation.repository.ServiceRequestRepository; import org.egov.wscalculation.repository.WSCalculationDao; @@ -51,26 +52,8 @@ import org.egov.wscalculation.util.WSCalculationUtil; import org.egov.wscalculation.validator.WSCalculationValidator; import org.egov.wscalculation.validator.WSCalculationWorkflowValidator; -import org.egov.wscalculation.web.models.BulkDemand; -import org.egov.wscalculation.web.models.Calculation; -import org.egov.wscalculation.web.models.Category; -import org.egov.wscalculation.web.models.Demand; +import org.egov.wscalculation.web.models.*; import org.egov.wscalculation.web.models.Demand.StatusEnum; -import org.egov.wscalculation.web.models.DemandDetail; -import org.egov.wscalculation.web.models.DemandDetailAndCollection; -import org.egov.wscalculation.web.models.DemandPenaltyResponse; -import org.egov.wscalculation.web.models.DemandRequest; -import org.egov.wscalculation.web.models.DemandResponse; -import org.egov.wscalculation.web.models.GetBillCriteria; -import org.egov.wscalculation.web.models.OwnerInfo; -import org.egov.wscalculation.web.models.Property; -import org.egov.wscalculation.web.models.Recipient; -import org.egov.wscalculation.web.models.RequestInfoWrapper; -import org.egov.wscalculation.web.models.SMSRequest; -import org.egov.wscalculation.web.models.TaxHeadEstimate; -import org.egov.wscalculation.web.models.TaxPeriod; -import org.egov.wscalculation.web.models.WaterConnection; -import org.egov.wscalculation.web.models.WaterConnectionRequest; import org.egov.wscalculation.web.models.users.UserDetailResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -147,6 +130,9 @@ public class DemandService { @Autowired private EstimationService estimationService; + @Autowired + private DemandAuditSeqBuilder demandAuditSeqBuilder; + /** * Creates or updates Demand * @@ -285,9 +271,20 @@ private List createDemand(RequestInfo requestInfo, List cal .businessService(businessService).status(StatusEnum.valueOf("ACTIVE")).billExpiryTime(expiryDate) .build()); } - //TODO:Write logic to enter in new table - log.info("CREATE DEMAND REQ : "+demands.size()); - log.info("CREATE DEMAND REQ : "+demands); + if(config.isSaveDemandAuditEnabled()){ + demands.stream().forEach(demand -> { + Long id = demandAuditSeqBuilder.getNextSequence(); + WsDemandChangeAuditRequest req = WsDemandChangeAuditRequest.builder().id(id). + consumercode(demand.getConsumerCode()). + tenant_id(demand.getTenantId()). + status(demand.getStatus().toString()). + action("CREATE DEMAND BULK"). + data((Map) demand). + createdby(demand.getAuditDetails().getCreatedBy()). + createdtime(demand.getAuditDetails().getLastModifiedTime()).build(); + producer.push(config.getSaveDemandAudit(), req); + }); + } demandRes = demandRepository.saveDemand(requestInfo, demands); finalDemandRes.addAll(demandRes); @@ -890,9 +887,20 @@ public List updateDemands(GetBillCriteria getBillCriteria, RequestInfoWr // Call demand update in bulk to update the interest or penalty if(!isGetPenaltyEstimate) { if(demandsToBeUpdated.size() > 0) { - //TODO: add the data - log.info("DEMAND UPDATE FROM UPDATE DEMAND CALL : " +demandsToBeUpdated.size()); - log.info("demandsToBeUpdated : " +demandsToBeUpdated); + if(config.isSaveDemandAuditEnabled()){ + demandsToBeUpdated.stream().forEach(demand -> { + Long id = demandAuditSeqBuilder.getNextSequence(); + WsDemandChangeAuditRequest req = WsDemandChangeAuditRequest.builder().id(id). + consumercode(demand.getConsumerCode()). + tenant_id(demand.getTenantId()). + status(demand.getStatus().toString()). + action("UPDATE DEMAND GET PENALTY/UPDATE API"). + data((Map) demand). + createdby(demand.getAuditDetails().getCreatedBy()). + createdtime(demand.getAuditDetails().getLastModifiedTime()).build(); + producer.push(config.getSaveDemandAudit(), req); + }); + } DemandRequest request = DemandRequest.builder().demands(demandsToBeUpdated).requestInfo(requestInfo).build(); repository.fetchResult(utils.getUpdateDemandUrl(), request); return res.getDemands(); @@ -951,10 +959,22 @@ private List updateDemandForCalculation(RequestInfo requestInfo, List { + Long id = demandAuditSeqBuilder.getNextSequence(); + WsDemandChangeAuditRequest req = WsDemandChangeAuditRequest.builder().id(id). + consumercode(dem.getConsumerCode()). + tenant_id(dem.getTenantId()). + status(dem.getStatus().toString()). + action("UPDATE DEMAND BULK"). + data((Map) dem). + createdby(dem.getAuditDetails().getCreatedBy()). + createdtime(dem.getAuditDetails().getLastModifiedTime()).build(); + producer.push(config.getSaveDemandAudit(), req); + }); + } demandRes = demandRepository.updateDemand(requestInfo, demands); finalDemandRes.addAll(demandRes); List billNumbers = fetchBill(demands, waterConnectionRequest.getRequestInfo()); @@ -1384,6 +1404,20 @@ public int compare(Demand d1, Demand d2) { } log.info("Updated Demand Details " + demands.toString()); + if(config.isSaveDemandAuditEnabled()){ + demands.stream().forEach(demand -> { + Long id = demandAuditSeqBuilder.getNextSequence(); + WsDemandChangeAuditRequest req = WsDemandChangeAuditRequest.builder().id(id). + consumercode(demand.getConsumerCode()). + tenant_id(demand.getTenantId()). + status(demand.getStatus().toString()). + action("UPDATE DEMAND APPLYADHOCTAX"). + data((Map) demand). + createdby(demand.getAuditDetails().getCreatedBy()). + createdtime(demand.getAuditDetails().getLastModifiedTime()).build(); + producer.push(config.getSaveDemandAudit(), req); + }); + } demandRepository.updateDemand(requestInfo, demands); return calculations; } diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java index 04f8dd5da..475104982 100644 --- a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java @@ -17,21 +17,9 @@ import org.egov.wscalculation.config.WSCalculationConfiguration; import org.egov.wscalculation.constants.WSCalculationConstant; import org.egov.wscalculation.producer.WSCalculationProducer; -import org.egov.wscalculation.web.models.AdhocTaxReq; -import org.egov.wscalculation.web.models.BulkDemand; -import org.egov.wscalculation.web.models.Calculation; -import org.egov.wscalculation.web.models.CalculationCriteria; -import org.egov.wscalculation.web.models.CalculationReq; -import org.egov.wscalculation.web.models.Demand; +import org.egov.wscalculation.repository.DemandAuditSeqBuilder; +import org.egov.wscalculation.web.models.*; import org.egov.wscalculation.web.models.Demand.StatusEnum; -import org.egov.wscalculation.web.models.GetBillCriteria; -import org.egov.wscalculation.web.models.TaxHeadCategory; -import org.egov.wscalculation.web.models.Property; -import org.egov.wscalculation.web.models.RequestInfoWrapper; -import org.egov.wscalculation.web.models.TaxHeadEstimate; -import org.egov.wscalculation.web.models.TaxHeadMaster; -import org.egov.wscalculation.web.models.WaterConnection; -import org.egov.wscalculation.web.models.WaterConnectionRequest; import org.egov.wscalculation.web.models.enums.Status; import org.egov.wscalculation.repository.DemandRepository; import org.egov.wscalculation.repository.ServiceRequestRepository; @@ -82,6 +70,9 @@ public class WSCalculationServiceImpl implements WSCalculationService { @Autowired private WSCalculationConfiguration config; + @Autowired + private DemandAuditSeqBuilder demandAuditSeqBuilder; + /** * Get CalculationReq and Calculate the Tax Head on Water Charge And Estimation Charge */ @@ -127,6 +118,20 @@ public List getCalculation(CalculationReq request) { .getWaterConnection().getPreviousReadingDate().longValue())) { searchResult.get(0).setStatus(StatusEnum.CANCELLED); isWSUpdateSMS = true; + if(config.isSaveDemandAuditEnabled()){ + searchResult.stream().forEach(demand -> { + Long id = demandAuditSeqBuilder.getNextSequence(); + WsDemandChangeAuditRequest req = WsDemandChangeAuditRequest.builder().id(id). + consumercode(demand.getConsumerCode()). + tenant_id(demand.getTenantId()). + status(demand.getStatus().toString()). + action("GET CALCULATION UPDATE"). + data((Map) demand). + createdby(demand.getAuditDetails().getCreatedBy()). + createdtime(demand.getAuditDetails().getLastModifiedTime()).build(); + wsCalculationProducer.push(config.getSaveDemandAudit(), req); + }); + } demandRepository.updateDemand(request.getRequestInfo(), searchResult); } diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequest.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequest.java new file mode 100644 index 000000000..aaf5b24d7 --- /dev/null +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequest.java @@ -0,0 +1,29 @@ +package org.egov.wscalculation.web.models; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.NoArgsConstructor; +import lombok.ToString; + +import java.util.Map; + +import static org.apache.commons.lang3.StringUtils.isNotEmpty; + +@AllArgsConstructor +@NoArgsConstructor +@Builder +@ToString +public class WsDemandChangeAuditRequest { + private Long id; + private String consumercode; + private String tenant_id; + private String status; + private String action; + private Map data; + private String createdby; + private Long createdtime; + public boolean isValid() { + + return isNotEmpty(consumercode); + } +} diff --git a/municipal-services/ws-calculator/src/main/resources/application.properties b/municipal-services/ws-calculator/src/main/resources/application.properties index c1860ade8..0aa381c6b 100644 --- a/municipal-services/ws-calculator/src/main/resources/application.properties +++ b/municipal-services/ws-calculator/src/main/resources/application.properties @@ -145,3 +145,7 @@ sms.demand.enabled: true sms.payment.link.enabled: true sms.bill.download.enabled: true sms.exclude.tenant="pb.testing" + +#SAVE DEMAND AUDIT FROM WS_SERVICE +is.save.demand.audit.enabled= true +egov.save.demand.audit.from.wsservice= save-ws-demand-change-audit \ No newline at end of file From 6b35ee8ca702144b2b500cc9213f4b07c9341722 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Wed, 22 May 2024 14:27:41 +0530 Subject: [PATCH 04/18] ISTE-44: Added demand change audit logs from ws-calculator service --- .../egov/wscalculation/config/WSCalculationConfiguration.java | 2 +- .../ws-calculator/src/main/resources/application.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/config/WSCalculationConfiguration.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/config/WSCalculationConfiguration.java index 75be0fb6c..ac8c68890 100644 --- a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/config/WSCalculationConfiguration.java +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/config/WSCalculationConfiguration.java @@ -253,6 +253,6 @@ public class WSCalculationConfiguration { @Value("${is.save.demand.audit.enabled}") private boolean isSaveDemandAuditEnabled; - @Value("${egov.save.demand.audit.from.wsservice}") + @Value("${egov.save.demand.audit.from.wscal}") private String saveDemandAudit; } diff --git a/municipal-services/ws-calculator/src/main/resources/application.properties b/municipal-services/ws-calculator/src/main/resources/application.properties index 0aa381c6b..f5d371823 100644 --- a/municipal-services/ws-calculator/src/main/resources/application.properties +++ b/municipal-services/ws-calculator/src/main/resources/application.properties @@ -148,4 +148,4 @@ sms.exclude.tenant="pb.testing" #SAVE DEMAND AUDIT FROM WS_SERVICE is.save.demand.audit.enabled= true -egov.save.demand.audit.from.wsservice= save-ws-demand-change-audit \ No newline at end of file +egov.save.demand.audit.from.wscal= save-ws-demand-change-audit \ No newline at end of file From 370fb9f9bdc6fda07e3359a9f90c142605e48e3f Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Thu, 23 May 2024 10:39:37 +0530 Subject: [PATCH 05/18] ISTE-44: Added demand change audit db script from ws-calculator service --- ...02405230601__wc_create_demand_audit_ddl.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 municipal-services/ws-calculator/src/main/resources/db/migration/ddl/V202405230601__wc_create_demand_audit_ddl.sql diff --git a/municipal-services/ws-calculator/src/main/resources/db/migration/ddl/V202405230601__wc_create_demand_audit_ddl.sql b/municipal-services/ws-calculator/src/main/resources/db/migration/ddl/V202405230601__wc_create_demand_audit_ddl.sql new file mode 100644 index 000000000..813ea1dbc --- /dev/null +++ b/municipal-services/ws-calculator/src/main/resources/db/migration/ddl/V202405230601__wc_create_demand_audit_ddl.sql @@ -0,0 +1,18 @@ +CREATE TABLE IF NOT EXISTS eg_ws_demand_auditchange ( + id bigint NOT NULL, + consumercode VARCHAR(30) NOT NULL, + tenant_id VARCHAR(50), + status VARCHAR(50), + action VARCHAR(100), + data JSONB, + createdby VARCHAR(250), + createdtime bigint + +); +CREATE SEQUENCE seq_eg_ws_demand_auditchange + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; +ALTER TABLE eg_ws_demand_auditchange ADD CONSTRAINT eg_ws_demand_auditchange_pkey PRIMARY KEY (id); \ No newline at end of file From 1fe1efbfdd28cc52dde91890bf80e1917849f82b Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Thu, 23 May 2024 11:03:51 +0530 Subject: [PATCH 06/18] ISTE-44: Added demand change audit db script from ws-calculator service --- .../main/java/org/egov/wscalculation/service/DemandService.java | 2 +- .../wscalculation/web/models/WsDemandChangeAuditRequest.java | 2 +- 2 files changed, 2 insertions(+), 2 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 3eae1e548..56d9f76fe 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 @@ -279,7 +279,7 @@ private List createDemand(RequestInfo requestInfo, List cal tenant_id(demand.getTenantId()). status(demand.getStatus().toString()). action("CREATE DEMAND BULK"). - data((Map) demand). + data(demand). createdby(demand.getAuditDetails().getCreatedBy()). createdtime(demand.getAuditDetails().getLastModifiedTime()).build(); producer.push(config.getSaveDemandAudit(), req); diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequest.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequest.java index aaf5b24d7..610a0a4c6 100644 --- a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequest.java +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequest.java @@ -19,7 +19,7 @@ public class WsDemandChangeAuditRequest { private String tenant_id; private String status; private String action; - private Map data; + private Object data; private String createdby; private Long createdtime; public boolean isValid() { From a3028b467b8338c6ba00e166b8f7481463c6d092 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Thu, 23 May 2024 11:42:41 +0530 Subject: [PATCH 07/18] ISTE-44: Added demand change audit db script from ws-calculator service --- .../main/java/org/egov/wscalculation/service/DemandService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 56d9f76fe..b6b780a1c 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 @@ -279,7 +279,7 @@ private List createDemand(RequestInfo requestInfo, List cal tenant_id(demand.getTenantId()). status(demand.getStatus().toString()). action("CREATE DEMAND BULK"). - data(demand). + //data(demand). createdby(demand.getAuditDetails().getCreatedBy()). createdtime(demand.getAuditDetails().getLastModifiedTime()).build(); producer.push(config.getSaveDemandAudit(), req); From 0d7ae0fcebf375baa37fd15f4970d67a190f0ce4 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Thu, 23 May 2024 11:54:52 +0530 Subject: [PATCH 08/18] ISTE-44: Added demand change audit db script from ws-calculator service --- .../java/org/egov/wscalculation/service/DemandService.java | 6 +++--- .../wscalculation/service/WSCalculationServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 4 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 b6b780a1c..2c88739ec 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 @@ -895,7 +895,7 @@ public List updateDemands(GetBillCriteria getBillCriteria, RequestInfoWr tenant_id(demand.getTenantId()). status(demand.getStatus().toString()). action("UPDATE DEMAND GET PENALTY/UPDATE API"). - data((Map) demand). + data(demand). createdby(demand.getAuditDetails().getCreatedBy()). createdtime(demand.getAuditDetails().getLastModifiedTime()).build(); producer.push(config.getSaveDemandAudit(), req); @@ -969,7 +969,7 @@ private List updateDemandForCalculation(RequestInfo requestInfo, List) dem). + data(dem). createdby(dem.getAuditDetails().getCreatedBy()). createdtime(dem.getAuditDetails().getLastModifiedTime()).build(); producer.push(config.getSaveDemandAudit(), req); @@ -1412,7 +1412,7 @@ public int compare(Demand d1, Demand d2) { tenant_id(demand.getTenantId()). status(demand.getStatus().toString()). action("UPDATE DEMAND APPLYADHOCTAX"). - data((Map) demand). + data(demand). createdby(demand.getAuditDetails().getCreatedBy()). createdtime(demand.getAuditDetails().getLastModifiedTime()).build(); producer.push(config.getSaveDemandAudit(), req); diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java index 475104982..c7b1d1df3 100644 --- a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java @@ -126,7 +126,7 @@ public List getCalculation(CalculationReq request) { tenant_id(demand.getTenantId()). status(demand.getStatus().toString()). action("GET CALCULATION UPDATE"). - data((Map) demand). + data(demand). createdby(demand.getAuditDetails().getCreatedBy()). createdtime(demand.getAuditDetails().getLastModifiedTime()).build(); wsCalculationProducer.push(config.getSaveDemandAudit(), req); From 7ac1b314372b3d002c1b333e9877072b8146610a Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Thu, 23 May 2024 12:00:32 +0530 Subject: [PATCH 09/18] ISTE-44: Added demand change audit db script from ws-calculator service --- .../egov/wscalculation/consumer/DemandGenerationConsumer.java | 2 -- .../java/org/egov/wscalculation/service/DemandService.java | 4 +++- 2 files changed, 3 insertions(+), 3 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 0aba61a11..5bd669c71 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 @@ -462,14 +462,12 @@ private void generateDemandAndSendnotification(RequestInfo requestInfo, String t String msgLink = config.getNotificationUrl() + config.getGpUserDemandLink(); for (OwnerInfo userInfo : userDetailResponse.getUser()) { - log.info("USER NUMBER:" + userInfo.getMobileNumber() + " USER ROLE:" + userInfo.getRoles()); if (userInfo.getName() != null) { mobileNumberIdMap.put(userInfo.getMobileNumber(), userInfo.getName()); } else { mobileNumberIdMap.put(userInfo.getMobileNumber(), userInfo.getUserName()); } } - log.info("MOBILENUMBER MAPPINNG USERROLE:" +mobileNumberIdMap); mobileNumberIdMap.entrySet().stream().forEach(map -> { String msg = demandMessage.get(WSCalculationConstant.MSG_KEY); msg = msg.replace("{ownername}", map.getValue()); 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 2c88739ec..40419a57d 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 @@ -271,15 +271,17 @@ private List createDemand(RequestInfo requestInfo, List cal .businessService(businessService).status(StatusEnum.valueOf("ACTIVE")).billExpiryTime(expiryDate) .build()); } + if(config.isSaveDemandAuditEnabled()){ demands.stream().forEach(demand -> { Long id = demandAuditSeqBuilder.getNextSequence(); + log.info("Audit details:"+demand.getAuditDetails()); WsDemandChangeAuditRequest req = WsDemandChangeAuditRequest.builder().id(id). consumercode(demand.getConsumerCode()). tenant_id(demand.getTenantId()). status(demand.getStatus().toString()). action("CREATE DEMAND BULK"). - //data(demand). + data(demand). createdby(demand.getAuditDetails().getCreatedBy()). createdtime(demand.getAuditDetails().getLastModifiedTime()).build(); producer.push(config.getSaveDemandAudit(), req); From 95bac7707161541d6def7b5cdc56486ed97bba54 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Thu, 23 May 2024 12:02:56 +0530 Subject: [PATCH 10/18] ISTE-44: Added demand change audit db script from ws-calculator service --- .../main/java/org/egov/wscalculation/service/DemandService.java | 1 + 1 file changed, 1 insertion(+) 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 40419a57d..10abad1c1 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 @@ -276,6 +276,7 @@ private List createDemand(RequestInfo requestInfo, List cal demands.stream().forEach(demand -> { Long id = demandAuditSeqBuilder.getNextSequence(); log.info("Audit details:"+demand.getAuditDetails()); + log.info("request details:"+requestInfo.getUserInfo()); WsDemandChangeAuditRequest req = WsDemandChangeAuditRequest.builder().id(id). consumercode(demand.getConsumerCode()). tenant_id(demand.getTenantId()). From a081c68687df1b8795de6a92a9e1cd9bafab6a9a Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Thu, 23 May 2024 12:19:11 +0530 Subject: [PATCH 11/18] ISTE-44: Added demand change audit db script from ws-calculator service --- .../java/org/egov/wscalculation/service/DemandService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 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 10abad1c1..23238bfa3 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 @@ -283,8 +283,8 @@ private List createDemand(RequestInfo requestInfo, List cal status(demand.getStatus().toString()). action("CREATE DEMAND BULK"). data(demand). - createdby(demand.getAuditDetails().getCreatedBy()). - createdtime(demand.getAuditDetails().getLastModifiedTime()).build(); + createdby(requestInfo.getUserInfo().getUuid()). + createdtime(System.currentTimeMillis()).build(); producer.push(config.getSaveDemandAudit(), req); }); } From 57f1da36f3edcd0994083d987216ea847a7634db Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Thu, 23 May 2024 13:25:32 +0530 Subject: [PATCH 12/18] ISTE-44: Added demand change audit db script from ws-calculator service --- .../wscalculation/service/DemandService.java | 18 ++++++++---------- .../service/WSCalculationServiceImpl.java | 4 ++-- 2 files changed, 10 insertions(+), 12 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 23238bfa3..f00191b4f 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 @@ -275,9 +275,7 @@ private List createDemand(RequestInfo requestInfo, List cal if(config.isSaveDemandAuditEnabled()){ demands.stream().forEach(demand -> { Long id = demandAuditSeqBuilder.getNextSequence(); - log.info("Audit details:"+demand.getAuditDetails()); - log.info("request details:"+requestInfo.getUserInfo()); - WsDemandChangeAuditRequest req = WsDemandChangeAuditRequest.builder().id(id). + WsDemandChangeAuditRequest wsDemandChangeAuditRequest = WsDemandChangeAuditRequest.builder().id(id). consumercode(demand.getConsumerCode()). tenant_id(demand.getTenantId()). status(demand.getStatus().toString()). @@ -285,7 +283,7 @@ private List createDemand(RequestInfo requestInfo, List cal data(demand). createdby(requestInfo.getUserInfo().getUuid()). createdtime(System.currentTimeMillis()).build(); - producer.push(config.getSaveDemandAudit(), req); + producer.push(config.getSaveDemandAudit(), wsDemandChangeAuditRequest); }); } demandRes = demandRepository.saveDemand(requestInfo, demands); @@ -893,7 +891,7 @@ public List updateDemands(GetBillCriteria getBillCriteria, RequestInfoWr if(config.isSaveDemandAuditEnabled()){ demandsToBeUpdated.stream().forEach(demand -> { Long id = demandAuditSeqBuilder.getNextSequence(); - WsDemandChangeAuditRequest req = WsDemandChangeAuditRequest.builder().id(id). + WsDemandChangeAuditRequest wsDemandChangeAuditRequest = WsDemandChangeAuditRequest.builder().id(id). consumercode(demand.getConsumerCode()). tenant_id(demand.getTenantId()). status(demand.getStatus().toString()). @@ -901,7 +899,7 @@ public List updateDemands(GetBillCriteria getBillCriteria, RequestInfoWr data(demand). createdby(demand.getAuditDetails().getCreatedBy()). createdtime(demand.getAuditDetails().getLastModifiedTime()).build(); - producer.push(config.getSaveDemandAudit(), req); + producer.push(config.getSaveDemandAudit(), wsDemandChangeAuditRequest); }); } DemandRequest request = DemandRequest.builder().demands(demandsToBeUpdated).requestInfo(requestInfo).build(); @@ -967,7 +965,7 @@ private List updateDemandForCalculation(RequestInfo requestInfo, List { Long id = demandAuditSeqBuilder.getNextSequence(); - WsDemandChangeAuditRequest req = WsDemandChangeAuditRequest.builder().id(id). + WsDemandChangeAuditRequest wsDemandChangeAuditRequest = WsDemandChangeAuditRequest.builder().id(id). consumercode(dem.getConsumerCode()). tenant_id(dem.getTenantId()). status(dem.getStatus().toString()). @@ -975,7 +973,7 @@ private List updateDemandForCalculation(RequestInfo requestInfo, List { Long id = demandAuditSeqBuilder.getNextSequence(); - WsDemandChangeAuditRequest req = WsDemandChangeAuditRequest.builder().id(id). + WsDemandChangeAuditRequest wsDemandChangeAuditRequest = WsDemandChangeAuditRequest.builder().id(id). consumercode(demand.getConsumerCode()). tenant_id(demand.getTenantId()). status(demand.getStatus().toString()). @@ -1418,7 +1416,7 @@ public int compare(Demand d1, Demand d2) { data(demand). createdby(demand.getAuditDetails().getCreatedBy()). createdtime(demand.getAuditDetails().getLastModifiedTime()).build(); - producer.push(config.getSaveDemandAudit(), req); + producer.push(config.getSaveDemandAudit(), wsDemandChangeAuditRequest); }); } demandRepository.updateDemand(requestInfo, demands); diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java index c7b1d1df3..8aa75f741 100644 --- a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/WSCalculationServiceImpl.java @@ -121,7 +121,7 @@ public List getCalculation(CalculationReq request) { if(config.isSaveDemandAuditEnabled()){ searchResult.stream().forEach(demand -> { Long id = demandAuditSeqBuilder.getNextSequence(); - WsDemandChangeAuditRequest req = WsDemandChangeAuditRequest.builder().id(id). + WsDemandChangeAuditRequest wsDemandChangeAuditRequest = WsDemandChangeAuditRequest.builder().id(id). consumercode(demand.getConsumerCode()). tenant_id(demand.getTenantId()). status(demand.getStatus().toString()). @@ -129,7 +129,7 @@ public List getCalculation(CalculationReq request) { data(demand). createdby(demand.getAuditDetails().getCreatedBy()). createdtime(demand.getAuditDetails().getLastModifiedTime()).build(); - wsCalculationProducer.push(config.getSaveDemandAudit(), req); + wsCalculationProducer.push(config.getSaveDemandAudit(), wsDemandChangeAuditRequest); }); } demandRepository.updateDemand(request.getRequestInfo(), searchResult); From 2e378d7e43da5d2619121f2b186d476f060e226c Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Thu, 23 May 2024 15:14:02 +0530 Subject: [PATCH 13/18] ISTE-44: Added demand change audit db script from ws-calculator service --- .../egov/wscalculation/consumer/DemandGenerationConsumer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 5bd669c71..19471617b 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 @@ -336,7 +336,7 @@ private void generateDemandAndSendnotification(RequestInfo requestInfo, String t } } catch (Exception e) { - System.out.println("Got the exception while genating the demands:" + connectionNo); + System.out.println("Got the exception while genating the demands:" + e); failedConnectionNos.add(connectionNo); } } From 84c182ea06768b89659a8f11a34466bc7cae370d Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Thu, 23 May 2024 17:30:55 +0530 Subject: [PATCH 14/18] ISTE-44: Added demand change audit db script from ws-calculator service --- .../main/java/org/egov/wscalculation/service/DemandService.java | 1 + 1 file changed, 1 insertion(+) 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 f00191b4f..60fd64ab2 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 @@ -283,6 +283,7 @@ private List createDemand(RequestInfo requestInfo, List cal data(demand). createdby(requestInfo.getUserInfo().getUuid()). createdtime(System.currentTimeMillis()).build(); + log.info("wsDemandChangeAuditRequest:"+wsDemandChangeAuditRequest); producer.push(config.getSaveDemandAudit(), wsDemandChangeAuditRequest); }); } From 5c04bbe843c3337a53b9c415d10f50c4202503b6 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Fri, 24 May 2024 10:59:38 +0530 Subject: [PATCH 15/18] ISTE-44: Added demand change audit db script from ws-calculator service --- .../web/models/WsDemandChangeAuditRequest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequest.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequest.java index 610a0a4c6..3fc468037 100644 --- a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequest.java +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequest.java @@ -1,14 +1,13 @@ package org.egov.wscalculation.web.models; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.NoArgsConstructor; -import lombok.ToString; +import lombok.*; import java.util.Map; import static org.apache.commons.lang3.StringUtils.isNotEmpty; + +@Getter @AllArgsConstructor @NoArgsConstructor @Builder From f47749b204edc480d6e20c5839937bd75760465f Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Fri, 24 May 2024 11:19:38 +0530 Subject: [PATCH 16/18] ISTE-44: Added demand change audit db script from ws-calculator service --- .../wscalculation/service/DemandService.java | 5 +++-- .../WsDemandChangeAuditRequestWrapper.java | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequestWrapper.java 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 60fd64ab2..efa25b9fc 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 @@ -283,8 +283,9 @@ private List createDemand(RequestInfo requestInfo, List cal data(demand). createdby(requestInfo.getUserInfo().getUuid()). createdtime(System.currentTimeMillis()).build(); - log.info("wsDemandChangeAuditRequest:"+wsDemandChangeAuditRequest); - producer.push(config.getSaveDemandAudit(), wsDemandChangeAuditRequest); + WsDemandChangeAuditRequestWrapper wsDemandChangeAuditRequestWrapper = WsDemandChangeAuditRequestWrapper.builder().wsDemandChangeAuditRequest(wsDemandChangeAuditRequest).build(); + log.info("WsDemandChangeAuditRequestWrapper:"+wsDemandChangeAuditRequestWrapper); + producer.push(config.getSaveDemandAudit(), wsDemandChangeAuditRequestWrapper); }); } demandRes = demandRepository.saveDemand(requestInfo, demands); diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequestWrapper.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequestWrapper.java new file mode 100644 index 000000000..0b18d6ccd --- /dev/null +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequestWrapper.java @@ -0,0 +1,16 @@ +package org.egov.wscalculation.web.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +@Getter +@AllArgsConstructor +@NoArgsConstructor +@Builder +@ToString +public class WsDemandChangeAuditRequestWrapper { + + @JsonProperty("WsDemandChangeAuditRequestWrapper") + private WsDemandChangeAuditRequest wsDemandChangeAuditRequest; +} From 3504cdd2840dac48548792f1a3c30389800f6839 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Fri, 24 May 2024 11:59:09 +0530 Subject: [PATCH 17/18] ISTE-44: Added demand change audit db script from ws-calculator service --- .../web/models/WsDemandChangeAuditRequestWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequestWrapper.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequestWrapper.java index 0b18d6ccd..fb439dcc1 100644 --- a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequestWrapper.java +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/web/models/WsDemandChangeAuditRequestWrapper.java @@ -11,6 +11,6 @@ @ToString public class WsDemandChangeAuditRequestWrapper { - @JsonProperty("WsDemandChangeAuditRequestWrapper") + @JsonProperty("WsDemandChangeAuditRequest") private WsDemandChangeAuditRequest wsDemandChangeAuditRequest; } From f87fb1371e9314670e511363d2a703abe0985b55 Mon Sep 17 00:00:00 2001 From: debasishchakraborty-egovt Date: Fri, 24 May 2024 12:03:22 +0530 Subject: [PATCH 18/18] ISTE-44: Added demand change audit db script from ws-calculator service --- .../org/egov/wscalculation/service/DemandService.java | 10 ++++++---- .../service/WSCalculationServiceImpl.java | 3 ++- 2 files changed, 8 insertions(+), 5 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 efa25b9fc..75de96d6a 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 @@ -284,7 +284,6 @@ private List createDemand(RequestInfo requestInfo, List cal createdby(requestInfo.getUserInfo().getUuid()). createdtime(System.currentTimeMillis()).build(); WsDemandChangeAuditRequestWrapper wsDemandChangeAuditRequestWrapper = WsDemandChangeAuditRequestWrapper.builder().wsDemandChangeAuditRequest(wsDemandChangeAuditRequest).build(); - log.info("WsDemandChangeAuditRequestWrapper:"+wsDemandChangeAuditRequestWrapper); producer.push(config.getSaveDemandAudit(), wsDemandChangeAuditRequestWrapper); }); } @@ -901,7 +900,8 @@ public List updateDemands(GetBillCriteria getBillCriteria, RequestInfoWr data(demand). createdby(demand.getAuditDetails().getCreatedBy()). createdtime(demand.getAuditDetails().getLastModifiedTime()).build(); - producer.push(config.getSaveDemandAudit(), wsDemandChangeAuditRequest); + WsDemandChangeAuditRequestWrapper wsDemandChangeAuditRequestWrapper = WsDemandChangeAuditRequestWrapper.builder().wsDemandChangeAuditRequest(wsDemandChangeAuditRequest).build(); + producer.push(config.getSaveDemandAudit(), wsDemandChangeAuditRequestWrapper); }); } DemandRequest request = DemandRequest.builder().demands(demandsToBeUpdated).requestInfo(requestInfo).build(); @@ -975,7 +975,8 @@ private List updateDemandForCalculation(RequestInfo requestInfo, List getCalculation(CalculationReq request) { data(demand). createdby(demand.getAuditDetails().getCreatedBy()). createdtime(demand.getAuditDetails().getLastModifiedTime()).build(); - wsCalculationProducer.push(config.getSaveDemandAudit(), wsDemandChangeAuditRequest); + WsDemandChangeAuditRequestWrapper wsDemandChangeAuditRequestWrapper = WsDemandChangeAuditRequestWrapper.builder().wsDemandChangeAuditRequest(wsDemandChangeAuditRequest).build(); + wsCalculationProducer.push(config.getSaveDemandAudit(), wsDemandChangeAuditRequestWrapper); }); } demandRepository.updateDemand(request.getRequestInfo(), searchResult);