Commit 99c177d0 authored by 张俊's avatar 张俊

转发程序开发

parent ff36fb7b
......@@ -26,7 +26,6 @@ import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Properties;
/**
......@@ -42,8 +41,12 @@ public class DeptInfoUpdateController {
@Resource
private DruidDataSource druidDataSource;
@Value("${frontEndProcessorServer}")
private String frontEndProcessorServer;
@Value("${dwxxbgPullUrl}")
private String dwxxbgPullUrl;
@Value("${dwxxbgPushUrl}")
private String dwxxbgPushUrl;
@Value("${timetype}")
private String timetype;
......@@ -76,9 +79,8 @@ public class DeptInfoUpdateController {
jsonObject.put("app_id", "eb453ca78b354f2c9163a703530f5186");
jsonObject.put("app_secret", "9a31b84878654a72a999e38ef55aa186");
String str = jsonObject.toString();
String providentFundServices = frontEndProcessorServer + "/FrontEndProcessor/FrontEndProcessor/ProvidentFundServices";
//(测试环境地址)调用前置机将业务机封装的业务json数据发给前置机,让前置机去请求第三方的公积金系统服务接口
String forObject = restTemplate.postForObject(providentFundServices, str, String.class);
String forObject = restTemplate.postForObject(dwxxbgPullUrl, str, String.class);
return forObject;
}
......@@ -256,9 +258,8 @@ public class DeptInfoUpdateController {
jsonObject.put("nodeList", collDwxxbgList);
String str = jsonObject.toString();
String businessprocessingUrl = frontEndProcessorServer + "/FrontEndProcessor/FrontEndProcessor/BusinessProcessing";
//(测试环境)调用前置机将业务机封装的业务json数据发给前置机,让前置机去请求第三方的公积金系统服务接口
String forObject = restTemplate.postForObject(businessprocessingUrl, str, String.class);
String forObject = restTemplate.postForObject(dwxxbgPushUrl, str, String.class);
log.info("前置机返回第三方解压之后的进度推送结果:{}", forObject);
JSONObject jsonObj = JSONObject.parseObject(forObject);
Integer value = "true".equals(jsonObj.getString("success")) ? 1 : 0;
......
......@@ -44,8 +44,11 @@ public class DeptLogoutController {
@Resource
private DruidDataSource druidDataSource;
@Value("${frontEndProcessorServer}")
private String frontEndProcessorServer;
@Value("${dwxhPullUrl}")
private String dwxhPullUrl;
@Value("${dwxhPushUrl}")
private String dwxhPushUrl;
@Value("${timetype}")
private String timetype;
......@@ -78,9 +81,8 @@ public class DeptLogoutController {
jsonObject.put("app_id", "eb453ca78b354f2c9163a703530f5186");
jsonObject.put("app_secret", "9a31b84878654a72a999e38ef55aa186");
String str = jsonObject.toString();
String providentFundServices = frontEndProcessorServer + "/FrontEndProcessor/FrontEndProcessor/ProvidentFundServices";
//(测试环境地址)调用前置机将业务机封装的业务json数据发给前置机,让前置机去请求第三方的公积金系统服务接口
String forObject = restTemplate.postForObject(providentFundServices, str, String.class);
String forObject = restTemplate.postForObject(dwxhPullUrl, str, String.class);
return forObject;
}
......@@ -96,8 +98,7 @@ public class DeptLogoutController {
@PostMapping("/dwxhPull")
public AjaxResult dwxhPull() {
// 1.调用公积金系统服务接口方法,请求前置机,让前置机请求市监接口,拿到市监返回的开户信息json数据,经过前置机zip解压返回给本内置机处理
// String dwxhHttp = getDwxhHttp();
String dwxhHttp = mockDwxhHttp();
String dwxhHttp = getDwxhHttp();
log.info("拿到第一个接口返回的第三方数据:{}", dwxhHttp);
Json jsonentity = JSONObject.parseObject(dwxhHttp, Json.class);
List<UnitAccountOpeningInformation> bills = null;
......@@ -218,9 +219,8 @@ public class DeptLogoutController {
jsonObject.put("nodeList", collDwxhList);
String str = jsonObject.toString();
String businessprocessingUrl = frontEndProcessorServer + "/FrontEndProcessor/FrontEndProcessor/BusinessProcessing";
//(测试环境)调用前置机将业务机封装的业务json数据发给前置机,让前置机去请求第三方的公积金系统服务接口
String forObject = restTemplate.postForObject(businessprocessingUrl, str, String.class);
String forObject = restTemplate.postForObject(dwxhPushUrl, str, String.class);
log.info("前置机返回第三方解压之后的进度推送结果:{}", forObject);
JSONObject jsonObj = JSONObject.parseObject(forObject);
Integer value = "true".equals(jsonObj.getString("success")) ? 1 : 0;
......
......@@ -33,8 +33,12 @@ public class ProvidentFundServicesController {
@Resource
private DruidDataSource dataSource;
@Value("${frontEndProcessorServer}")
private String frontEndProcessorServer;
@Value("${dwkhPullUrl}")
private String dwkhPullUrl;
@Value("${dwkhPushUrl}")
private String dwkhPushUrl;
@Value("${timetype}")
private String timetype;
......@@ -66,9 +70,8 @@ public class ProvidentFundServicesController {
jsonObject.put("app_id", "eb453ca78b354f2c9163a703530f5186");
jsonObject.put("app_secret", "9a31b84878654a72a999e38ef55aa186");
String str = jsonObject.toString();
String spec = frontEndProcessorServer + "/FrontEndProcessor/FrontEndProcessor/ProvidentFundServices";
// 发起 post 请求
return HttpUtil.sendPost(spec, str);
return HttpUtil.sendPost(dwkhPullUrl, str);
}
/**
......@@ -316,9 +319,8 @@ public class ProvidentFundServicesController {
jsonObject.put("departCode", "10");
jsonObject.put("nodeList", list);
String str = jsonObject.toString();
String spec = frontEndProcessorServer + "/FrontEndProcessor/FrontEndProcessor/BusinessProcessing";
// 发起 post 请求
String result = HttpUtil.sendPost(spec, str);
String result = HttpUtil.sendPost(dwkhPushUrl, str);
if (result != null) {
String uscc = "";
if (!list.isEmpty()) {
......
......@@ -24,8 +24,22 @@ password:ENC(PI2/xdOsEObL0YZlfGfQnyiJeYUw/90FePU+sO4EDjU=)
# 前置服务URL
#frontEndProcessorServer:http://192.168.1.252:8888
frontEndProcessorServer:http://127.0.0.1:8081
#单位开户拉取url
dwkhPullUrl:http://127.0.0.1:8081/FrontEndProcessor/ProvidentFundServices
#单位开户推送url
dwkhPushUrl:http://127.0.0.1:8081/FrontEndProcessor/BusinessProcessing
#单位信息变跟拉取url
dwxxbgPullUrl:http://127.0.0.1:8081/FrontEndProcessor/dwxxbgPull
#单位信息变跟推送url
dwxxbgPushUrl:http://127.0.0.1:8081/FrontEndProcessor/dwxxbgPush
#单位销户拉取url
dwxhPullUrl:http://127.0.0.1:8081/FrontEndProcessor/dwxhPull
#单位销户推送url
dwxhPushUrl:http://127.0.0.1:8081/FrontEndProcessor/dwxhPush
# 定时任务
dwkhPullTaskDelay:60000
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment