gateway-api добавил запись GATEWAY_RESULT в GatewayService.requestOnReport
This commit is contained in:
parent
55080005c8
commit
7886d13a24
2 changed files with 7 additions and 0 deletions
|
|
@ -261,10 +261,13 @@ public class GatewayService extends QueueConsumer implements InitializingBean {
|
||||||
.section(Section.FOND.getKey())
|
.section(Section.FOND.getKey())
|
||||||
.type(reportType.getKey())
|
.type(reportType.getKey())
|
||||||
.content(content).build();
|
.content(content).build();
|
||||||
|
GatewayResultBuilder gatewayBuilder = GatewayResultBuilder.builder();
|
||||||
|
gatewayBuilder.outboundRequest(outboundRequest);
|
||||||
|
|
||||||
String url = formingInboundUrl(inboundServerSettings.getPathLOCM());
|
String url = formingInboundUrl(inboundServerSettings.getPathLOCM());
|
||||||
HttpEntity<OutboundRequest> r = makeDefaultRequest(outboundRequest);
|
HttpEntity<OutboundRequest> r = makeDefaultRequest(outboundRequest);
|
||||||
ResponseEntity<SuccessResponse> response = restTemplate.exchange(url, HttpMethod.POST, r, SuccessResponse.class);
|
ResponseEntity<SuccessResponse> response = restTemplate.exchange(url, HttpMethod.POST, r, SuccessResponse.class);
|
||||||
|
gatewayResultImdg.insert(gatewayBuilder.build());
|
||||||
SuccessResponse bodyResponse = response.getBody();
|
SuccessResponse bodyResponse = response.getBody();
|
||||||
if (bodyResponse != null) {
|
if (bodyResponse != null) {
|
||||||
log.debug("Response from service: {}", bodyResponse);
|
log.debug("Response from service: {}", bodyResponse);
|
||||||
|
|
|
||||||
|
|
@ -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.clearing.platform.messaging.serialization.LogFormatter;
|
||||||
import ru.spcex.platform.enumeration.InOutDirection;
|
import ru.spcex.platform.enumeration.InOutDirection;
|
||||||
import ru.spcex.platform.enumeration.Section;
|
import ru.spcex.platform.enumeration.Section;
|
||||||
|
import ru.spcex.platform.utils.enumeration.IEnumKey;
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
|
||||||
|
|
@ -39,6 +40,9 @@ public class GatewayResultBuilder {
|
||||||
this.nameRequest = getNameReqByAsset(section, direction);
|
this.nameRequest = getNameReqByAsset(section, direction);
|
||||||
else if (OutboundRequestType.FILL_LIMITS.equalsByKey(outboundRequest.getType()))
|
else if (OutboundRequestType.FILL_LIMITS.equalsByKey(outboundRequest.getType()))
|
||||||
this.nameRequest = getNameReqByLim(section);
|
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;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue