From f338c88721d32ebf45cffc10947443d7e79e3994 Mon Sep 17 00:00:00 2001 From: shubhang-eGov <70943369+shubhang-eGov@users.noreply.github.com> Date: Tue, 28 Jan 2025 15:47:30 +0530 Subject: [PATCH] Removed duplicate code due to conflict (#1888) Co-authored-by: Shailesh Pandey <110380977+shailesh-egov@users.noreply.github.com> --- .../adapter/config/MuktaAdaptorConfig.java | 6 ----- .../service/PaymentInstructionService.java | 24 ------------------- 2 files changed, 30 deletions(-) diff --git a/reference-adapters/mukta-ifix-adapter/src/main/java/org/egov/works/mukta/adapter/config/MuktaAdaptorConfig.java b/reference-adapters/mukta-ifix-adapter/src/main/java/org/egov/works/mukta/adapter/config/MuktaAdaptorConfig.java index 0c123cb2bd..82555d5c9e 100644 --- a/reference-adapters/mukta-ifix-adapter/src/main/java/org/egov/works/mukta/adapter/config/MuktaAdaptorConfig.java +++ b/reference-adapters/mukta-ifix-adapter/src/main/java/org/egov/works/mukta/adapter/config/MuktaAdaptorConfig.java @@ -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}") diff --git a/reference-adapters/mukta-ifix-adapter/src/main/java/org/egov/works/mukta/adapter/service/PaymentInstructionService.java b/reference-adapters/mukta-ifix-adapter/src/main/java/org/egov/works/mukta/adapter/service/PaymentInstructionService.java index 88c0bbcd6c..ea6ac68ede 100644 --- a/reference-adapters/mukta-ifix-adapter/src/main/java/org/egov/works/mukta/adapter/service/PaymentInstructionService.java +++ b/reference-adapters/mukta-ifix-adapter/src/main/java/org/egov/works/mukta/adapter/service/PaymentInstructionService.java @@ -405,28 +405,4 @@ public void pushPIToIndex(RequestInfo requestInfo, PaymentInstruction pi) { } } - public List processCreatePayment(BillSearchRequest billSearchRequest) { - List bills = billUtils.fetchBillsData(billSearchRequest); - List 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 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; - } }