Commit 099726a9 authored by huyuchen's avatar huyuchen

商险优化修改

parent f499bdf4
...@@ -1157,6 +1157,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1157,6 +1157,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// 被替换的id // 被替换的id
List<String> replaceIdList = new ArrayList<>(); List<String> replaceIdList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(detailList)){ if (CollectionUtils.isNotEmpty(detailList)){
TInsuranceReplace one;
TInsuranceDetail byId;
for (TInsuranceDetail detail : detailList) { for (TInsuranceDetail detail : detailList) {
if (detail.getBuyHandleStatus() == CommonConstants.FOUR_INT if (detail.getBuyHandleStatus() == CommonConstants.FOUR_INT
|| detail.getBuyHandleStatus() == CommonConstants.FIVE_INT){ || detail.getBuyHandleStatus() == CommonConstants.FIVE_INT){
...@@ -1178,14 +1180,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1178,14 +1180,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if(detail.getBuyType() == CommonConstants.FOUR_INT){ if(detail.getBuyType() == CommonConstants.FOUR_INT){
//替换者有效状态为空 //替换者有效状态为空
detail.setIsEffect(null); detail.setIsEffect(null);
TInsuranceReplace one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda() one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getToInsuranceDetailId, detail.getId()) .eq(TInsuranceReplace::getToInsuranceDetailId, detail.getId())
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(one).isPresent()){ if (Optional.ofNullable(one).isPresent()){
//替换记录变为失败 //替换记录变为失败
one.setReplaceStatus(CommonConstants.ZERO_INT); one.setReplaceStatus(CommonConstants.ZERO_INT);
tInsuranceReplaceService.updateById(one); tInsuranceReplaceService.updateById(one);
TInsuranceDetail byId = this.getById(one.getFromInsuranceDetailId()); byId = this.getById(one.getFromInsuranceDetailId());
if (Optional.ofNullable(byId).isPresent()){ if (Optional.ofNullable(byId).isPresent()){
//被替换者激活 //被替换者激活
byId.setIsEffect(CommonConstants.ZERO_INT); byId.setIsEffect(CommonConstants.ZERO_INT);
...@@ -1214,9 +1216,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1214,9 +1216,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
if (CollectionUtils.isNotEmpty(successList)){ if (CollectionUtils.isNotEmpty(successList)){
TInsuranceSettle settle;
for (TInsuranceDetail detail : successList) { for (TInsuranceDetail detail : successList) {
if (StringUtils.isNotBlank(detail.getDefaultSettleId())){ if (StringUtils.isNotBlank(detail.getDefaultSettleId())){
TInsuranceSettle settle = tInsuranceSettleService.getById(detail.getDefaultSettleId()); settle = tInsuranceSettleService.getById(detail.getDefaultSettleId());
if (Optional.ofNullable(settle).isPresent()){ if (Optional.ofNullable(settle).isPresent()){
TInsuranceSettle burden = new TInsuranceSettle(); TInsuranceSettle burden = new TInsuranceSettle();
BeanCopyUtils.copyProperties(settle,burden); BeanCopyUtils.copyProperties(settle,burden);
...@@ -1255,9 +1258,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1255,9 +1258,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setDefaultSettleId(burden.getId()); detail.setDefaultSettleId(burden.getId());
pushResult = pushEstimate(detail, CommonConstants.THREE_INT); pushResult = pushEstimate(detail, CommonConstants.THREE_INT);
} }
} //预估已推送,实缴已推送
//预估已推送,实缴已推送 } else if(isEstimatePush == CommonConstants.ONE_INT && isActualPush == CommonConstants.ONE_INT){
if(isEstimatePush == CommonConstants.ONE_INT && isActualPush == CommonConstants.ONE_INT){
//预估未结算,实缴未结算推送作废 //预估未结算,实缴未结算推送作废
if(InsurancesConstants.SETTLE_ZERO.equals(estimateStatus) && InsurancesConstants.SETTLE_ZERO.equals(actualStatus)){ if(InsurancesConstants.SETTLE_ZERO.equals(estimateStatus) && InsurancesConstants.SETTLE_ZERO.equals(actualStatus)){
pushResult= pushEstimate(detail, CommonConstants.FIVE_INT); pushResult= pushEstimate(detail, CommonConstants.FIVE_INT);
...@@ -1266,9 +1268,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1266,9 +1268,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setDefaultSettleId(burden.getId()); detail.setDefaultSettleId(burden.getId());
pushResult= pushEstimate(detail, CommonConstants.SIX_INT); pushResult= pushEstimate(detail, CommonConstants.SIX_INT);
} }
} //预估未推送,实缴已推送
//预估未推送,实缴已推送 } else if(isEstimatePush == CommonConstants.ZERO_INT && isActualPush == CommonConstants.ONE_INT){
if(isEstimatePush == CommonConstants.ZERO_INT && isActualPush == CommonConstants.ONE_INT){
//实缴未结算推送作废 //实缴未结算推送作废
if(InsurancesConstants.SETTLE_ZERO.equals(actualStatus)){ if(InsurancesConstants.SETTLE_ZERO.equals(actualStatus)){
pushResult= pushEstimate(detail, CommonConstants.FIVE_INT); pushResult= pushEstimate(detail, CommonConstants.FIVE_INT);
...@@ -1299,7 +1300,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1299,7 +1300,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}); });
} }
//更新状态 //更新状态
this.saveOrUpdateBatch(successList); this.updateBatchById(successList);
// 处理档案状态 // 处理档案状态
if (CollectionUtils.isNotEmpty(successList)) { if (CollectionUtils.isNotEmpty(successList)) {
...@@ -1374,7 +1375,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1374,7 +1375,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override @Override
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class}) @Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R<List<InsuranceListVO>> successfulInsurance(YifuUser user, List<InsuranceHandleParam> paramList) { public R<List<InsuranceListVO>> successfulInsurance(YifuUser user, List<InsuranceHandleParam> paramList) {
ThreadPoolExecutor threadPool = new ThreadPoolExecutor(50, 50, 100, TimeUnit.SECONDS, new LinkedBlockingQueue<>(10));
//解析参数里的商险id //解析参数里的商险id
List<String> idList = paramList.stream().map(InsuranceHandleParam::getId).distinct().collect(Collectors.toList()); List<String> idList = paramList.stream().map(InsuranceHandleParam::getId).distinct().collect(Collectors.toList());
//操作日志对象 //操作日志对象
...@@ -1385,6 +1385,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1385,6 +1385,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<InsuranceListVO> errorList = new ArrayList<>(); List<InsuranceListVO> errorList = new ArrayList<>();
//后端处理的数据 //后端处理的数据
List<TInsuranceDetail> successList = new ArrayList<>(); List<TInsuranceDetail> successList = new ArrayList<>();
List<TInsuranceDetail> successOne = new ArrayList<>();
List<TInsuranceDetail> successTwo = new ArrayList<>();
//被替换人标记被替换成功 //被替换人标记被替换成功
List<TInsuranceDetail> sourceList = new ArrayList<>(); List<TInsuranceDetail> sourceList = new ArrayList<>();
//被替换人的档案要处理状态 //被替换人的档案要处理状态
...@@ -1393,6 +1395,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1393,6 +1395,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<String> replaceIdList = new ArrayList<>(); List<String> replaceIdList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(detailList)){ if (CollectionUtils.isNotEmpty(detailList)){
TInsuranceReplace one; TInsuranceReplace one;
//项目信息
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
TSettleDomain settleDomain;
TInsuranceDetail byId;
for (TInsuranceDetail detail : detailList) { for (TInsuranceDetail detail : detailList) {
//先判断投保状态是不是投保中,如果不是不给标记办理成功,防止重复推数据 //先判断投保状态是不是投保中,如果不是不给标记办理成功,防止重复推数据
if(detail.getBuyHandleStatus() != CommonConstants.TWO_INT){ if(detail.getBuyHandleStatus() != CommonConstants.TWO_INT){
...@@ -1415,14 +1421,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1415,14 +1421,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setUpdateBy(user.getId()); detail.setUpdateBy(user.getId());
//替换类型,保单生效日期:T + 1 //替换类型,保单生效日期:T + 1
detail.setPolicyEffect(LocalDate.now().plusDays(CommonConstants.ONE_INT)); detail.setPolicyEffect(LocalDate.now().plusDays(CommonConstants.ONE_INT));
successList.add(detail); successOne.add(detail);
//查找被替换人信息 //查找被替换人信息
one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda() one = tInsuranceReplaceService.getOne(Wrappers.<TInsuranceReplace>query().lambda()
.eq(TInsuranceReplace::getToInsuranceDetailId, detail.getId()) .eq(TInsuranceReplace::getToInsuranceDetailId, detail.getId())
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(one).isPresent()) { if (Optional.ofNullable(one).isPresent()) {
TInsuranceDetail byId = this.getById(one.getFromInsuranceDetailId()); byId = this.getById(one.getFromInsuranceDetailId());
if (Optional.ofNullable(byId).isPresent()) { if (Optional.ofNullable(byId).isPresent()) {
sourceList.add(byId); sourceList.add(byId);
replaceIdList.add(byId.getId()); replaceIdList.add(byId.getId());
...@@ -1430,6 +1436,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1430,6 +1436,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
}else{ }else{
//获取项目信息
if (null != mapSelectVo) {
settleDomain = mapSelectVo.get(detail.getDeptNo());
} else {
settleDomain = null;
}
//根据结算类型判断是否需要计算预估保费 //根据结算类型判断是否需要计算预估保费
//预估 //预估
if (detail.getSettleType() == CommonConstants.ZERO_INT){ if (detail.getSettleType() == CommonConstants.ZERO_INT){
...@@ -1449,7 +1461,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1449,7 +1461,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setIsOverdue(CommonConstants.ZERO_INT); detail.setIsOverdue(CommonConstants.ZERO_INT);
detail.setIsUse(CommonConstants.ZERO_INT); detail.setIsUse(CommonConstants.ZERO_INT);
detail.setUpdateTime(LocalDateTime.now()); detail.setUpdateTime(LocalDateTime.now());
detail.setUpdateBy(user.getId());
//保费存储 //保费存储
TInsuranceSettle settle = new TInsuranceSettle(); TInsuranceSettle settle = new TInsuranceSettle();
settle.setInsDetailId(detail.getId()); settle.setInsDetailId(detail.getId());
...@@ -1461,9 +1473,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1461,9 +1473,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
settle.setIsEstimatePush(CommonConstants.ZERO_INT); settle.setIsEstimatePush(CommonConstants.ZERO_INT);
tInsuranceSettleService.save(settle); tInsuranceSettleService.save(settle);
detail.setDefaultSettleId(settle.getId()); detail.setDefaultSettleId(settle.getId());
successList.add(detail); successTwo.add(detail);
//生成收入数据 //生成收入数据
createInsuranceInfo(detail,null); createInsuranceInfo(detail,settleDomain);
}else { }else {
//按天 //按天
//计算起止时间的天数 //计算起止时间的天数
...@@ -1483,7 +1495,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1483,7 +1495,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setIsOverdue(CommonConstants.ZERO_INT); detail.setIsOverdue(CommonConstants.ZERO_INT);
detail.setIsUse(CommonConstants.ZERO_INT); detail.setIsUse(CommonConstants.ZERO_INT);
detail.setUpdateTime(LocalDateTime.now()); detail.setUpdateTime(LocalDateTime.now());
detail.setUpdateBy(user.getId());
//保费存储 //保费存储
TInsuranceSettle settle = new TInsuranceSettle(); TInsuranceSettle settle = new TInsuranceSettle();
settle.setInsDetailId(detail.getId()); settle.setInsDetailId(detail.getId());
...@@ -1496,9 +1508,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1496,9 +1508,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
settle.setCreateTime(LocalDateTime.now()); settle.setCreateTime(LocalDateTime.now());
tInsuranceSettleService.save(settle); tInsuranceSettleService.save(settle);
detail.setDefaultSettleId(settle.getId()); detail.setDefaultSettleId(settle.getId());
successList.add(detail); successTwo.add(detail);
//生成收入数据 //生成收入数据
createInsuranceInfo(detail,null); createInsuranceInfo(detail,settleDomain);
} }
} }
//实缴 //实缴
...@@ -1514,40 +1526,30 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1514,40 +1526,30 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setIsOverdue(CommonConstants.ZERO_INT); detail.setIsOverdue(CommonConstants.ZERO_INT);
detail.setIsUse(CommonConstants.ZERO_INT); detail.setIsUse(CommonConstants.ZERO_INT);
detail.setUpdateTime(LocalDateTime.now()); detail.setUpdateTime(LocalDateTime.now());
successList.add(detail); detail.setUpdateBy(user.getId());
successOne.add(detail);
} }
} }
} }
} }
} }
updateBatchById(successList); //分开操作保证批量更新
updateBatchById(successOne);
updateBatchById(successTwo);
successList.addAll(successOne);
successList.addAll(successTwo);
successOne.clear();
successTwo.clear();
// 被替换的老商险,要处理档案状态 // 被替换的老商险,要处理档案状态
if (CollectionUtils.isNotEmpty(sourceIdCardList)) { if (CollectionUtils.isNotEmpty(sourceIdCardList)) {
this.doFailInfo(sourceList, sourceIdCardList, replaceIdList, CommonConstants.THREE_STRING); this.doFailInfo(sourceList, sourceIdCardList, replaceIdList, CommonConstants.THREE_STRING);
} }
if (CollectionUtils.isNotEmpty(successList)) { if (CollectionUtils.isNotEmpty(successList)) {
// 同步操作档案的 商险状态为:2正常(0无2正常3失效4处理中) // 异步任务操作档案的 商险状态为:2正常(0无2正常3失效4处理中)
this.updateEmpInfp(successList, CommonConstants.TWO_STRING); doJointInsuranceTask.updateEmpInfp(successList, CommonConstants.TWO_STRING);
threadPool.execute(() -> { //异步任务推送
//根据结算类型是合并结算,推送预估保费到ekp(上面已经算好,这里直接判断有预估保费的就推送) doJointInsuranceTask.pushEstime(successList);
for (TInsuranceDetail tInsuranceDetail : successList) {
Integer settleType = tInsuranceDetail.getSettleType();
//如果是合并计算则推送至EKP
if(CommonConstants.ZERO_INT == settleType){
//存储成功后发送给EKP
String s = pushEstimate(tInsuranceDetail,CommonConstants.ONE_INT);
if(StringUtils.isNotBlank(s)){
LambdaUpdateWrapper<TInsuranceSettle> settleWrapper = new LambdaUpdateWrapper<>();
settleWrapper.eq(TInsuranceSettle :: getId,tInsuranceDetail.getDefaultSettleId())
.set(TInsuranceSettle :: getIsEstimatePush,CommonConstants.ONE_INT)
.set(TInsuranceSettle :: getEstimatePushTime,LocalDateTime.now());
//更新结算信息表
tInsuranceSettleService.update(settleWrapper);
}
}
}
});
} }
//操作记录 //操作记录
if (CollectionUtils.isNotEmpty(successList)){ if (CollectionUtils.isNotEmpty(successList)){
...@@ -1629,8 +1631,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1629,8 +1631,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
archivesDaprUtil.updateEmployeeInfoInsuranceStatus(empStatusVo); archivesDaprUtil.updateEmployeeInfoInsuranceStatus(empStatusVo);
} }
} else { } else {
// 同步操作档案的 商险状态为:3失效(0无2正常3失效4处理中) // 异步任务操作档案的 商险状态为:3失效(0无2正常3失效4处理中)
this.updateEmpInfp(sourceList, toStatus); doJointInsuranceTask.updateEmpInfp(sourceList, toStatus);
} }
} }
...@@ -1999,7 +2001,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1999,7 +2001,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
long d2 = System.currentTimeMillis(); long d2 = System.currentTimeMillis();
log.info("登记保单保费一条耗时:" + (d2 - d1)); log.info("登记保单保费一条耗时:" + (d2 - d1));
} }
mapSelectVo.clear();
//批量更新和插入数据 //批量更新和插入数据
if (!detailList.isEmpty()) { if (!detailList.isEmpty()) {
this.updateBatchById(detailList); this.updateBatchById(detailList);
......
package com.yifu.cloud.plus.v1.yifu.insurances.util; package com.yifu.cloud.plus.v1.yifu.insurances.util;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpIdCardAndDeptVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil; import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.SalaryDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.SalaryDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
...@@ -30,6 +34,7 @@ import org.springframework.stereotype.Component; ...@@ -30,6 +34,7 @@ import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -69,7 +74,11 @@ public class DoJointInsuranceTask { ...@@ -69,7 +74,11 @@ public class DoJointInsuranceTask {
@Autowired @Autowired
private TUpdateStatusErrorMapper updateStatusErrorMapper; private TUpdateStatusErrorMapper updateStatusErrorMapper;
/** @Autowired
private ArchivesDaprUtil archivesDaprUtil;
/**
* @Description: 商险明细推送 * @Description: 商险明细推送
* @Author: huyc * @Author: huyc
* @Date: 2022-11-30 * @Date: 2022-11-30
...@@ -470,4 +479,54 @@ public class DoJointInsuranceTask { ...@@ -470,4 +479,54 @@ public class DoJointInsuranceTask {
log.error("薪资结算状态更新异常", e); log.error("薪资结算状态更新异常", e);
} }
} }
/**
* @param sourceList
* @Description: // 同步操作档案的 商险状态为:3失效(0无2正常3失效4处理中)
* @Author: hgw
* @Date: 2022/11/23 15:46
* @return: void
**/
@Async
public void updateEmpInfp(List<TInsuranceDetail> sourceList, String status) {
EmpStatusVo empStatusVo = new EmpStatusVo();
EmpIdCardAndDeptVo empIdCardAndDeptVo;
List<EmpIdCardAndDeptVo> voList = new ArrayList<>();
for (TInsuranceDetail d : sourceList) {
empIdCardAndDeptVo = new EmpIdCardAndDeptVo();
empIdCardAndDeptVo.setIdCard(d.getEmpIdcardNo());
empIdCardAndDeptVo.setDeptNo(d.getDeptNo());
empIdCardAndDeptVo.setStatus(status);
voList.add(empIdCardAndDeptVo);
}
empStatusVo.setEmpInfo(voList);
archivesDaprUtil.updateEmployeeInsuranceStatus(empStatusVo);
archivesDaprUtil.updateEmployeeInfoInsuranceStatus(empStatusVo);
}
/**
* @Description: 商险明细推送
* @Author: huyc
* @Date: 2022-11-30
* @return: void
**/
@Async
public void pushEstime(List<TInsuranceDetail> successList) {
//根据结算类型是合并结算,推送预估保费到ekp(上面已经算好,这里直接判断有预估保费的就推送)
for (TInsuranceDetail tInsuranceDetail : successList) {
//如果是合并计算则推送至EKP
if (CommonConstants.ZERO_INT == tInsuranceDetail.getSettleType()) {
//存储成功后发送给EKP
String s = pushEstimate(tInsuranceDetail, CommonConstants.ONE_INT);
if (StringUtils.isNotBlank(s)) {
LambdaUpdateWrapper<TInsuranceSettle> settleWrapper = new LambdaUpdateWrapper<>();
settleWrapper.eq(TInsuranceSettle::getId, tInsuranceDetail.getDefaultSettleId())
.set(TInsuranceSettle::getIsEstimatePush, CommonConstants.ONE_INT)
.set(TInsuranceSettle::getEstimatePushTime, LocalDateTime.now());
//更新结算信息表
tInsuranceSettleService.update(settleWrapper);
}
}
}
}
} }
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