Commit 817704a8 authored by huyuchen's avatar huyuchen

优化修改

parent 76d38f8e
......@@ -1385,6 +1385,48 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (Common.isEmpty(vo) || Common.isEmpty(vo.getEmpIdCard()) || Common.isEmpty(vo.getDepartNo())){
return false;
}
TEmployeeInfo employee = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, vo.getEmpIdCard())
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING).last(CommonConstants.LAST_ONE_SQL));
// : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
if (Common.isNotNull(employee)) {
if (Common.isNotNull(vo.getSocialStatus())) {
employee.setSocialStatus(Integer.parseInt(vo.getSocialStatus()));
}
if (Common.isNotNull(vo.getFundStatus())) {
employee.setFundStatus(Integer.parseInt(vo.getFundStatus()));
}
if (Common.isNotNull(vo.getFileProvince())) {
employee.setFileProvince(Integer.parseInt(vo.getFileProvince()));
}
if (Common.isNotNull(vo.getFileCity())) {
employee.setFileCity(Integer.parseInt(vo.getFileCity()));
if (Common.isNotNull(vo.getFileTown())) {
employee.setFileTown(Integer.parseInt(vo.getFileTown()));
} else {
employee.setFileTown(null);
}
}
if (Common.isNotNull(vo.getMobile())) {
employee.setEmpPhone(vo.getMobile());
}
tEmployeeInfoMapper.updateSocialInfoById(employee);
}
TEmployeeProject project = baseMapper.selectOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeptNo, vo.getDepartNo())
.eq(TEmployeeProject::getEmpIdcard, vo.getEmpIdCard())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
// : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
if (Common.isNotNull(project)) {
if (Common.isNotNull(vo.getSocialStatus())) {
project.setSocialStatus(Integer.parseInt(vo.getSocialStatus()));
}
if (Common.isNotNull(vo.getFundStatus())) {
project.setFundStatus(Integer.parseInt(vo.getFundStatus()));
}
baseMapper.updateSocialAndFundStatusById(project);
}
//是否同步终止合同、减项、减档为是的时候 单独写逻辑
if (Common.isNotNull(vo.getChangeContractAndEmployee())
&& CommonConstants.ZERO_STRING.equals(vo.getChangeContractAndEmployee())) {
......@@ -1498,49 +1540,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
handlerInfo.setOperResult(failueInfo.length() > 1 ? "1" : "2");
workHandlerInfoService.updateById(handlerInfo);
}
}else {
TEmployeeInfo employee = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, vo.getEmpIdCard())
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING).last(CommonConstants.LAST_ONE_SQL));
// : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
if (Common.isNotNull(employee)) {
if (Common.isNotNull(vo.getSocialStatus())) {
employee.setSocialStatus(Integer.parseInt(vo.getSocialStatus()));
}
if (Common.isNotNull(vo.getFundStatus())) {
employee.setFundStatus(Integer.parseInt(vo.getFundStatus()));
}
if (Common.isNotNull(vo.getFileProvince())) {
employee.setFileProvince(Integer.parseInt(vo.getFileProvince()));
}
if (Common.isNotNull(vo.getFileCity())) {
employee.setFileCity(Integer.parseInt(vo.getFileCity()));
if (Common.isNotNull(vo.getFileTown())) {
employee.setFileTown(Integer.parseInt(vo.getFileTown()));
} else {
employee.setFileTown(null);
}
}
if (Common.isNotNull(vo.getMobile())) {
employee.setEmpPhone(vo.getMobile());
}
tEmployeeInfoMapper.updateSocialInfoById(employee);
}
TEmployeeProject project = baseMapper.selectOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeptNo, vo.getDepartNo())
.eq(TEmployeeProject::getEmpIdcard, vo.getEmpIdCard())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
// : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
if (Common.isNotNull(project)) {
if (Common.isNotNull(vo.getSocialStatus())) {
project.setSocialStatus(Integer.parseInt(vo.getSocialStatus()));
}
if (Common.isNotNull(vo.getFundStatus())) {
project.setFundStatus(Integer.parseInt(vo.getFundStatus()));
}
baseMapper.updateSocialAndFundStatusById(project);
}
}
return true;
}
......@@ -1856,6 +1855,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
audit.setRootName("社保派减联动减合同");
audit.setLinkId(tEmployeeContractInfo.getId());
audit.setLinkType(CommonConstants.ONE_INT);
audit.setCreateName(tEmployeeContractInfo.getAuditUserName());
tEmployeeContractAuditService.save(audit);
}
}
......@@ -3956,8 +3956,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&& (CommonConstants.FOUR_STRING.equals(sf.getFundStatus())
|| CommonConstants.NINE_STRING.equals(sf.getFundStatus())))) {
UpProjectSocialFundVo vo = new UpProjectSocialFundVo();
// 社保状态 社保状态(字典): 0 无社保 1 处理中 2.部分购买 3.正常 4.已派减
initSocialFundStatus(socialInfo, providentFund, vo,sf);
if (Common.isNotNull(dis.getChangeContractAndEmployee())
&& CommonConstants.ZERO_STRING.equals(dis.getChangeContractAndEmployee())) {
&& CommonConstants.ZERO_STRING.equals(dis.getChangeContractAndEmployee())
&& (Common.isNotNull(vo.getSocialStatus()) || Common.isNotNull(vo.getFundStatus()))) {
vo.setEmpIdCard(dis.getEmpIdcard());
vo.setDepartNo(dis.getSettleDomainCode());
vo.setChangeContractAndEmployee(dis.getChangeContractAndEmployee());
......@@ -3966,16 +3969,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
vo.setEmpName(dis.getEmpName());
vo.setDeptName(dis.getSettleDomainName());
vo.setDetailId(dis.getId());
vo.setSocialStatus(sf.getSocialStatus());
}
R<Boolean> resUp = archivesDaprUtil.updateProjectSocialFund(vo);
if (Common.isEmpty(resUp) || !(CommonConstants.SUCCESS.intValue() == resUp.getCode()) || !resUp.getData().booleanValue()) {
errorList.add(new ErrorMessage(-1, vo.getEmpIdCard() + DispatchConstants.DISPATCH_SYN_DOC_EXE, CommonConstants.RED, dis.getEmpName()));
continue;
}
}
// 派减公积金办理失败不同步档案的相关字段信息
if (!(CommonConstants.ONE_STRING.equals(dis.getType())
// 派减公积金办理失败不同步档案的相关字段信息
} else if (!(CommonConstants.ONE_STRING.equals(dis.getType())
&& CommonConstants.ONE_INT == flag
&& CommonConstants.ONE_STRING.equals(typeSub))){
UpProjectSocialFundVo vo = new UpProjectSocialFundVo();
......
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