Commit bd3223e6 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.6.8' into MVP1.6.8

parents d6c4e422 898c3360
...@@ -1241,68 +1241,76 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -1241,68 +1241,76 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
@Override @Override
public R<String> getSixJobByAudit() { public R<String> getSixJobByAudit() {
// 获取所有需要反馈的任务id // 获取所有需要反馈的任务id
// 社保 type 1:社保;2:医保
List<TSocialInfo> socialList = tSocialInfoService.getSocialSoldierYgsByAudit(); List<TSocialInfo> socialList = tSocialInfoService.getSocialSoldierYgsByAudit();
if (socialList != null && !socialList.isEmpty()) {
this.doAuditCoreByType(socialList, CommonConstants.ONE_INT);
}
// 医保
List<TSocialInfo> socialYsdList = tSocialInfoService.getSocialSoldierYsdByAudit(); List<TSocialInfo> socialYsdList = tSocialInfoService.getSocialSoldierYsdByAudit();
if (socialYsdList != null && !socialYsdList.isEmpty()) { if (socialYsdList != null && !socialYsdList.isEmpty()) {
if (socialList != null && !socialList.isEmpty()) { this.doAuditCoreByType(socialYsdList, CommonConstants.TWO_INT);
socialList.addAll(socialYsdList);
} else {
socialList = socialYsdList;
}
} }
return R.ok();
}
if (socialList != null && !socialList.isEmpty()) { /**
Map<String, TSocialInfo> idCardMap = new HashMap<>(); * @param socialList
Set<String> addIdSet = new HashSet<>(); * @param type 1:社保;2:医保
for (TSocialInfo socialInfo : socialList) { * @Description: 整合社保与医保
if (Common.isNotNull(socialInfo.getYgsAddId())) { * @Author: hgw
addIdSet.add(socialInfo.getYgsAddId()); * @Date: 2024/8/16 17:43
idCardMap.put(socialInfo.getYgsAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo); * @return: void
} **/
if (Common.isNotNull(socialInfo.getYsdAddId())) { private void doAuditCoreByType(List<TSocialInfo> socialList, int type) {
addIdSet.add(socialInfo.getYsdAddId()); Map<String, TSocialInfo> idCardMap = new HashMap<>();
idCardMap.put(socialInfo.getYsdAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo); Set<String> addIdSet = new HashSet<>();
} for (TSocialInfo socialInfo : socialList) {
if (type ==1 && Common.isNotNull(socialInfo.getYgsAddId())) {
addIdSet.add(socialInfo.getYgsAddId());
idCardMap.put(socialInfo.getYgsAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo);
} else if(type ==2 && Common.isNotNull(socialInfo.getYsdAddId())) {
addIdSet.add(socialInfo.getYsdAddId());
idCardMap.put(socialInfo.getYsdAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo);
} }
HttpURLConnection conn; }
InputStream in = null; HttpURLConnection conn;
Map<String, FailReasonConfig> errorMap = failReasonConfigService.getFailReasonMap(); InputStream in = null;
if (!addIdSet.isEmpty()) { Map<String, FailReasonConfig> errorMap = failReasonConfigService.getFailReasonMap();
for (String doAddId : addIdSet) { if (!addIdSet.isEmpty()) {
R<String> resultFile = socialConfig.getFiveJob(restTemplate, doAddId, RESULT_ANNEX); for (String doAddId : addIdSet) {
log.info("resultFileByAudit=" + resultFile); R<String> resultFile = socialConfig.getFiveJob(restTemplate, doAddId, RESULT_ANNEX);
try { log.info("resultFileByAudit=" + resultFile);
// 解决中文文件名的乱码问题 try {
String fileTeturnUrl = resultFile.getData(); // 解决中文文件名的乱码问题
if (Common.isNotNull(fileTeturnUrl)) { String fileTeturnUrl = resultFile.getData();
fileTeturnUrl = this.getEncodeUrl(fileTeturnUrl); if (Common.isNotNull(fileTeturnUrl)) {
URL url = new URL(fileTeturnUrl); fileTeturnUrl = this.getEncodeUrl(fileTeturnUrl);
conn = (HttpURLConnection) url.openConnection(); URL url = new URL(fileTeturnUrl);
//设置超时间为30秒 conn = (HttpURLConnection) url.openConnection();
conn.setConnectTimeout(30 * 1000); //设置超时间为30秒
in = conn.getInputStream(); conn.setConnectTimeout(30 * 1000);
// 实际读取文件内容 in = conn.getInputStream();
this.readZip(in, idCardMap, errorMap, doAddId); // 实际读取文件内容
} this.readZip(in, idCardMap, errorMap, doAddId, type);
} catch (Exception e) { }
e.printStackTrace(); } catch (Exception e) {
} finally { e.printStackTrace();
if (in != null) { } finally {
try { if (in != null) {
in.close(); try {
} catch (IOException e) { in.close();
e.printStackTrace(); } catch (IOException e) {
} e.printStackTrace();
} }
} }
} }
} }
} }
return R.ok();
} }
public R<List<TSocialSoldierReturnAuditErrorVo>> readZip(InputStream inputStream, Map<String, TSocialInfo> idCardMap public R<List<TSocialSoldierReturnAuditErrorVo>> readZip(InputStream inputStream, Map<String, TSocialInfo> idCardMap
, Map<String, FailReasonConfig> errorMap, String doAddId) { , Map<String, FailReasonConfig> errorMap, String doAddId, int type) {
TSocialSoldierReturnAuditErrorVo vo; TSocialSoldierReturnAuditErrorVo vo;
List<TSocialSoldierReturnAuditErrorVo> voList = new ArrayList<>(); List<TSocialSoldierReturnAuditErrorVo> voList = new ArrayList<>();
XSSFWorkbook sheets = null; XSSFWorkbook sheets = null;
...@@ -1461,7 +1469,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -1461,7 +1469,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} }
} }
if (!voList.isEmpty()) { if (!voList.isEmpty()) {
importTSocialSoldierByAudit(voList, idCardMap, errorMap, doAddId); importTSocialSoldierByAudit(voList, idCardMap, errorMap, doAddId, type);
} }
return R.ok(voList); return R.ok(voList);
} }
...@@ -1759,7 +1767,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -1759,7 +1767,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
* @return: void * @return: void
**/ **/
private void importTSocialSoldierByAudit(List<TSocialSoldierReturnAuditErrorVo> excelVOList, Map<String, TSocialInfo> idCardMap private void importTSocialSoldierByAudit(List<TSocialSoldierReturnAuditErrorVo> excelVOList, Map<String, TSocialInfo> idCardMap
, Map<String, FailReasonConfig> errorMap, String doAddId) { , Map<String, FailReasonConfig> errorMap, String doAddId, int type) {
// 个性化校验逻辑 // 个性化校验逻辑
// 执行数据插入操作 组装 // 执行数据插入操作 组装
TSocialSoldierReturnAuditErrorVo excel; TSocialSoldierReturnAuditErrorVo excel;
...@@ -1770,6 +1778,9 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -1770,6 +1778,9 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
TSocialInfo updateSocial; TSocialInfo updateSocial;
// true养工失 false 医生大 // true养工失 false 医生大
boolean typeFlag = true; boolean typeFlag = true;
if (type == 2) {
typeFlag = false;
}
FailReasonConfig failConfig; FailReasonConfig failConfig;
String ygsHandleStatus; String ygsHandleStatus;
String ysdHandleStatus; String ysdHandleStatus;
...@@ -1806,7 +1817,6 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -1806,7 +1817,6 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
auditRemark = excel.getYgsOperation(); auditRemark = excel.getYgsOperation();
if (Common.isEmpty(auditRemark)) { if (Common.isEmpty(auditRemark)) {
auditRemark = excel.getYsdRemark(); auditRemark = excel.getYsdRemark();
typeFlag = false;
} }
if (Common.isNotNull(empIdCard)) { if (Common.isNotNull(empIdCard)) {
title = "社保"; title = "社保";
......
...@@ -54,4 +54,7 @@ spring: ...@@ -54,4 +54,7 @@ spring:
#社保士兵相关属性配置 #社保士兵相关属性配置
soldier: soldier:
authorizations : Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmODA2ZjRlYzYzZjY0NjVlOGFlZjRmZmVlOTYwMzcxNiIsInN1YiI6IjIiLCJ1c2VyX3Bob25lIjoiIiwidXNlcl90eXBlIjoiMTAiLCJ1c2VyX25hbWUiOiLmtYvor5UiLCJpc19hcHAiOiIxIiwiVXNlcklkIjoiMiIsIm5iZiI6MTcxMjg5Mjk1OCwiZXhwIjoxNzIzMjYwOTU4LCJpYXQiOjE3MTI4OTI5NTh9.oTmhLfv1tLq8aPOfO3LeqM1IDYT76YGXkqpz3dwBX4M authorizations : Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmODA2ZjRlYzYzZjY0NjVlOGFlZjRmZmVlOTYwMzcxNiIsInN1YiI6IjIiLCJ1c2VyX3Bob25lIjoiIiwidXNlcl90eXBlIjoiMTAiLCJ1c2VyX25hbWUiOiLmtYvor5UiLCJpc19hcHAiOiIxIiwiVXNlcklkIjoiMiIsIm5iZiI6MTcxMjg5Mjk1OCwiZXhwIjoxNzIzMjYwOTU4LCJpYXQiOjE3MTI4OTI5NTh9.oTmhLfv1tLq8aPOfO3LeqM1IDYT76YGXkqpz3dwBX4M
urlPre : http://172.16.24.66:55555 urlPre : http://172.16.24.66:55555
\ No newline at end of file #线上社保士兵,一般不允许用,用之前要清理测试环境当月的社保自动化数据,否则有可能产生费用
#authorizations: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2MzcwYWIyZDRhZTI0NjQ2YTg0MTE0Mzk1Y2M2MTkzMiIsInN1YiI6IjQiLCJ1c2VyX3Bob25lIjoiIiwidXNlcl90eXBlIjoiMTAiLCJ1c2VyX25hbWUiOiLlkIjogqXnpL7kv53lo6vlhbVBUEkiLCJpc19hcHAiOiIxIiwiVXNlcklkIjoiNCIsIm5iZiI6MTcxNjE3OTIxOSwiZXhwIjoxNzI2NTQ3MjE5LCJpYXQiOjE3MTYxNzkyMTl9.Ei-52hRlfMLXLzpzmbP2xCVFZKE5sHHexzfX5PtmZ_M
#urlPre: http://60.168.131.18:55555
\ No newline at end of file
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