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 {
String detailId;
String contactAddress;
String highEducation;
String flag;
}
......@@ -1396,9 +1396,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (Common.isNotNull(vo.getFundStatus())) {
employee.setFundStatus(Integer.parseInt(vo.getFundStatus()));
}
if (Common.isNotNull(vo.getHighEducation())) {
employee.setHignEducation(vo.getHighEducation());
}
if (Common.isNotNull(vo.getFileProvince())) {
employee.setFileProvince(Integer.parseInt(vo.getFileProvince()));
}
......@@ -1413,7 +1410,12 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (Common.isNotNull(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);
}
TEmployeeProject project = baseMapper.selectOne(Wrappers.<TEmployeeProject>query().lambda()
......
......@@ -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,
......@@ -694,13 +694,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(dispatchMap)){
dispatch = dispatchMap.get(excel.getEmpIdcard());
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)){
dispatch.setSocialId(social.getId());
dispatch.setSocialHouseholdName(social.getSocialHouseholdName());
......@@ -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));
}catch (Exception e){
log.error("派单新增异常:", e);
......@@ -765,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);
......@@ -803,8 +796,12 @@ 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 = null;
if (Common.isNotNull(empVoMap)) {
emp = empVoMap.get(excel.getEmpIdcard());
}
if(Common.isNotNull(emp)) {
if (Common.isEmpty(emp.getHignEducation())) {
if (excel.getEducationName().equals("文盲")) {
vo.setHighEducation("1");
}
......@@ -826,6 +823,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (excel.getEducationName().equals("硕士")) {
vo.setHighEducation("7");
}
if (excel.getEducationName().equals("博士")) {
vo.setHighEducation("8");
}
if (excel.getEducationName().equals("技工")) {
vo.setHighEducation("9");
}
......@@ -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);
......@@ -1310,7 +1258,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isEmpty(dispatch.getDispatchItem())){
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.setCreateBy(user.getId());
dispatch.setCreateTime(LocalDateTime.now());
......@@ -2325,21 +2277,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return true;
}
// 如果没有人员档案和项目档案的时候校验身份证和手机号码
R<Boolean> checkRes = checkDaprUtil.checkIdCardAndMobile(excel.getEmpName(),excel.getEmpIdcard(),excel.getEmpMobile());
if (Common.isEmpty(checkRes) || checkRes.getCode() != CommonConstants.SUCCESS){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), checkRes.getMsg()));
return true;
}
// 校验手机号码重复
checkRes = archivesDaprUtil.checkMobile(excel.getEmpMobile());
if (Common.isEmpty(checkRes) || checkRes.getCode() != CommonConstants.SUCCESS){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), checkRes.getMsg()));
return true;
}
if (checkRes.getData().booleanValue()){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_MOBILE_REPEAT)));
return true;
}
// R<Boolean> checkRes = checkDaprUtil.checkIdCardAndMobile(excel.getEmpName(),excel.getEmpIdcard(),excel.getEmpMobile());
// if (Common.isEmpty(checkRes) || checkRes.getCode() != CommonConstants.SUCCESS){
// errorMessageList.add(new ErrorMessage(excel.getRowIndex(), checkRes.getMsg()));
// return true;
// }
// // 校验手机号码重复
// checkRes = archivesDaprUtil.checkMobile(excel.getEmpMobile());
// if (Common.isEmpty(checkRes) || checkRes.getCode() != CommonConstants.SUCCESS){
// errorMessageList.add(new ErrorMessage(excel.getRowIndex(), checkRes.getMsg()));
// return true;
// }
// if (checkRes.getData().booleanValue()){
// errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_MOBILE_REPEAT)));
// return true;
// }
}
Date contractDateTemp = excel.getContractStart();
/*项目档案有可用状态的合同:
......@@ -2388,12 +2340,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(empVo.getEmpPhone()) && Common.isEmpty(excel.getEmpMobile())){
excel.setEmpMobile(empVo.getEmpPhone());
}
// 如果存在档案但是手机号码不为空校验号码
if (Common.isNotNull(excel.getEmpMobile())
&& !excel.getEmpMobile().equals(empVo.getEmpPhone())
&& checkMobileAndIdcard(errorMessageList, excel)){
return true;
}
// // 如果存在档案但是手机号码不为空校验号码
// if (Common.isNotNull(excel.getEmpMobile())
// && !excel.getEmpMobile().equals(empVo.getEmpPhone())
// && checkMobileAndIdcard(errorMessageList, excel)){
// return true;
// }
// 档案地 手机号码, 派单有数据 更新档案,派单没有 有档案取值档案数据
if (Common.isEmpty(excel.getFileProvince())){
excel.setFileProvince(Common.isNotNullToStr(empVo.getFileProvince()));
......@@ -3542,6 +3494,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(dis.getFundId())){
vo.setFundStatus(CommonConstants.ZERO_STRING);
}
vo.setFlag(CommonConstants.ONE_STRING);
vo.setEmpIdCard(dis.getEmpIdcard());
vo.setDepartNo(dis.getSettleDomainCode());
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