Commit 4848eb89 authored by 华润's avatar 华润

代码提交内置机

parent ad7f1adf
...@@ -29,7 +29,7 @@ public class AlarmTask { ...@@ -29,7 +29,7 @@ public class AlarmTask {
Date dt = new Date(); Date dt = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");
dqsj = sdf.format(dt); dqsj = sdf.format(dt);
System.out.println("开始时间"+dqsj); System.out.println("第一个接口开始时间"+dqsj);
try { try {
ProvidentFundServicesController.gjjxtfwjk(); ProvidentFundServicesController.gjjxtfwjk();
} catch (Exception e) { } catch (Exception e) {
...@@ -39,13 +39,13 @@ public class AlarmTask { ...@@ -39,13 +39,13 @@ public class AlarmTask {
//进度数据定时器 //进度数据定时器
/**第一次延迟(initialDelay)?秒后执行,之后按fixedDelay的规则每?秒执行一次*/ /**第一次延迟(initialDelay)?秒后执行,之后按fixedDelay的规则每?秒执行一次*/
@Scheduled(initialDelay = 10*1000, fixedDelay = 60*1000) @Scheduled(initialDelay = 20*1000, fixedDelay = 60*1000)
public void run4(){ public void run4(){
String dqsj = ""; String dqsj = "";
Date dt = new Date(); Date dt = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");
dqsj = sdf.format(dt); dqsj = sdf.format(dt);
System.out.println("开始时间"+dqsj); System.out.println("第二个接口开始时间"+dqsj);
ProvidentFundServicesController.BusinessProcessing(); ProvidentFundServicesController.BusinessProcessing();
} }
} }
......
...@@ -123,7 +123,7 @@ public class ProvidentFundServicesController { ...@@ -123,7 +123,7 @@ public class ProvidentFundServicesController {
curentDay.set(Calendar.HOUR_OF_DAY, 0); curentDay.set(Calendar.HOUR_OF_DAY, 0);
curentDay.set(Calendar.MINUTE, 0); curentDay.set(Calendar.MINUTE, 0);
curentDay.set(Calendar.SECOND, 0); curentDay.set(Calendar.SECOND, 0);
SimpleDateFormat df2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat df2 = new SimpleDateFormat("yyyyMMdd HH:mm:ss");
time = df2.format(curentDay.getTime().getTime()); time = df2.format(curentDay.getTime().getTime());
System.out.println(time); System.out.println(time);
} else if (type == 24) { } else if (type == 24) {
...@@ -133,7 +133,7 @@ public class ProvidentFundServicesController { ...@@ -133,7 +133,7 @@ public class ProvidentFundServicesController {
curentDay.set(Calendar.HOUR_OF_DAY, 24); curentDay.set(Calendar.HOUR_OF_DAY, 24);
curentDay.set(Calendar.MINUTE, 0); curentDay.set(Calendar.MINUTE, 0);
curentDay.set(Calendar.SECOND, 0); curentDay.set(Calendar.SECOND, 0);
SimpleDateFormat df2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat df2 = new SimpleDateFormat("yyyyMMdd HH:mm:ss");
time = df2.format(curentDay.getTime().getTime()); time = df2.format(curentDay.getTime().getTime());
System.out.println(time); System.out.println(time);
} }
...@@ -151,7 +151,7 @@ public class ProvidentFundServicesController { ...@@ -151,7 +151,7 @@ public class ProvidentFundServicesController {
public static void gjjxtfwjk() throws Exception{ public static void gjjxtfwjk() throws Exception{
//1.调用公积金系统服务接口方法,请求前置机,让前置机请求市监接口,拿到市监返回的开户信息json数据,经过前置机zip解压返回给本内置机处理 //1.调用公积金系统服务接口方法,请求前置机,让前置机请求市监接口,拿到市监返回的开户信息json数据,经过前置机zip解压返回给本内置机处理
String jsoninfom=ProvidentFundServices(); String jsoninfom=ProvidentFundServices();
System.out.println(jsoninfom); System.out.println("拿到第一个接口返回的第三方数据,准备调第一个存储过程"+jsoninfom);
//2.内置机处理返回的业务数据,调用oracle存储过程 //2.内置机处理返回的业务数据,调用oracle存储过程
JSONObject a = JSONObject.parseObject(jsoninfom); JSONObject a = JSONObject.parseObject(jsoninfom);
JSONArray jsonArray = (JSONArray)a.get("data"); JSONArray jsonArray = (JSONArray)a.get("data");
...@@ -165,6 +165,7 @@ public class ProvidentFundServicesController { ...@@ -165,6 +165,7 @@ public class ProvidentFundServicesController {
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存储过程
CallableStatement pstm2=connection.prepareCall("{call JGJ_KSYW_DWKH.DWKH_SAVE()}"); CallableStatement pstm2=connection.prepareCall("{call JGJ_KSYW_DWKH.DWKH_SAVE()}");
System.out.println(""+bills);
//给参数赋值 //给参数赋值
// pstm.getString(1); // pstm.getString(1);
if(!bills.isEmpty()){ if(!bills.isEmpty()){
...@@ -313,6 +314,7 @@ public class ProvidentFundServicesController { ...@@ -313,6 +314,7 @@ public class ProvidentFundServicesController {
@ResponseBody @ResponseBody
@PostMapping("BusinessProcessing") @PostMapping("BusinessProcessing")
public static String BusinessProcessing() { public static String BusinessProcessing() {
System.out.println("调第二个接口了");
//调oracle存储过程拿到进度推进的数据集合 //调oracle存储过程拿到进度推进的数据集合
List<BusinessProcessing> list=null; List<BusinessProcessing> list=null;
try { try {
...@@ -320,6 +322,7 @@ public class ProvidentFundServicesController { ...@@ -320,6 +322,7 @@ public class ProvidentFundServicesController {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
System.out.println("调第二个接口了存储过程返回的list"+list);
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("state","1"); jsonObject.put("state","1");
if(!list.isEmpty()){ if(!list.isEmpty()){
...@@ -429,7 +432,8 @@ public class ProvidentFundServicesController { ...@@ -429,7 +432,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:1566:zfgjj", "HG2020", "HG2020");//测试环境
//得到预编译的Statement对象 //得到预编译的Statement对象
CallableStatement pstm=connection.prepareCall("{call JGJ_KSYW_DWKH.DWKH_CX(?)}"); CallableStatement pstm=connection.prepareCall("{call JGJ_KSYW_DWKH.DWKH_CX(?)}");
//给参数赋值 //给参数赋值
...@@ -493,7 +497,8 @@ public class ProvidentFundServicesController { ...@@ -493,7 +497,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:1566:zfgjj", "HG2020", "HG2020");//测试环境
//得到预编译的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