Commit 57044506 authored by huyuchen's avatar huyuchen

huych-商险自动化逻辑调整

parent fe033b35
......@@ -589,7 +589,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
}
employeeRegistrationPre.setInsurancePreList(newList);
}
} else {
} else if (employeeRegistrationPre.getInsuranceIsBuy().equals(CommonConstants.ONE_STRING)) {
if (employeeRegistrationPre.getInsurancePreList() == null
|| employeeRegistrationPre.getInsurancePreList().isEmpty()) {
return R.failed("含商险服务,商险配置不可为空");
......
......@@ -263,8 +263,8 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
detailList.add(detailInsuranceLog);
}
//如果服务类型包含商险处理商险明细数据
newInfo.setId(empPreId);
if (Common.isNotNull(newInfo.getServerItem()) && newInfo.getServerItem().contains("商险")) {
newInfo.setId(empPreId);
if (!newInfo.getExitInsuranceInfoList().isEmpty()) {
newInfo.getExitInsuranceInfoList().forEach(insurancePreVo -> insurancePreVo.setRegisterId(empPreId));
}
......@@ -272,6 +272,13 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
, "/temployeeinsurancepre/inner/updateInfoSaveInsurancePreInfo"
, newInfo, Boolean.class, SecurityConstants.FROM_IN);
}
//如果服务类型不包含商险删除商险明细数据
if (Common.isNotNull(newInfo.getServerItem()) && !newInfo.getServerItem().contains("商险")) {
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(), daprInsurancesProperties.getAppId()
, "/temployeeinsurancepre/inner/deleteInsurancePreInfo"
, newInfo, Boolean.class, SecurityConstants.FROM_IN);
}
if (newList != null && !newList.isEmpty()) {
for (TEmployeeInsurancePre newInsurance : newList) {
differenceInsuranceKey = null;
......
......@@ -200,6 +200,18 @@ public class TEmployeeInsurancePreController {
return tEmployeeInsurancePreService.updateInfoSaveInsurancePreInfo(pre);
}
/**
* 信息修改入口删除商险已购买明细
* @author huych
* @date 2025-08-14 11:46:16
**/
@Operation(description = "信息修改入口删除商险已购买明细")
@Inner
@PostMapping("/inner/deleteInsurancePreInfo")
public Boolean deleteInsurancePreInfo(@RequestBody EmployeeRegistrationPre pre) {
return tEmployeeInsurancePreService.deleteInsurancePreInfo(pre);
}
/**
* 商险状态是否正常判断
* @author huych
......
......@@ -76,6 +76,8 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc
*/
Boolean updateInfoSaveInsurancePreInfo(EmployeeRegistrationPre pre);
Boolean deleteInsurancePreInfo(EmployeeRegistrationPre pre);
Boolean checkExitInsuanceIsProcess(EmployeeRegistrationPreVo preVo);
TEmployeeInsuranceSelectVo selectInsurancePreInfoList(TEmployeeInsurancePreVo preVo);
......
......@@ -644,6 +644,14 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
return true;
}
@Override
public Boolean deleteInsurancePreInfo(EmployeeRegistrationPre registrationPre) {
//删除已存在的入职确认信息对应的商险明细
preDetailService.remove(Wrappers.<TInsurancePreDetail>lambdaQuery()
.eq(TInsurancePreDetail::getRegisterId, registrationPre.getId()));
return true;
}
@Override
public Boolean checkExitInsuanceIsProcess(EmployeeRegistrationPreVo preVo) {
//如果状态有变动就会拦截
......
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