Commit 897be69c authored by hongguangwu's avatar hongguangwu

MVP1.7.1 预入职更新在项时的薪资人员

parent b9743422
...@@ -194,9 +194,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -194,9 +194,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tSalaryEmployee = sdr.getData(); tSalaryEmployee = sdr.getData();
} }
TPreEmpMain main = baseMapper.getTPreEmpMainByCardAndDept(empIdCard, deptId); TPreEmpMain main = baseMapper.getTPreEmpMainByCardAndDept(empIdCard, deptId);
TEmployeeInfo employee = null; TEmployeeInfo employee = tEmployeeInfoService.getInfoByIdcard(empIdCard);
String empId = null; String empId = null;
TEmployeeProject project; TEmployeeProject project = tEmployeeProjectService.getByEmpIdCardAndDeptId(empIdCard, deptId);
PreEmpMainDetailVo vo = new PreEmpMainDetailVo(); PreEmpMainDetailVo vo = new PreEmpMainDetailVo();
YifuUser user = getNewYifuUser(); YifuUser user = getNewYifuUser();
if (main != null && CommonConstants.FIVE_STRING.equals(main.getStatus())) { if (main != null && CommonConstants.FIVE_STRING.equals(main.getStatus())) {
...@@ -229,9 +229,25 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -229,9 +229,25 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TPreEmployeeInfo tPreEmployeeInfo = tPreEmployeeInfoService.getTPreEmployeeInfoList(main.getId()); TPreEmployeeInfo tPreEmployeeInfo = tPreEmployeeInfoService.getTPreEmployeeInfoList(main.getId());
if (tPreEmployeeInfo != null && Common.isNotNull(tPreEmployeeInfo.getId())) { if (tPreEmployeeInfo != null && Common.isNotNull(tPreEmployeeInfo.getId())) {
empId = tPreEmployeeInfo.getId(); empId = tPreEmployeeInfo.getId();
// 预入职已审核+在项,取在项信息
if (CommonConstants.FOUR_STRING.equals(main.getStatus()) && employee != null && project != null) {
empId = employee.getId();
BeanUtil.copyProperties(employee, tPreEmployeeInfo, ID);
tPreEmployeeInfo.setOldId(employee.getId());
}
if (employee == null) {
tPreEmployeeInfo.setOldId(null);
}
vo.setTpreEmployeeInfo(tPreEmployeeInfo); vo.setTpreEmployeeInfo(tPreEmployeeInfo);
} else { } else {
tPreEmployeeInfo = new TPreEmployeeInfo(); tPreEmployeeInfo = new TPreEmployeeInfo();
// 预入职已审核+在项,取在项信息
if (CommonConstants.FOUR_STRING.equals(main.getStatus()) && employee != null && project != null) {
empId = employee.getId();
BeanUtil.copyProperties(employee, tPreEmployeeInfo, ID);
tPreEmployeeInfo.setOldId(employee.getId());
}
tPreEmployeeInfo.setEmpIdcard(main.getEmpIdcard()); tPreEmployeeInfo.setEmpIdcard(main.getEmpIdcard());
tPreEmployeeInfo.setEmpName(main.getEmpName()); tPreEmployeeInfo.setEmpName(main.getEmpName());
tPreEmployeeInfo.setPreMainId(main.getId()); tPreEmployeeInfo.setPreMainId(main.getId());
...@@ -244,11 +260,24 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -244,11 +260,24 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TPreEmployeeProject tPreEmployeeProject = tPreEmployeeProjectService.getTPreEmployeeProjectList(main.getId()); TPreEmployeeProject tPreEmployeeProject = tPreEmployeeProjectService.getTPreEmployeeProjectList(main.getId());
// 预入职-项目档案表 // 预入职-项目档案表
if (tPreEmployeeProject != null) { if (tPreEmployeeProject != null) {
// 预入职已审核+在项,取在项信息
if (CommonConstants.FOUR_STRING.equals(main.getStatus()) && employee != null && project != null) {
BeanUtil.copyProperties(project, tPreEmployeeProject, ID);
tPreEmployeeProject.setOldId(project.getId());
}
if (project == null) {
tPreEmployeeProject.setOldId(null);
}
vo.setTpreEmployeeProject(tPreEmployeeProject); vo.setTpreEmployeeProject(tPreEmployeeProject);
} else { } else {
tPreEmployeeProject = new TPreEmployeeProject(); tPreEmployeeProject = new TPreEmployeeProject();
tPreEmployeeProject.setEmpIdcard(main.getEmpIdcard()); tPreEmployeeProject.setEmpIdcard(main.getEmpIdcard());
tPreEmployeeProject.setEmpName(main.getEmpName()); tPreEmployeeProject.setEmpName(main.getEmpName());
// 预入职已审核+在项,取在项信息
if (CommonConstants.FOUR_STRING.equals(main.getStatus()) && employee != null && project != null) {
BeanUtil.copyProperties(project, tPreEmployeeProject, ID);
tPreEmployeeProject.setOldId(project.getId());
}
tPreEmployeeProject.setUnitId(dept.getCustomerId()); tPreEmployeeProject.setUnitId(dept.getCustomerId());
tPreEmployeeProject.setUnitName(dept.getCustomerName()); tPreEmployeeProject.setUnitName(dept.getCustomerName());
tPreEmployeeProject.setUnitNo(dept.getCustomerNo()); tPreEmployeeProject.setUnitNo(dept.getCustomerNo());
...@@ -288,8 +317,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -288,8 +317,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
vo.setTpreEmpDeclaration(tPreEmpDeclaration); vo.setTpreEmpDeclaration(tPreEmpDeclaration);
main.setDeclarationId(tPreEmpDeclaration.getId()); main.setDeclarationId(tPreEmpDeclaration.getId());
this.save(main); this.save(main);
// 查询档案信息
employee = tEmployeeInfoService.getInfoByIdcard(empIdCard);
TPreEmployeeInfo tPreEmployeeInfo; TPreEmployeeInfo tPreEmployeeInfo;
TPreEmployeeProject tPreEmployeeProject; TPreEmployeeProject tPreEmployeeProject;
if (employee != null) { if (employee != null) {
...@@ -303,7 +331,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -303,7 +331,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeInfo.setCreateTime(LocalDateTime.now()); tPreEmployeeInfo.setCreateTime(LocalDateTime.now());
tPreEmployeeInfoService.saveOrUpdate(tPreEmployeeInfo); tPreEmployeeInfoService.saveOrUpdate(tPreEmployeeInfo);
vo.setTpreEmployeeInfo(tPreEmployeeInfo); vo.setTpreEmployeeInfo(tPreEmployeeInfo);
project = tEmployeeProjectService.getByEmpIdCardAndDeptId(empIdCard, deptId);
if (project != null) { if (project != null) {
tPreEmployeeProject = new TPreEmployeeProject(); tPreEmployeeProject = new TPreEmployeeProject();
BeanUtil.copyProperties(project, tPreEmployeeProject, ID); BeanUtil.copyProperties(project, tPreEmployeeProject, ID);
...@@ -551,6 +579,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -551,6 +579,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeInfo = tPreEmployeeInfoService.getTPreEmployeeInfoList(id); tPreEmployeeInfo = tPreEmployeeInfoService.getTPreEmployeeInfoList(id);
if (tPreEmployeeInfo == null) { if (tPreEmployeeInfo == null) {
tPreEmployeeInfo = new TPreEmployeeInfo(); tPreEmployeeInfo = new TPreEmployeeInfo();
// 预入职已审核+在项,取在项信息
if (CommonConstants.FOUR_STRING.equals(main.getStatus()) && employee != null && project != null) {
BeanUtil.copyProperties(employee, tPreEmployeeInfo, ID);
tPreEmployeeInfo.setOldId(project.getId());
}
tPreEmployeeInfo.setEmpIdcard(main.getEmpIdcard()); tPreEmployeeInfo.setEmpIdcard(main.getEmpIdcard());
tPreEmployeeInfo.setPreMainId(main.getId()); tPreEmployeeInfo.setPreMainId(main.getId());
tPreEmployeeInfo.setCreateBy(user.getId()); tPreEmployeeInfo.setCreateBy(user.getId());
...@@ -575,6 +608,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -575,6 +608,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TPreEmployeeProject tPreEmployeeProject = tPreEmployeeProjectService.getTPreEmployeeProjectList(id); TPreEmployeeProject tPreEmployeeProject = tPreEmployeeProjectService.getTPreEmployeeProjectList(id);
if (tPreEmployeeProject == null) { if (tPreEmployeeProject == null) {
tPreEmployeeProject = new TPreEmployeeProject(); tPreEmployeeProject = new TPreEmployeeProject();
// 预入职已审核+在项,取在项信息
if (CommonConstants.FOUR_STRING.equals(main.getStatus()) && employee != null && project != null) {
BeanUtil.copyProperties(project, tPreEmployeeProject, ID);
tPreEmployeeProject.setOldId(project.getId());
}
tPreEmployeeProject.setEmpIdcard(main.getEmpIdcard()); tPreEmployeeProject.setEmpIdcard(main.getEmpIdcard());
tPreEmployeeProject.setUnitId(dept.getCustomerId()); tPreEmployeeProject.setUnitId(dept.getCustomerId());
tPreEmployeeProject.setUnitName(dept.getCustomerName()); tPreEmployeeProject.setUnitName(dept.getCustomerName());
......
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