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 6810e5766..fe4ca1f5b 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,11 +242,12 @@ 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(reportType.getKey()) + .type(finalReportKey) .clearingSystem(clearingSystemValue) .content(content).build(); @@ -369,4 +370,16 @@ 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; + } }