Commit 27e48025 authored by huyuchen's avatar huyuchen

Merge branch 'MVP1.5.5' into develop

parents d80cf2ae 716cbcfd
...@@ -53,4 +53,5 @@ public class UpProjectSocialFundVo implements Serializable { ...@@ -53,4 +53,5 @@ public class UpProjectSocialFundVo implements Serializable {
String detailId; String detailId;
String contactAddress; String contactAddress;
String highEducation; String highEducation;
String flag;
} }
...@@ -1396,9 +1396,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1396,9 +1396,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (Common.isNotNull(vo.getFundStatus())) { if (Common.isNotNull(vo.getFundStatus())) {
employee.setFundStatus(Integer.parseInt(vo.getFundStatus())); employee.setFundStatus(Integer.parseInt(vo.getFundStatus()));
} }
if (Common.isNotNull(vo.getHighEducation())) {
employee.setHignEducation(vo.getHighEducation());
}
if (Common.isNotNull(vo.getFileProvince())) { if (Common.isNotNull(vo.getFileProvince())) {
employee.setFileProvince(Integer.parseInt(vo.getFileProvince())); employee.setFileProvince(Integer.parseInt(vo.getFileProvince()));
} }
...@@ -1413,7 +1410,12 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1413,7 +1410,12 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (Common.isNotNull(vo.getMobile())) { if (Common.isNotNull(vo.getMobile())) {
employee.setEmpPhone(vo.getMobile()); employee.setEmpPhone(vo.getMobile());
} }
employee.setIsCollege(CommonConstants.ONE_INT); if(Common.isEmpty(vo.getFlag())){
employee.setIsCollege(CommonConstants.ONE_INT);
if (Common.isNotNull(vo.getHighEducation())) {
employee.setHignEducation(vo.getHighEducation());
}
}
tEmployeeInfoMapper.updateSocialInfoById(employee); tEmployeeInfoMapper.updateSocialInfoById(employee);
} }
TEmployeeProject project = baseMapper.selectOne(Wrappers.<TEmployeeProject>query().lambda() TEmployeeProject project = baseMapper.selectOne(Wrappers.<TEmployeeProject>query().lambda()
......
...@@ -592,7 +592,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -592,7 +592,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
addVo.setProjectsMap(projectsMap); addVo.setProjectsMap(projectsMap);
R<EmpDispatchAddVo> res = archivesDaprUtil.addDispatchInfo(addVo); 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 等数据 // 清理map list 等数据
Common.clear(excelVOList); Common.clear(excelVOList);
Common.clear(empAddsMap); Common.clear(empAddsMap);
...@@ -621,7 +621,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -621,7 +621,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private void insertAllInfo(List<TDispatchImportVo> excelVOList, private void insertAllInfo(List<TDispatchImportVo> excelVOList,
List<ErrorMessage> errorMessageList, List<ErrorMessage> errorMessageList,
DispatchEmpVo empVo, Map<String, DispatchEmpVo> empVoMap ,
R<EmpDispatchAddVo> res, R<EmpDispatchAddVo> res,
Map<String, TSocialInfo> socialsMap, Map<String, TSocialInfo> socialsMap,
Map<String, TProvidentFund> fundsMap, Map<String, TProvidentFund> fundsMap,
...@@ -694,13 +694,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -694,13 +694,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(dispatchMap)){ if (Common.isNotNull(dispatchMap)){
dispatch = dispatchMap.get(excel.getEmpIdcard()); dispatch = dispatchMap.get(excel.getEmpIdcard());
if (Common.isNotNull(dispatch)){ if (Common.isNotNull(dispatch)){
if(Common.isNotNull(empVo)) {
if (Common.isNotNull(empVo.getContactAddress()) && Common.isNotNull(excel.getContactAddress()) && !excel.getContactAddress().equals(empVo.getContactAddress())) {
dispatch.setContactAddress(empVo.getContactAddress());
}
}else {
dispatch.setContactAddress(excel.getContactAddress());
}
if (Common.isNotNull(social)){ if (Common.isNotNull(social)){
dispatch.setSocialId(social.getId()); dispatch.setSocialId(social.getId());
dispatch.setSocialHouseholdName(social.getSocialHouseholdName()); dispatch.setSocialHouseholdName(social.getSocialHouseholdName());
...@@ -737,7 +730,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -737,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)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS, CommonConstants.GREEN));
}catch (Exception e){ }catch (Exception e){
log.error("派单新增异常:", e); log.error("派单新增异常:", e);
...@@ -765,7 +758,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -765,7 +758,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
auditInfoMapper.insert(auditInfo); 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(); UpProjectSocialFundVo vo = new UpProjectSocialFundVo();
if (Common.isNotNull(social)) { if (Common.isNotNull(social)) {
vo.setSocialStatus(CommonConstants.ONE_STRING); vo.setSocialStatus(CommonConstants.ONE_STRING);
...@@ -803,8 +796,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -803,8 +796,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
vo.setMobile(excel.getEmpMobile()); vo.setMobile(excel.getEmpMobile());
vo.setEmpIdCard(socialFund.getEmpIdcard()); vo.setEmpIdCard(socialFund.getEmpIdcard());
if (Common.isNotNull(excel.getEducationName())) { if (Common.isNotNull(excel.getEducationName())) {
if(Common.isNotNull(empVo)) { DispatchEmpVo emp = null;
if (Common.isEmpty(empVo.getHignEducation())) { if (Common.isNotNull(empVoMap)) {
emp = empVoMap.get(excel.getEmpIdcard());
}
if(Common.isNotNull(emp)) {
if (Common.isEmpty(emp.getHignEducation())) {
if (excel.getEducationName().equals("文盲")) { if (excel.getEducationName().equals("文盲")) {
vo.setHighEducation("1"); vo.setHighEducation("1");
} }
...@@ -826,6 +823,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -826,6 +823,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (excel.getEducationName().equals("硕士")) { if (excel.getEducationName().equals("硕士")) {
vo.setHighEducation("7"); vo.setHighEducation("7");
} }
if (excel.getEducationName().equals("博士")) {
vo.setHighEducation("8");
}
if (excel.getEducationName().equals("技工")) { if (excel.getEducationName().equals("技工")) {
vo.setHighEducation("9"); vo.setHighEducation("9");
} }
...@@ -837,58 +837,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -837,58 +837,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
} }
if (Common.isNotNull(empVo.getHignEducation())) {
if (excel.getEducationName().equals("文盲")) {
if (empVo.getHignEducation() == "1") {
vo.setHighEducation("1");
}
}
if (excel.getEducationName().equals("小学")) {
if (empVo.getHignEducation() == "2") {
vo.setHighEducation("2");
}
}
if (excel.getEducationName().equals("初中")) {
if (empVo.getHignEducation() == "3") {
vo.setHighEducation("3");
}
}
if (excel.getEducationName().equals("高中")) {
if (empVo.getHignEducation() == "4") {
vo.setHighEducation("4");
}
}
if (excel.getEducationName().equals("大专")) {
if (empVo.getHignEducation() == "5") {
vo.setHighEducation("5");
}
}
if (excel.getEducationName().equals("本科")) {
if (empVo.getHignEducation() == "6") {
vo.setHighEducation("6");
}
}
if (excel.getEducationName().equals("硕士")) {
if (empVo.getHignEducation() == "7") {
vo.setHighEducation("7");
}
}
if (excel.getEducationName().equals("技工")) {
if (empVo.getHignEducation() == "9") {
vo.setHighEducation("9");
}
}
if (excel.getEducationName().equals("职高")) {
if (empVo.getHignEducation() == "10") {
vo.setHighEducation("10");
}
}
if (excel.getEducationName().equals("中专")) {
if (empVo.getHignEducation() == "11") {
vo.setHighEducation("11");
}
}
}
} }
} }
R<Boolean> resUp = archivesDaprUtil.updateProjectSocialFund(vo); R<Boolean> resUp = archivesDaprUtil.updateProjectSocialFund(vo);
...@@ -1310,7 +1258,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1310,7 +1258,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isEmpty(dispatch.getDispatchItem())){ if (Common.isEmpty(dispatch.getDispatchItem())){
return true; return true;
} }
dispatch.setContactAddress(excel.getContactAddress()); if(Common.isNotNull(empVo) && Common.isNotNull(empVo.getContactAddress())) {
dispatch.setContactAddress(empVo.getContactAddress());
} else {
dispatch.setContactAddress(excel.getContactAddress());
}
dispatch.setOrganName(user.getDeptName()); dispatch.setOrganName(user.getDeptName());
dispatch.setCreateBy(user.getId()); dispatch.setCreateBy(user.getId());
dispatch.setCreateTime(LocalDateTime.now()); dispatch.setCreateTime(LocalDateTime.now());
...@@ -2325,21 +2277,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2325,21 +2277,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return true; return true;
} }
// 如果没有人员档案和项目档案的时候校验身份证和手机号码 // 如果没有人员档案和项目档案的时候校验身份证和手机号码
R<Boolean> checkRes = checkDaprUtil.checkIdCardAndMobile(excel.getEmpName(),excel.getEmpIdcard(),excel.getEmpMobile()); // R<Boolean> checkRes = checkDaprUtil.checkIdCardAndMobile(excel.getEmpName(),excel.getEmpIdcard(),excel.getEmpMobile());
if (Common.isEmpty(checkRes) || checkRes.getCode() != CommonConstants.SUCCESS){ // if (Common.isEmpty(checkRes) || checkRes.getCode() != CommonConstants.SUCCESS){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), checkRes.getMsg())); // errorMessageList.add(new ErrorMessage(excel.getRowIndex(), checkRes.getMsg()));
return true; // return true;
} // }
// 校验手机号码重复 // // 校验手机号码重复
checkRes = archivesDaprUtil.checkMobile(excel.getEmpMobile()); // checkRes = archivesDaprUtil.checkMobile(excel.getEmpMobile());
if (Common.isEmpty(checkRes) || checkRes.getCode() != CommonConstants.SUCCESS){ // if (Common.isEmpty(checkRes) || checkRes.getCode() != CommonConstants.SUCCESS){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), checkRes.getMsg())); // errorMessageList.add(new ErrorMessage(excel.getRowIndex(), checkRes.getMsg()));
return true; // return true;
} // }
if (checkRes.getData().booleanValue()){ // if (checkRes.getData().booleanValue()){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_MOBILE_REPEAT))); // errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_MOBILE_REPEAT)));
return true; // return true;
} // }
} }
Date contractDateTemp = excel.getContractStart(); Date contractDateTemp = excel.getContractStart();
/*项目档案有可用状态的合同: /*项目档案有可用状态的合同:
...@@ -2388,12 +2340,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2388,12 +2340,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(empVo.getEmpPhone()) && Common.isEmpty(excel.getEmpMobile())){ if (Common.isNotNull(empVo.getEmpPhone()) && Common.isEmpty(excel.getEmpMobile())){
excel.setEmpMobile(empVo.getEmpPhone()); excel.setEmpMobile(empVo.getEmpPhone());
} }
// 如果存在档案但是手机号码不为空校验号码 // // 如果存在档案但是手机号码不为空校验号码
if (Common.isNotNull(excel.getEmpMobile()) // if (Common.isNotNull(excel.getEmpMobile())
&& !excel.getEmpMobile().equals(empVo.getEmpPhone()) // && !excel.getEmpMobile().equals(empVo.getEmpPhone())
&& checkMobileAndIdcard(errorMessageList, excel)){ // && checkMobileAndIdcard(errorMessageList, excel)){
return true; // return true;
} // }
// 档案地 手机号码, 派单有数据 更新档案,派单没有 有档案取值档案数据 // 档案地 手机号码, 派单有数据 更新档案,派单没有 有档案取值档案数据
if (Common.isEmpty(excel.getFileProvince())){ if (Common.isEmpty(excel.getFileProvince())){
excel.setFileProvince(Common.isNotNullToStr(empVo.getFileProvince())); excel.setFileProvince(Common.isNotNullToStr(empVo.getFileProvince()));
...@@ -3542,6 +3494,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3542,6 +3494,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(dis.getFundId())){ if (Common.isNotNull(dis.getFundId())){
vo.setFundStatus(CommonConstants.ZERO_STRING); vo.setFundStatus(CommonConstants.ZERO_STRING);
} }
vo.setFlag(CommonConstants.ONE_STRING);
vo.setEmpIdCard(dis.getEmpIdcard()); vo.setEmpIdCard(dis.getEmpIdcard());
vo.setDepartNo(dis.getSettleDomainCode()); vo.setDepartNo(dis.getSettleDomainCode());
if (flagTemp){ if (flagTemp){
......
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