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 #805 from egovernments/enableforApsDiv
Browse files Browse the repository at this point in the history
Enable penalty for aps division in punjab
  • Loading branch information
pradeepkumarcm-egov authored Jun 4, 2024
2 parents 43775bd + 2fcb92b commit cf4c392
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,16 @@ public void addPenaltyEventToWaterCalculator(AddPenaltyCriteria penaltyCriteria)
Role role= Role.builder().code(config.getRole()).tenantId(config.getTenantId()).name(config.getRole()).build();
List<Role> roles = new ArrayList<>();
roles.add(role);
log.info("role:"+role);
log.info("roles:"+roles);
User user = User.builder().userName(config.getUserName()).
mobileNumber(config.getUserName()).
uuid(config.getUuid()).
roles(roles).
tenantId(config.getTenantId()).build();
log.info("userInfo:"+user);
log.info("penaltyCriteria:"+penaltyCriteria);
RequestInfo requestInfo= RequestInfo.builder().userInfo(user).build();
PenaltyRequest penaltyRequest = PenaltyRequest.builder().requestInfo(requestInfo).addPenaltyCriteria(penaltyCriteria).build();
log.info("Posting request to add Penalty for tenantid:" +penaltyCriteria.getTenantId());
log.info("Penalty Request"+ penaltyRequest);
if (penaltyCriteria.getTenantId() != null) {
if (penaltyCriteria.getTenantId().equalsIgnoreCase("pb.poohlahjgfid")) {
try {
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
Expand All @@ -96,7 +91,6 @@ public void addPenaltyEventToWaterCalculator(AddPenaltyCriteria penaltyCriteria)
log.info("Error while calling to water calculator service for tenant :" + penaltyCriteria.getTenantId() + " ERROR MESSAGE:" + e.getMessage(), e.getCause());
}
}
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mdms.event.tenantId=pb
egov.wscalculator.host=http://localhost:8083
egov.wscalculator.url=/ws-calculator/waterCalculator/_addPenalty
egov.penalty.enabled= true
egov.penalty.enabled.division.code.list=DIV1038,DIV1001
egov.penalty.enabled.division.code.list=DIV1038

#----------------aspect Configurations----------------#
timestamp.logging.enabled=true
Expand Down

0 comments on commit cf4c392

Please sign in to comment.