Commit 9482b66c authored by fangxinjiang's avatar fangxinjiang

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

parents bf27208c 19180440
...@@ -16,6 +16,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.*; ...@@ -16,6 +16,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
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.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
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.config.DaprArchivesProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
...@@ -1729,9 +1730,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1729,9 +1730,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<InsuranceRegisterParam> listSuccess = operatList.stream().filter(e-> e.getErrorMessage().equals(CommonConstants.RESULT_DATA_SUCESS)).collect(Collectors.toList()); List<InsuranceRegisterParam> listSuccess = operatList.stream().filter(e-> e.getErrorMessage().equals(CommonConstants.RESULT_DATA_SUCESS)).collect(Collectors.toList());
List<TInsuranceDetail> detailList = new ArrayList<>(); List<TInsuranceDetail> detailList = new ArrayList<>();
List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo;
BigDecimal actualMoney; BigDecimal actualMoney;
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
TSettleDomain settleDomain;
if (CollectionUtils.isNotEmpty(listSuccess)){ if (CollectionUtils.isNotEmpty(listSuccess)){
for (InsuranceRegisterParam success : listSuccess) { for (InsuranceRegisterParam success : listSuccess) {
long d1 = System.currentTimeMillis(); long d1 = System.currentTimeMillis();
...@@ -1882,23 +1884,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1882,23 +1884,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detailList.add(detail); detailList.add(detail);
try { try {
//获取项目信息 //获取项目信息
TSettleDomain settleDomain = new TSettleDomain(); if (null != mapSelectVo) {
listVo = archivesDaprUtil.selectSettleDomainSelectVoByNo(detail.getDeptNo()); settleDomain = mapSelectVo.get(detail.getDeptNo());
if (Common.isNotNull(listVo)) { } else {
TSettleDomainListVo tSettleDomainListVo = listVo.getData(); settleDomain = null;
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo : settleDomainR) {
BeanUtils.copyProperties(vo, settleDomain);
}
}
} }
if (detail.getBuyType() != CommonConstants.FOUR_INT && if (detail.getBuyType() != CommonConstants.FOUR_INT &&
CommonConstants.ONE_INT == detail.getSettleType() && CommonConstants.ONE_INT == detail.getSettleType() &&
new BigDecimal(success.getActualPremium()).compareTo(actualMoney) != 0) { new BigDecimal(success.getActualPremium()).compareTo(actualMoney) != 0) {
BigDecimal gMoney = BigDecimal.ZERO; BigDecimal gMoney = BigDecimal.ZERO;
boolean isBl = false; boolean isBl = false;
if (Common.isNotNull(settleDomain) && settleDomain.getMrSettleType().equals(CommonConstants.TWO_STRING)) { if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getMrSettleType()) &&
CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType())) {
// 含有商险,则计算收入 // 含有商险,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && settleDomain.getManageServerItem() if (Common.isNotNull(settleDomain.getManageServerItem()) && settleDomain.getManageServerItem()
.contains(CommonConstants.THREE_STRING) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) { .contains(CommonConstants.THREE_STRING) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
...@@ -1977,6 +1974,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1977,6 +1974,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
log.info("登记保单保费一条耗时:" + (d2 - d1)); log.info("登记保单保费一条耗时:" + (d2 - d1));
} }
} }
mapSelectVo.clear();
//操作记录 //操作记录
addOperate(detailList,user,InsurancesConstants.REGISTERED,null,CommonConstants.ONE_INT); addOperate(detailList,user,InsurancesConstants.REGISTERED,null,CommonConstants.ONE_INT);
if (operatList.stream().allMatch(e->e.getErrorMessage().equals(CommonConstants.RESULT_DATA_SUCESS))) { if (operatList.stream().allMatch(e->e.getErrorMessage().equals(CommonConstants.RESULT_DATA_SUCESS))) {
...@@ -6495,4 +6493,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6495,4 +6493,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
private Map<String, TSettleDomainSelectVo> getSelectVoMap() {
R<TSettleDomainListVo> settleDomainR = archivesDaprUtil.selectAllSettleDomainSelectVos();
Map<String,TSettleDomainSelectVo> mapSelectVo = null;
if (Common.isNotNull(settleDomainR) && Common.isNotNull(settleDomainR.getData())){
mapSelectVo = settleDomainR.getData().getMapSelectVo();
}
if (Common.isEmpty(mapSelectVo)){
throw new CheckedException(CommonConstants.SETTLE_DOMAIN_GET_ERROR);
}
return mapSelectVo;
}
} }
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