Commit acf437cc authored by hongguangwu's avatar hongguangwu

MVP1.6.6-预入职相关_加创建人

parent 74dc8072
......@@ -244,9 +244,9 @@ public class TEmployeeProject extends BaseEntity {
private String tryPeriod;
/**
* 项目档案来源(字典:4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬、6批量导入、7电子签)
* 项目档案来源(字典:4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬、6批量导入、7电子签8预入职
*/
@Schema(description ="项目档案来源(字典:4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬、6批量导入、7电子签)")
@Schema(description ="项目档案来源(字典:4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬、6批量导入、7电子签、8预入职)")
private String projectSource;
/**
......
......@@ -1110,6 +1110,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (Common.isNotNull(empIdCard)) {
tEmpEducationService.updateEducationToNoByIdCard(empIdCard);
}
if (Common.isNotNull(tEmpEducation.getCreateBy())) {
tEmpEducation.setCreateBy(user.getId());
tEmpEducation.setCreateName(user.getNickname());
tEmpEducation.setCreateTime(LocalDateTime.now());
}
tEmpEducationService.saveOrUpdate(tEmpEducation);
if (tPreEmpEducation.getAttaList() != null && !tPreEmpEducation.getAttaList().isEmpty()) {
......@@ -1124,6 +1129,12 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
newEmpAtta = new TAttaInfo();
BeanUtil.copyProperties(atta, newEmpAtta, ID);
newEmpAtta.setDomainId(tEmpEducation.getId());
if (Common.isNotNull(tEmpEducation.getCreateBy())) {
tEmpEducation.setCreateBy(user.getId());
tEmpEducation.setCreateName(user.getNickname());
tEmpEducation.setCreateTime(LocalDateTime.now());
}
tAttaInfoService.saveOrUpdate(newEmpAtta);
}
}
......@@ -1141,6 +1152,12 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
BeanUtil.copyProperties(tPreEmpBadRecord, tEmpBadRecord, ID);
tEmpBadRecord.setEmpId(empId);
if (Common.isNotNull(tEmpBadRecord.getCreateBy())) {
tEmpBadRecord.setCreateBy(user.getId());
tEmpBadRecord.setCreateName(user.getNickname());
tEmpBadRecord.setCreateTime(LocalDateTime.now());
}
tEmpBadRecordService.saveOrUpdate(tEmpBadRecord);
}
// 预入职-紧急联络人
......@@ -1155,6 +1172,12 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
BeanUtil.copyProperties(tPreEmpContactInfo, tEmpContactInfo, ID);
tEmpContactInfo.setEmpId(empId);
if (Common.isNotNull(tEmpContactInfo.getCreateBy())) {
tEmpContactInfo.setCreateBy(user.getId());
tEmpContactInfo.setCreateName(user.getNickname());
tEmpContactInfo.setCreateTime(LocalDateTime.now());
}
tEmpContactInfoService.saveOrUpdate(tEmpContactInfo);
}
// 预入职-员工伤残信息表
......@@ -1173,6 +1196,12 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (Common.isEmpty(tEmpDisabilityInfo.getEmpCode())) {
tEmpDisabilityInfo.setEmpCode(emp.getEmpCode());
}
if (Common.isNotNull(tEmpDisabilityInfo.getCreateBy())) {
tEmpDisabilityInfo.setCreateBy(user.getId());
tEmpDisabilityInfo.setCreateName(user.getNickname());
tEmpDisabilityInfo.setCreateTime(LocalDateTime.now());
}
tEmpDisabilityInfoService.saveOrUpdate(tEmpDisabilityInfo);
}
......@@ -1193,6 +1222,12 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (Common.isNotNull(tPreEmpFamily.getOldId())) {
tEmpFamily.setId(tPreEmpFamily.getOldId());
}
if (Common.isNotNull(tEmpFamily.getCreateBy())) {
tEmpFamily.setCreateBy(user.getId());
tEmpFamily.setCreateName(user.getNickname());
tEmpFamily.setCreateTime(LocalDateTime.now());
}
tEmpFamilyService.save(tEmpFamily);
}
}
......@@ -1213,6 +1248,12 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (Common.isNotNull(preInfo.getOldId())) {
info.setId(preInfo.getOldId());
}
if (Common.isNotNull(info.getCreateBy())) {
info.setCreateBy(user.getId());
info.setCreateName(user.getNickname());
info.setCreateTime(LocalDateTime.now());
}
tEmpProfessionalService.save(info);
if (preInfo.getAttaList() != null && !preInfo.getAttaList().isEmpty()) {
List<TAttaInfo> attaList = preInfo.getAttaList();
......@@ -1226,6 +1267,12 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
newEmpAtta = new TAttaInfo();
BeanUtil.copyProperties(atta, newEmpAtta, ID);
newEmpAtta.setDomainId(info.getId());
if (Common.isNotNull(atta.getCreateBy())) {
atta.setCreateBy(user.getId());
atta.setCreateName(user.getNickname());
atta.setCreateTime(LocalDateTime.now());
}
tAttaInfoService.saveOrUpdate(newEmpAtta);
}
}
......@@ -1246,6 +1293,12 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
info.setEmpCode(emp.getEmpCode());
info.setEmpName(emp.getEmpName());
info.setEmpIdcard(emp.getEmpIdcard());
if (Common.isNotNull(info.getCreateBy())) {
info.setCreateBy(user.getId());
info.setCreateName(user.getNickname());
info.setCreateTime(LocalDateTime.now());
}
if (Common.isNotNull(preInfo.getOldId())) {
info.setId(preInfo.getOldId());
tEmpWorkRecordingService.updateById(info);
......@@ -1262,6 +1315,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
for (TAttaInfo atta : attaList) {
if (Common.isEmpty(atta.getDomainId())) {
atta.setDomainId(empId);
if (Common.isNotNull(atta.getCreateBy())) {
atta.setCreateBy(user.getId());
atta.setCreateName(user.getNickname());
atta.setCreateTime(LocalDateTime.now());
}
}
}
tAttaInfoService.saveOrUpdateBatch(attaList);
......@@ -1279,6 +1337,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (project != null) {
project.setCreateTime(LocalDateTime.now());
project.setProjectStatus(CommonConstants.ZERO_INT);
project.setProjectSource(CommonConstants.EIGHT_STRING);
project.setDeleteFlag(CommonConstants.STATUS_NORMAL);
}
} else if (CommonConstants.ONE_INT == project.getProjectStatus()) {
......@@ -1385,7 +1444,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
insTEmployeePro.setEmpName(tEmployeeInfo.getEmpName());
insTEmployeePro.setCreateTime(LocalDateTime.now());
insTEmployeePro.setCreateName(user.getNickname());
insTEmployeePro.setProjectSource(CommonConstants.SIX_STRING);
insTEmployeePro.setProjectSource(CommonConstants.EIGHT_STRING);
insTEmployeePro.setEmpId(tEmployeeInfo.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