Commit 2141d2a8 authored by huyuchen's avatar huyuchen

huych-商险自动化逻辑调整

parent 3b32985a
...@@ -262,9 +262,12 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -262,9 +262,12 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
isModifyInsurance = true; isModifyInsurance = true;
detailList.add(detailInsuranceLog); detailList.add(detailInsuranceLog);
} }
//如果是否已购买商险为是,则需要处理商险明细数据 //如果服务类型包含商险处理商险明细数据
if (CommonConstants.ZERO_STRING.equals(isBuyNew)) { if (Common.isNotNull(newInfo.getServerItem()) && newInfo.getServerItem().contains("商险")) {
newInfo.setId(empPreId); newInfo.setId(empPreId);
if (!newInfo.getExitInsuranceInfoList().isEmpty()) {
newInfo.getExitInsuranceInfoList().forEach(insurancePreVo -> insurancePreVo.setRegisterId(empPreId));
}
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(), daprInsurancesProperties.getAppId() HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(), daprInsurancesProperties.getAppId()
, "/temployeeinsurancepre/inner/updateInfoSaveInsurancePreInfo" , "/temployeeinsurancepre/inner/updateInfoSaveInsurancePreInfo"
, newInfo, Boolean.class, SecurityConstants.FROM_IN); , newInfo, Boolean.class, SecurityConstants.FROM_IN);
......
...@@ -667,7 +667,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -667,7 +667,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo.getExitInsuranceInfoList().forEach(insurancePreVo -> insurancePreVo.setRegisterId(domainR.getData())); preVo.getExitInsuranceInfoList().forEach(insurancePreVo -> insurancePreVo.setRegisterId(domainR.getData()));
//生成入职确认信息商险明细数据 //生成入职确认信息商险明细数据
insuranceDaprUtil.saveInsurancePreInfo(preVo); insuranceDaprUtil.saveInsurancePreInfo(preVo);
} else if (preVo.getServerItem().contains("商险") && !preVo.getEmployeeInsurancePreVos().isEmpty()) { } else if (preVo.getServerItem().contains("商险")
&& preVo.getInsuranceIsBuy().equals(CommonConstants.ONE_STRING)
&& !preVo.getEmployeeInsurancePreVos().isEmpty()) {
//生成商险待购买的数据 //生成商险待购买的数据
for (TEmployeeInsurancePreVo insurancePreVo : preVo.getEmployeeInsurancePreVos()) { for (TEmployeeInsurancePreVo insurancePreVo : preVo.getEmployeeInsurancePreVos()) {
initInsruancePreInfo(registration, insurancePreVo, user, domainR.getData()); initInsruancePreInfo(registration, insurancePreVo, user, domainR.getData());
......
...@@ -190,13 +190,11 @@ public class InsuranceBatchParam implements Serializable { ...@@ -190,13 +190,11 @@ public class InsuranceBatchParam implements Serializable {
/** /**
* 保单开始时间 * 保单开始时间
*/ */
@JsonIgnore
private LocalDate policyStart; private LocalDate policyStart;
/** /**
* 保单结束时间 * 保单结束时间
*/ */
@JsonIgnore
private LocalDate policyEnd; private LocalDate policyEnd;
@Schema(description = "项目名称") @Schema(description = "项目名称")
......
...@@ -572,6 +572,10 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -572,6 +572,10 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
TEmployeeInsurancePre preExit; TEmployeeInsurancePre preExit;
if (null != employeeInsurancePreVos && !employeeInsurancePreVos.isEmpty()) { if (null != employeeInsurancePreVos && !employeeInsurancePreVos.isEmpty()) {
try { try {
//删除已存在的入职确认信息对应的商险明细
preDetailService.remove(Wrappers.<TInsurancePreDetail>lambdaQuery()
.eq(TInsurancePreDetail::getRegisterId, registrationPreVo.getExitInsuranceInfoList()
.get(0).getRegisterId()));
for (TEmployeeInsurancePreVo preVo : employeeInsurancePreVos) { for (TEmployeeInsurancePreVo preVo : employeeInsurancePreVos) {
//判断是否存在商险待购买信息 //判断是否存在商险待购买信息
preExit = baseMapper.selectOne(Wrappers.<TEmployeeInsurancePre>query().lambda() preExit = baseMapper.selectOne(Wrappers.<TEmployeeInsurancePre>query().lambda()
...@@ -631,6 +635,13 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -631,6 +635,13 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
//批量新增 //批量新增
preDetailService.saveBatch(registrationPre.getExitInsuranceInfoList()); preDetailService.saveBatch(registrationPre.getExitInsuranceInfoList());
} }
//如果商险是否已购买为否,删除商险已购买明细
if (Common.isNotNull(registrationPre.getInsuranceIsBuy())
&& registrationPre.getInsuranceIsBuy().equals(CommonConstants.ONE_STRING)) {
//删除已存在的入职确认信息对应的商险明细
preDetailService.remove(Wrappers.<TInsurancePreDetail>lambdaQuery()
.eq(TInsurancePreDetail::getRegisterId, registrationPre.getId()));
}
return true; return true;
} }
...@@ -810,6 +821,8 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -810,6 +821,8 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam.setDeptName(batchParam.getDeptName()); autoParam.setDeptName(batchParam.getDeptName());
autoParam.setBuyType(batchParam.getBuyType()); autoParam.setBuyType(batchParam.getBuyType());
autoParam.setInProgressList(batchParam.getInProgressList()); autoParam.setInProgressList(batchParam.getInProgressList());
autoParam.setPolicyEnd(LocalDateUtil.getDateSrt(batchParam.getPolicyEnd()));
autoParam.setPolicyStart(LocalDateUtil.getDateSrt(batchParam.getPolicyStart()));
return autoParam; return autoParam;
} }
......
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