Просмотр исходного кода

Merge branch 'master' into wrq_dev

wangrq 3 недель назад
Родитель
Сommit
644791a190

+ 1 - 1
commons/src/main/java/com/jzg/commons/entity/scheme/vo/PtlSchemeSaveVo.java

@@ -230,7 +230,7 @@ public class PtlSchemeSaveVo {
         result.append("包含");
         for(int i=0;i<minArray.length;i++) {
             int finalI = i;
-            PtlAgreementUndwrtRulesDictLabal ptlAgreementUndwrtRulesDictLabal = ptlAgreementUndwrtRulesAttr.getDictLabal().stream()
+            PtlAgreementUndwrtRulesDictLabal ptlAgreementUndwrtRulesDictLabal = ptlAgreementProductCostsAttrLink.getDictLabal().stream()
                     .filter(x -> x.getCode().equals(minArray[finalI])).findAny().get();
             result.append(ptlAgreementUndwrtRulesDictLabal.getName());
         }

+ 11 - 1
tenant/insurance/quotation-renbaonew/src/main/java/com/jzg/quotation/renbaonew/crawler/service/impl/RenBaoNewCrawlerRequestImpl.java

@@ -984,6 +984,16 @@ public class RenBaoNewCrawlerRequestImpl implements RenBaoNewCrawlerRequest {
                 log.warn("获取人保评分失败: {}", e.getMessage());
             }
         }
