瀏覽代碼

诚泰api接口获取评分的开发

dongxin 10 月之前
父節點
當前提交
18f84ffa5e

+ 8 - 0
src/main/java/com/ydtech/modules/order/entity/api/chengtai/request/InsurePremiumRequest.java

@@ -101,6 +101,10 @@ public class InsurePremiumRequest extends ChengTaiBaseRequest{
         private String linkerName;
         @JsonProperty("unitTypeCode")
         private String unitTypeCode;
+        @JsonProperty("terrorNationality")
+        private String terrorNationality;
+
+
 
         public InsuredDTO(BaseQuoteInfoVo quoteInfoVo, PersonAreaVo personAreaVo){
             // 获取投保人信息
@@ -131,6 +135,7 @@ public class InsurePremiumRequest extends ChengTaiBaseRequest{
             this.identifyValidDate = insureInfo.getIdentifyValidDate();
             this.identifyValidEndDate = insureInfo.getIdentifyValidEndDate();
             this.longTerm = "0";
+            this.terrorNationality = "CN";
         }
     }
 
@@ -176,6 +181,8 @@ public class InsurePremiumRequest extends ChengTaiBaseRequest{
         private String linkerName;
         @JsonProperty("unitTypeCode")
         private String unitTypeCode;
+        @JsonProperty("terrorNationality")
+        private String terrorNationality;
 
 
         public ApplicantDTO(BaseQuoteInfoVo quoteInfoVo, PersonAreaVo applyPersonAreaVo){
@@ -205,6 +212,7 @@ public class InsurePremiumRequest extends ChengTaiBaseRequest{
             this.identifyValidDate = applyInfo.getIdentifyValidDate();
             this.identifyValidEndDate = applyInfo.getIdentifyValidEndDate();
             this.longTerm = "0";
+            this.terrorNationality = "CN";
         }
     }
 

+ 8 - 0
src/main/java/com/ydtech/modules/order/entity/api/chengtai/request/SubmitVerifyRequest.java

@@ -93,6 +93,9 @@ public class SubmitVerifyRequest extends ChengTaiBaseRequest{
         private String linkerName;
         @JsonProperty("unitTypeCode")
         private String unitTypeCode;
+        @JsonProperty("terrorNationality")
+        private String terrorNationality;
+
 
 
         public ApplicantDTO(InsOrders insOrders, PersonAreaVo applyPersonAreaVo){
@@ -122,6 +125,7 @@ public class SubmitVerifyRequest extends ChengTaiBaseRequest{
             this.identifyValidDate = applyInfo.getIdentifyValidDate();
             this.identifyValidEndDate = applyInfo.getIdentifyValidEndDate();
             this.longTerm = "0";
+            this.terrorNationality = "CN";
         }
     }
 
@@ -171,6 +175,9 @@ public class SubmitVerifyRequest extends ChengTaiBaseRequest{
         private String linkerName;
         @JsonProperty("unitTypeCode")
         private String unitTypeCode;
+        @JsonProperty("terrorNationality")
+        private String terrorNationality;
+
 
         public InsuredDTO(InsOrders insOrders, PersonAreaVo personAreaVo){
             // 获取投保人信息
@@ -201,6 +208,7 @@ public class SubmitVerifyRequest extends ChengTaiBaseRequest{
             this.identifyValidDate = insureInfo.getIdentifyValidDate();
             this.identifyValidEndDate = insureInfo.getIdentifyValidEndDate();
             this.longTerm = "0";
+            this.terrorNationality = "CN";
         }
     }
 

+ 46 - 0
src/main/java/com/ydtech/modules/order/entity/api/chengtai/response/InsurePremiumResponse.java

@@ -9,6 +9,7 @@ import com.ydtech.utils.StringUtils;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -28,6 +29,51 @@ public class InsurePremiumResponse extends ChengTaiBaseResponse {
     @JsonProperty("ciContract")
     private CiContractDTO ciContract;
 
+    @JsonProperty("yztScore")
+    private YztScore yztScore;
+
+    @NoArgsConstructor
+    @Data
+    public static class YztScore {
+
+        /**
+         * 评分百分段
+         */
+        @JsonProperty("centile")
+        private Integer centile;
+
+        /**
+         * 商业险纯损失
+         */
+        @JsonProperty("commercialPureLost")
+        private BigDecimal commercialPureLost;
+
+        /**
+         * 预估标的终极赔付率
+         */
+        @JsonProperty("finalLossrationRate")
+        private BigDecimal finalLossrationRate;
+
+        /**
+         * 交强险纯损失
+         */
+        @JsonProperty("forcePureLost")
+        private BigDecimal forcePureLost;
+
+        /**
+         * 标的纯损失
+         */
+        @JsonProperty("targetPureLost")
+        private BigDecimal targetPureLost;
+
+        /**
+         * 升分主要因子
+         */
+        @JsonProperty("increaseFactor")
+        private String increaseFactor;
+    }
+
+
     @NoArgsConstructor
     @Data
     public static class BiContractDTO {

+ 2 - 0
src/main/java/com/ydtech/modules/order/service/impl/ChengTaiOrderApiServiceImpl.java

@@ -594,6 +594,8 @@ public class ChengTaiOrderApiServiceImpl implements ChengTaiOrderApiService {
                 quoteRespVo.setSyappoint(JSON.toJSONString(biEngageDTOS));
             }
         }
+        // 评分
+        quoteRespVo.setILogPreUdwMess(insurePremiumResponse.getYztScore().getCentile()+ "");
         return quoteRespVo;
     }