diff --git a/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java b/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java index 47728c986..1bb9f9af4 100644 --- a/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java +++ b/business-services/billing-service/src/main/java/org/egov/demand/service/DemandService.java @@ -228,7 +228,12 @@ public DemandResponse updateAsync(DemandRequest demandRequest, PaymentBackUpdate RequestInfo requestInfo = demandRequest.getRequestInfo(); List demands = demandRequest.getDemands(); + AuditDetails currAuditDetails=demands.get(0).getAuditDetails(); AuditDetails auditDetail = util.getAuditDetail(requestInfo); + if (currAuditDetails != null) { + auditDetail.setCreatedTime(currAuditDetails.getCreatedTime()); + auditDetail.setCreatedBy(currAuditDetails.getCreatedBy()); + } List newDemands = new ArrayList<>(); diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/EnrichmentService.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/EnrichmentService.java index 24a3d3c2c..7c84d8b81 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/EnrichmentService.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/EnrichmentService.java @@ -198,9 +198,13 @@ private List getIdList(RequestInfo requestInfo, String tenantId, String * * @param waterConnectionRequest WaterConnectionRequest Object */ - public void enrichUpdateWaterConnection(WaterConnectionRequest waterConnectionRequest) { + public void enrichUpdateWaterConnection(AuditDetails currentAuditDetails, WaterConnectionRequest waterConnectionRequest) { AuditDetails auditDetails = waterServicesUtil .getAuditDetails(waterConnectionRequest.getRequestInfo().getUserInfo().getUuid(), false); + if (currentAuditDetails != null) { + auditDetails.setCreatedBy(currentAuditDetails.getCreatedBy()); + auditDetails.setCreatedTime(currentAuditDetails.getCreatedTime()); + } waterConnectionRequest.getWaterConnection().setAuditDetails(auditDetails); WaterConnection connection = waterConnectionRequest.getWaterConnection(); if (!CollectionUtils.isEmpty(connection.getDocuments())) { diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java index b0d3c72b8..c8546409b 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/service/WaterServiceImpl.java @@ -240,7 +240,7 @@ public List updateWaterConnection(WaterConnectionRequest waterC throw new CustomException("DUPLICATE_OLD_CONNECTION_NUMBER", "Duplicate Old connection number"); } - + AuditDetails auditDetails=waterConnection.get(0).getAuditDetails(); mDMSValidator.validateMasterData(waterConnectionRequest, WCConstants.UPDATE_APPLICATION); Property property = validateProperty.getOrValidateProperty(waterConnectionRequest); validateProperty.validatePropertyFields(property, waterConnectionRequest.getRequestInfo()); @@ -252,7 +252,7 @@ public List updateWaterConnection(WaterConnectionRequest waterC String previousApplicationStatus = workflowService.getApplicationStatus(waterConnectionRequest.getRequestInfo(), waterConnectionRequest.getWaterConnection().getApplicationNo(), waterConnectionRequest.getWaterConnection().getTenantId(), config.getBusinessServiceValue()); - enrichmentService.enrichUpdateWaterConnection(waterConnectionRequest); + enrichmentService.enrichUpdateWaterConnection(auditDetails, waterConnectionRequest); actionValidator.validateUpdateRequest(waterConnectionRequest, businessService, previousApplicationStatus); waterConnectionValidator.validateUpdate(waterConnectionRequest, searchResult, WCConstants.UPDATE_APPLICATION); userService.updateUser(waterConnectionRequest, searchResult); @@ -331,6 +331,7 @@ private List updateWaterConnectionForModifyFlow(WaterConnection throw new CustomException("DUPLICATE_OLD_CONNECTION_NUMBER", "Duplicate Old connection number"); } + AuditDetails auditDetails=waterConnection.get(0).getAuditDetails(); mDMSValidator.validateMasterData(waterConnectionRequest, WCConstants.MODIFY_CONNECTION); BusinessService businessService = workflowService.getBusinessService( waterConnectionRequest.getWaterConnection().getTenantId(), waterConnectionRequest.getRequestInfo(), @@ -342,7 +343,7 @@ private List updateWaterConnectionForModifyFlow(WaterConnection String previousApplicationStatus = workflowService.getApplicationStatus(waterConnectionRequest.getRequestInfo(), waterConnectionRequest.getWaterConnection().getApplicationNo(), waterConnectionRequest.getWaterConnection().getTenantId(), config.getModifyWSBusinessServiceName()); - enrichmentService.enrichUpdateWaterConnection(waterConnectionRequest); + enrichmentService.enrichUpdateWaterConnection(auditDetails, waterConnectionRequest); actionValidator.validateUpdateRequest(waterConnectionRequest, businessService, previousApplicationStatus); userService.updateUser(waterConnectionRequest, searchResult); waterConnectionValidator.validateUpdate(waterConnectionRequest, searchResult, WCConstants.MODIFY_CONNECTION);