Commit a5e0d51f authored by hongguangwu's avatar hongguangwu

MVP1.4-人员合同相关

parent 8d64e01e
...@@ -1548,15 +1548,25 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1548,15 +1548,25 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
employee = tEmployeeInfoMapper.selectById(employeeInfo.getEmpId()); employee = tEmployeeInfoMapper.selectById(employeeInfo.getEmpId());
initEmpBusinessInfo(employeeInfo, employee, businessVo, tBusinessEmployeeExtendInfo); initEmpBusinessInfo(employeeInfo, employee, businessVo, tBusinessEmployeeExtendInfo);
} }
// 获取合同数据
// 获取合同数据(去除作废,终止)
List<TEmployeeContractInfo> contractInfoList = contractInfoMapper.selectList(Wrappers.<TEmployeeContractInfo>query().lambda() List<TEmployeeContractInfo> contractInfoList = contractInfoMapper.selectList(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard,employeeInfo.getEmpIdcard())
.eq(TEmployeeContractInfo::getIsObsolete,CommonConstants.ZERO_STRING)
.ne(TEmployeeContractInfo::getSituation, EmployeeConstants.SITUATION_SIX)
.ne(TEmployeeContractInfo::getSituation, EmployeeConstants.SITUATION_SEVEN)
.eq(TEmployeeContractInfo::getSettleDomain, settleDomain)
.orderByDesc(TEmployeeContractInfo::getContractStart));
// 获取合同数据(全部2023-1-16 11:32:12 倩倩要求:B端人员里要看到作废中止的合同(原话:显示没有问题))
List<TEmployeeContractInfo> allContractInfoList = contractInfoMapper.selectList(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard,employeeInfo.getEmpIdcard()) .eq(TEmployeeContractInfo::getEmpIdcard,employeeInfo.getEmpIdcard())
.eq(TEmployeeContractInfo::getIsObsolete,CommonConstants.ZERO_STRING) .eq(TEmployeeContractInfo::getIsObsolete,CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getSettleDomain, settleDomain) .eq(TEmployeeContractInfo::getSettleDomain, settleDomain)
.orderByDesc(TEmployeeContractInfo::getContractStart)); .orderByDesc(TEmployeeContractInfo::getContractStart));
// 处理详情对应的合同信息 // 处理详情对应的合同信息
if (Common.isNotNull(contractInfoList)){ if (Common.isNotNull(contractInfoList)){
initEmpBusinessContractInfo(businessDetailVo, contractInfoList); initEmpBusinessContractInfo(businessDetailVo, contractInfoList, allContractInfoList);
} }
// 获取最高学历 // 获取最高学历
List<TEmpEducation> educations = empEducationMapper.selectList(Wrappers.<TEmpEducation>query().lambda() List<TEmpEducation> educations = empEducationMapper.selectList(Wrappers.<TEmpEducation>query().lambda()
...@@ -1606,14 +1616,15 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1606,14 +1616,15 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return R.ok(businessVo); return R.ok(businessVo);
} }
private void initEmpBusinessContractInfo(EmployeeBusinessDetailVo businessDetailVo, List<TEmployeeContractInfo> contractInfoList) { private void initEmpBusinessContractInfo(EmployeeBusinessDetailVo businessDetailVo
, List<TEmployeeContractInfo> contractInfoList, List<TEmployeeContractInfo> allContractInfoList) {
businessDetailVo.setSituationCount(contractInfoList.size()); businessDetailVo.setSituationCount(contractInfoList.size());
if (businessDetailVo.getSituationCount() > CommonConstants.ONE_INT){ if (businessDetailVo.getSituationCount() > CommonConstants.ONE_INT){
businessDetailVo.setSituation(EmpBusinessConstants.empContractSituationRenew); businessDetailVo.setSituation(EmpBusinessConstants.empContractSituationRenew);
}else { }else {
businessDetailVo.setSituation(EmpBusinessConstants.empContractSituationNew); businessDetailVo.setSituation(EmpBusinessConstants.empContractSituationNew);
} }
businessDetailVo.setContractInfoList(contractInfoList); businessDetailVo.setContractInfoList(allContractInfoList);
TEmployeeContractInfo contractInfo = contractInfoList.get(CommonConstants.ZERO_INT); TEmployeeContractInfo contractInfo = contractInfoList.get(CommonConstants.ZERO_INT);
if (null != contractInfo.getContractEnd()){ if (null != contractInfo.getContractEnd()){
businessDetailVo.setContractEndDate(DateUtil.formatDate(contractInfo.getContractEnd())); businessDetailVo.setContractEndDate(DateUtil.formatDate(contractInfo.getContractEnd()));
......
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