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 #987 from egovernments/Taniya-createdDateIssue
Browse files Browse the repository at this point in the history
Created date issue
  • Loading branch information
debasishchakraborty-egovt authored Oct 25, 2024
2 parents f69c34f + 77b818d commit 51a8bfb
Showing 1 changed file with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,13 @@ public DemandResponse updateAsync(DemandRequest demandRequest, PaymentBackUpdate
*/
newDemands.add(demand);
} else {
AuditDetails currAuditDetails = demand.getAuditDetails();
if (currAuditDetails != null) {
auditDetail.setCreatedTime(currAuditDetails.getCreatedTime());
auditDetail.setCreatedBy(currAuditDetails.getCreatedBy());
AuditDetails updateAuditDetail = util.getAuditDetail(requestInfo);
AuditDetails demandAuditDetails = demand.getAuditDetails();
if (demandAuditDetails != null) {
updateAuditDetail.setCreatedTime(demandAuditDetails.getCreatedTime());
updateAuditDetail.setCreatedBy(demandAuditDetails.getCreatedBy());
}
demand.setAuditDetails(auditDetail);
demand.setAuditDetails(updateAuditDetail);
for (DemandDetail detail : demand.getDemandDetails()) {

if (StringUtils.isEmpty(detail.getId())) {
Expand All @@ -265,7 +266,13 @@ public DemandResponse updateAsync(DemandRequest demandRequest, PaymentBackUpdate
detail.setId(UUID.randomUUID().toString());
detail.setCollectionAmount(BigDecimal.ZERO);
}
detail.setAuditDetails(auditDetail);
AuditDetails demandDetailAuditDetail = detail.getAuditDetails();
if (demandDetailAuditDetail != null) {
updateAuditDetail.setCreatedTime(demandDetailAuditDetail.getCreatedTime());
updateAuditDetail.setCreatedBy(demandDetailAuditDetail.getCreatedBy());
}

detail.setAuditDetails(updateAuditDetail);
detail.setDemandId(demandId);
detail.setTenantId(demand.getTenantId());
}
Expand Down

0 comments on commit 51a8bfb

Please sign in to comment.