Commit 100d2055 authored by hongguangwu's avatar hongguangwu

MVP1.7.1 优化预入职

parent 02a036c1
......@@ -411,7 +411,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TEmpBadRecord info = tEmpBadRecordService.getByEmpId(empId);
if (info != null) {
BeanUtil.copyProperties(info, tPreEmpBadRecord, ID);
if (Common.isEmpty(preId)) {
if (Common.isEmpty(preId) && empFirst) {
tPreEmpBadRecord.setId(info.getId());
}
tPreEmpBadRecord.setEmpId(empId);
......@@ -426,7 +426,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmpBadRecord.setCreateBy(user.getId());
tPreEmpBadRecord.setCreateName(user.getNickname());
tPreEmpBadRecord.setCreateTime(LocalDateTime.now());
if (Common.isEmpty(preId) && !empFirst) {
if (Common.isEmpty(tPreEmpBadRecord.getId())) {
tPreEmpBadRecordService.save(tPreEmpBadRecord);
}
}
......@@ -444,7 +444,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TEmpContactInfo info = tEmpContactInfoService.getByEmpId(empId);
if (info != null) {
BeanUtil.copyProperties(info, tPreEmpContactInfo, ID);
if (Common.isEmpty(preId)) {
if (Common.isEmpty(preId) && !empFirst) {
tPreEmpContactInfo.setId(info.getId());
}
tPreEmpContactInfo.setEmpId(empId);
......@@ -455,7 +455,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmpContactInfo.setCreateBy(user.getId());
tPreEmpContactInfo.setCreateName(user.getNickname());
tPreEmpContactInfo.setCreateTime(LocalDateTime.now());
if (Common.isEmpty(preId) && !empFirst) {
if (Common.isEmpty(tPreEmpContactInfo.getId())) {
tPreEmpContactInfoService.save(tPreEmpContactInfo);
}
}
......@@ -473,7 +473,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TEmpDisabilityInfo info = tEmpDisabilityInfoService.getByEmpId(empId);
if (info != null) {
BeanUtil.copyProperties(info, tPreEmpDisabilityInfo, ID);
if (Common.isEmpty(preId)) {
if (Common.isEmpty(preId) && !empFirst) {
tPreEmpDisabilityInfo.setId(info.getId());
}
tPreEmpDisabilityInfo.setEmpId(empId);
......@@ -491,7 +491,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmpDisabilityInfo.setCreateBy(user.getId());
tPreEmpDisabilityInfo.setCreateName(user.getNickname());
tPreEmpDisabilityInfo.setCreateTime(LocalDateTime.now());
if (Common.isEmpty(preId) && !empFirst) {
if (Common.isEmpty(tPreEmpDisabilityInfo.getId())) {
tPreEmpDisabilityInfoService.save(tPreEmpDisabilityInfo);
}
}
......@@ -509,7 +509,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TEmpEducation info = tEmpEducationService.getByEmpId(empId);
if (info != null) {
BeanUtil.copyProperties(info, tPreEmpEducation, ID);
if (Common.isEmpty(preId)) {
if (Common.isEmpty(preId) && !empFirst) {
tPreEmpEducation.setId(info.getId());
}
tPreEmpEducation.setEmpId(empId);
......@@ -538,7 +538,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmpEducation.setCreateBy(user.getId());
tPreEmpEducation.setCreateName(user.getNickname());
tPreEmpEducation.setCreateTime(LocalDateTime.now());
if (Common.isEmpty(preId) && !empFirst) {
if (Common.isEmpty(tPreEmpEducation.getId())) {
tPreEmpEducationService.save(tPreEmpEducation);
}
} else {
......
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