Commit 0ccfa673 authored by hongguangwu's avatar hongguangwu

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

parents cf586bd1 b788fe7d
......@@ -85,6 +85,7 @@ import java.lang.reflect.Field;
import java.net.URL;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
......@@ -134,6 +135,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
@Autowired
private OSSUtil ossUtil;
ExcelUtil<Object> excelUtil = new ExcelUtil<>(Object.class);
@Override
public IPage<TEmployeeInfo> getPage(Page<TEmployeeInfo> page, TEmployeeInfo employeeInfo) {
return baseMapper.getPage(page, employeeInfo);
......@@ -2589,10 +2592,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
//重新刷新一下项目编码对应的档案完整度监控的数据
if (Common.isNotNull(vo.getProjectNo()) && CommonConstants.ZERO_STRING.equals(vo.getType())) {
completeMonitorService.updateProjectStatusByDeptNo(vo.getProjectNo());
}
}
return true;
}
......@@ -2633,6 +2632,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
EmpAddDispatchVo emp;
EmpProjectDispatchVo project;
TEmployeeContractAudit audit;
TEmployeeProject projectUpd;
for (Map.Entry<String, EmpContractDispatchVo> entry : contractsMap.entrySet()) {
contractAdd = entry.getValue();
try {
......@@ -2666,6 +2666,30 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
contractAdd.setId(contract.getId());
contractAdd.setEmpNo(contract.getEmpNo());
contractsMap.put(contractAdd.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + contractAdd.getDeptNo(), contractAdd);
//新增合同和同步更新项目档案中的合同信息
projectUpd = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeptNo, contract.getDeptNo())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.ZERO_STRING)
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(projectUpd)) {
if (Common.isEmpty(projectUpd.getContractType())) {
projectUpd.setContractType(excelUtil.getDicValueByDataType(contract.getContractName(), ExcelAttributeConstants.PERSONNEL_TYPE));
}
if (Common.isEmpty(projectUpd.getPost())) {
projectUpd.setPost(contract.getPost());
}
if (Common.isEmpty(projectUpd.getWorkingHours())) {
projectUpd.setWorkingHours(contract.getWorkingHours());
}
if (Common.isEmpty(projectUpd.getTryPeriod())) {
projectUpd.setTryPeriod(contract.getTryPeriod());
}
if (Common.isEmpty(projectUpd.getEnjoinDate())) {
projectUpd.setEnjoinDate(null != contract.getContractStart() ? contract.getContractStart().toInstant().atZone(ZoneId.systemDefault()).toLocalDate() : null);
}
tEmployeeProjectService.updateById(projectUpd);
}
}
} catch (Exception e) {
log.error(contractAdd.getEmpIdcard() + CommonConstants.COLON_STRING + "派单新增合同失败", e);
......
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