Commit ad3a4385 authored by fangxinjiang's avatar fangxinjiang

項目檔案劃轉

parent 14360dcf
......@@ -420,6 +420,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
newEmpProject = new TEmployeeProject();
BeanUtil.copyProperties(oldEmpProject,newEmpProject);
newEmpProject.setId(null);
newEmpProject.setEmpNo(tEmployeeProjectService.getEmpNo(newEmpProject.getDeptNo()));
newEmpProject.setDeptId(vo.getNewDeptId());
newEmpProject.setDeptName(vo.getNewDeptName());
newEmpProject.setDeptNo(vo.getNewDeptNo());
......@@ -430,17 +431,23 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
newEmpProject.setBusinessSecondType(tSettleDomain.getBusinessSecondType());
newEmpProject.setBusinessThirdType(tSettleDomain.getBusinessThirdType());
newEmpProject.setInsuranceStatus(null);
updateTEmployeeProject.setDeptName(vo.getNewDeptName());
updateTEmployeeProject.setDeptNo(vo.getNewDeptNo());
updateTEmployeeProject.setDeptId(vo.getNewDeptId());
updateTEmployeeProject.setUnitNo(vo.getNewUnitNo());
updateTEmployeeProject.setUnitId(vo.getNewUnitId());
updateTEmployeeProject.setUnitName(vo.getNewUnitName());
updateTEmployeeProject.setBusinessPrimaryType(tSettleDomain.getBusinessPrimaryType());
updateTEmployeeProject.setBusinessSecondType(tSettleDomain.getBusinessSecondType());
updateTEmployeeProject.setBusinessThirdType(tSettleDomain.getBusinessThirdType());
newEmpProject.setSocialStatus(null);
newEmpProject.setSocialProvince(null);
newEmpProject.setSocialCity(null);
newEmpProject.setSocialTown(null);
newEmpProject.setFundStatus(null);
newEmpProject.setContractStatus(null);
newEmpProject.setContractType(null);
}
updateTEmployeeProject.setDeptName(vo.getNewDeptName());
updateTEmployeeProject.setDeptNo(vo.getNewDeptNo());
updateTEmployeeProject.setDeptId(vo.getNewDeptId());
updateTEmployeeProject.setUnitNo(vo.getNewUnitNo());
updateTEmployeeProject.setUnitId(vo.getNewUnitId());
updateTEmployeeProject.setUnitName(vo.getNewUnitName());
updateTEmployeeProject.setBusinessPrimaryType(tSettleDomain.getBusinessPrimaryType());
updateTEmployeeProject.setBusinessSecondType(tSettleDomain.getBusinessSecondType());
updateTEmployeeProject.setBusinessThirdType(tSettleDomain.getBusinessThirdType());
// 记录变更日志
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", updateTEmployeeProject.getId(), oldEmpProject, updateTEmployeeProject);
updateTEmployeeProject.setOdlDeptId(oldEmpProject.getDeptId());
......@@ -456,8 +463,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updatesf.setUnitName(updateTEmployeeProject.getUnitName());
// 处理社保 目标项目档案已有项目档案不做处理
if (vo.getChangeItems().indexOf(CommonConstants.ONE_STRING) >= CommonConstants.ZERO_INT) {
if (!(Common.isEmpty(newEmpProject.getSocialStatus())
|| CommonConstants.ZERO_INT == newEmpProject.getSocialStatus())){
if (Common.isEmpty(newEmpProject.getSocialStatus())
|| CommonConstants.ZERO_INT == newEmpProject.getSocialStatus()){
newEmpProject.setSocialStatus(oldEmpProject.getSocialStatus());
newEmpProject.setSocialProvince(oldEmpProject.getSocialProvince());
newEmpProject.setSocialCity(oldEmpProject.getSocialCity());
......@@ -475,8 +482,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
// 处理公积金 如果目标项目档案已存在公积金 不划转
if (vo.getChangeItems().indexOf(CommonConstants.TWO_STRING) >= CommonConstants.ZERO_INT) {
if (!(Common.isEmpty(newEmpProject.getFundStatus())
|| CommonConstants.ZERO_INT == newEmpProject.getFundStatus())){
if (Common.isEmpty(newEmpProject.getFundStatus())
|| CommonConstants.ZERO_INT == newEmpProject.getFundStatus()){
newEmpProject.setFundStatus(oldEmpProject.getFundStatus());
updatesf.setFlag(CommonConstants.ONE_STRING);
socialDaprUtils.updateSocialAndFoundInfo(updatesf);
......@@ -488,8 +495,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
// 处理員工合同 目标 已有合同状态 不在处理合同划转
if (vo.getChangeItems().indexOf(CommonConstants.ZERO_STRING) >= CommonConstants.ZERO_INT){
if (!(Common.isEmpty(newEmpProject.getContractStatus())
|| CommonConstants.ZERO_INT != newEmpProject.getContractStatus())){
if (Common.isEmpty(newEmpProject.getContractStatus())
|| CommonConstants.ZERO_INT != newEmpProject.getContractStatus()){
newEmpProject.setContractStatus(oldEmpProject.getContractStatus());
newEmpProject.setContractType(oldEmpProject.getContractType());
// 合同同步划转---只划转在用合同 fxj 2023-03-06
......@@ -506,6 +513,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
tEmployeeProjectService.saveOrUpdate(newEmpProject);
//同步减项老项目档案
if (CommonConstants.ONE_STRING.equals(vo.getChangeType())){
oldEmpProject.setIsLeaveEmployee(CommonConstants.ONE_INT);
R res = tEmployeeProjectService.deleteEmpPro(oldEmpProject);
resStr.append(res.getMsg());
}
......
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