Commit 84a9ec2d authored by hongguangwu's avatar hongguangwu

MVP1.6.6-预入职相关_导出优化

parent 0ac2012c
...@@ -273,7 +273,8 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T ...@@ -273,7 +273,8 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
@Override @Override
public TEmpBadRecord getByEmpId(String empId) { public TEmpBadRecord getByEmpId(String empId) {
return baseMapper.selectOne(Wrappers.<TEmpBadRecord>query().lambda().eq(TEmpBadRecord::getEmpId, empId).last(CommonConstants.LAST_ONE_SQL)); return baseMapper.selectOne(Wrappers.<TEmpBadRecord>query().lambda().eq(TEmpBadRecord::getEmpId, empId)
.orderByDesc(TEmpBadRecord::getCreateTime).last(CommonConstants.LAST_ONE_SQL));
} }
@Override @Override
......
...@@ -258,7 +258,8 @@ public class TEmpContactInfoServiceImpl extends ServiceImpl<TEmpContactInfoMappe ...@@ -258,7 +258,8 @@ public class TEmpContactInfoServiceImpl extends ServiceImpl<TEmpContactInfoMappe
@Override @Override
public TEmpContactInfo getByEmpId(String empId) { public TEmpContactInfo getByEmpId(String empId) {
return baseMapper.selectOne(Wrappers.<TEmpContactInfo>query().lambda().eq(TEmpContactInfo::getEmpId, empId).last(CommonConstants.LAST_ONE_SQL)); return baseMapper.selectOne(Wrappers.<TEmpContactInfo>query().lambda().eq(TEmpContactInfo::getEmpId, empId)
.orderByDesc(TEmpContactInfo::getCreateTime).last(CommonConstants.LAST_ONE_SQL));
} }
} }
...@@ -28,7 +28,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -28,7 +28,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpBadRecord;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpDisabilityInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpDisabilityInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper;
...@@ -306,7 +305,10 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf ...@@ -306,7 +305,10 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
@Override @Override
public TEmpDisabilityInfo getByEmpId(String empId) { public TEmpDisabilityInfo getByEmpId(String empId) {
return baseMapper.selectOne(Wrappers.<TEmpDisabilityInfo>query().lambda().eq(TEmpDisabilityInfo::getEmpId, empId).last(CommonConstants.LAST_ONE_SQL)); return baseMapper.selectOne(Wrappers.<TEmpDisabilityInfo>query().lambda()
.eq(TEmpDisabilityInfo::getEmpId, empId)
.eq(TEmpDisabilityInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.orderByDesc(TEmpDisabilityInfo::getCreateTime).last(CommonConstants.LAST_ONE_SQL));
} }
} }
...@@ -544,8 +544,17 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T ...@@ -544,8 +544,17 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
@Override @Override
public TEmpEducation getByEmpId(String empId) { public TEmpEducation getByEmpId(String empId) {
return baseMapper.selectOne(Wrappers.<TEmpEducation>query().lambda().eq(TEmpEducation::getEmpId, empId) TEmpEducation empEducation = baseMapper.selectOne(Wrappers.<TEmpEducation>query().lambda().eq(TEmpEducation::getEmpId, empId)
.eq(TEmpEducation::getDeleteFlag, CommonConstants.STATUS_NORMAL).last(CommonConstants.LAST_ONE_SQL)); .eq(TEmpEducation::getDeleteFlag, CommonConstants.STATUS_NORMAL).eq(TEmpEducation::getHighIdentification, CommonConstants.STATUS_NORMAL)
.orderByDesc(TEmpEducation::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL));
if (empEducation == null) {
empEducation = baseMapper.selectOne(Wrappers.<TEmpEducation>query().lambda().eq(TEmpEducation::getEmpId, empId)
.eq(TEmpEducation::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.orderByDesc(TEmpEducation::getCreateTime).last(CommonConstants.LAST_ONE_SQL));
}
return empEducation;
} }
} }
...@@ -423,9 +423,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -423,9 +423,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
} }
record.setEmpIdcard(empIdCard); record.setEmpIdcard(empIdCard);
record.setPreMainId(id); record.setPreMainId(id);
if (Common.isEmpty(record.getCreateBy())) {
record.setCreateBy(user.getId()); record.setCreateBy(user.getId());
record.setCreateName(user.getNickname()); record.setCreateName(user.getNickname());
record.setCreateTime(LocalDateTime.now()); record.setCreateTime(LocalDateTime.now());
}
tPreEmpFamilyList.add(record); tPreEmpFamilyList.add(record);
} }
tPreEmpFamilyService.saveBatch(tPreEmpFamilyList); tPreEmpFamilyService.saveBatch(tPreEmpFamilyList);
...@@ -518,9 +520,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -518,9 +520,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
record.setAttaList(attaInfoList); record.setAttaList(attaInfoList);
record.setPreMainId(id); record.setPreMainId(id);
record.setEmpIdcard(empIdCard); record.setEmpIdcard(empIdCard);
if (Common.isEmpty(record.getCreateBy())) {
record.setCreateBy(user.getId()); record.setCreateBy(user.getId());
record.setCreateName(user.getNickname()); record.setCreateName(user.getNickname());
record.setCreateTime(LocalDateTime.now()); record.setCreateTime(LocalDateTime.now());
}
tPreEmpProfessionalQualificationList.add(record); tPreEmpProfessionalQualificationList.add(record);
} }
tPreEmpProfessionalService.saveBatch(tPreEmpProfessionalQualificationList); tPreEmpProfessionalService.saveBatch(tPreEmpProfessionalQualificationList);
...@@ -579,9 +583,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -579,9 +583,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
} }
record.setEmpIdcard(empIdCard); record.setEmpIdcard(empIdCard);
record.setPreMainId(id); record.setPreMainId(id);
if (Common.isEmpty(record.getCreateBy())) {
record.setCreateBy(user.getId()); record.setCreateBy(user.getId());
record.setCreateName(user.getNickname()); record.setCreateName(user.getNickname());
record.setCreateTime(LocalDateTime.now()); record.setCreateTime(LocalDateTime.now());
}
tPreEmpWorkRecordingList.add(record); tPreEmpWorkRecordingList.add(record);
} }
tPreEmpWorkRecordingService.saveBatch(tPreEmpWorkRecordingList); tPreEmpWorkRecordingService.saveBatch(tPreEmpWorkRecordingList);
......
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