Commit 9a400df3 authored by hongguangwu's avatar hongguangwu

MVP1.6.8-审核模板变更,改变逻辑

parent d372983b
...@@ -1241,25 +1241,35 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -1241,25 +1241,35 @@ 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()) { /**
* @param socialList
* @param type 1:社保;2:医保
* @Description: 整合社保与医保
* @Author: hgw
* @Date: 2024/8/16 17:43
* @return: void
**/
private void doAuditCoreByType(List<TSocialInfo> socialList, int type) {
Map<String, TSocialInfo> idCardMap = new HashMap<>(); Map<String, TSocialInfo> idCardMap = new HashMap<>();
Set<String> addIdSet = new HashSet<>(); Set<String> addIdSet = new HashSet<>();
for (TSocialInfo socialInfo : socialList) { for (TSocialInfo socialInfo : socialList) {
if (Common.isNotNull(socialInfo.getYgsAddId())) { if (type ==1 && Common.isNotNull(socialInfo.getYgsAddId())) {
addIdSet.add(socialInfo.getYgsAddId()); addIdSet.add(socialInfo.getYgsAddId());
idCardMap.put(socialInfo.getYgsAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo); idCardMap.put(socialInfo.getYgsAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo);
} } else if(type ==2 && Common.isNotNull(socialInfo.getYsdAddId())) {
if (Common.isNotNull(socialInfo.getYsdAddId())) {
addIdSet.add(socialInfo.getYsdAddId()); addIdSet.add(socialInfo.getYsdAddId());
idCardMap.put(socialInfo.getYsdAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo); idCardMap.put(socialInfo.getYsdAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo);
} }
...@@ -1282,7 +1292,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -1282,7 +1292,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
conn.setConnectTimeout(30 * 1000); conn.setConnectTimeout(30 * 1000);
in = conn.getInputStream(); in = conn.getInputStream();
// 实际读取文件内容 // 实际读取文件内容
this.readZip(in, idCardMap, errorMap, doAddId); this.readZip(in, idCardMap, errorMap, doAddId, type);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -1298,11 +1308,9 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -1298,11 +1308,9 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} }
} }
} }
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 = "社保";
......
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