Commit 84a9ec2d authored by hongguangwu's avatar hongguangwu

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

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