|
|
|
|
@ -1,10 +1,10 @@
|
|
|
|
|
package com.mfsys.aconnect.client.service;
|
|
|
|
|
|
|
|
|
|
import com.mfsys.aconnect.client.dto.*;
|
|
|
|
|
import com.mfsys.aconnect.configuration.config.WebClientConfig;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.http.*;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
@ -16,9 +16,10 @@ public class PendingDepositApplicationsService {
|
|
|
|
|
@Value("${app.deposit.uri}")
|
|
|
|
|
private String depositURI;
|
|
|
|
|
|
|
|
|
|
private final RestTemplate restTemplate;
|
|
|
|
|
|
|
|
|
|
public PendingDepositApplicationsService(RestTemplate restTemplate) {this.restTemplate = restTemplate;}
|
|
|
|
|
private final WebClientConfig webClientConfig;
|
|
|
|
|
public PendingDepositApplicationsService(WebClientConfig webClientConfig) {
|
|
|
|
|
this.webClientConfig = webClientConfig;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Map<String, Object> param(String columnName, Object columnValue, String columnType, String conditionType) {
|
|
|
|
|
return Map.of("columnName", columnName, "columnValue", columnValue,
|
|
|
|
|
@ -196,13 +197,10 @@ public class PendingDepositApplicationsService {
|
|
|
|
|
headers.set("SUS_USERCODE", susUserCode);
|
|
|
|
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
|
|
|
|
|
|
|
|
|
HttpEntity<LazyListRequestDTO> entity = new HttpEntity<>(payload, headers);
|
|
|
|
|
|
|
|
|
|
return restTemplate.exchange(
|
|
|
|
|
return webClientConfig.postForString(
|
|
|
|
|
url,
|
|
|
|
|
HttpMethod.POST,
|
|
|
|
|
entity,
|
|
|
|
|
String.class
|
|
|
|
|
payload,
|
|
|
|
|
headers
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -219,13 +217,10 @@ public class PendingDepositApplicationsService {
|
|
|
|
|
headers.set("SUS_USERCODE", susUserCode);
|
|
|
|
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
|
|
|
|
|
|
|
|
|
HttpEntity<LazyListRequestDTO> entity = new HttpEntity<>(payload, headers);
|
|
|
|
|
|
|
|
|
|
return restTemplate.exchange(
|
|
|
|
|
return webClientConfig.postForString(
|
|
|
|
|
url,
|
|
|
|
|
HttpMethod.POST,
|
|
|
|
|
entity,
|
|
|
|
|
String.class
|
|
|
|
|
payload,
|
|
|
|
|
headers
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -259,11 +254,10 @@ public class PendingDepositApplicationsService {
|
|
|
|
|
headers.set("SUS_USERCODE", susUserCode);
|
|
|
|
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
|
|
|
|
|
|
|
|
|
return restTemplate.exchange(
|
|
|
|
|
return webClientConfig.postForString(
|
|
|
|
|
url,
|
|
|
|
|
HttpMethod.POST,
|
|
|
|
|
new HttpEntity<>(dto, headers),
|
|
|
|
|
String.class
|
|
|
|
|
dto,
|
|
|
|
|
headers
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -296,11 +290,10 @@ public class PendingDepositApplicationsService {
|
|
|
|
|
headers.set("SUS_USERCODE", susUserCode);
|
|
|
|
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
|
|
|
|
|
|
|
|
|
return restTemplate.exchange(
|
|
|
|
|
return webClientConfig.postForString(
|
|
|
|
|
url,
|
|
|
|
|
HttpMethod.POST,
|
|
|
|
|
new HttpEntity<>(dto, headers),
|
|
|
|
|
String.class
|
|
|
|
|
dto,
|
|
|
|
|
headers
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|