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.*;
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.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.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
......@@ -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<TInsuranceDetail> detailList = new ArrayList<>();
List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo;
BigDecimal actualMoney;
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
TSettleDomain settleDomain;
if (CollectionUtils.isNotEmpty(listSuccess)){
for (InsuranceRegisterParam success : listSuccess) {
long d1 = System.currentTimeMillis();
......@@ -1882,23 +1884,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detailList.add(detail);
try {
//获取项目信息
TSettleDomain settleDomain = new TSettleDomain();
listVo = archivesDaprUtil.selectSettleDomainSelectVoByNo(detail.getDeptNo());
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo : settleDomainR) {
BeanUtils.copyProperties(vo, settleDomain);
}
}
if (null != mapSelectVo) {
settleDomain = mapSelectVo.get(detail.getDeptNo());
} else {
settleDomain = null;
}
if (detail.getBuyType() != CommonConstants.FOUR_INT &&
CommonConstants.ONE_INT == detail.getSettleType() &&
new BigDecimal(success.getActualPremium()).compareTo(actualMoney) != 0) {
BigDecimal gMoney = BigDecimal.ZERO;
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()
.contains(CommonConstants.THREE_STRING) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
......@@ -1977,6 +1974,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
log.info("登记保单保费一条耗时:" + (d2 - d1));
}
}
mapSelectVo.clear();
//操作记录
addOperate(detailList,user,InsurancesConstants.REGISTERED,null,CommonConstants.ONE_INT);
if (operatList.stream().allMatch(e->e.getErrorMessage().equals(CommonConstants.RESULT_DATA_SUCESS))) {
......@@ -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