Commit ec3929eb authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.7.9' into MVP1.7.9

parents 9aa3576d 1d01cc45
...@@ -277,7 +277,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -277,7 +277,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
if (null != oldList && !oldList.isEmpty()) { if (null != oldList && !oldList.isEmpty()) {
for (TEmployeeInsurancePre oldInsurance : oldList) { for (TEmployeeInsurancePre oldInsurance : oldList) {
// 1:判断是否变更 商险待办 的项目 // 1:判断是否变更 商险待办 的项目
if (null != map.get(this.getFiveKey(oldInsurance))) { if (null != map.get(this.getPreOldFiveKey(oldInsurance))) {
oldMap.put(oldInsurance.getId(), oldInsurance); oldMap.put(oldInsurance.getId(), oldInsurance);
} }
} }
...@@ -744,7 +744,17 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -744,7 +744,17 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
return isNullToEmpty(insurancePreVo.getBuyStandard()) + CommonConstants.DOWN_LINE_STRING return isNullToEmpty(insurancePreVo.getBuyStandard()) + CommonConstants.DOWN_LINE_STRING
+ isNullToEmpty(insurancePreVo.getInsuranceTypeName()) + CommonConstants.DOWN_LINE_STRING + isNullToEmpty(insurancePreVo.getInsuranceTypeName()) + CommonConstants.DOWN_LINE_STRING
+ isNullToEmpty(insurancePreVo.getInsuranceCompanyName()) + CommonConstants.DOWN_LINE_STRING + isNullToEmpty(insurancePreVo.getInsuranceCompanyName()) + CommonConstants.DOWN_LINE_STRING
+ isNullToEmpty(insurancePreVo.getPolicyStart()) + CommonConstants.DOWN_LINE_STRING + isNullToEmpty(insurancePreVo.getPolicyEnd()); + isNullToEmpty(DateUtil.dateToString(insurancePreVo.getPolicyStart(), DateUtil.ISO_EXPANDED_DATE_FORMAT))
+ DateUtil.dateToString(insurancePreVo.getPolicyEnd(), DateUtil.ISO_EXPANDED_DATE_FORMAT);
}
private String getPreOldFiveKey(TEmployeeInsurancePre insurancePreVo) {
// 1:重复性判断
return isNullToEmpty(insurancePreVo.getBuyStandard()) + CommonConstants.DOWN_LINE_STRING
+ isNullToEmpty(insurancePreVo.getInsuranceTypeName()) + CommonConstants.DOWN_LINE_STRING
+ isNullToEmpty(insurancePreVo.getInsuranceCompanyName()) + CommonConstants.DOWN_LINE_STRING
+ isNullToEmpty(DateUtil.dateToString(insurancePreVo.getPolicyStart(), DateUtil.ISO_EXPANDED_DATE_FORMAT))
+ DateUtil.dateToString(insurancePreVo.getPolicyEnd(), DateUtil.ISO_EXPANDED_DATE_FORMAT);
} }
/** /**
......
...@@ -569,8 +569,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -569,8 +569,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} else { } else {
return R.other(CommonConstants.TWO_INT,null,"保险公司、险种、购买标准、保单起/止日期不可同时重复!"); return R.other(CommonConstants.TWO_INT,null,"保险公司、险种、购买标准、保单起/止日期不可同时重复!");
} }
insurancePreVo.setEmpIdcard(preVo.getEmpIdcard()); insurancePreVo.setEmpIdcard(registration.getEmpIdcard());
insurancePreVo.setDeptNo(preVo.getDeptNo()); insurancePreVo.setDeptNo(registration.getDeptNo());
//商险是否存在判断 //商险是否存在判断
checkVo = checkInsuranceExit(insurancePreVo,preVo.getEmployeeName(),preVo.getEmpIdcard()); checkVo = checkInsuranceExit(insurancePreVo,preVo.getEmployeeName(),preVo.getEmpIdcard());
if (null != checkVo) { if (null != checkVo) {
...@@ -680,18 +680,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -680,18 +680,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
insurancePreVo.setPolicyEffect(registration.getJoinLeaveDate()); insurancePreVo.setPolicyEffect(registration.getJoinLeaveDate());
insurancePreVo.setPolicyStart(registration.getJoinLeaveDate()); insurancePreVo.setPolicyStart(registration.getJoinLeaveDate());
} }
//商险是否存在判断 //入职日期需要小于保单截止日期
checkVo = checkInsuranceExit(insurancePreVo, registration.getEmployeeName(), registration.getEmpIdcard()); if ((DateUtil.dateToString(registration.getJoinLeaveDate(),DateUtil.ISO_EXPANDED_DATE_FORMAT).
if (null != checkVo) { compareTo(DateUtil.dateToString(insurancePreVo.getPolicyEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)) >= 0)
errorList.add(checkVo); || (DateUtil.dateToString(insurancePreVo.getPolicyStart(),DateUtil.ISO_EXPANDED_DATE_FORMAT).
continue; compareTo(DateUtil.dateToString(insurancePreVo.getPolicyEnd(),DateUtil.ISO_EXPANDED_DATE_FORMAT)) > 0)) {
} else {
if (Common.isEmpty(insurancePreVo.getProcessStatus())) {
insurancePreVo.setProcessStatus(CommonConstants.ZERO_STRING);
}
}
//入职日期需要小于等于保单截止日期
if (registration.getJoinLeaveDate().after(insurancePreVo.getPolicyEnd())) {
TEmployeeInsuranceExitCheckVo exitCheckVo = new TEmployeeInsuranceExitCheckVo(); TEmployeeInsuranceExitCheckVo exitCheckVo = new TEmployeeInsuranceExitCheckVo();
exitCheckVo.setBuyType(insurancePreVo.getBuyType()); exitCheckVo.setBuyType(insurancePreVo.getBuyType());
exitCheckVo.setEmployeeName(registration.getEmployeeName()); exitCheckVo.setEmployeeName(registration.getEmployeeName());
...@@ -701,9 +694,19 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -701,9 +694,19 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
exitCheckVo.setBuyStandard(insurancePreVo.getBuyStandard()); exitCheckVo.setBuyStandard(insurancePreVo.getBuyStandard());
exitCheckVo.setInsuranceCompanyName(insurancePreVo.getInsuranceCompanyName()); exitCheckVo.setInsuranceCompanyName(insurancePreVo.getInsuranceCompanyName());
exitCheckVo.setInsuranceTypeName(insurancePreVo.getInsuranceTypeName()); exitCheckVo.setInsuranceTypeName(insurancePreVo.getInsuranceTypeName());
exitCheckVo.setErrorMsg("入职日期需要小于等于保单截止日期!"); exitCheckVo.setErrorMsg("入职日期需要小于保单截止日期/保单开始日期需小于等于保单截止日期");
errorList.add(exitCheckVo);
continue;
}
//商险是否存在判断
checkVo = checkInsuranceExit(insurancePreVo, registration.getEmployeeName(), registration.getEmpIdcard());
if (null != checkVo) {
errorList.add(checkVo); errorList.add(checkVo);
continue; continue;
} else {
if (Common.isEmpty(insurancePreVo.getProcessStatus())) {
insurancePreVo.setProcessStatus(CommonConstants.ZERO_STRING);
}
} }
} }
//点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项, //点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项,
......
...@@ -75,9 +75,9 @@ public class TEmployeeInsurancePreExportVo implements Serializable { ...@@ -75,9 +75,9 @@ public class TEmployeeInsurancePreExportVo implements Serializable {
/** /**
* 是否地市自购0是 1 否 * 是否地市自购0是 1 否
*/ */
@ExcelAttribute(name = "是否地市自购0是 1 否") @ExcelAttribute(name = "是否地市自购")
@Schema(description = "是否地市自购0是 1 否") @Schema(description = "是否地市自购")
@ExcelProperty("是否地市自购0是 1 否") @ExcelProperty("是否地市自购")
private String isAddress; private String isAddress;
/** /**
......
...@@ -348,8 +348,8 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -348,8 +348,8 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
} }
if (Common.isNotNull(preExit)) { if (Common.isNotNull(preExit)) {
pre.setId(preExit.getId()); pre.setId(preExit.getId());
baseMapper.insert(pre);
baseMapper.deleteById(preExit); baseMapper.deleteById(preExit);
baseMapper.insert(pre);
} else { } else {
baseMapper.insert(pre); baseMapper.insert(pre);
//暂时不需要,先注释,后续可能会需要 //暂时不需要,先注释,后续可能会需要
...@@ -376,14 +376,19 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -376,14 +376,19 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
@Override @Override
public TEmployeeInsuranceSelectVo selectInsurancePreInfoList(TEmployeeInsurancePreVo preVo) { public TEmployeeInsuranceSelectVo selectInsurancePreInfoList(TEmployeeInsurancePreVo preVo) {
TEmployeeInsuranceSelectVo selectVo = new TEmployeeInsuranceSelectVo(); TEmployeeInsuranceSelectVo selectVo = new TEmployeeInsuranceSelectVo();
List<TEmployeeInsurancePre> list = baseMapper.selectList(Wrappers.<TEmployeeInsurancePre>query().lambda() List<TEmployeeInsurancePre> list = new ArrayList<>();
.eq(TEmployeeInsurancePre::getEmpIdcard, preVo.getEmpIdcard()) try {
.eq(TEmployeeInsurancePre::getBuyStandard, preVo.getBuyStandard()) list = baseMapper.selectList(Wrappers.<TEmployeeInsurancePre>query().lambda()
.eq(TEmployeeInsurancePre::getInsuranceTypeName, preVo.getInsuranceTypeName()) .eq(TEmployeeInsurancePre::getEmpIdcard, preVo.getEmpIdcard())
.eq(TEmployeeInsurancePre::getInsuranceCompanyName, preVo.getInsuranceCompanyName()) .eq(TEmployeeInsurancePre::getBuyStandard, preVo.getBuyStandard())
.eq(TEmployeeInsurancePre::getPolicyStart, preVo.getPolicyStart()) .eq(TEmployeeInsurancePre::getInsuranceTypeName, preVo.getInsuranceTypeName())
.eq(TEmployeeInsurancePre::getPolicyEnd, preVo.getPolicyEnd()) .eq(TEmployeeInsurancePre::getInsuranceCompanyName, preVo.getInsuranceCompanyName())
); .eq(TEmployeeInsurancePre::getPolicyStart, DateUtil.parseDate(DateUtil.dateToString(preVo.getPolicyStart()), DateUtil.ISO_EXPANDED_DATE_FORMAT))
.eq(TEmployeeInsurancePre::getPolicyEnd, DateUtil.parseDate(DateUtil.dateToString(preVo.getPolicyEnd()), DateUtil.ISO_EXPANDED_DATE_FORMAT))
);
}catch (Exception e){
log.error("执行异常" ,e);
}
selectVo.setInsurancePreList(list); selectVo.setInsurancePreList(list);
return selectVo; return selectVo;
} }
......
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