Commit 09543827 authored by 华润's avatar 华润

代码提交内置机

parent b66bd3ed
...@@ -37,10 +37,10 @@ public class ProvidentFundServicesController { ...@@ -37,10 +37,10 @@ public class ProvidentFundServicesController {
@PostMapping("ProvidentFundServices") @PostMapping("ProvidentFundServices")
public static String ProvidentFundServices() { public static String ProvidentFundServices() {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
// jsonObject.put("startTime", currenttime(0)); jsonObject.put("startTime", currenttime(0));//正式环境
// jsonObject.put("endTime", currenttime(24)); jsonObject.put("endTime", currenttime(24));//正式环境
jsonObject.put("startTime", "20210520 00:00:00"); // jsonObject.put("startTime", "20210520 00:00:00");//测试环境
jsonObject.put("endTime", "20210520 23:00:00"); // jsonObject.put("endTime", "20210520 23:00:00");//测试环境
jsonObject.put("app_id", "eb453ca78b354f2c9163a703530f5186"); jsonObject.put("app_id", "eb453ca78b354f2c9163a703530f5186");
jsonObject.put("app_secret", "9a31b84878654a72a999e38ef55aa186"); jsonObject.put("app_secret", "9a31b84878654a72a999e38ef55aa186");
String str = jsonObject.toString(); String str = jsonObject.toString();
...@@ -165,7 +165,8 @@ public class ProvidentFundServicesController { ...@@ -165,7 +165,8 @@ public class ProvidentFundServicesController {
Class.forName("oracle.jdbc.driver.OracleDriver"); Class.forName("oracle.jdbc.driver.OracleDriver");
//得到Connection连接 //得到Connection连接
// Connection connection= DriverManager.getConnection("jdbc:oracle:thin:@192.168.101.194:1521:zfgjj", "HG2020", "HG2020");//本地环境 // Connection connection= DriverManager.getConnection("jdbc:oracle:thin:@192.168.101.194:1521:zfgjj", "HG2020", "HG2020");//本地环境
Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.36:1521:zfgjj", "GJJ80", "GJJ80");//测试环境 // Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.36:1521:zfgjj", "GJJ80", "GJJ80");//测试环境
Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.33:1596:zfgjj", "gjj80", "HG80_Y9E1C5");//正式环境
//得到预编译的Statement对象 //得到预编译的Statement对象
CallableStatement pstm = connection.prepareCall("{call JGJ_KSYW_DWKH.DWXX_IMP(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}"); CallableStatement pstm = connection.prepareCall("{call JGJ_KSYW_DWKH.DWXX_IMP(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}");
//调完第一个存储过程DWXX_IMP之后再调DWKH_SAVE存储过程 //调完第一个存储过程DWXX_IMP之后再调DWKH_SAVE存储过程
...@@ -361,6 +362,7 @@ public class ProvidentFundServicesController { ...@@ -361,6 +362,7 @@ public class ProvidentFundServicesController {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
if(!list.isEmpty()){//查到数据才请求第三方接口推送
System.out.println("调第二个接口了存储过程返回的list" + list); System.out.println("调第二个接口了存储过程返回的list" + list);
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("state", "1"); jsonObject.put("state", "1");
...@@ -383,7 +385,8 @@ public class ProvidentFundServicesController { ...@@ -383,7 +385,8 @@ public class ProvidentFundServicesController {
OutputStream out = null; OutputStream out = null;
try { try {
// 创建url 资源 // 创建url 资源
URL url = new URL("http://192.168.1.252:8888/FrontEndProcessor/FrontEndProcessor/BusinessProcessing");//调用前置机将业务机封装的业务json数据发给前置机,让前置机去请求第三方的公积金系统服务接口 URL url = new URL("http://192.168.1.252:8888/FrontEndProcessor/FrontEndProcessor/BusinessProcessing");//(测试环境)调用前置机将业务机封装的业务json数据发给前置机,让前置机去请求第三方的公积金系统服务接口
// URL url = new URL("http://192.168.101.34:8080/FrontEndProcessor/FrontEndProcessor/BusinessProcessing");//(本地环境)调用前置机将业务机封装的业务json数据发给前置机,让前置机去请求第三方的公积金系统服务接口
// 创建http 连接 // 创建http 连接
conn = (HttpURLConnection) url.openConnection(); conn = (HttpURLConnection) url.openConnection();
// 设置允许输出 // 设置允许输出
...@@ -459,6 +462,8 @@ public class ProvidentFundServicesController { ...@@ -459,6 +462,8 @@ public class ProvidentFundServicesController {
conn.disconnect(); conn.disconnect();
} }
} }
}
return null; return null;
} }
...@@ -476,7 +481,8 @@ public class ProvidentFundServicesController { ...@@ -476,7 +481,8 @@ public class ProvidentFundServicesController {
Class.forName("oracle.jdbc.driver.OracleDriver"); Class.forName("oracle.jdbc.driver.OracleDriver");
//得到Connection连接 //得到Connection连接
// Connection connection= DriverManager.getConnection("jdbc:oracle:thin:@192.168.101.194:1521:zfgjj", "HG2020", "HG2020");//本地环境 // Connection connection= DriverManager.getConnection("jdbc:oracle:thin:@192.168.101.194:1521:zfgjj", "HG2020", "HG2020");//本地环境
Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.36:1521:zfgjj", "GJJ80", "GJJ80");//测试环境 // Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.36:1521:zfgjj", "GJJ80", "GJJ80");//测试环境
Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.33:1596:zfgjj", "gjj80", "HG80_Y9E1C5");//正式环境
//得到预编译的Statement对象 //得到预编译的Statement对象
CallableStatement pstm = connection.prepareCall("{call JGJ_KSYW_DWKH.DWKH_CX(?)}"); CallableStatement pstm = connection.prepareCall("{call JGJ_KSYW_DWKH.DWKH_CX(?)}");
//给参数赋值 //给参数赋值
...@@ -543,8 +549,9 @@ public class ProvidentFundServicesController { ...@@ -543,8 +549,9 @@ public class ProvidentFundServicesController {
//加载数据库驱动 //加载数据库驱动
Class.forName("oracle.jdbc.driver.OracleDriver"); Class.forName("oracle.jdbc.driver.OracleDriver");
//得到Connection连接 //得到Connection连接
// Connection connection= DriverManager.getConnection("jdbc:oracle:thin:@192.168.101.194:1521:zfgjj", "HG2020", "HG2020");//本地环境 // Connection connection= DriverManager.getConnection("jdbc:oracle:thin:@192.168.101.194:1521:zfgjj", "HG2020", "HG2020");//本地环境
Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.36:1521:zfgjj", "GJJ80", "GJJ80");//测试环境 // Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.36:1521:zfgjj", "GJJ80", "GJJ80");//测试环境
Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.33:1596:zfgjj", "gjj80", "HG80_Y9E1C5");//正式环境
//得到预编译的Statement对象 //得到预编译的Statement对象
CallableStatement pstm = connection.prepareCall("{call JGJ_KSYW_DWKH.DWKH_HX(?,?)}"); CallableStatement pstm = connection.prepareCall("{call JGJ_KSYW_DWKH.DWKH_HX(?,?)}");
//给参数赋值 //给参数赋值
......
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