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