Commit 267c1ced authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/MVP1.6.6' into MVP1.6.6

parents 24d62b3c e235101a
...@@ -117,6 +117,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -117,6 +117,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
private final OSSUtil ossUtil; private final OSSUtil ossUtil;
private final static String ID = "id";
/** /**
* 预入职-主表简单分页查询 * 预入职-主表简单分页查询
* *
...@@ -234,7 +235,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -234,7 +235,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (employee != null) { if (employee != null) {
empId = employee.getId(); empId = employee.getId();
tPreEmployeeInfo = new TPreEmployeeInfo(); tPreEmployeeInfo = new TPreEmployeeInfo();
BeanUtil.copyProperties(employee, tPreEmployeeInfo); BeanUtil.copyProperties(employee, tPreEmployeeInfo, ID);
tPreEmployeeInfo.setOldId(employee.getId()); tPreEmployeeInfo.setOldId(employee.getId());
tPreEmployeeInfo.setPreMainId(main.getId()); tPreEmployeeInfo.setPreMainId(main.getId());
tPreEmployeeInfo.setCreateBy(user.getId()); tPreEmployeeInfo.setCreateBy(user.getId());
...@@ -245,7 +246,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -245,7 +246,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
project = tEmployeeProjectService.getByEmpIdAndDeptId(empId, deptId); project = tEmployeeProjectService.getByEmpIdAndDeptId(empId, deptId);
if (project != null) { if (project != null) {
tPreEmployeeProject = new TPreEmployeeProject(); tPreEmployeeProject = new TPreEmployeeProject();
BeanUtil.copyProperties(project, tPreEmployeeProject); BeanUtil.copyProperties(project, tPreEmployeeProject, ID);
tPreEmployeeProject.setOldId(project.getId()); tPreEmployeeProject.setOldId(project.getId());
tPreEmployeeProject.setPreMainId(main.getId()); tPreEmployeeProject.setPreMainId(main.getId());
tPreEmployeeProject.setCreateBy(user.getId()); tPreEmployeeProject.setCreateBy(user.getId());
...@@ -285,7 +286,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -285,7 +286,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (Common.isNotNull(empId)) { if (Common.isNotNull(empId)) {
TEmpBadRecord info = tEmpBadRecordService.getByEmpId(empId); TEmpBadRecord info = tEmpBadRecordService.getByEmpId(empId);
if (info != null) { if (info != null) {
BeanUtil.copyProperties(info, tPreEmpBadRecord); BeanUtil.copyProperties(info, tPreEmpBadRecord, ID);
tPreEmpBadRecord.setOldId(info.getId()); tPreEmpBadRecord.setOldId(info.getId());
} }
} }
...@@ -307,7 +308,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -307,7 +308,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (Common.isNotNull(empId)) { if (Common.isNotNull(empId)) {
TEmpContactInfo info = tEmpContactInfoService.getByEmpId(empId); TEmpContactInfo info = tEmpContactInfoService.getByEmpId(empId);
if (info != null) { if (info != null) {
BeanUtil.copyProperties(info, tPreEmpContactInfo); BeanUtil.copyProperties(info, tPreEmpContactInfo, ID);
tPreEmpContactInfo.setOldId(info.getId()); tPreEmpContactInfo.setOldId(info.getId());
} }
} }
...@@ -325,7 +326,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -325,7 +326,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (Common.isNotNull(empId)) { if (Common.isNotNull(empId)) {
TEmpDisabilityInfo info = tEmpDisabilityInfoService.getByEmpId(empId); TEmpDisabilityInfo info = tEmpDisabilityInfoService.getByEmpId(empId);
if (info != null) { if (info != null) {
BeanUtil.copyProperties(info, tPreEmpDisabilityInfo); BeanUtil.copyProperties(info, tPreEmpDisabilityInfo, ID);
tPreEmpDisabilityInfo.setOldId(info.getId()); tPreEmpDisabilityInfo.setOldId(info.getId());
} }
} }
...@@ -350,7 +351,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -350,7 +351,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (Common.isNotNull(empId)) { if (Common.isNotNull(empId)) {
TEmpEducation info = tEmpEducationService.getByEmpId(empId); TEmpEducation info = tEmpEducationService.getByEmpId(empId);
if (info != null) { if (info != null) {
BeanUtil.copyProperties(info, tPreEmpEducation); BeanUtil.copyProperties(info, tPreEmpEducation, ID);
tPreEmpEducation.setOldId(info.getId()); tPreEmpEducation.setOldId(info.getId());
// 附件 // 附件
...@@ -401,7 +402,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -401,7 +402,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TPreEmpFamily record; TPreEmpFamily record;
for (TEmpFamily info : infoList) { for (TEmpFamily info : infoList) {
record = new TPreEmpFamily(); record = new TPreEmpFamily();
BeanUtil.copyProperties(info, record); BeanUtil.copyProperties(info, record, ID);
record.setOldId(info.getId()); record.setOldId(info.getId());
record.setSettleDomain(deptId); record.setSettleDomain(deptId);
if (employee != null) { if (employee != null) {
...@@ -457,7 +458,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -457,7 +458,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (infoList != null && !infoList.isEmpty()) { if (infoList != null && !infoList.isEmpty()) {
for (TEmpProfessionalQualification info : infoList) { for (TEmpProfessionalQualification info : infoList) {
record = new TPreEmpProfessionalQualification(); record = new TPreEmpProfessionalQualification();
BeanUtil.copyProperties(info, record); BeanUtil.copyProperties(info, record, ID);
record.setOldId(info.getId()); record.setOldId(info.getId());
record.setSettleDomain(deptId); record.setSettleDomain(deptId);
if (employee != null) { if (employee != null) {
...@@ -528,7 +529,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -528,7 +529,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (infoList != null && !infoList.isEmpty()) { if (infoList != null && !infoList.isEmpty()) {
for (TEmpWorkRecording info : infoList) { for (TEmpWorkRecording info : infoList) {
record = new TPreEmpWorkRecording(); record = new TPreEmpWorkRecording();
BeanUtil.copyProperties(info, record); BeanUtil.copyProperties(info, record, ID);
record.setOldId(info.getId()); record.setOldId(info.getId());
record.setSettleDomain(deptId); record.setSettleDomain(deptId);
if (employee != null) { if (employee != null) {
...@@ -959,7 +960,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -959,7 +960,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
empId = tPreEmployeeInfo.getOldId(); empId = tPreEmployeeInfo.getOldId();
emp = tEmployeeInfoService.getById(empId); emp = tEmployeeInfoService.getById(empId);
if (emp != null) { if (emp != null) {
BeanUtil.copyProperties(tPreEmployeeInfo, emp); BeanUtil.copyProperties(tPreEmployeeInfo, emp, ID);
if (CommonConstants.ONE_INT == emp.getFileStatus()) { if (CommonConstants.ONE_INT == emp.getFileStatus()) {
emp.setCreateTime(LocalDateTime.now()); emp.setCreateTime(LocalDateTime.now());
emp.setFileStatus(CommonConstants.ZERO_INT); emp.setFileStatus(CommonConstants.ZERO_INT);
...@@ -972,7 +973,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -972,7 +973,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
empIdCard = emp.getEmpIdcard(); empIdCard = emp.getEmpIdcard();
project = tEmployeeProjectService.getById(tPreEmployeeProject.getOldId()); project = tEmployeeProjectService.getById(tPreEmployeeProject.getOldId());
if (project != null) { if (project != null) {
BeanUtil.copyProperties(tPreEmployeeInfo, project); BeanUtil.copyProperties(tPreEmployeeInfo, project, ID);
if (CommonConstants.ONE_INT == project.getProjectStatus()) { if (CommonConstants.ONE_INT == project.getProjectStatus()) {
project.setCreateTime(LocalDateTime.now()); project.setCreateTime(LocalDateTime.now());
project.setDeleteFlag(CommonConstants.STATUS_NORMAL); project.setDeleteFlag(CommonConstants.STATUS_NORMAL);
...@@ -1046,7 +1047,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1046,7 +1047,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tEmployeeInfoService.updateById(emp); tEmployeeInfoService.updateById(emp);
} }
} }
BeanUtil.copyProperties(tPreEmpEducation, tEmpEducation); BeanUtil.copyProperties(tPreEmpEducation, tEmpEducation, ID);
if (Common.isNotNull(empIdCard)) { if (Common.isNotNull(empIdCard)) {
tEmpEducationService.updateEducationToNoByIdCard(empIdCard); tEmpEducationService.updateEducationToNoByIdCard(empIdCard);
} }
...@@ -1062,7 +1063,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1062,7 +1063,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TAttaInfo newEmpAtta; TAttaInfo newEmpAtta;
for (TAttaInfo atta : attaList) { for (TAttaInfo atta : attaList) {
newEmpAtta = new TAttaInfo(); newEmpAtta = new TAttaInfo();
BeanUtil.copyProperties(atta, newEmpAtta, "id"); BeanUtil.copyProperties(atta, newEmpAtta, ID);
newEmpAtta.setDomainId(tEmpEducation.getId()); newEmpAtta.setDomainId(tEmpEducation.getId());
tAttaInfoService.saveOrUpdate(newEmpAtta); tAttaInfoService.saveOrUpdate(newEmpAtta);
} }
...@@ -1079,7 +1080,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1079,7 +1080,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (tEmpBadRecord == null) { if (tEmpBadRecord == null) {
tEmpBadRecord = new TEmpBadRecord(); tEmpBadRecord = new TEmpBadRecord();
} }
BeanUtil.copyProperties(tPreEmpBadRecord, tEmpBadRecord); BeanUtil.copyProperties(tPreEmpBadRecord, tEmpBadRecord, ID);
tEmpBadRecordService.saveOrUpdate(tEmpBadRecord); tEmpBadRecordService.saveOrUpdate(tEmpBadRecord);
} }
// 预入职-紧急联络人 // 预入职-紧急联络人
...@@ -1092,7 +1093,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1092,7 +1093,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (tEmpContactInfo == null) { if (tEmpContactInfo == null) {
tEmpContactInfo = new TEmpContactInfo(); tEmpContactInfo = new TEmpContactInfo();
} }
BeanUtil.copyProperties(tPreEmpContactInfo, tEmpContactInfo); BeanUtil.copyProperties(tPreEmpContactInfo, tEmpContactInfo, ID);
tEmpContactInfoService.saveOrUpdate(tEmpContactInfo); tEmpContactInfoService.saveOrUpdate(tEmpContactInfo);
} }
// 预入职-员工伤残信息表 // 预入职-员工伤残信息表
...@@ -1105,7 +1106,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1105,7 +1106,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (tEmpDisabilityInfo == null) { if (tEmpDisabilityInfo == null) {
tEmpDisabilityInfo = new TEmpDisabilityInfo(); tEmpDisabilityInfo = new TEmpDisabilityInfo();
} }
BeanUtil.copyProperties(tPreEmpDisabilityInfo, tEmpDisabilityInfo); BeanUtil.copyProperties(tPreEmpDisabilityInfo, tEmpDisabilityInfo, ID);
tEmpDisabilityInfoService.saveOrUpdate(tEmpDisabilityInfo); tEmpDisabilityInfoService.saveOrUpdate(tEmpDisabilityInfo);
} }
...@@ -1118,7 +1119,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1118,7 +1119,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TEmpFamily tEmpFamily; TEmpFamily tEmpFamily;
for (TPreEmpFamily tPreEmpFamily : tPreEmpFamilyList) { for (TPreEmpFamily tPreEmpFamily : tPreEmpFamilyList) {
tEmpFamily = new TEmpFamily(); tEmpFamily = new TEmpFamily();
BeanUtil.copyProperties(tPreEmpFamily, tEmpFamily); BeanUtil.copyProperties(tPreEmpFamily, tEmpFamily, ID);
if (Common.isNotNull(tPreEmpFamily.getOldId())) { if (Common.isNotNull(tPreEmpFamily.getOldId())) {
tEmpFamily.setId(tPreEmpFamily.getOldId()); tEmpFamily.setId(tPreEmpFamily.getOldId());
} }
...@@ -1134,7 +1135,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1134,7 +1135,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TEmpProfessionalQualification info; TEmpProfessionalQualification info;
for (TPreEmpProfessionalQualification preInfo : tPreEmpProfessionalQualificationList) { for (TPreEmpProfessionalQualification preInfo : tPreEmpProfessionalQualificationList) {
info = new TEmpProfessionalQualification(); info = new TEmpProfessionalQualification();
BeanUtil.copyProperties(preInfo, info); BeanUtil.copyProperties(preInfo, info, ID);
if (Common.isNotNull(preInfo.getOldId())) { if (Common.isNotNull(preInfo.getOldId())) {
info.setId(preInfo.getOldId()); info.setId(preInfo.getOldId());
} }
...@@ -1149,7 +1150,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1149,7 +1150,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TAttaInfo newEmpAtta; TAttaInfo newEmpAtta;
for (TAttaInfo atta : attaList) { for (TAttaInfo atta : attaList) {
newEmpAtta = new TAttaInfo(); newEmpAtta = new TAttaInfo();
BeanUtil.copyProperties(atta, newEmpAtta, "id"); BeanUtil.copyProperties(atta, newEmpAtta, ID);
newEmpAtta.setDomainId(info.getId()); newEmpAtta.setDomainId(info.getId());
tAttaInfoService.saveOrUpdate(newEmpAtta); tAttaInfoService.saveOrUpdate(newEmpAtta);
} }
...@@ -1166,7 +1167,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1166,7 +1167,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TEmpWorkRecording info; TEmpWorkRecording info;
for (TPreEmpWorkRecording preInfo : tPreEmpWorkRecordingList) { for (TPreEmpWorkRecording preInfo : tPreEmpWorkRecordingList) {
info = new TEmpWorkRecording(); info = new TEmpWorkRecording();
BeanUtil.copyProperties(preInfo, info); BeanUtil.copyProperties(preInfo, info, ID);
if (Common.isNotNull(preInfo.getOldId())) { if (Common.isNotNull(preInfo.getOldId())) {
info.setId(preInfo.getOldId()); info.setId(preInfo.getOldId());
} }
...@@ -1210,7 +1211,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1210,7 +1211,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
isNew = true; isNew = true;
project = new TEmployeeProject(); project = new TEmployeeProject();
} }
BeanUtil.copyProperties(tPreEmployeeProject, project); BeanUtil.copyProperties(tPreEmployeeProject, project, ID);
if (isNew) { if (isNew) {
// 新项目档案塞基本属性 // 新项目档案塞基本属性
this.setNewEmpProjectBaseData(project, emp, dept, user); this.setNewEmpProjectBaseData(project, emp, dept, user);
...@@ -1239,7 +1240,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1239,7 +1240,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
isNew = true; isNew = true;
emp = new TEmployeeInfo(); emp = new TEmployeeInfo();
} }
BeanUtil.copyProperties(tPreEmployeeInfo, emp); BeanUtil.copyProperties(tPreEmployeeInfo, emp, ID);
if (isNew) { if (isNew) {
// 新员工塞基本属性 // 新员工塞基本属性
this.setNewEmpBaseData(emp, user); this.setNewEmpBaseData(emp, user);
......
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