From 5306ac085fa5550a9db36cfb8bfad2ea472230f0 Mon Sep 17 00:00:00 2001 From: Sachi Kuppuswami <34370041+sacsdam@users.noreply.github.com> Date: Thu, 22 Mar 2018 09:46:04 +0000 Subject: [PATCH] PAY-651 ccd reference and Case reference added back into CSV report (#117) --- .../java/uk/gov/hmcts/payment/api/contract/PaymentDto.java | 2 ++ .../java/uk/gov/hmcts/payment/api/reports/FeesService.java | 6 ++++-- .../hmcts/payment/api/reports/PaymentsReportService.java | 2 +- version.txt | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/api-contract/src/main/java/uk/gov/hmcts/payment/api/contract/PaymentDto.java b/api-contract/src/main/java/uk/gov/hmcts/payment/api/contract/PaymentDto.java index 5e5e9d78cc..ee1cde43d3 100644 --- a/api-contract/src/main/java/uk/gov/hmcts/payment/api/contract/PaymentDto.java +++ b/api-contract/src/main/java/uk/gov/hmcts/payment/api/contract/PaymentDto.java @@ -117,6 +117,8 @@ public String toCardPaymentCsv() { .add(getServiceName()) .add(getPaymentGroupReference()) .add(getPaymentReference()) + .add(getCcdCaseNumber()) + .add(getCaseReference()) .add(sdf.format(getDateCreated())) .add(sdf.format(getDateUpdated())) .add(getStatus()) diff --git a/api/src/main/java/uk/gov/hmcts/payment/api/reports/FeesService.java b/api/src/main/java/uk/gov/hmcts/payment/api/reports/FeesService.java index f1ae820bef..3300d0b81c 100644 --- a/api/src/main/java/uk/gov/hmcts/payment/api/reports/FeesService.java +++ b/api/src/main/java/uk/gov/hmcts/payment/api/reports/FeesService.java @@ -61,8 +61,10 @@ public Map> getFeesVersionsData() { public Map getFeesDtoMap() { try { if (feesDtoMap.isEmpty()) { - if (feesRegisterClient.getFeesDataAsMap().isPresent()) - feesDtoMap = feesRegisterClient.getFeesDataAsMap().get(); + Optional> optionalFeesDtoMap = feesRegisterClient.getFeesDataAsMap(); + if (optionalFeesDtoMap.isPresent()) { + feesDtoMap = optionalFeesDtoMap.get(); + } } } catch (Exception ex) { LOG.error("FeesService - Unable to get fees data." + ex.getMessage()); diff --git a/api/src/main/java/uk/gov/hmcts/payment/api/reports/PaymentsReportService.java b/api/src/main/java/uk/gov/hmcts/payment/api/reports/PaymentsReportService.java index ac3910f0a9..cc24e8bfc5 100644 --- a/api/src/main/java/uk/gov/hmcts/payment/api/reports/PaymentsReportService.java +++ b/api/src/main/java/uk/gov/hmcts/payment/api/reports/PaymentsReportService.java @@ -54,7 +54,7 @@ public class PaymentsReportService { private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd-HH-mm-ss"); - private static final String CARD_PAYMENTS_HEADER = "Service,Payment Group reference,Payment reference," + private static final String CARD_PAYMENTS_HEADER = "Service,Payment Group reference,Payment reference,CCD reference,Case reference," + "Payment created date,Payment status updated date,Payment status,Payment channel,Payment method,Payment amount," + "Site id,Fee code,Version,Calculated amount,Memoline,Natural account code," + "Fee code,Version,Calculated amount,Memoline,Natural account code," diff --git a/version.txt b/version.txt index 63a1a1ca3c..8dbb0f26ba 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.1.9 +2.1.10