Commit 05d7872c authored by huyuchen's avatar huyuchen

huych-入职确认信息编辑提交

parent ed2ff005
...@@ -618,56 +618,58 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -618,56 +618,58 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
if (Common.isNotNull(insurancePreVo.getId())) { if (Common.isNotNull(insurancePreVo.getId())) {
newMap.put(insurancePreVo.getId(), insurancePreVo); newMap.put(insurancePreVo.getId(), insurancePreVo);
} }
// 初始化信息 if (CommonConstants.FOUR_STRING.equals(insurancePreVo.getModelType())) {
initInsurancePreInfo(employeeRegistrationPre, insurancePreVo, user, id); // 初始化信息
// 1:重复性判断 initInsurancePreInfo(employeeRegistrationPre, insurancePreVo, user, id);
key = this.getFiveKey(insurancePreVo); // 1:重复性判断
newDeptNo = insurancePreVo.getDeptNo(); key = this.getFiveKey(insurancePreVo);
if (Common.isEmpty(newDeptNo)) { newDeptNo = insurancePreVo.getDeptNo();
errorTemp.append("项目编码不可为空;"); if (Common.isEmpty(newDeptNo)) {
errorTemp.append("项目编码不可为空;");
// return R.failed("请传项目编码"); // return R.failed("请传项目编码");
}
newKeyDeptNoMap.put(key, insurancePreVo.getDeptNo());
if (keyMap.get(key) == null) {
if (Common.isEmpty(insurancePreVo.getModelType()) || !insurancePreVo.getModelType().equals(CommonConstants.THREE_STRING)) {
keyMap.put(key, CommonConstants.ONE_INT);
} }
} else if (Common.isEmpty(insurancePreVo.getModelType()) || !insurancePreVo.getModelType().equals(CommonConstants.THREE_STRING)) { newKeyDeptNoMap.put(key, insurancePreVo.getDeptNo());
errorTemp.append("保险公司、险种、购买标准、保单起、止日期不可同时重复;"); if (keyMap.get(key) == null) {
if (Common.isEmpty(insurancePreVo.getModelType()) || !insurancePreVo.getModelType().equals(CommonConstants.THREE_STRING)) {
keyMap.put(key, CommonConstants.ONE_INT);
}
} else if (Common.isEmpty(insurancePreVo.getModelType()) || !insurancePreVo.getModelType().equals(CommonConstants.THREE_STRING)) {
errorTemp.append("保险公司、险种、购买标准、保单起、止日期不可同时重复;");
// return R.failed("保险公司、险种、购买标准、保单起、止日期不可同时重复!"); // return R.failed("保险公司、险种、购买标准、保单起、止日期不可同时重复!");
} }
insurancePreVo.setEmpIdcard(employeeRegistrationPre.getEmpIdcard()); insurancePreVo.setEmpIdcard(employeeRegistrationPre.getEmpIdcard());
insurancePreVo.setDeptNo(employeeRegistrationPre.getDeptNo()); insurancePreVo.setDeptNo(employeeRegistrationPre.getDeptNo());
//商险是否存在判断 //商险是否存在判断
preVo = new TEmployeeInsurancePreVo(); preVo = new TEmployeeInsurancePreVo();
preVo.setEmployeeName(employeeRegistrationPre.getEmployeeName()); preVo.setEmployeeName(employeeRegistrationPre.getEmployeeName());
preVo.setEmpIdcard(employeeRegistrationPre.getEmpIdcard()); preVo.setEmpIdcard(employeeRegistrationPre.getEmpIdcard());
preVo.setBuyStandard(insurancePreVo.getBuyStandard()); preVo.setBuyStandard(insurancePreVo.getBuyStandard());
preVo.setBuyType(insurancePreVo.getBuyType()); preVo.setBuyType(insurancePreVo.getBuyType());
preVo.setDeptNo(insurancePreVo.getDeptNo()); preVo.setDeptNo(insurancePreVo.getDeptNo());
preVo.setInsuranceTypeName(insurancePreVo.getInsuranceTypeName()); preVo.setInsuranceTypeName(insurancePreVo.getInsuranceTypeName());
preVo.setInsuranceCompanyName(insurancePreVo.getInsuranceCompanyName()); preVo.setInsuranceCompanyName(insurancePreVo.getInsuranceCompanyName());
preVo.setPolicyStart(insurancePreVo.getPolicyStart()); preVo.setPolicyStart(insurancePreVo.getPolicyStart());
preVo.setPolicyEnd(insurancePreVo.getPolicyEnd()); preVo.setPolicyEnd(insurancePreVo.getPolicyEnd());
if (Common.isEmpty(insurancePreVo.getModelType()) if (Common.isEmpty(insurancePreVo.getModelType())
|| !CommonConstants.FOUR_STRING.equals(insurancePreVo.getModelType())) { || !CommonConstants.FOUR_STRING.equals(insurancePreVo.getModelType())) {
checkVo = checkInsuranceExit(preVo); checkVo = checkInsuranceExit(preVo);
if (null != checkVo) { if (null != checkVo) {
errorTemp.append("保单开始日期:" + insurancePreVo.getPolicyStart().toString() errorTemp.append("保单开始日期:" + insurancePreVo.getPolicyStart().toString()
+ ",保单结束日期:" + insurancePreVo.getPolicyEnd().toString() + "这条数据存在流程中/已完结的商险数据;"); + ",保单结束日期:" + insurancePreVo.getPolicyEnd().toString() + "这条数据存在流程中/已完结的商险数据;");
// errorList.add(checkVo); // errorList.add(checkVo);
} else {
if (Common.isNotNull(preVo.getProcessStatus())) {
insurancePreVo.setProcessStatus(preVo.getProcessStatus());
} else { } else {
insurancePreVo.setProcessStatus(CommonConstants.ZERO_STRING); if (Common.isNotNull(preVo.getProcessStatus())) {
} insurancePreVo.setProcessStatus(preVo.getProcessStatus());
if (Common.isNotNull(preVo.getIsAddress())) { } else {
insurancePreVo.setIsAddress(preVo.getIsAddress()); insurancePreVo.setProcessStatus(CommonConstants.ZERO_STRING);
} }
if (Common.isNotNull(preVo.getInsurancesId())) { if (Common.isNotNull(preVo.getIsAddress())) {
insurancePreVo.setInsurancesId(preVo.getInsurancesId()); insurancePreVo.setIsAddress(preVo.getIsAddress());
}
if (Common.isNotNull(preVo.getInsurancesId())) {
insurancePreVo.setInsurancesId(preVo.getInsurancesId());
}
} }
} }
} }
......
...@@ -316,6 +316,8 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -316,6 +316,8 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
oldMap = new HashMap<>(); oldMap = new HashMap<>();
} }
List<TEmployeeInsurancePre> saveOrUpdateList = new ArrayList<>(); List<TEmployeeInsurancePre> saveOrUpdateList = new ArrayList<>();
//加一个禁止编辑的判断
List<TEmployeeInsurancePre> unUpdateList = new ArrayList<>();
// 是否修改了商险 // 是否修改了商险
boolean isModifyInsurance = false; boolean isModifyInsurance = false;
TEmployeeInsurancePre oldInsurance; TEmployeeInsurancePre oldInsurance;
...@@ -400,6 +402,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -400,6 +402,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
this.setLogBaseInfo(empPreId, newInsurance, null, user, differenceInsuranceKey, logId, detailInsuranceLog); this.setLogBaseInfo(empPreId, newInsurance, null, user, differenceInsuranceKey, logId, detailInsuranceLog);
isModifyInsurance = true; isModifyInsurance = true;
detailList.add(detailInsuranceLog); detailList.add(detailInsuranceLog);
} else if (CommonConstants.FOUR_STRING.equals(newInsurance.getModelType())) {
// 4:不可编辑
unUpdateList.add(newInsurance);
} }
} else { } else {
// 没有调整的 // 没有调整的
...@@ -667,7 +672,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -667,7 +672,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(), daprInsurancesProperties.getAppId() HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(), daprInsurancesProperties.getAppId()
, "/temployeeinsurancepre/inner/saveOrUpdateInsuranceList" , "/temployeeinsurancepre/inner/saveOrUpdateInsuranceList"
, saveOrUpdateList, Boolean.class, SecurityConstants.FROM_IN); , saveOrUpdateList, Boolean.class, SecurityConstants.FROM_IN);
} else { } else if (unUpdateList.isEmpty()){
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(), daprInsurancesProperties.getAppId() HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(), daprInsurancesProperties.getAppId()
, "/temployeeinsurancepre/inner/deleteInsuranceByPreId" , "/temployeeinsurancepre/inner/deleteInsuranceByPreId"
, empPreId, Boolean.class, SecurityConstants.FROM_IN); , empPreId, Boolean.class, SecurityConstants.FROM_IN);
......
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