+        // 获取商业险,交强险折扣率
+        if(quoteResponse.getData() != null && quoteResponse.getData().getPrpQmain() != null && quoteResponse.getData().getPrpQmain().getDiscount() != null){
+            // 设置商业险折扣率
+            resultsVo.getScoreVo().setSyAdjustRate(BigDecimal.valueOf(quoteResponse.getData().getPrpQmain().getDiscount()).toString());
+        }
+        if(quoteResponse.getData() != null && quoteResponse.getData().getPrpQmainCI() != null && quoteResponse.getData().getPrpQmainCI().getDiscount() != null) {
+            // 设置交强险折扣率
+            resultsVo.getScoreVo().setJqAdjustRate(BigDecimal.valueOf(quoteResponse.getData().getPrpQmainCI().getDiscount()).toString());
+        }
+
         // 处理上一年的投保险别
         if(!lastYeseRisks.isEmpty()){
             try{
@@ -1010,7 +1020,7 @@ public class RenBaoNewCrawlerRequestImpl implements RenBaoNewCrawlerRequest {
 
         // 获取交强险出险次数
         RenBaoNewCrawlerQuoteResponse.CarQuoteRiskItemCIRsp carQuoteRiskItemCIRsp = quoteResponse.getData().getCarQuoteRiskItemCIRsp();
-        JSONArray scoreJson1 = resultsVo.getScoreVo().getScoreJson();
+        JSONArray scoreJson1 = resultsVo.getScoreVo().getScoreJson() != null ?resultsVo.getScoreVo().getScoreJson() : new JSONArray() ;
         if( carQuoteRiskItemCIRsp != null){
             scoreJson1.add(new JSONObject()
                     .fluentPut("scoreName", "交强险出险情况")

+ 2 - 2
tenant/insurance/quotation-summary/src/main/resources/mapper/InsOrdersMapper.xml

@@ -1599,9 +1599,9 @@
 
 
     <select id="selectListOrderQuotationCompany" resultType="com.jzg.quotation.summary.entity.vo.OrderQuotationCompany">
-        SELECT id,parent_id,quote_no,company_id,company_name,order_status,fee.total_premium
+        SELECT id,parent_id,quote_no,company_id,company_name,order_status,ioc.sum_premium as totalPremium
         FROM ins_orders
-        LEFT JOIN ins_fee_orders fee ON fee.order_no = ins_orders.id
+        LEFT JOIN ins_orders_costs ioc ON ioc.order_no = ins_orders.id
         <where>
             and ins_orders.is_delete = 0
             and parent_id != 0

+ 8 - 3
tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quotation/zhongmei/crawler/entity/Request/ZmCrawlerQuotedPriceRequest.java

@@ -404,7 +404,7 @@ public class ZmCrawlerQuotedPriceRequest extends BaseRequest {
             private ModelDetailsDTO modelDetails;
 
             public InsuredObjectDTO(ZmCrawlerModelQueryResponse.FullCarDataDTO fullCarDataDTO, QuoteVo quoteVo, ZmCrawlerActualValueResponse actualValueResponse) {
-                SimpleStadarCarDTO stadarCarDTO = new SimpleStadarCarDTO(fullCarDataDTO.getFullCarData());
+                SimpleStadarCarDTO stadarCarDTO = new SimpleStadarCarDTO(fullCarDataDTO.getFullCarData(),quoteVo.getCarInfoVo());
                 this.simpleStadarCar = stadarCarDTO;
 
                 PlatformCarDTO platformCarDTO = new PlatformCarDTO();
@@ -823,7 +823,7 @@ public class ZmCrawlerQuotedPriceRequest extends BaseRequest {
                 @JsonProperty("series")
                 private String series;
 
-                public SimpleStadarCarDTO(ZmCrawlerModelQueryResponse.FullCarDataDTO.FullCarData fullCarData){
+                public SimpleStadarCarDTO(ZmCrawlerModelQueryResponse.FullCarDataDTO.FullCarData fullCarData,CarInfoVo carInfo){
                     this.approvedLoad = fullCarData.getApprovedLoad();
                     this.approvedPassengersCapacity = fullCarData.getApprovedPassengersCapacity();
                     this.brand = fullCarData.getModelName();
@@ -842,7 +842,12 @@ public class ZmCrawlerQuotedPriceRequest extends BaseRequest {
                     this.purchasePrice = fullCarData.getPurchasePrice();
                     this.purchasePriceCopy = fullCarData.getPurchasePrice();
                     this.series = fullCarData.getSeries();
-                    this.unladenMass = fullCarData.getUnladenMass();
+                    if (fullCarData.getUnladenMass() != null && !fullCarData.getUnladenMass().equals(0.00)) {
+                        this.unladenMass = fullCarData.getUnladenMass();
+                    } else {
+                        this.unladenMass = Double.parseDouble(carInfo.getCompleteKerbMass())/1000;
+                    }
+
                 }
             }
 

+ 3 - 2
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementServiceImpl.java

@@ -17,12 +17,12 @@ import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.util.AssertionUtils;
 import com.jzg.commons.util.MinioUtils;
 import com.jzg.commons.util.StringUtils;
+import com.jzg.commons.util.idgen.IdGenerate;
 import com.jzg.organization.client.EsmInsCompanyClient;
 import com.jzg.organization.mapper.PtlAgreementMapper;
 import com.jzg.organization.mapper.SysUploadFilesMapper;
 import com.jzg.organization.mapper.SysUserMapper;
 import com.jzg.organization.service.*;
-import io.seata.spring.annotation.GlobalTransactional;
 import org.apache.commons.lang3.ObjectUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -436,7 +436,7 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
 
         // 查询所有承保规则明细
         LambdaQueryWrapper<PtlAgreementUndwrtRulesAttrLink> queryWrapper = new LambdaQueryWrapper<>();
-        queryWrapper.in(PtlAgreementUndwrtRulesAttrLink::getId, rulesIds);
+        queryWrapper.in(PtlAgreementUndwrtRulesAttrLink::getRulesId, rulesIds);
         List<PtlAgreementUndwrtRulesAttrLink> linkList = agreementUndwrtRulesAttrLinkService.list(queryWrapper);
         Map<String, List<PtlAgreementUndwrtRulesAttrLink>> linkMap = linkList.stream().collect(
                 Collectors.groupingBy(PtlAgreementUndwrtRulesAttrLink::getRulesId));
@@ -469,6 +469,7 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
             PtlAgreementUndwrtRules maxRules = agreementRulesService.getOne(undwrtRulesLambdaQueryWrapper);
             newAgreementUndwrtRules.setOrderNum(Objects.nonNull(maxRules) ? maxRules.getOrderNum() + 1 : 1);
             newAgreementUndwrtRules.setAgreementId(newAgreement.getId());
+            newAgreementUndwrtRules.setParentId(IdGenerate.nextId());
             agreementRulesService.save(newAgreementUndwrtRules);
 
             // 复制承保规则因子

+ 25 - 0
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlSchemeServiceImpl.java

@@ -647,6 +647,31 @@ public class PtlSchemeServiceImpl extends ServiceImpl<PtlSchemeMapper, PtlScheme
         List<SchemeResultVo.SchemeVo> schemeInsuranceInfo = ptlSchemeMapper.getSchemeInsuranceInfo(companyId, productId);
         List<SchemeResultVo.SchemeVo> schemeDrivingInfo = ptlSchemeMapper.getSchemeDrivingInfo(companyId, productId);
 
+        // 过滤驾意险 ->根据座位数
+        if (StrUtil.isNotBlank(seatCount)) {
+            int seats = Integer.parseInt(seatCount);
+            schemeDrivingInfo.forEach(scheme -> {
+                scheme.getInfos().forEach(info -> {
+                    List<SchemeResultVo.Driving> drivings = info.getDrivings();
+                    if (drivings != null && !drivings.isEmpty()) {
+                        List<SchemeResultVo.Driving> filteredList = drivings.stream()
+                                .filter(driving -> {
+                                    // 如果 minSeatCount 和 maxSeatCount 都为 null,视为没有限制,不过滤
+                                    if (driving.getMinSeatCount() == null && driving.getMaxSeatCount() == null) {
+                                        return true;
+                                    }
+                                    // 检查座位数是否在范围内
+                                    int minSeat = driving.getMinSeatCount() != null ? driving.getMinSeatCount() : Integer.MIN_VALUE;
+                                    int maxSeat = driving.getMaxSeatCount() != null ? driving.getMaxSeatCount() : Integer.MAX_VALUE;
+                                    return seats >= minSeat && seats <= maxSeat;
+                                })
+                                .collect(Collectors.toList());
+                        info.setDrivings(filteredList);
+                    }
+                });
+            });
+        }
+
         // 过滤类型
         List<SchemeResultVo.SchemeVo> newSchemeList = schemeInsuranceInfo.stream()
                 .filter(scheme -> scheme.getVehicleType().contains(vehicleType)