Commit 36889278 authored by fangxinjiang's avatar fangxinjiang

派单分项目派单状态处理

parent 5dce737e
...@@ -428,6 +428,10 @@ public interface ErrorCodes { ...@@ -428,6 +428,10 @@ public interface ErrorCodes {
* 派减异常: 本次派增已存在对应身份证号的派减记录 * 派减异常: 本次派增已存在对应身份证号的派减记录
*/ */
String EMP_DISPATCH_REDUCE_EXISTS = "emp.dispatch.reduce.exists"; String EMP_DISPATCH_REDUCE_EXISTS = "emp.dispatch.reduce.exists";
/**
* 无可派单项,请确认后再次操作
*/
String EMP_DISPATCH_ITEM_EMPTY_EXISTS = "emp.dispatch.item.empty.exists";
/** /**
* 当前社保导入队列不足或者数据量过大,请稍后重试! * 当前社保导入队列不足或者数据量过大,请稍后重试!
*/ */
......
...@@ -156,6 +156,8 @@ emp.dispatch.reduce.exists=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u672C\u6B21\u6D3E\u58 ...@@ -156,6 +156,8 @@ emp.dispatch.reduce.exists=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u672C\u6B21\u6D3E\u58
socialinfo.list.num.large=\u5F53\u524D\u793E\u4FDD\u5BFC\u5165\u961F\u5217\u4E0D\u8DB3\u6216\u8005\u6570\u636E\u91CF\u8FC7\u5927\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\uFF01 socialinfo.list.num.large=\u5F53\u524D\u793E\u4FDD\u5BFC\u5165\u961F\u5217\u4E0D\u8DB3\u6216\u8005\u6570\u636E\u91CF\u8FC7\u5927\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\uFF01
emp.dispatch.item.empty.exists=\u65E0\u53EF\u6D3E\u5355\u9879\uFF0C\u8BF7\u786E\u8BA4\u540E\u518D\u6B21\u64CD\u4F5C
emp.dispatch.social.diy.not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD\u201C\u7F34\u7EB3\u7C7B\u578B\u201D\u4E3A\u201C\u81EA\u5B9A\u4E49\u201D\uFF0C\u5404\u9669\u79CD\u57FA\u6570\u76F8\u540C\uFF0C\u8BF7\u586B\u5199\u201C\u517B\u8001\u57FA\u6570\u201D\uFF0C\u5982\u57FA\u6570\u4E0D\u540C\uFF0C\u5219\u6240\u6709\u9669\u79CD\u57FA\u6570\u90FD\u9700\u586B\u5199 emp.dispatch.social.diy.not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD\u201C\u7F34\u7EB3\u7C7B\u578B\u201D\u4E3A\u201C\u81EA\u5B9A\u4E49\u201D\uFF0C\u5404\u9669\u79CD\u57FA\u6570\u76F8\u540C\uFF0C\u8BF7\u586B\u5199\u201C\u517B\u8001\u57FA\u6570\u201D\uFF0C\u5982\u57FA\u6570\u4E0D\u540C\uFF0C\u5219\u6240\u6709\u9669\u79CD\u57FA\u6570\u90FD\u9700\u586B\u5199
emp.dispatch.social.diy.medical_not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A \u81EA\u5B9A\u4E49\u7F34\u7EB3\u517B\u8001\u57FA\u6570\u548C\u517B\u8001\u8D77\u7F34\u65E5\u671F\u4E0D\u53EF\u4E3A\u7A7A emp.dispatch.social.diy.medical_not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A \u81EA\u5B9A\u4E49\u7F34\u7EB3\u517B\u8001\u57FA\u6570\u548C\u517B\u8001\u8D77\u7F34\u65E5\u671F\u4E0D\u53EF\u4E3A\u7A7A
......
...@@ -575,7 +575,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -575,7 +575,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
// 新增派单信息 // 新增派单信息
excel.setOrderId(orderId); excel.setOrderId(orderId);
initDispatchAddInfo(user, dispatchMap, empVo, socialSet, fundSet, excel,socialFund,injury); if (initDispatchAddInfo(user, dispatchMap, empVo, socialSet, fundSet, excel,socialFund,injury)){
excelVOTemp.put(excel.getRowIndex().toString(),excel.getEmpIdcard());
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_ITEM_EMPTY_EXISTS)));
continue;
}
if (Common.isNotNull(dispatchMap.get(excel.getEmpIdcard())) && "公积金".equals(dispatchMap.get(excel.getEmpIdcard()).getDispatchItem())){
socialsMap.remove(excel.getEmpIdcard());
excel.setSocialHousehold(null);
}
// 变更社保公积金查询 // 变更社保公积金查询
initSocialFundAddInfo(socialFundAddMap, empVo, socialSet, fundSet, setInfoVo, socialFund, excel); initSocialFundAddInfo(socialFundAddMap, empVo, socialSet, fundSet, setInfoVo, socialFund, excel);
} }
...@@ -688,6 +696,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -688,6 +696,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(social)){ if (Common.isNotNull(social)){
dispatch.setSocialId(social.getId()); dispatch.setSocialId(social.getId());
dispatch.setSocialHouseholdName(social.getSocialHouseholdName()); dispatch.setSocialHouseholdName(social.getSocialHouseholdName());
dispatch.setFirstBuyMonthSocial(getFirstBuyMonthSocial(social));
} }
if (Common.isNotNull(fund)){ if (Common.isNotNull(fund)){
dispatch.setFundId(fund.getId()); dispatch.setFundId(fund.getId());
...@@ -699,13 +708,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -699,13 +708,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(project)){ if (Common.isNotNull(project)){
dispatch.setEmpNo(project.getEmpNo()); dispatch.setEmpNo(project.getEmpNo());
} }
}
dispatch.setFirstBuyMonthSocial(getFirstBuyMonthSocial(social));
insertDispatch(emp, dispatch); insertDispatch(emp, dispatch);
// 新增派单申请提交记录 // 新增派单申请提交记录
auditInfo = new TAuditInfo(); auditInfo = new TAuditInfo();
addAuditInfo(dispatch, auditInfo); addAuditInfo(dispatch, auditInfo);
} }
}
// 插入或更新社保公积金查询信息 大病在封装社保的时候已经算了 大病技术和金额了 // 插入或更新社保公积金查询信息 大病在封装社保的时候已经算了 大病技术和金额了
if (Common.isNotNull(socialFundAddMap)){ if (Common.isNotNull(socialFundAddMap)){
socialFund = socialFundAddMap.get(excel.getEmpIdcard()); socialFund = socialFundAddMap.get(excel.getEmpIdcard());
...@@ -1179,7 +1187,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1179,7 +1187,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
int num = 3 - nowNums.length(); int num = 3 - nowNums.length();
return zeroArr[num] + nowNums; return zeroArr[num] + nowNums;
} }
private void initDispatchAddInfo(YifuUser user, private boolean initDispatchAddInfo(YifuUser user,
Map<String, TDispatchInfo> dispatchMap, Map<String, TDispatchInfo> dispatchMap,
DispatchEmpVo empVo, DispatchEmpVo empVo,
SysBaseSetInfo socialSet, SysBaseSetInfo socialSet,
...@@ -1191,6 +1199,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1191,6 +1199,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 初始化派单项 // 初始化派单项
dispatch.setOrderId(excel.getOrderId()); dispatch.setOrderId(excel.getOrderId());
initAddHandleItem(excel, socialFund,dispatch,socialSet,injury); initAddHandleItem(excel, socialFund,dispatch,socialSet,injury);
if (Common.isEmpty(dispatch.getDispatchItem())){
return true;
}
dispatch.setOrganName(user.getDeptName()); dispatch.setOrganName(user.getDeptName());
dispatch.setCreateBy(user.getId()); dispatch.setCreateBy(user.getId());
dispatch.setCreateTime(LocalDateTime.now()); dispatch.setCreateTime(LocalDateTime.now());
...@@ -1210,7 +1221,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1210,7 +1221,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch.setSettleDomainName(excel.getDepartName()); dispatch.setSettleDomainName(excel.getDepartName());
dispatch.setSettleDomainCode(excel.getSettleDomainCode()); dispatch.setSettleDomainCode(excel.getSettleDomainCode());
dispatch.setSettleDomain(excel.getSettleDomainId()); dispatch.setSettleDomain(excel.getSettleDomainId());
if (Common.isNotNull(excel.getSocialHousehold())){ if (Common.isNotNull(excel.getSocialHousehold()) && !"公积金".equals(dispatch.getDispatchItem())){
dispatch.setSocialHandleStatus(CommonConstants.ZERO_STRING); dispatch.setSocialHandleStatus(CommonConstants.ZERO_STRING);
} }
if (Common.isNotNull(excel.getProvidentHousehold())){ if (Common.isNotNull(excel.getProvidentHousehold())){
...@@ -1281,6 +1292,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1281,6 +1292,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 生成申请编码 // 生成申请编码
dispatch.setApplyNo(getApplyCode()); dispatch.setApplyNo(getApplyCode());
dispatchMap.put(excel.getEmpIdcard(),dispatch); dispatchMap.put(excel.getEmpIdcard(),dispatch);
return false;
} }
private void initAddHandleItem(TDispatchImportVo excel, TSocialFundInfo socialFund, TDispatchInfo dispatch, SysBaseSetInfo socialSet, boolean injury) { private void initAddHandleItem(TDispatchImportVo excel, TSocialFundInfo socialFund, TDispatchInfo dispatch, SysBaseSetInfo socialSet, boolean injury) {
...@@ -2721,6 +2733,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2721,6 +2733,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
excelVOTemp.put(excel.getRowIndex().toString(),excel.getEmpIdcard()); excelVOTemp.put(excel.getRowIndex().toString(),excel.getEmpIdcard());
// 初始化派单 和 社保公积金查询信息 // 初始化派单 和 社保公积金查询信息
dispatch = getDispatchInfo(empVo, excel, socialFund,setInfoVo,user); dispatch = getDispatchInfo(empVo, excel, socialFund,setInfoVo,user);
if (Common.isEmpty(dispatch.getDispatchItem())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_ITEM_EMPTY_EXISTS)));
continue;
}
try { try {
dispatch.setOrderId(orderId); dispatch.setOrderId(orderId);
dispatch.setApplyNo(getApplyCode()); dispatch.setApplyNo(getApplyCode());
...@@ -4076,6 +4092,17 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4076,6 +4092,17 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
|| CommonConstants.FOUR_STRING.equals(sf.getBigailmentHandle()))){ || CommonConstants.FOUR_STRING.equals(sf.getBigailmentHandle()))){
sf.setSocialStatus(CommonConstants.TWELVE_STRING); sf.setSocialStatus(CommonConstants.TWELVE_STRING);
sf.setSocialReduceStatus(CommonConstants.SIX_STRING); sf.setSocialReduceStatus(CommonConstants.SIX_STRING);
sf.setSocialReduceDate(null);
}
if (CommonConstants.NINE_STRING.equals(sf.getSocialStatus()) &&
(CommonConstants.THREE_STRING.equals(sf.getPensionHandle())
|| CommonConstants.THREE_STRING.equals(sf.getMedicalHandle())
|| CommonConstants.THREE_STRING.equals(sf.getUnemployHandle())
|| CommonConstants.THREE_STRING.equals(sf.getWorkInjuryHandle())
|| CommonConstants.THREE_STRING.equals(sf.getBirthHandle())
|| CommonConstants.THREE_STRING.equals(sf.getBigailmentHandle()))){
sf.setSocialStatus(CommonConstants.TWELVE_STRING);
sf.setSocialReduceStatus(CommonConstants.SIX_STRING);
} }
} }
// 2.派增处理 socialType 社保拆分的每一项(1养老 2医疗 3失业 4工伤 5生育 6大病) // 2.派增处理 socialType 社保拆分的每一项(1养老 2医疗 3失业 4工伤 5生育 6大病)
......
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