Commit 6efff77f authored by fangxinjiang's avatar fangxinjiang

派单调整

parent 44ee2df9
...@@ -474,4 +474,16 @@ public class TEmployeeInfoController { ...@@ -474,4 +474,16 @@ public class TEmployeeInfoController {
public Boolean updateEmpInfo(@RequestBody UpdateEmpVo vo) { public Boolean updateEmpInfo(@RequestBody UpdateEmpVo vo) {
return tEmployeeInfoService.updateEmpInfo(vo); return tEmployeeInfoService.updateEmpInfo(vo);
} }
/**
* @Description: 查验手机号码是否存在
* @Author: fxj
* @Date: 2022/08/01 18:52
**/
@Operation(summary = "通过mobile查询是否已存在", description = "通过mobile查询是否已存在")
@Inner
@PostMapping("/inner/checkMobile")
public Boolean checkMobile(@RequestBody String mobile) {
return tEmployeeInfoService.checkMobile(mobile);
}
} }
...@@ -186,4 +186,6 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> { ...@@ -186,4 +186,6 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
EmpDispatchAddVo addDispatchInfo(EmpDispatchAddVo addVo); EmpDispatchAddVo addDispatchInfo(EmpDispatchAddVo addVo);
Boolean updateEmpInfo(UpdateEmpVo vo); Boolean updateEmpInfo(UpdateEmpVo vo);
Boolean checkMobile(String mobile);
} }
...@@ -2135,6 +2135,16 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2135,6 +2135,16 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
return true; return true;
} }
@Override
public Boolean checkMobile(String mobile) {
if (Common.isEmpty(mobile)){
return true;
}
return !(baseMapper.selectCount(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getFileStatus,CommonConstants.ZERO_STRING)
.eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING)) > 0);
}
private void saveContract(Map<String, EmpProjectDispatchVo> projectsMap, private void saveContract(Map<String, EmpProjectDispatchVo> projectsMap,
Map<String, EmpContractDispatchVo> contractsMap, Map<String, EmpContractDispatchVo> contractsMap,
Map<String, EmpAddDispatchVo> empAddsMap) { Map<String, EmpAddDispatchVo> empAddsMap) {
......
...@@ -480,4 +480,8 @@ public interface ErrorCodes { ...@@ -480,4 +480,8 @@ public interface ErrorCodes {
* 派增异常: 单派工伤其他起缴日期不可填写 * 派增异常: 单派工伤其他起缴日期不可填写
*/ */
String EMP_DISPATCH_SOCIAL_DIY_INJURY_ERROR = "emp.dispatch.social.diy.injury.error"; String EMP_DISPATCH_SOCIAL_DIY_INJURY_ERROR = "emp.dispatch.social.diy.injury.error";
/**
* 派增异常: 已存在对应手机号码的在用员工档案
*/
String EMP_DISPATCH_EMP_MOBILE_REPEAT = "emp.dispatch.emp.mobile.repeat";
} }
...@@ -183,6 +183,8 @@ emp.dispatch.reduce.fund.depart.no.error=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u65E0\u ...@@ -183,6 +183,8 @@ emp.dispatch.reduce.fund.depart.no.error=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u65E0\u
emp.dispatch.social.diy.injury.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5355\u6D3E\u5DE5\u4F24\u5176\u4ED6\u8D77\u7F34\u65E5\u671F\u4E0D\u53EF\u586B\u5199 emp.dispatch.social.diy.injury.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5355\u6D3E\u5DE5\u4F24\u5176\u4ED6\u8D77\u7F34\u65E5\u671F\u4E0D\u53EF\u586B\u5199
emp.dispatch.emp.mobile.repeat=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5DF2\u5B58\u5728\u5BF9\u5E94\u624B\u673A\u53F7\u7801\u7684\u5728\u7528\u5458\u5DE5\u6863\u6848
......
...@@ -187,4 +187,18 @@ public class ArchivesDaprUtil { ...@@ -187,4 +187,18 @@ public class ArchivesDaprUtil {
} }
return res; return res;
} }
/**
* @Author fxj
* @Description 校验手机号码重复
* @Date 22:11 2022/8/4
* @Param
* @return
**/
public R<Boolean> checkMobile(String mobile) {
R<Boolean> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/temployeeinfo/checkMobile" , mobile, Boolean.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("检验号码重复信息失败!");
}
return res;
}
} }
...@@ -1685,6 +1685,16 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1685,6 +1685,16 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), checkRes.getMsg())); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), checkRes.getMsg()));
return true; return true;
} }
// 校验手机号码重复
checkRes = archivesDaprUtil.checkMobile(excel.getEmpMobile());
if (Common.isEmpty(checkRes) || checkRes.getCode() != CommonConstants.SUCCESS){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), checkRes.getMsg()));
return true;
}
if (checkRes.getData().booleanValue()){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_MOBILE_REPEAT)));
return true;
}
} }
/*项目档案有可用状态的合同: /*项目档案有可用状态的合同:
不对合同做判断,取值:项目档案的合同; 不对合同做判断,取值:项目档案的合同;
...@@ -2212,6 +2222,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2212,6 +2222,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
} }
if (Common.isNotNull(excel.getFundReduceDate())){ if (Common.isNotNull(excel.getFundReduceDate())){
// 公积金状态:派增(0待审核、1待办理、3办理成功、4办理失败9 审核不通过)、派减(5待审核 6待办理 7 办理成功 8 办理失败 )
if (CommonConstants.THREE_STRING.equals(socialFund.getFundStatus())){
temp.append(DispatchConstants.DISPATCH_FUND);
}
dispatch.setFundHandleStatus(CommonConstants.ZERO_STRING); dispatch.setFundHandleStatus(CommonConstants.ZERO_STRING);
dispatch.setFundId(socialFund.getFundId()); dispatch.setFundId(socialFund.getFundId());
dispatch.setFundReduceDate(excel.getSocialReduceDate()); dispatch.setFundReduceDate(excel.getSocialReduceDate());
...@@ -2221,10 +2235,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2221,10 +2235,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund.setFundReduceDate(excel.getFundReduceDate()); socialFund.setFundReduceDate(excel.getFundReduceDate());
socialFund.setFundStatus(CommonConstants.FIVE_STRING); socialFund.setFundStatus(CommonConstants.FIVE_STRING);
socialFund.setFundReduceStatus(CommonConstants.ZERO_STRING); socialFund.setFundReduceStatus(CommonConstants.ZERO_STRING);
// 公积金状态:派增(0待审核、1待办理、3办理成功、4办理失败9 审核不通过)、派减(5待审核 6待办理 7 办理成功 8 办理失败 )
if (CommonConstants.THREE_STRING.equals(socialFund.getFundStatus())){
temp.append(DispatchConstants.DISPATCH_FUND);
}
} }
dispatch.setDispatchItem(temp.toString()); dispatch.setDispatchItem(temp.toString());
dispatch.setBelongUnitName(socialFund.getUnitName()); dispatch.setBelongUnitName(socialFund.getUnitName());
...@@ -2268,8 +2278,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2268,8 +2278,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败)、派减(6待审核 7待办理 8办理成功 9 办理失败) //社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败)、派减(6待审核 7待办理 8办理成功 9 办理失败)
if (Common.isNotNull(excel.getSocialReduceDate())){ if (Common.isNotNull(excel.getSocialReduceDate())){
if (Common.isEmpty(socialFund.getSocialStatus()) if (Common.isEmpty(socialFund.getSocialStatus())
|| (!socialFund.getSocialStatus().equals(CommonConstants.THREE_STRING) || !(socialFund.getSocialStatus().equals(CommonConstants.THREE_STRING)
&& !socialFund.getSocialStatus().equals(CommonConstants.NINE_STRING))){ || socialFund.getSocialStatus().equals(CommonConstants.FOUR_STRING)
|| socialFund.getSocialStatus().equals(CommonConstants.NINE_STRING))){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_REDUCE_SOCIAL_STATUS_ERROR))); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_REDUCE_SOCIAL_STATUS_ERROR)));
return true; return true;
} }
...@@ -2454,7 +2465,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2454,7 +2465,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf.setSocialAddStatus(CommonConstants.FIVE_STRING); sf.setSocialAddStatus(CommonConstants.FIVE_STRING);
sf.setSocialStatus(CommonConstants.TEN_STRING); sf.setSocialStatus(CommonConstants.TEN_STRING);
// 更新预估数据 // 更新预估数据
forecastLibraryService.updateForecastLibaryByDispatchReduce(sf); forecastLibraryService.updateForecastLibaryByDispatch(sf);
} }
socialInfo.setAuditTime(now); socialInfo.setAuditTime(now);
socialInfo.setAuditUser(user.getId()); socialInfo.setAuditUser(user.getId());
...@@ -2505,7 +2516,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2505,7 +2516,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf.setFundAddStatus(CommonConstants.FOUR_STRING); sf.setFundAddStatus(CommonConstants.FOUR_STRING);
sf.setFundStatus(CommonConstants.NINE_STRING); sf.setFundStatus(CommonConstants.NINE_STRING);
// 更新预估数据 // 更新预估数据
forecastLibraryService.updateForecastLibaryByDispatchReduce(sf); forecastLibraryService.updateForecastLibaryByDispatch(sf);
} }
providentFund.setAuditTime(now); providentFund.setAuditTime(now);
providentFund.setAuditUser(user.getId()); providentFund.setAuditUser(user.getId());
...@@ -2516,7 +2527,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2516,7 +2527,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (CommonConstants.ZERO_INT == flag.intValue()) { if (CommonConstants.ZERO_INT == flag.intValue()) {
providentFund.setReduceCan(CommonConstants.ONE_STRING); providentFund.setReduceCan(CommonConstants.ONE_STRING);
sf.setFundReduceStatus(CommonConstants.ONE_STRING); sf.setFundReduceStatus(CommonConstants.ONE_STRING);
sf.setFundStatus(CommonConstants.EIGHT_STRING); sf.setFundStatus(CommonConstants.SIX_STRING);
// 审核不通过 // 审核不通过
} else if (CommonConstants.ONE_INT == flag.intValue()) { } else if (CommonConstants.ONE_INT == flag.intValue()) {
// 作废更新:公积金状态、同步档案的公积金状态 // 作废更新:公积金状态、同步档案的公积金状态
...@@ -2541,13 +2552,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2541,13 +2552,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 派单状态信息拼接 // 派单状态信息拼接
if (CommonConstants.ZERO_INT == flag.intValue()) { if (CommonConstants.ZERO_INT == flag.intValue()) {
remark += "审核通过:" + auditRemark; remark += "审核通过:" + auditRemark;
initAuditInfo(auditInfo, remark, CommonConstants.ONE_STRING, user,remark);
} else { } else {
remark += "审核不通过:" + auditRemark; remark += "审核不通过:" + auditRemark;
initAuditInfo(auditInfo, remark, CommonConstants.TWO_STRING, user,remark);
} }
//记录处理意见到派单 最新的意见会覆盖之前的,详情 到流程中查询 //记录处理意见到派单 最新的意见会覆盖之前的,详情 到流程中查询
dis.setHandleRemark(ServiceUtil.ifNullToEmpty(auditRemark)); dis.setHandleRemark(ServiceUtil.ifNullToEmpty(auditRemark));
dis.setAuditRemark(ServiceUtil.ifNullToEmpty(auditRemark)); dis.setAuditRemark(ServiceUtil.ifNullToEmpty(auditRemark));
initAuditInfo(auditInfo, remark, auditStatus, user,remark);
auditInfo.setDispatchInfoId(dis.getId()); auditInfo.setDispatchInfoId(dis.getId());
//更新派单状态 //更新派单状态
if (CommonConstants.ZERO_INT == flag.intValue()) { if (CommonConstants.ZERO_INT == flag.intValue()) {
...@@ -2737,7 +2749,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2737,7 +2749,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 派增办理,全部失败,清空社保状态 // 派增办理,全部失败,清空社保状态
if (CommonConstants.TWO_STRING.equals(socialInfo.getHandleStatus())) { if (CommonConstants.TWO_STRING.equals(socialInfo.getHandleStatus())) {
// 同步预估库数据 // 同步预估库数据
forecastLibraryService.updateForecastLibaryByDispatchReduce(sf); forecastLibraryService.updateForecastLibaryByDispatch(sf);
} }
socialMapper.updateById(socialInfo); socialMapper.updateById(socialInfo);
dis.setSocialHandleRemark(ServiceUtil.ifNullToEmpty(handleRemark)); dis.setSocialHandleRemark(ServiceUtil.ifNullToEmpty(handleRemark));
...@@ -2747,13 +2759,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2747,13 +2759,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
temp.append(DispatchConstants.DISPATCH_SOCIAL_ADD); temp.append(DispatchConstants.DISPATCH_SOCIAL_ADD);
temp.append(socialTypeRemark); temp.append(socialTypeRemark);
temp.append(DispatchConstants.DISPATCH_HANDLE_SUCCESS); temp.append(DispatchConstants.DISPATCH_HANDLE_SUCCESS);
initAuditInfo(auditInfo, ( temp + handleRemark), handleStatus, user, temp.toString()); initAuditInfo(auditInfo, ( temp + handleRemark), CommonConstants.THREE_STRING, user, temp.toString());
} else { } else {
temp.setLength(CommonConstants.ZERO_INT); temp.setLength(CommonConstants.ZERO_INT);
temp.append(DispatchConstants.DISPATCH_SOCIAL_ADD); temp.append(DispatchConstants.DISPATCH_SOCIAL_ADD);
temp.append(socialTypeRemark); temp.append(socialTypeRemark);
temp.append(DispatchConstants.DISPATCH_HANDLE_FAIL); temp.append(DispatchConstants.DISPATCH_HANDLE_FAIL);
initAuditInfo(auditInfo, ( temp + handleRemark), handleStatus, user, temp.toString()); initAuditInfo(auditInfo, ( temp + handleRemark), CommonConstants.FOUR_STRING, user, temp.toString());
} }
auditInfo.setSocialId(dis.getId()); auditInfo.setSocialId(dis.getId());
} else { } else {
...@@ -2780,14 +2792,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2780,14 +2792,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf.setFundAddStatus(CommonConstants.THREE_STRING); sf.setFundAddStatus(CommonConstants.THREE_STRING);
sf.setFundStatus(CommonConstants.FOUR_STRING); sf.setFundStatus(CommonConstants.FOUR_STRING);
// 同步预估库数据 // 同步预估库数据
forecastLibraryService.updateForecastLibaryByDispatchReduce(sf); forecastLibraryService.updateForecastLibaryByDispatch(sf);
} }
fundMapper.updateById(providentFund); fundMapper.updateById(providentFund);
dis.setFundHandleRemark(ServiceUtil.ifNullToEmpty(handleRemark)); dis.setFundHandleRemark(ServiceUtil.ifNullToEmpty(handleRemark));
if (CommonConstants.ZERO_INT == flag) { if (CommonConstants.ZERO_INT == flag) {
initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_ADD_SUCCESS + handleRemark), handleStatus, user, DispatchConstants.DISPATCH_FUND_ADD_SUCCESS); initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_ADD_SUCCESS + handleRemark), CommonConstants.THREE_STRING, user, DispatchConstants.DISPATCH_FUND_ADD_SUCCESS);
} else { } else {
initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_ADD_FAIL + handleRemark), handleStatus, user, DispatchConstants.DISPATCH_FUND_ADD_FAIL); initAuditInfo(auditInfo, (DispatchConstants.DISPATCH_FUND_ADD_FAIL + handleRemark), CommonConstants.FOUR_STRING, user, DispatchConstants.DISPATCH_FUND_ADD_FAIL);
} }
auditInfo.setProvidentId(dis.getId()); auditInfo.setProvidentId(dis.getId());
} else { } else {
...@@ -2834,14 +2846,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2834,14 +2846,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
temp.append(socialTypeRemark.toString()); temp.append(socialTypeRemark.toString());
temp.append(DispatchConstants.DISPATCH_HANDLE_SUCCESS); temp.append(DispatchConstants.DISPATCH_HANDLE_SUCCESS);
temp.append(handleRemark); temp.append(handleRemark);
initAuditInfo(auditInfo,temp.toString(), handleStatus, user, temp.toString()); initAuditInfo(auditInfo,temp.toString(), CommonConstants.THREE_STRING, user, temp.toString());
} else { } else {
temp.setLength(CommonConstants.ZERO_INT); temp.setLength(CommonConstants.ZERO_INT);
temp.append(DispatchConstants.DISPATCH_SOCIAL_REDUCE); temp.append(DispatchConstants.DISPATCH_SOCIAL_REDUCE);
temp.append(socialTypeRemark.toString()); temp.append(socialTypeRemark.toString());
temp.append(DispatchConstants.DISPATCH_HANDLE_FAIL); temp.append(DispatchConstants.DISPATCH_HANDLE_FAIL);
temp.append(handleRemark); temp.append(handleRemark);
initAuditInfo(auditInfo,temp.toString(), handleStatus, user, temp.toString()); initAuditInfo(auditInfo,temp.toString(), CommonConstants.FOUR_STRING, user, temp.toString());
} }
dis.setSocialHandleStatus(handleStatus); dis.setSocialHandleStatus(handleStatus);
auditInfo.setSocialId(dis.getId()); auditInfo.setSocialId(dis.getId());
...@@ -2877,10 +2889,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2877,10 +2889,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
fundMapper.updateById(providentFund); fundMapper.updateById(providentFund);
dis.setFundHandleRemark(ServiceUtil.ifNullToEmpty(handleRemark)); dis.setFundHandleRemark(ServiceUtil.ifNullToEmpty(handleRemark));
if (CommonConstants.ZERO_INT == flag) { if (CommonConstants.ZERO_INT == flag) {
initAuditInfo(auditInfo, ("公积金派减办理成功:" + handleRemark), handleStatus, user, ""); initAuditInfo(auditInfo, ("公积金派减办理成功:" + handleRemark), CommonConstants.SIX_STRING, user, "");
dis.setFundHandleStatus(CommonConstants.ONE_STRING); dis.setFundHandleStatus(CommonConstants.ONE_STRING);
} else { } else {
initAuditInfo(auditInfo, ("公积金派减办理失败:" + handleRemark), handleStatus, user, ""); initAuditInfo(auditInfo, ("公积金派减办理失败:" + handleRemark), CommonConstants.FOUR_STRING, user, "");
dis.setFundHandleStatus(CommonConstants.TWO_STRING); dis.setFundHandleStatus(CommonConstants.TWO_STRING);
} }
auditInfo.setProvidentId(dis.getId()); auditInfo.setProvidentId(dis.getId());
......
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