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

This commit is contained in:
AKurakin 2024-06-24 15:32:05 +03:00
parent 2f0c54ca3c
commit 7c655c2c18
2 changed files with 5 additions and 0 deletions

View file

@ -282,9 +282,12 @@ public class GatewayService extends QueueConsumer implements InitializingBean {
if (reportRequest.getRequestId() != null) {
outboundRequest.setId(reportRequest.getRequestId());
}
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

@ -39,6 +39,8 @@ public class GatewayResultBuilder {
this.nameRequest = getNameReqByAsset(section, direction);
else if (OutboundRequestType.FILL_LIMITS.equalsByKey(outboundRequest.getType()))
this.nameRequest = getNameReqByLim(section);
else if (OutboundRequestType.MEMBER_RESPONSE_TKR.equalsByKey(outboundRequest.getType()))
this.nameRequest = "Выгрузка ТКР";
return this;
}