Commit 904df417 authored by hongguangwu's avatar hongguangwu

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

parents a533c244 e8b1f36e
......@@ -26,4 +26,8 @@ public class EmpDispatchAddVo implements Serializable {
* 员工项目档案
**/
Map<String,EmpProjectDispatchVo> projectsMap;
/**
* 员工项目档案更新 岗位等信息
**/
Map<String,EmpProjectDispatchVo> projectsUpdateMap;
}
......@@ -2182,8 +2182,12 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
Map<String, EmpContractDispatchVo> contractsMap = addVo.getContractsMap();
//员工项目档案
Map<String, EmpProjectDispatchVo> projectsMap = addVo.getProjectsMap();
//员工项目档案更新岗位等信息
Map<String, EmpProjectDispatchVo> projectsUpdateMap = addVo.getProjectsUpdateMap();
// 新增档案
saveEmp(empAddsMap);
// 更新项目档案的岗位信息
updateProjectPost(projectsUpdateMap);
// 新增项目档案不需要返回ID
saveProject(empAddsMap, projectsMap);
// 新增合同
......@@ -2430,7 +2434,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
for (Map.Entry<String, EmpProjectDispatchVo> entry : projectsMap.entrySet()) {
projectAdd = entry.getValue();
if (Common.isNotNull(projectAdd.getPostUpdate()) && projectAdd.getPostUpdate()){
tEmployeeProjectService.updatePostByEmpDeptNo(projectAdd.getDeptNo(),projectAdd.getPost(),projectAdd.getEmpIdcard());
continue;
}
try {
......@@ -2474,6 +2477,17 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
}
}
private void updateProjectPost(Map<String, EmpProjectDispatchVo> projectsMap) {
if (Common.isNotNull(projectsMap)) {
EmpProjectDispatchVo projectAdd;
for (Map.Entry<String, EmpProjectDispatchVo> entry : projectsMap.entrySet()) {
projectAdd = entry.getValue();
if (Common.isNotNull(projectAdd.getPostUpdate()) && projectAdd.getPostUpdate()) {
tEmployeeProjectService.updatePostByEmpDeptNo(projectAdd.getDeptNo(), projectAdd.getPost(), projectAdd.getEmpIdcard());
}
}
}
}
/**
* @Description: 更新人员档案的商险状态
......
......@@ -1069,7 +1069,7 @@
</update>
<update id="updatePostByEmpDeptNo" >
update t_employee_project a
set POST = #{psot}
set a.POST = #{post}
WHERE a.DEPT_NO=#{deptNo} and a.POST is null and a.EMP_IDCARD=#{empIdcard} and a.DELETE_FLAG ='0'
</update>
</mapper>
......@@ -450,6 +450,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
Map<String,EmpContractDispatchVo> contractsMap = new HashMap<>();
//员工项目档案
Map<String,EmpProjectDispatchVo> projectsMap = new HashMap<>();
//员工项目档案更新岗位信息
Map<String,EmpProjectDispatchVo> projectsUpdateMap = new HashMap<>();
//新增社保
Map<String,TSocialInfo> socialsMap = new HashMap<>();
//新增公积金
......@@ -578,7 +580,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
continue;
}
// 初始化新增信息:档案、项目档案、员工合同
initAddInfo(empAddsMap, contractsMap, projectsMap, empVo, excel,user,setInfoVo,socialSet);
initAddInfo(empAddsMap, contractsMap, projectsMap, empVo, excel,user,setInfoVo,socialSet,projectsUpdateMap);
// 新增社保
initSocialAddInfo(socialsMap, empVo, socialSet, excel,socialFundMap,dispatchPart);
// 新增公积金
......@@ -603,6 +605,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
addVo.setEmpAddsMap(empAddsMap);
addVo.setContractsMap(contractsMap);
addVo.setProjectsMap(projectsMap);
addVo.setProjectsUpdateMap(projectsUpdateMap);
R<EmpDispatchAddVo> res = archivesDaprUtil.addDispatchInfo(addVo);
// 开始插入各种数据了
insertAllInfo(excelVOList, errorMessageList, empVoMap,res,socialsMap,fundsMap,socialFundAddMap,dispatchMap,excelVOTemp,dispatchPart,injury);
......@@ -1567,7 +1570,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
Map<String, EmpContractDispatchVo> contracts,
Map<String, EmpProjectDispatchVo> projects,
DispatchEmpVo empVo, TDispatchImportVo excel,
YifuUser user, ProjectSetInfoVo setInfoVo, SysBaseSetInfo socialSet) {
YifuUser user, ProjectSetInfoVo setInfoVo, SysBaseSetInfo socialSet,
Map<String, EmpProjectDispatchVo> projectsUpdateMap) {
// 无档案无项目档案无合同无学历
if (Common.isEmpty(empVo) || Common.isEmpty(empVo.getId())) {
// 初始化档案
......@@ -1593,18 +1597,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(empVo)
&& Common.isNotNull(empVo.getDeptNo())
&& Common.isEmpty(empVo.getContractType())) {
if (Common.isEmpty(empVo.getPost()) && Common.isNotNull(excel.getPost())){
EmpProjectDispatchVo project = new EmpProjectDispatchVo();
project.setEmpNo(empVo.getDeptNo());
project.setPost(excel.getPost());
project.setEmpIdcard(empVo.getEmpIdcard());
project.setPostUpdate(true);
projects.put(excel.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+excel.getSettleDomainCode(),project);
}
// 初始化合同
initContractInfo(contracts, excel, empVo, setInfoVo, user);
}
// 有项目档案但岗位信息为空
if (Common.isNotNull(empVo)
&& Common.isNotNull(empVo.getDeptNo())
&& Common.isEmpty(empVo.getPost())
&& Common.isNotNull(excel.getPost())){
EmpProjectDispatchVo project = new EmpProjectDispatchVo();
project.setDeptNo(empVo.getDeptNo());
project.setPost(excel.getPost());
project.setEmpIdcard(empVo.getEmpIdcard());
project.setPostUpdate(true);
projectsUpdateMap.put(excel.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+excel.getSettleDomainCode(),project);
}
}
private void initSocialAddInfo(Map<String, TSocialInfo> socials,
......@@ -2394,7 +2401,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
excel.setIdCardTown(Common.isNotNullToStr(empVo.getIdCity()));
excel.setEmpNational(empVo.getEmpNational());
excel.setEmpRegisType(empVo.getEmpRegisType());
excel.setPost(empVo.getPost());
if (Common.isEmpty(excel.getPost())){
excel.setPost(empVo.getPost());
}
if (Common.isNotNull(empVo.getContractStart())){
excel.setContractStart(empVo.getContractStart());
excel.setContractEnd(empVo.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