Commit 3ce6d9bf authored by 张俊's avatar 张俊

市监局单位变更、单位注销入参调整

parent a0c66122
...@@ -58,7 +58,7 @@ public class DeptInfoUpdateService { ...@@ -58,7 +58,7 @@ public class DeptInfoUpdateService {
try { try {
connection = druidDataSource.getConnection(); connection = druidDataSource.getConnection();
// 得到预编译的Statement对象 // 得到预编译的Statement对象
dwxxbgImp = connection.prepareCall("{call JGJ_KSYW_DWXXBG.DWXXBG_IMP(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}"); dwxxbgImp = connection.prepareCall("{call JGJ_KSYW_DWXXBG.DWXXBG_IMP(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}");
// 循环插入 // 循环插入
for (UnitAccountOpeningInformation uniInfom : bills) { for (UnitAccountOpeningInformation uniInfom : bills) {
if (StringUtils.isEmpty(uniInfom.getOplocdistrict())) { if (StringUtils.isEmpty(uniInfom.getOplocdistrict())) {
...@@ -203,40 +203,7 @@ public class DeptInfoUpdateService { ...@@ -203,40 +203,7 @@ public class DeptInfoUpdateService {
// 输出结果[第二个参数] // 输出结果[第二个参数]
rs = (ResultSet) dwxxbgCx.getObject(1);// 此处的2要与存储过程中cursor的问题对应 rs = (ResultSet) dwxxbgCx.getObject(1);// 此处的2要与存储过程中cursor的问题对应
while (rs.next()) { while (rs.next()) {
BusinessProcessing bp = new BusinessProcessing(); BusinessProcessing bp = OpenAccountService.getBusinessProcessing(rs);
if (StringUtils.hasText(rs.getString(1))) {
bp.setBusiLink(rs.getString(1));
}
if (StringUtils.hasText(rs.getString(2))) {
bp.setBusiType(rs.getString(2));
}
if (StringUtils.hasText(rs.getString(3))) {
bp.setOpeartor(rs.getString(3));
}
if (StringUtils.hasText(rs.getString(4))) {
bp.setTel(rs.getString(4));
}
if (StringUtils.hasText(rs.getString(5))) {
bp.setOpinion(rs.getString(5));
}
if (StringUtils.hasText(rs.getString(6))) {
bp.setResult(rs.getString(6));
}
if (StringUtils.hasText(rs.getString(7))) {
bp.setTime(rs.getString(7).substring(0, 19));
}
if (StringUtils.hasText(rs.getString(8))) {
bp.setUscc(rs.getString(8));
}
if (StringUtils.hasText(rs.getString(9))) {
bp.setEntName(rs.getString(9));
}
if (StringUtils.hasText(rs.getString(10))) {
bp.setRn(rs.getString(10));
}
if (StringUtils.hasText(rs.getString(11))) {
bp.setBusId(rs.getString(11));
}
list.add(bp); list.add(bp);
} }
log.info("单位信息变更调用过程结果:{}", JSONObject.toJSONString(list)); log.info("单位信息变更调用过程结果:{}", JSONObject.toJSONString(list));
......
...@@ -57,7 +57,7 @@ public class DeptLogoutService { ...@@ -57,7 +57,7 @@ public class DeptLogoutService {
try { try {
connection = druidDataSource.getConnection(); connection = druidDataSource.getConnection();
// 得到预编译的Statement对象 // 得到预编译的Statement对象
dwxhImp = connection.prepareCall("{call JGJ_KSYW_DWXH.DWXH_IMP(?, ?, ?, ?, ?, ?, ?)}"); dwxhImp = connection.prepareCall("{call JGJ_KSYW_DWXH.DWXH_IMP(?, ?, ?, ?, ?, ?, ?, ?)}");
// 循环插入 // 循环插入
for (UnitAccountOpeningInformation uniInfom : bills) { for (UnitAccountOpeningInformation uniInfom : bills) {
if (StringUtils.isEmpty(uniInfom.getOplocdistrict())) { if (StringUtils.isEmpty(uniInfom.getOplocdistrict())) {
...@@ -173,40 +173,7 @@ public class DeptLogoutService { ...@@ -173,40 +173,7 @@ public class DeptLogoutService {
// 输出结果[第二个参数] // 输出结果[第二个参数]
rs = (ResultSet) dwxhCx.getObject(1);// 此处的2要与存储过程中cursor的问题对应 rs = (ResultSet) dwxhCx.getObject(1);// 此处的2要与存储过程中cursor的问题对应
while (rs.next()) { while (rs.next()) {
BusinessProcessing bp = new BusinessProcessing(); BusinessProcessing bp = OpenAccountService.getBusinessProcessing(rs);
if (StringUtils.hasText(rs.getString(1))) {
bp.setBusiLink(rs.getString(1));
}
if (StringUtils.hasText(rs.getString(2))) {
bp.setBusiType(rs.getString(2));
}
if (StringUtils.hasText(rs.getString(3))) {
bp.setOpeartor(rs.getString(3));
}
if (StringUtils.hasText(rs.getString(4))) {
bp.setTel(rs.getString(4));
}
if (StringUtils.hasText(rs.getString(5))) {
bp.setOpinion(rs.getString(5));
}
if (StringUtils.hasText(rs.getString(6))) {
bp.setResult(rs.getString(6));
}
if (StringUtils.hasText(rs.getString(7))) {
bp.setTime(rs.getString(7).substring(0, 19));
}
if (StringUtils.hasText(rs.getString(8))) {
bp.setUscc(rs.getString(8));
}
if (StringUtils.hasText(rs.getString(9))) {
bp.setEntName(rs.getString(9));
}
if (StringUtils.hasText(rs.getString(10))) {
bp.setRn(rs.getString(10));
}
if (StringUtils.hasText(rs.getString(11))) {
bp.setBusId(rs.getString(11));
}
list.add(bp); list.add(bp);
} }
log.info("单位销户调用过程结果:{}", JSONObject.toJSONString(list)); log.info("单位销户调用过程结果:{}", JSONObject.toJSONString(list));
......
...@@ -21,6 +21,7 @@ import javax.annotation.Resource; ...@@ -21,6 +21,7 @@ import javax.annotation.Resource;
import java.sql.CallableStatement; import java.sql.CallableStatement;
import java.sql.Connection; import java.sql.Connection;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -329,44 +330,53 @@ public class OpenAccountService { ...@@ -329,44 +330,53 @@ public class OpenAccountService {
ResultSet rs = (ResultSet) pstm.getObject(1);// 此处的2要与存储过程中cursor的问题对应 ResultSet rs = (ResultSet) pstm.getObject(1);// 此处的2要与存储过程中cursor的问题对应
List<BusinessProcessing> list = new ArrayList<>(); List<BusinessProcessing> list = new ArrayList<>();
while (rs.next()) { while (rs.next()) {
BusinessProcessing b = new BusinessProcessing(); BusinessProcessing bp = getBusinessProcessing(rs);
if (!"".equals(rs.getString(1)) && rs.getString(1) != null) { list.add(bp);
b.setBusiLink(rs.getString(1));
} }
if (!"".equals(rs.getString(2)) && rs.getString(2) != null) { log.info("单位开户调用过程结果:{}", JSON.toJSONString(list));
b.setBusiType(rs.getString(2)); // 释放资源
pstm.close();
connection.close();
return list;
}
public static BusinessProcessing getBusinessProcessing(ResultSet rs) throws SQLException {
BusinessProcessing bp = new BusinessProcessing();
if (StringUtils.hasText(rs.getString(1))) {
bp.setBusiLink(rs.getString(1));
} }
if (!"".equals(rs.getString(3)) && rs.getString(3) != null) { if (StringUtils.hasText(rs.getString(2))) {
b.setOpeartor(rs.getString(3)); bp.setBusiType(rs.getString(2));
} }
if (!"".equals(rs.getString(4)) && rs.getString(4) != null) { if (StringUtils.hasText(rs.getString(3))) {
b.setTel(rs.getString(4)); bp.setOpeartor(rs.getString(3));
} }
if (!"".equals(rs.getString(5)) && rs.getString(5) != null) { if (StringUtils.hasText(rs.getString(4))) {
b.setOpinion(rs.getString(5)); bp.setTel(rs.getString(4));
} }
if (!"".equals(rs.getString(6)) && rs.getString(6) != null) { if (StringUtils.hasText(rs.getString(5))) {
b.setResult(rs.getString(6)); bp.setOpinion(rs.getString(5));
} }
if (!"".equals(rs.getString(7)) && rs.getString(7) != null) { if (StringUtils.hasText(rs.getString(6))) {
b.setTime(rs.getString(7).substring(0, 19)); bp.setResult(rs.getString(6));
} }
if (!"".equals(rs.getString(8)) && rs.getString(8) != null) { if (StringUtils.hasText(rs.getString(7))) {
b.setUscc(rs.getString(8)); bp.setTime(rs.getString(7).substring(0, 19));
} }
if (!"".equals(rs.getString(9)) && rs.getString(9) != null) { if (StringUtils.hasText(rs.getString(8))) {
b.setEntName(rs.getString(9)); bp.setUscc(rs.getString(8));
} }
if (!"".equals(rs.getString(10)) && rs.getString(10) != null) { if (StringUtils.hasText(rs.getString(9))) {
b.setBusId(rs.getString(10)); bp.setEntName(rs.getString(9));
} }
list.add(b); if (StringUtils.hasText(rs.getString(10))) {
bp.setRn(rs.getString(10));
} }
log.info("单位开户调用过程结果:{}", JSON.toJSONString(list)); if (StringUtils.hasText(rs.getString(11))) {
// 释放资源 bp.setBusId(rs.getString(11));
pstm.close(); }
connection.close(); return bp;
return list;
} }
......
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