Commit 1b6a1a82 authored by huyuchen's avatar huyuchen

优化修改

parent a47c9087
......@@ -592,7 +592,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
addVo.setProjectsMap(projectsMap);
R<EmpDispatchAddVo> res = archivesDaprUtil.addDispatchInfo(addVo);
// 开始插入各种数据了
insertAllInfo(excelVOList, errorMessageList, empVo,res,socialsMap,fundsMap,socialFundAddMap,dispatchMap,excelVOTemp,dispatchPart,injury);
insertAllInfo(excelVOList, errorMessageList, empVoMap,res,socialsMap,fundsMap,socialFundAddMap,dispatchMap,excelVOTemp,dispatchPart,injury);
// 清理map list 等数据
Common.clear(excelVOList);
Common.clear(empAddsMap);
......@@ -621,7 +621,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private void insertAllInfo(List<TDispatchImportVo> excelVOList,
List<ErrorMessage> errorMessageList,
DispatchEmpVo empVo,
Map<String, DispatchEmpVo> empVoMap ,
R<EmpDispatchAddVo> res,
Map<String, TSocialInfo> socialsMap,
Map<String, TProvidentFund> fundsMap,
......@@ -730,7 +730,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
// 同步更新人员档案和项目档案的社保公积金状态
updateDocSocialFund(social, fund, socialFund,empVo,excel);
updateDocSocialFund(social, fund, socialFund,empVoMap,excel);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS, CommonConstants.GREEN));
}catch (Exception e){
log.error("派单新增异常:", e);
......@@ -758,7 +758,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
auditInfoMapper.insert(auditInfo);
}
private void updateDocSocialFund(TSocialInfo social, TProvidentFund fund, TSocialFundInfo socialFund, DispatchEmpVo empVo,TDispatchImportVo excel) {
private void updateDocSocialFund(TSocialInfo social, TProvidentFund fund, TSocialFundInfo socialFund, Map<String, DispatchEmpVo> empVoMap,TDispatchImportVo excel) {
UpProjectSocialFundVo vo = new UpProjectSocialFundVo();
if (Common.isNotNull(social)) {
vo.setSocialStatus(CommonConstants.ONE_STRING);
......@@ -796,8 +796,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
vo.setMobile(excel.getEmpMobile());
vo.setEmpIdCard(socialFund.getEmpIdcard());
if (Common.isNotNull(excel.getEducationName())) {
if(Common.isNotNull(empVo)) {
if (Common.isEmpty(empVo.getHignEducation())) {
DispatchEmpVo emp = empVoMap.get(excel.getEmpIdcard());
if(Common.isNotNull(emp)) {
if (Common.isEmpty(emp.getHignEducation())) {
if (excel.getEducationName().equals("文盲")) {
vo.setHighEducation("1");
}
......@@ -830,54 +831,54 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
if (Common.isNotNull(empVo.getHignEducation())) {
if (Common.isNotNull(emp.getHignEducation())) {
if (excel.getEducationName().equals("文盲")) {
if (empVo.getHignEducation() == "1") {
if (emp.getHignEducation() == "1") {
vo.setHighEducation("1");
}
}
if (excel.getEducationName().equals("小学")) {
if (empVo.getHignEducation() == "2") {
if (emp.getHignEducation() == "2") {
vo.setHighEducation("2");
}
}
if (excel.getEducationName().equals("初中")) {
if (empVo.getHignEducation() == "3") {
if (emp.getHignEducation() == "3") {
vo.setHighEducation("3");
}
}
if (excel.getEducationName().equals("高中")) {
if (empVo.getHignEducation() == "4") {
if (emp.getHignEducation() == "4") {
vo.setHighEducation("4");
}
}
if (excel.getEducationName().equals("大专")) {
if (empVo.getHignEducation() == "5") {
if (emp.getHignEducation() == "5") {
vo.setHighEducation("5");
}
}
if (excel.getEducationName().equals("本科")) {
if (empVo.getHignEducation() == "6") {
if (emp.getHignEducation() == "6") {
vo.setHighEducation("6");
}
}
if (excel.getEducationName().equals("硕士")) {
if (empVo.getHignEducation() == "7") {
if (emp.getHignEducation() == "7") {
vo.setHighEducation("7");
}
}
if (excel.getEducationName().equals("技工")) {
if (empVo.getHignEducation() == "9") {
if (emp.getHignEducation() == "9") {
vo.setHighEducation("9");
}
}
if (excel.getEducationName().equals("职高")) {
if (empVo.getHignEducation() == "10") {
if (emp.getHignEducation() == "10") {
vo.setHighEducation("10");
}
}
if (excel.getEducationName().equals("中专")) {
if (empVo.getHignEducation() == "11") {
if (emp.getHignEducation() == "11") {
vo.setHighEducation("11");
}
}
......
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