gateway-api добавил запись GATEWAY_RESULT в GatewayService.requestOnReport

This commit is contained in:
AKurakin 2024-06-24 15:21:21 +03:00
parent 55080005c8
commit 7886d13a24
2 changed files with 7 additions and 0 deletions

View file

@ -261,10 +261,13 @@ public class GatewayService extends QueueConsumer implements InitializingBean {
.section(Section.FOND.getKey())
.type(reportType.getKey())
.content(content).build();
GatewayResultBuilder gatewayBuilder = GatewayResultBuilder.builder();
gatewayBuilder.outboundRequest(outboundRequest);
String url = formingInboundUrl(inboundServerSettings.getPathLOCM());
HttpEntity<OutboundRequest> r = makeDefaultRequest(outboundRequest);
ResponseEntity<SuccessResponse> response = restTemplate.exchange(url, HttpMethod.POST, r, SuccessResponse.class);
gatewayResultImdg.insert(gatewayBuilder.build());
SuccessResponse bodyResponse = response.getBody();
if (bodyResponse != null) {
log.debug("Response from service: {}", bodyResponse);

View file

@ -7,6 +7,7 @@ import ru.spcex.clearing.platform.messaging.domain.cud.clearing.AssetOperationRe
import ru.spcex.clearing.platform.messaging.serialization.LogFormatter;
import ru.spcex.platform.enumeration.InOutDirection;
import ru.spcex.platform.enumeration.Section;
import ru.spcex.platform.utils.enumeration.IEnumKey;
import java.time.Instant;
@ -39,6 +40,9 @@ public class GatewayResultBuilder {
this.nameRequest = getNameReqByAsset(section, direction);
else if (OutboundRequestType.FILL_LIMITS.equalsByKey(outboundRequest.getType()))
this.nameRequest = getNameReqByLim(section);
else if (IEnumKey.contains(outboundRequest.getType(), OutboundRequestType.PFX64, OutboundRequestType.PFX65, OutboundRequestType.REPORT_KS_TMP, OutboundRequestType.REPORT_KS_FINAL)) {
this.nameRequest = "Выгрузка ТКР";
}
return this;
}