diff --git a/clearing-parent/gateway-api/src/main/java/ru/spcex/clearing/gatewayapi/service/GatewayService.java b/clearing-parent/gateway-api/src/main/java/ru/spcex/clearing/gatewayapi/service/GatewayService.java index fe4ca1f5b..e77461afe 100644 --- a/clearing-parent/gateway-api/src/main/java/ru/spcex/clearing/gatewayapi/service/GatewayService.java +++ b/clearing-parent/gateway-api/src/main/java/ru/spcex/clearing/gatewayapi/service/GatewayService.java @@ -242,12 +242,11 @@ public class GatewayService extends QueueConsumer implements InitializingBean { return; } - String finalReportKey = defineExtTypeName(reportType); Map content = new HashMap<>(); reportRequest.getReports().forEach(reportPart -> makeContentByReportRequest(content, reportPart)); OutboundRequest outboundRequest = OutboundRequestBuilder.builder() - .section(reportType == ReportType.REPORT_KS_VALUE ? Section.CURR.getKey() : Section.FOND.getKey()) - .type(finalReportKey) + .section(reportType == ReportType.REPORT_KS_VALUE_OUTER ? Section.CURR.getKey() : Section.FOND.getKey()) + .type(reportType.getKey()) .clearingSystem(clearingSystemValue) .content(content).build(); @@ -370,16 +369,4 @@ public class GatewayService extends QueueConsumer implements InitializingBean { httpHeaders.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON)); return new HttpEntity<>(outboundRequest, httpHeaders); } - - private String defineExtTypeName(ReportType reportType) { - String finalReportKey = reportType.getKey(); - if (!clearingSystemValue.equals("SPVB")) { - if (reportType == ReportType.REPORT_KS_FINAL) { - finalReportKey = "REPORT_KS_OUTER"; - } else if (reportType == ReportType.REPORT_KS_VALUE) { - finalReportKey = "REPORT_KS_VALUE_OUTER"; - } - } - return finalReportKey; - } } diff --git a/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/services/ReportService.java b/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/services/ReportService.java index b85e4b78f..239111945 100644 --- a/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/services/ReportService.java +++ b/clearing-parent/reports-service/src/main/java/ru/spcex/clearing/reports/services/ReportService.java @@ -346,7 +346,7 @@ public class ReportService extends QueueConsumerV2 implements InitializingBean { Map outFiles = createReportsForTask(List.of(), reportBuildersForGREC.values()); - sendReportsToGateway(List.of(), outFiles, ReportType.REPORT_KS_VALUE.getKey()); + sendReportsToGateway(List.of(), outFiles, ReportType.REPORT_KS_OUTER.getKey()); sendFilesToSftp(outFiles.keySet()); } catch (Exception e) { log.error("Unexpected exception", e); @@ -364,7 +364,7 @@ public class ReportService extends QueueConsumerV2 implements InitializingBean { Map outFiles = createReportsForTask(List.of(), reportBuildersForCX84.values()); - sendReportsToGateway(List.of(), outFiles, ReportType.REPORT_KS_VALUE.getKey()); + sendReportsToGateway(List.of(), outFiles, ReportType.REPORT_KS_VALUE_OUTER.getKey()); sendFilesToSftp(outFiles.keySet()); } catch (Exception e) { log.error("Unexpected exception", e); diff --git a/platform-parent/platform-enum/src/main/java/ru/spcex/platform/enumeration/ReportType.java b/platform-parent/platform-enum/src/main/java/ru/spcex/platform/enumeration/ReportType.java index dc4ba8029..ad7723c4f 100644 --- a/platform-parent/platform-enum/src/main/java/ru/spcex/platform/enumeration/ReportType.java +++ b/platform-parent/platform-enum/src/main/java/ru/spcex/platform/enumeration/ReportType.java @@ -11,7 +11,8 @@ public enum ReportType implements IEnumKey { PFX65("PFX65"), REPORT_KS_TMP("REPORT_KS_TMP"), REPORT_KS_FINAL("REPORT_KS_FINAL"), - REPORT_KS_VALUE("REPORT_KS_VALUE"), + REPORT_KS_VALUE_OUTER("REPORT_KS_VALUE_OUTER"), + REPORT_KS_OUTER("REPORT_KS_OUTER"), ;