Explorar el Código

紫金报价能源车添加(鼎然-车辆风险评分)分值添加到ins_orders表中

hxl13994548489 hace 2 años
padre
commit
6a0188a4ed

+ 2 - 2
src/main/java/com/ydtech/modules/ins/model/vo/QuoteRespVo.java

@@ -128,8 +128,8 @@ public class QuoteRespVo {
     private CoreModelsVo coreModels;
 
 
-    //add by hxl 添加紫能源车返回的鼎然-车辆风险评分
-    @ApiModelProperty("紫能源车(鼎然-车辆风险评分)")
+    //add by hxl 添加紫能源车返回的鼎然-车辆风险评分
+    @ApiModelProperty("紫能源车(鼎然-车辆风险评分)")
     private String ubiPredictedInfoScore;
     /**
      * 预核保信息

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

@@ -362,6 +362,12 @@ public class InsAreaCompany implements Serializable {
     @TableField(exist = false)
     private static final long serialVersionUID = 1L;
 
+    /**
+     * 紫金能源车(鼎然-车辆风险评分  add by hxl 2024-04-09
+     */
+    @TableField(exist = false)
+    private String ubiPredictedInfoScore;
+
     public InsAreaCompany(QuoteRespVo quoteRespVo, PtlAgreementAttribution ptlAgreementAttribution) {
         this.id = IdGenerate.nextId();
         this.orderno = quoteRespVo.getOrderno();

+ 6 - 0
src/main/java/com/ydtech/modules/order/entity/InsOrders.java

@@ -213,6 +213,12 @@ public class InsOrders implements Serializable {
     @TableField(exist = false)
     private static final long serialVersionUID = 1L;
 
+    /**
+     * 紫金能源车(鼎然-车辆风险评分  add by hxl 2024-04-09
+     */
+    @TableField(value = "ubi_predicted_info_score")
+    private String ubiPredictedInfoScore;
+
     public InsOrders(SysUser user, SysDept dept, BaseQuoteInfoVo quoteInfoVo) {
         // 2. 组装订单
         this.setQuoteno(String.valueOf(quoteInfoVo.getQuoteno()));

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

@@ -1,10 +1,10 @@
 package com.ydtech.modules.order.entity.vo;
 
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.ydtech.modules.ins.model.vo.AccidentResponseVo;
 import com.ydtech.modules.ins.model.vo.QuoteKindRespVo;
 import com.ydtech.modules.ins.model.vo.QuoteRiskRespVo;
-import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.InsOrders;
 import com.ydtech.modules.order.entity.TaxArrears;
 import com.ydtech.modules.order.entity.dto.InsAreaCompanyQueryDto;
@@ -133,6 +133,13 @@ public class InsOrdersEditingVo extends InsOrders implements Serializable {
         @ApiModelProperty("商业赔付率")
         private double syLossRation;
 
+
+        /**
+         * 紫金能源车(鼎然-车辆风险评分  add by hxl 2024-04-09
+         */
+        @TableField(value = "紫金能源车(鼎然-车辆风险评分)")
+        private String ubiPredictedInfoScore;
+
         public InsAreaCompanyEditingDto(InsAreaCompanyQueryDto insAreaCompany) {
             this.orderno = insAreaCompany.getOrderno();
             this.orderstatus = insAreaCompany.getOrderstatus();

+ 6 - 0
src/main/java/com/ydtech/modules/order/entity/vo/OrderVo.java

@@ -360,4 +360,10 @@ public class OrderVo implements Serializable {
      */
     private List<DistributionLevelVo>  distributionLevelVoList;
 
+    /**
+     * 紫金能源车(鼎然-车辆风险评分  add by hxl 2024-04-09
+     */
+    @TableField(value = "ubi_predicted_info_score")
+    private String ubiPredictedInfoScore;
+
 }

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

@@ -175,7 +175,10 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
             if (InsOrderStatusEnum.ACCEPT_INSURANCE.getCode().equals(insOrders.getOrderstatus())) {
                 return;
             }
-
+            //add by hxl  2024-04-09  添加赋值紫金能源车 鼎然-车辆风险评分
+            if (insAreaCompany.getUbiPredictedInfoScore()!=null && !"".equals(insAreaCompany.getUbiPredictedInfoScore())) {
+                insOrders.setUbiPredictedInfoScore(insAreaCompany.getUbiPredictedInfoScore());
+            }
             insOrders.setOrderstatus(orderStatus);
             LambdaQueryWrapper<InsOrders> insOrdersLambdaQueryWrapper = new LambdaQueryWrapper<>();
             insOrdersLambdaQueryWrapper.ne(InsOrders::getOrderstatus, InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());

+ 3 - 2
src/main/java/com/ydtech/modules/order/service/impl/ZijinOrderApiServiceImpl.java

@@ -574,8 +574,6 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
                 Double.parseDouble(carShipTax.getLateFee()));
         List<TaxArrears> taxArrearsList = Collections.singletonList(taxArrears);
         insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(taxArrearsList)));
-        insAreaCompanyService.insertCompanyAndOrders(insAreaCompany);
-        quoteRespVo.setCompanyId(orderNo);
         //add by hxl 2024-04-08 添加紫荆能源车的鼎然-车辆风险评分 返回前台
         List<CalculatePremiumResponse.PriceInfoListDTO> priceInfoList = calculatePremiumResponse.getPriceInfoList();
         if(priceInfoList!=null && priceInfoList.size()>0){
@@ -583,8 +581,11 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
             if(priceInfoListDTO.getUbiPredictedInfo()!=null && priceInfoListDTO.getUbiPredictedInfo().getScore()!=null &&  !"".equals(priceInfoListDTO.getUbiPredictedInfo().getScore())){
                 String score = priceInfoListDTO.getUbiPredictedInfo().getScore();
                 quoteRespVo.setUbiPredictedInfoScore(score);
+                insAreaCompany.setUbiPredictedInfoScore(score);
             }
         }
+        insAreaCompanyService.insertCompanyAndOrders(insAreaCompany);
+        quoteRespVo.setCompanyId(orderNo);
         //添加调用费用匹配功能
 //        feeRuleSchemeService.dealFeeOrderInfo(quoteInfoVo, quoteRespVo, ptlAgreementAttribution.getId(), insAreaCompany.getId());
         return HttpResult.ok("报价成功", quoteRespVo);

+ 5 - 2
src/main/resources/mapper/modules/order/InsOrdersMapper.xml

@@ -179,6 +179,7 @@
                o.licenseno,
                o.insuredname,
                o.vehicle_and_vessel_tax,
+               o.ubi_predicted_info_score,
                iac.jq_start_date as jqstartdate,
                iac.jq_end_date   as jqenddate,
                iac.sy_start_date as systartdate,
@@ -246,7 +247,8 @@
                syenddate,
                risk,
                king,
-               vehicle_and_vessel_tax
+               vehicle_and_vessel_tax,
+               ubi_predicted_info_score
         from ins_orders
         where userid = #{userId, jdbcType=VARCHAR}
           and licenseno = #{licenseNo, jdbcType=VARCHAR}
@@ -384,7 +386,8 @@
         b.kindinfo,
         b.pay_date,
         b.signing_time,
-        b.cross_insurance
+        b.cross_insurance,
+        a.ubi_predicted_info_score
         FROM ins_orders a LEFT JOIN ins_area_company b on a.orderno = b.orderno
         WHERE
         1 = 1