Explorar o código

切换test 提交代码

785834757 %!s(int64=2) %!d(string=hai) anos
pai
achega
97ed926b15

+ 1 - 1
src/main/java/com/ydtech/modules/fee/dto/vo/RuleAttrMappingVo.java

@@ -41,7 +41,7 @@ public class RuleAttrMappingVo {
         this.value = value;
     }
 
-    public static List<RuleAttrMappingVo> getRuleAttrMappingVoList(InsAreaCompany insAreaCompany, InsOrders insOrders,
+    public static List<RuleAttrMappingVo> getRuleAttrMappingVoList(InsAreaCompany insAreaCompany,
                                                                    List<PtlAgreementUndwrtRulesAttr> undwrtRulesAttrList, PtlNewCarJudgeRules carJudgeRule) {
         List<RuleAttrMappingVo> ruleAttrMappingVoList = new ArrayList<>();
         InsAreaCompanyCarInfo carInfo = insAreaCompany.getCarinfo();

+ 3 - 2
src/main/java/com/ydtech/modules/fee/service/FeeRuleSchemeNewService.java

@@ -4,6 +4,7 @@ package com.ydtech.modules.fee.service;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.InsOrders;
+import com.ydtech.modules.order.entity.bo.InsOrdersBo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.QueryOrderFeeResultVo;
 import com.ydtech.modules.order.entity.vo.QueryOrderFeeVo;
@@ -48,14 +49,14 @@ public interface FeeRuleSchemeNewService {
      * @param insAreaCompany
      * @param insOrders
      */
-    void verificationCostFactor(InsAreaCompany insAreaCompany, InsOrders insOrders);
+    void verificationCostFactor(InsAreaCompany insAreaCompany, InsOrdersBo insOrders);
 
     /**
      * 查找匹配承保规则的因子
      * @param insAreaCompany
      * @param insOrders
      */
-    void verificationRuleFactor(InsAreaCompany insAreaCompany, InsOrders insOrders);
+    void verificationRuleFactor(InsAreaCompany insAreaCompany);
 
 
     /**

+ 9 - 9
src/main/java/com/ydtech/modules/fee/service/impl/FeeRuleSchemeServiceNewImpl.java

@@ -17,6 +17,7 @@ import com.ydtech.modules.fee.dto.vo.RuleAttrMappingVo;
 import com.ydtech.modules.fee.service.FeeRuleSchemeNewService;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.InsOrders;
+import com.ydtech.modules.order.entity.bo.InsOrdersBo;
 import com.ydtech.modules.order.entity.vo.*;
 import com.ydtech.modules.order.service.InsOrdersService;
 import com.ydtech.modules.protocol.entity.po.PtlAgreement;
@@ -104,7 +105,7 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
      * 校验费用因子
      */
     @Override
-    public void verificationCostFactor(InsAreaCompany insAreaCompany,InsOrders insOrders){
+    public void verificationCostFactor(InsAreaCompany insAreaCompany, InsOrdersBo insOrders){
 
         List<AgreementProductCosts> agreementProductCosts = ptlAgreementProductCostsNewService.costsGetList(insAreaCompany.getAgreementId(),insOrders.getProductid());
 //        if(agreementProductCosts == null || agreementProductCosts.size() == 0){
@@ -120,7 +121,7 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
             //按优先级进行排序
             Collections.sort(agreementProductCosts, Comparator.comparingInt(AgreementProductCosts::getPriorityLevel).reversed());
             //遍历费用因子
-            String costsId = verificationCosts(agreementProductCosts, insAreaCompany, insOrders);
+            String costsId = verificationCosts(agreementProductCosts, insAreaCompany);
             if(costsId != null) {
                 calcCosts(costsId, insAreaCompany);
                 System.out.printf("费用因子校验通过,子订单id:" + insAreaCompany.getId() + ",费用id:" + costsId);
@@ -131,14 +132,13 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
     /**
      * 校验承保规则
      * @param insAreaCompany
-     * @param insOrders
      */
     @Override
-    public void verificationRuleFactor(InsAreaCompany insAreaCompany, InsOrders insOrders) {
+    public void verificationRuleFactor(InsAreaCompany insAreaCompany) {
 
 
         List<PtlAgreementUndwrtRulesNew> ptlAgreementUndwrtRules = ptlAgreementUndwrtRulesNewService.rulesList(insAreaCompany.getAgreementId());
-        verificationRules(ptlAgreementUndwrtRules, insAreaCompany,insOrders);
+        verificationRules(ptlAgreementUndwrtRules, insAreaCompany);
     }
 
     /**
@@ -451,14 +451,14 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
      * @param insOrders
      * @return
      */
-    private String verificationCosts(List<AgreementProductCosts> agreementProductCosts,InsAreaCompany insAreaCompany,InsOrders insOrders){
+    private String verificationCosts(List<AgreementProductCosts> agreementProductCosts,InsAreaCompany insAreaCompany){
         //匹配费用因子
         //获取所有费用属性
         List<PtlAgreementUndwrtRulesAttr> undwrtRulesAttrList = ptlAgreementUndwrtRulesAttrService.getUndwrtRulesAttrList();
         //获取新旧车信息
         PtlNewCarJudgeRules carJudgeRule = getCarJudgeRule(insAreaCompany.getCompanyId());
         //获取所有费用属性关联
-        List<RuleAttrMappingVo> ruleAttrMappingVoList = RuleAttrMappingVo.getRuleAttrMappingVoList(insAreaCompany, insOrders, undwrtRulesAttrList, carJudgeRule);
+        List<RuleAttrMappingVo> ruleAttrMappingVoList = RuleAttrMappingVo.getRuleAttrMappingVoList(insAreaCompany, undwrtRulesAttrList, carJudgeRule);
 
 //        List<AgreementProductCosts> filterAgreementProductCosts = new ArrayList<>();
 
@@ -511,12 +511,12 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
     }
 
 
-    private boolean verificationRules(List<PtlAgreementUndwrtRulesNew> ptlAgreementUndwrtRulesNews,InsAreaCompany insAreaCompany,InsOrders insOrders){
+    private boolean verificationRules(List<PtlAgreementUndwrtRulesNew> ptlAgreementUndwrtRulesNews,InsAreaCompany insAreaCompany){
         //匹配承保规则
         //获取所有承保规则属性
         List<PtlAgreementUndwrtRulesAttr> undwrtRulesAttrList = ptlAgreementUndwrtRulesAttrService.getUndwrtRulesAttrList();
         //获取所有费用属性关联
-        List<RuleAttrMappingVo> ruleAttrMappingVoList = RuleAttrMappingVo.getRuleAttrMappingVoList(insAreaCompany, insOrders, undwrtRulesAttrList,getCarJudgeRule(insAreaCompany.getCompanyId()));
+        List<RuleAttrMappingVo> ruleAttrMappingVoList = RuleAttrMappingVo.getRuleAttrMappingVoList(insAreaCompany, undwrtRulesAttrList,getCarJudgeRule(insAreaCompany.getCompanyId()));
 
 
         for (int i = 0; i < ptlAgreementUndwrtRulesNews.size(); i++) {

+ 2 - 2
src/main/java/com/ydtech/modules/order/aop/aspect/AuditVerificationAspect.java

@@ -58,8 +58,8 @@ public class AuditVerificationAspect {
             //再进行费用因子判断
             try {
                 //先进行承保规则判断
-                feeRuleSchemeNewService.verificationRuleFactor(insAreaCompany, insOrders);
-                feeRuleSchemeNewService.verificationCostFactor(insAreaCompany, insOrders);
+                feeRuleSchemeNewService.verificationRuleFactor(insAreaCompany);
+                feeRuleSchemeNewService.verificationCostFactor(insAreaCompany,insOrders);
             } catch (Exception ignored) {
                 System.out.printf("费用因子匹配失败:" + ignored.getMessage());
             }

+ 14 - 0
src/main/java/com/ydtech/modules/order/entity/InsAreaCompany.java

@@ -8,7 +8,9 @@ import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
+import com.ydtech.modules.ins.model.vo.QuoteKindRespVo;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
+import com.ydtech.modules.ins.model.vo.QuoteRiskRespVo;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
 import com.ydtech.utils.StringUtils;
 import com.ydtech.utils.idgen.IdGenerate;
@@ -453,5 +455,17 @@ public class InsAreaCompany implements Serializable {
         this.signingTime = LocalDateTime.now();
         this.paymentLink = paymentLink;
     }
+
+    public List<QuoteKindRespVo> convertQuoteKindRespVo() {
+        return JSON.parseArray(JSON.toJSONString(this.king), QuoteKindRespVo.class);
+    }
+
+    public List<QuoteRiskRespVo> convertQuoteRiskRespVo() {
+        return JSON.parseArray(JSON.toJSONString(this.risk), QuoteRiskRespVo.class);
+    }
+
+    public void setCarUserInfo(){
+
+    }
 }
 

+ 3 - 1
src/main/java/com/ydtech/modules/order/entity/vo/InsOrdersEditingVo.java

@@ -145,8 +145,10 @@ public class InsOrdersEditingVo extends InsOrders implements Serializable {
             this.orderstatus = insAreaCompany.getOrderstatus();
             this.companyId = insAreaCompany.getId();
             this.inscompany = insAreaCompany.getInscompany();
+            this.riskList = ObjectUtils.isEmpty(insAreaCompany.getRisk()) ? new ArrayList<>() :
+                    insAreaCompany.convertQuoteRiskRespVo();
             this.kindList = ObjectUtils.isEmpty(insAreaCompany.getKing()) ? new ArrayList<>() :
-                    insAreaCompany.getKindinfo().toJavaList(QuoteKindRespVo.class);
+                    insAreaCompany.convertQuoteKindRespVo();
             this.jqPremium = insAreaCompany.getJqpremium().doubleValue();
             this.syPremium = insAreaCompany.getSypremium().doubleValue();
             this.jyPremium = insAreaCompany.getJypremium().doubleValue();

+ 1 - 0
src/main/java/com/ydtech/modules/order/service/InsAreaCompanyService.java

@@ -33,6 +33,7 @@ public interface InsAreaCompanyService extends IService<InsAreaCompany> {
      */
     InsAreaCompany getByInsOrderNo(String insOrderNo);
 
+
     /**
      * 修改子订单 并且修改订单状态
      *

+ 1 - 1
src/main/java/com/ydtech/modules/order/service/impl/BoHaiOrderApiServiceImpl.java

@@ -650,7 +650,7 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
         // 渤海业务id
         String busUniqueId = response.getData().getBusUniqueId();
         insAreaCompany.setId(orderId);
-        insAreaCompany.setReptxt(JSON.parseObject(JSON.toJSONString(response)));
+//        insAreaCompany.setReptxt(JSON.parseObject(JSON.toJSONString(response)));
         insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
         insAreaCompany.setInsOrderNo(busUniqueId);
         // 驾意险

+ 1 - 1
src/main/java/com/ydtech/modules/order/service/impl/DaJiaOrderServiceImpl.java

@@ -395,7 +395,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
         insAreaCompany.setOrderno(quoteInfoVo.getOrderNo());
         JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(odr1009Response.getResult()));
         jsonObject.put("busiId", busiId);
-        insAreaCompany.setReptxt(jsonObject);
+//        insAreaCompany.setReptxt(jsonObject);
         insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
         insAreaCompany.setInsOrderNo(orderId);
         //交强投保单号

+ 1 - 1
src/main/java/com/ydtech/modules/order/service/impl/GuorenOrderApiServiceImpl.java

@@ -630,7 +630,7 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
 
         boolean jq_falg = jqPremium.doubleValue() > 0;
         //保存订单信息
-        iac.setReptxt(JSON.parseObject(JSON.toJSONString(premiumResult)));
+//        iac.setReptxt(JSON.parseObject(JSON.toJSONString(premiumResult)));
         iac.setJqpremium(jqPremium);
         iac.setSypremium(syPremium);
         iac.setTaxamount(BigDecimal.valueOf(jq_falg ? quoteRespVo.getTaxAmount() : 0));

+ 9 - 6
src/main/java/com/ydtech/modules/order/service/impl/HuaTaiOrderApiServiceImpl.java

@@ -24,6 +24,7 @@ import com.ydtech.modules.order.entity.api.huatai.constants.HuaTaiRiskCode;
 import com.ydtech.modules.order.entity.api.huatai.constants.HuaTaiSubmitCommon;
 import com.ydtech.modules.order.entity.api.huatai.request.*;
 import com.ydtech.modules.order.entity.api.huatai.response.*;
+import com.ydtech.modules.order.entity.bo.InsOrdersBo;
 import com.ydtech.modules.order.entity.config.HuaTaiConfigureParameters;
 import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
 import com.ydtech.modules.order.entity.dto.InsUploadImagesDto;
@@ -166,7 +167,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
         // 1. 协议id获取配置实体
         HuaTaiConfigureParameters huaTaiConfigureParameters = configureParametersComponents.toEntity(HuaTaiConfigureParameters.class,
                 insAreaCompany.getAgreementId());
-        InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
+        InsOrdersBo insOrders = insOrdersService.queryInsOrders(insAreaCompany.getOrderno());
         YaQuoteInfoVo yaQuoteInfoVo = new YaQuoteInfoVo(insOrders);
 
         //查找车主的区划信息
@@ -282,10 +283,11 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
     @Override
     public HttpResult<List<InsHuataiContributing>> queryClauseData(String companyId) {
         InsAreaCompany insAreaCompany = insAreaCompanyService.getById(companyId);
-        InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
-
-        CustomerInfoVo ownerinfo = insOrders.getOwnerinfo().toJavaObject(CustomerInfoVo.class);
-        CustomerInfoVo applyinfo = insOrders.getApplyinfo().toJavaObject(CustomerInfoVo.class);
+        insAreaCompanyService.getByInsOrderNo()
+//        InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
+        InsOrdersBo insOrders = insOrdersService.queryInsOrders(insAreaCompany.getOrderno());
+        CustomerInfoVo ownerinfo = insOrders.getOwnerinfo();
+        CustomerInfoVo applyinfo = insOrders.getApplyinfo();
 
         List<String> collect =
                 insAreaCompany.getRiskinfo().toJavaList(RiskInfoVo.class).stream().map(RiskInfoVo::getRiskCode).collect(Collectors.toList());
@@ -432,7 +434,8 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
         // 1. 协议id获取配置实体
         HuaTaiConfigureParameters huaTaiConfigureParameters = configureParametersComponents.toEntity(HuaTaiConfigureParameters.class,
                 insAreaCompany.getAgreementId());
-        InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
+//        InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
+        InsOrdersBo insOrders = insOrdersService.queryInsOrders(insAreaCompany.getOrderno());
         String licensePlate = insOrders.getLicenseno();
         YaQuoteInfoVo yaQuoteInfoVo = new YaQuoteInfoVo(insOrders);
         String password = yaQuoteInfoVo.getInsuredPersonInfo().getIdentifyNumber();

+ 31 - 0
src/main/java/com/ydtech/modules/order/service/impl/InsAreaCompanyServiceImpl.java

@@ -6,12 +6,20 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ydtech.exception.SystemException;
 import com.ydtech.modules.order.dao.InsAreaCompanyMapper;
 import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.modules.order.entity.InsAreaCompanyCarInfo;
+import com.ydtech.modules.order.entity.InsAreaCompanyCarUserInfo;
 import com.ydtech.modules.order.entity.InsOrders;
+import com.ydtech.modules.order.entity.bo.InsOrdersBo;
 import com.ydtech.modules.order.entity.dto.InsAreaCompanyQueryDto;
+import com.ydtech.modules.order.entity.po.InsOrdersCarInfo;
+import com.ydtech.modules.order.entity.po.InsOrdersCarUserInfo;
 import com.ydtech.modules.order.entity.vo.OrderQueryVo;
+import com.ydtech.modules.order.service.InsAreaCompanyCarInfoService;
 import com.ydtech.modules.order.service.InsAreaCompanyService;
 import com.ydtech.modules.order.service.InsOrdersService;
 import com.ydtech.modules.order.service.InsOrdersTrackService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -32,6 +40,9 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
 
     private final InsOrdersTrackService insOrdersTrackService;
 
+    @Autowired
+    private InsAreaCompanyCarInfoService insAreaCompanyCarInfoService;
+
     public InsAreaCompanyServiceImpl(@Lazy InsOrdersService insOrdersService, InsOrdersTrackService insOrdersTrackService) {
         this.insOrdersService = insOrdersService;
         this.insOrdersTrackService = insOrdersTrackService;
@@ -43,7 +54,27 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
         if (ObjectUtils.isEmpty(insAreaCompany)) {
             throw new SystemException("子订单不存在");
         }
+        //设置车辆信息
+        InsAreaCompanyCarInfo ordersCarUserInfos = insAreaCompanyCarInfoService.getCarInfoByCompanyId(companyId);
+        insAreaCompany.setCarinfo(ordersCarUserInfos);
+
+        //设置车主信息
+        insAreaCompany.setCarinfo(ordersCarUserInfos);
         return insAreaCompany;
+
+        InsOrders insOrders = baseMapper.selectById(orderNo);
+        if(insOrders == null){
+            return null;
+        }
+        BeanUtils.copyProperties(insOrders,insOrdersBo);
+
+
+
+
+        //获取车辆信息
+        InsOrdersCarInfo insOrdersCarInfo = insOrdersCarInfoService.getCarInfoByOrderNo(orderNo);
+        insOrdersBo.setCarAllInfo(insOrdersCarInfo);
+        return insOrdersBo;
     }
 
     @Override