Commit 179243bd authored by 华润's avatar 华润

跨省单位开户公积金服务接口

parent 78278dd8
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
<version>1.2.68</version> <version>1.2.68</version>
</dependency> </dependency>
</dependencies> </dependencies>
<dependencyManagement> <dependencyManagement>
......
...@@ -7,13 +7,13 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -7,13 +7,13 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.io.*; import java.io.*;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
import java.net.URL; import java.net.URL;
import java.sql.CallableStatement; import java.sql.CallableStatement;
import java.sql.Connection; import java.sql.Connection;
import java.sql.DriverManager; import java.sql.DriverManager;
import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
...@@ -134,8 +134,24 @@ public class ProvidentFundServicesController { ...@@ -134,8 +134,24 @@ public class ProvidentFundServicesController {
List<UnitAccountOpeningInformation> data = new ArrayList<>(); List<UnitAccountOpeningInformation> data = new ArrayList<>();
UnitAccountOpeningInformation openingInformation = new UnitAccountOpeningInformation(); UnitAccountOpeningInformation openingInformation = new UnitAccountOpeningInformation();
openingInformation.setBusId("332090874"); openingInformation.setBusId("332090874");
openingInformation.setUscc("914205007146986237"); openingInformation.setUscc("914205007146986277");
openingInformation.setEntName("湖北稻花香酒业股份有限公司"); openingInformation.setEntName("湖北稻花香酒业股份有限公司(华润测试)");
openingInformation.setDom("湖北省宜昌市龙泉镇圣诞快乐房价数量的方式独立开发");
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
openingInformation.setEstDate(new Date());
openingInformation.setLerep("蔡开云");
openingInformation.setCerType("10");
openingInformation.setCerNo("421121199402084030");
openingInformation.setOperatorName("张文");
openingInformation.setOperatorCerNo("421121199402084030");
openingInformation.setOperatorPhone("13345678899");
openingInformation.setOplocdistrict("421101001");
openingInformation.setUnitNature("01");
openingInformation.setEconomicType("1222");
openingInformation.setIndustryphy("C1512");
openingInformation.setUnitPayDay("05");
openingInformation.setUnitDepPro("12");
openingInformation.setPersonalDepPro("12");
data.add(openingInformation); data.add(openingInformation);
jsonObject.put("data", data); jsonObject.put("data", data);
String str = jsonObject.toString(); String str = jsonObject.toString();
...@@ -218,13 +234,47 @@ public class ProvidentFundServicesController { ...@@ -218,13 +234,47 @@ public class ProvidentFundServicesController {
//得到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");
//得到预编译的Statement对象 //得到预编译的Statement对象
CallableStatement pstm=connection.prepareCall("{call JGJ_KSYW_DWKH.DWKH_SL(?,?)}"); CallableStatement pstm=connection.prepareCall("{call JGJ_KSYW_DWKH.DWKH_SL(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}");
//给参数赋值 //给参数赋值
pstm.setObject(1,uniInfom); // pstm.getString(1);
pstm.registerOutParameter(1,oracle.jdbc.OracleTypes.VARCHAR);
pstm.setString(2,uniInfom.getBusId());
pstm.setString(3,uniInfom.getUscc());
pstm.setString(4,uniInfom.getEntName());
pstm.setString(5,uniInfom.getDom());
pstm.setDate(6,new java.sql.Date(uniInfom.getEstDate().getTime()));
pstm.setString(7,uniInfom.getLerep());
pstm.setString(8,uniInfom.getCerType());
pstm.setString(9,uniInfom.getCerNo());
pstm.setString(10,uniInfom.getOperatorName());
pstm.setString(11,uniInfom.getOperatorCerNo());
pstm.setString(12,uniInfom.getOperatorPhone());
pstm.setString(13,uniInfom.getOplocdistrict());
pstm.setString(14,uniInfom.getUnitNature());
pstm.setString(15,uniInfom.getEconomicType());
pstm.setString(16,uniInfom.getIndustryphy());
pstm.setString(17,uniInfom.getUnitPayDay());
pstm.setString(18,uniInfom.getUnitDepPro());
pstm.setString(19,uniInfom.getPersonalDepPro());
pstm.setString(20,"");
pstm.setString(21,"");
pstm.registerOutParameter(22,oracle.jdbc.OracleTypes.VARCHAR);
pstm.registerOutParameter(23,oracle.jdbc.OracleTypes.VARCHAR);
pstm.registerOutParameter(24,oracle.jdbc.OracleTypes.VARCHAR);
// pstm.getString(22);
// pstm.getString(23);
// pstm.getString(24);
//执行数据库查询操作 //执行数据库查询操作
pstm.execute(); pstm.execute();
//输出结果[第二个参数] //输出结果[第二个参数]
System.out.println(pstm.getObject(2)); // pstm.registerOutParameter(1,oracle.jdbc.OracleTypes.VARCHAR);
// pstm.registerOutParameter(22,oracle.jdbc.OracleTypes.VARCHAR);
// pstm.registerOutParameter(23,oracle.jdbc.OracleTypes.VARCHAR);
// pstm.registerOutParameter(24,oracle.jdbc.OracleTypes.VARCHAR);
System.out.println(pstm.getString(1));
System.out.println(pstm.getString(22));
System.out.println(pstm.getString(23));
System.out.println(pstm.getString(24));
//释放资源 //释放资源
pstm.close(); pstm.close();
connection.close(); connection.close();
......
...@@ -2,6 +2,7 @@ package net.cdkj.gjj.adapter.domain; ...@@ -2,6 +2,7 @@ package net.cdkj.gjj.adapter.domain;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import java.util.Date;
import java.util.Objects; import java.util.Objects;
/** /**
...@@ -10,6 +11,8 @@ import java.util.Objects; ...@@ -10,6 +11,8 @@ import java.util.Objects;
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
public class UnitAccountOpeningInformation { public class UnitAccountOpeningInformation {
private String ywbh;
private String busId; private String busId;
private String uscc; private String uscc;
...@@ -18,7 +21,7 @@ public class UnitAccountOpeningInformation { ...@@ -18,7 +21,7 @@ public class UnitAccountOpeningInformation {
private String dom; private String dom;
private String estDate; private Date estDate;
private String lerep; private String lerep;
...@@ -46,6 +49,16 @@ public class UnitAccountOpeningInformation { ...@@ -46,6 +49,16 @@ public class UnitAccountOpeningInformation {
private String personalDepPro; private String personalDepPro;
private String zxdqbm;
private String lcls;
private String dwzh;
private String errcode;
private String errmsg;
public String getBusId() { public String getBusId() {
return busId; return busId;
...@@ -79,11 +92,11 @@ public class UnitAccountOpeningInformation { ...@@ -79,11 +92,11 @@ public class UnitAccountOpeningInformation {
this.dom = dom; this.dom = dom;
} }
public String getEstDate() { public Date getEstDate() {
return estDate; return estDate;
} }
public void setEstDate(String estDate) { public void setEstDate(Date estDate) {
this.estDate = estDate; this.estDate = estDate;
} }
...@@ -187,6 +200,54 @@ public class UnitAccountOpeningInformation { ...@@ -187,6 +200,54 @@ public class UnitAccountOpeningInformation {
return personalDepPro; return personalDepPro;
} }
public String getYwbh() {
return ywbh;
}
public void setYwbh(String ywbh) {
this.ywbh = ywbh;
}
public String getZxdqbm() {
return zxdqbm;
}
public void setZxdqbm(String zxdqbm) {
this.zxdqbm = zxdqbm;
}
public String getLcls() {
return lcls;
}
public void setLcls(String lcls) {
this.lcls = lcls;
}
public String getDwzh() {
return dwzh;
}
public void setDwzh(String dwzh) {
this.dwzh = dwzh;
}
public String getErrcode() {
return errcode;
}
public void setErrcode(String errcode) {
this.errcode = errcode;
}
public String getErrmsg() {
return errmsg;
}
public void setErrmsg(String errmsg) {
this.errmsg = errmsg;
}
public void setPersonalDepPro(String personalDepPro) { public void setPersonalDepPro(String personalDepPro) {
this.personalDepPro = personalDepPro; this.personalDepPro = personalDepPro;
} }
...@@ -194,11 +255,12 @@ public class UnitAccountOpeningInformation { ...@@ -194,11 +255,12 @@ public class UnitAccountOpeningInformation {
@Override @Override
public String toString() { public String toString() {
return "UnitAccountOpeningInformation{" + return "UnitAccountOpeningInformation{" +
"busId='" + busId + '\'' + "ywbh='" + ywbh + '\'' +
", busId='" + busId + '\'' +
", uscc='" + uscc + '\'' + ", uscc='" + uscc + '\'' +
", entName='" + entName + '\'' + ", entName='" + entName + '\'' +
", dom='" + dom + '\'' + ", dom='" + dom + '\'' +
", estDate='" + estDate + '\'' + ", estDate=" + estDate +
", lerep='" + lerep + '\'' + ", lerep='" + lerep + '\'' +
", cerType='" + cerType + '\'' + ", cerType='" + cerType + '\'' +
", cerNo='" + cerNo + '\'' + ", cerNo='" + cerNo + '\'' +
...@@ -212,6 +274,11 @@ public class UnitAccountOpeningInformation { ...@@ -212,6 +274,11 @@ public class UnitAccountOpeningInformation {
", unitPayDay='" + unitPayDay + '\'' + ", unitPayDay='" + unitPayDay + '\'' +
", unitDepPro='" + unitDepPro + '\'' + ", unitDepPro='" + unitDepPro + '\'' +
", personalDepPro='" + personalDepPro + '\'' + ", personalDepPro='" + personalDepPro + '\'' +
", zxdqbm='" + zxdqbm + '\'' +
", lcls='" + lcls + '\'' +
", dwzh='" + dwzh + '\'' +
", errcode='" + errcode + '\'' +
", errmsg='" + errmsg + '\'' +
'}'; '}';
} }
} }
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