Skip to content

Commit

Permalink
Removed duplicate code due to conflict (#1888)
Browse files Browse the repository at this point in the history
Co-authored-by: Shailesh Pandey <110380977+shailesh-egov@users.noreply.github.com>
  • Loading branch information
shubhang-eGov and shailesh-egov authored Jan 28, 2025
1 parent ba1bfd5 commit f338c88
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,6 @@ public class MuktaAdaptorConfig {
@Value("${mukta.ifix.adapter.error.queue.topic}")
private String muktaIfixAdapterErrorQueueTopic;

@Value("${mukta.ifix.adapter.error.queue.topic}")
private String muktaIfixAdapterErrorQueueTopic;

@Value("${mukta.ifix.adapter.error.queue.topic}")
private String muktaIfixAdapterErrorQueueTopic;

@Value("${egov.program.service.host}")
private String programServiceHost;
@Value("${program.service.disbursement.create.endpoint}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,28 +405,4 @@ public void pushPIToIndex(RequestInfo requestInfo, PaymentInstruction pi) {
}
}

public List<Payment> processCreatePayment(BillSearchRequest billSearchRequest) {
List<Bill> bills = billUtils.fetchBillsData(billSearchRequest);
List<Payment> totalPayments = new ArrayList<>();
if (bills == null || bills.isEmpty()) {
throw new CustomException(Error.BILLS_NOT_FOUND, Error.BILLS_NOT_FOUND_MESSAGE);
}
for(Bill bill: bills){
String wfStatus = bill.getWfStatus();
if (bill.getPaymentStatus() == null && wfStatus != null && wfStatus.equalsIgnoreCase(Constants.APPROVED_STATUS)) {
PaymentRequest paymentRequest = paymentService.getPaymentRequest(billSearchRequest.getRequestInfo(), bill);
log.info("Payment request: " + paymentRequest);
// Payment create call
List<Payment> payments = paymentService.createPayment(paymentRequest);
totalPayments.addAll(payments);
if (payments.isEmpty()) {
log.error("Error creating Payment for bill number : " + bill.getBillNumber());
}
}else{
log.error("Bill is not in approved status or payment status is already present for bill number : " + bill.getBillNumber());
throw new CustomException("BILL_NOT_APPROVED", "Bill is not in approved status or payment status is already present for bill number : " + bill.getBillNumber());
}
}
return totalPayments;
}
}

0 comments on commit f338c88

Please sign in to comment.