Commit 646317c3 authored by zhangyun's avatar zhangyun

Merge branch 'develop' of http://git.worfu.com/fangxinjiang/yifu into develop

parents 949d801c 42cb5a1d
...@@ -1142,28 +1142,28 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1142,28 +1142,28 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
if (CollectionUtils.isNotEmpty(successList)){ if (CollectionUtils.isNotEmpty(successList)){
threadPool.execute(() -> {
for (TInsuranceDetail tInsuranceDetail : successList) { for (TInsuranceDetail tInsuranceDetail : successList) {
Integer settleType = tInsuranceDetail.getSettleType(); Integer settleType = tInsuranceDetail.getSettleType();
//如果是合并计算则推送至EKP //如果是合并计算则推送至EKP
if(CommonConstants.ZERO_INT == settleType){ if(CommonConstants.ZERO_INT == settleType){
//存储成功后发送给EKP //存储成功后发送给EKP
threadPool.execute(() -> { String s = pushEstimate(tInsuranceDetail,CommonConstants.ONE_INT);
String s = pushEstimate(tInsuranceDetail,CommonConstants.ONE_INT); if(StringUtils.isNotBlank(s)){
if(StringUtils.isNotBlank(s)){ LambdaUpdateWrapper<TInsuranceSettle> settleWrapper = new LambdaUpdateWrapper<>();
LambdaUpdateWrapper<TInsuranceSettle> settleWrapper = new LambdaUpdateWrapper<>(); settleWrapper.eq(TInsuranceSettle :: getId,tInsuranceDetail.getDefaultSettleId())
settleWrapper.eq(TInsuranceSettle :: getId,tInsuranceDetail.getDefaultSettleId()) .set(TInsuranceSettle :: getIsEstimatePush,CommonConstants.ONE_INT)
.set(TInsuranceSettle :: getIsEstimatePush,CommonConstants.ONE_INT) .set(TInsuranceSettle :: getEstimatePushTime,LocalDateTime.now());
.set(TInsuranceSettle :: getEstimatePushTime,LocalDateTime.now()); //更新结算信息表
//更新结算信息表 tInsuranceSettleService.update(settleWrapper);
tInsuranceSettleService.update(settleWrapper); //更新保单信息表
//更新保单信息表 updateById(tInsuranceDetail);
updateById(tInsuranceDetail); }
}
});
}else{ }else{
updateById(tInsuranceDetail); updateById(tInsuranceDetail);
} }
} }
});
//todo 根据结算类型是合并结算,推送预估保费到ekp(上面已经算好,这里直接判断有预估保费的就推送) //todo 根据结算类型是合并结算,推送预估保费到ekp(上面已经算好,这里直接判断有预估保费的就推送)
//结算状态是待结算,结算中、已结算是ekp反馈的,如果结算失败,反馈到我们这边的状态是待结算 //结算状态是待结算,结算中、已结算是ekp反馈的,如果结算失败,反馈到我们这边的状态是待结算
} }
...@@ -1228,14 +1228,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1228,14 +1228,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceSettle settle = tInsuranceSettleService.getById(detail.getDefaultSettleId()); TInsuranceSettle settle = tInsuranceSettleService.getById(detail.getDefaultSettleId());
if (Optional.ofNullable(settle).isPresent()){ if (Optional.ofNullable(settle).isPresent()){
settle.setActualPremium(new BigDecimal(success.getActualPremium())); settle.setActualPremium(new BigDecimal(success.getActualPremium()));
settle.setIsActualPush(CommonConstants.ONE_INT); settle.setIsActualPush(CommonConstants.ZERO_INT);
settle.setActualPushTime(LocalDateTime.now());
settle.setUpdateTime(LocalDateTime.now()); settle.setUpdateTime(LocalDateTime.now());
tInsuranceSettleService.updateById(settle); tInsuranceSettleService.updateById(settle);
//更新实际保费 //调EKP更新实际保费
detail.setActualPremium(new BigDecimal(success.getActualPremium())); detail.setActualPremium(new BigDecimal(success.getActualPremium()));
threadPool.execute(() ->{ threadPool.execute(() ->{
pushEstimate(detail,CommonConstants.FOUR_INT); String s = pushEstimate(detail,CommonConstants.FOUR_INT);
if(StringUtils.isNotBlank(s)){
settle.setActualPushTime(LocalDateTime.now());
settle.setIsActualPush(CommonConstants.ONE_INT);
tInsuranceSettleService.updateById(settle);
}
}); });
} }
}else { }else {
...@@ -3154,8 +3158,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3154,8 +3158,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<DeptChangeCheckParam> successList = stringListMap.get("successList"); List<DeptChangeCheckParam> successList = stringListMap.get("successList");
List<TInsuranceOperate> operateList = new ArrayList<>(16); List<TInsuranceOperate> operateList = new ArrayList<>(16);
if(CollectionUtils.isNotEmpty(successList)){ if(CollectionUtils.isNotEmpty(successList)){
threadPool.execute(() -> {
for (DeptChangeCheckParam success : successList) { for (DeptChangeCheckParam success : successList) {
threadPool.execute(() -> {
EKPInteractiveParam interactiveParam = new EKPInteractiveParam(); EKPInteractiveParam interactiveParam = new EKPInteractiveParam();
TInsuranceDetail one = getOne(lambdaQuery().getWrapper().eq(TInsuranceDetail::getId, success.getId())); TInsuranceDetail one = getOne(lambdaQuery().getWrapper().eq(TInsuranceDetail::getId, success.getId()));
BeanCopyUtils.copyProperties(one,interactiveParam); BeanCopyUtils.copyProperties(one,interactiveParam);
...@@ -3527,7 +3531,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3527,7 +3531,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
});
//新增操作信息 //新增操作信息
TInsuranceOperate insuranceOperate = new TInsuranceOperate(); TInsuranceOperate insuranceOperate = new TInsuranceOperate();
insuranceOperate.setInsuranceDetailId(success.getId()); insuranceOperate.setInsuranceDetailId(success.getId());
...@@ -3537,6 +3540,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3537,6 +3540,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceOperate.setOperateDesc(InsurancesConstants.DEPT_CHANGE); insuranceOperate.setOperateDesc(InsurancesConstants.DEPT_CHANGE);
operateList.add(insuranceOperate); operateList.add(insuranceOperate);
} }
});
} }
tInsuranceOperateService.saveBatch(operateList); tInsuranceOperateService.saveBatch(operateList);
List<DeptChangeCheckParam> errorList = stringListMap.get("errorList"); List<DeptChangeCheckParam> errorList = stringListMap.get("errorList");
...@@ -4662,8 +4666,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -4662,8 +4666,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
String defaultSettleId = tInsuranceDetail.getDefaultSettleId(); String defaultSettleId = tInsuranceDetail.getDefaultSettleId();
TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId); TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId);
//冲正取负数 //冲正取负数
param.setEstimatePremium(byId.getEstimatePremium().negate()); if(null != byId.getEstimatePremium()){
param.setActualPremium(byId.getActualPremium().negate()); param.setEstimatePremium(byId.getEstimatePremium().negate());
}
if(null != byId.getActualPremium()){
param.setActualPremium(byId.getActualPremium().negate());
}
param.setInteractiveType(CommonConstants.ONE_INT); param.setInteractiveType(CommonConstants.ONE_INT);
param.setSettleType(CommonConstants.ONE_INT); param.setSettleType(CommonConstants.ONE_INT);
} }
......
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