Explorar o código

爬虫永安添加车损验车事项

785834757 hai 1 ano
pai
achega
5ffc69a58a

+ 54 - 0
src/main/java/com/ydtech/modules/order/constants/ya/CarDamageVerification.java

@@ -0,0 +1,54 @@
+package com.ydtech.modules.order.constants.ya;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 永安车损校验字典
+ */
+@Getter
+@AllArgsConstructor
+public enum CarDamageVerification {
+
+
+    CarDamage01(1, "按期续保,未增加损失类险种"),
+    CarDamage02(2,"已验车,验车合格"),
+    CarDamage03(3,"未投保损失类险种"),
+    CarDamage04(4,"新车免验车"),
+    CarDamage05(5,"已验车,验车不合格"),
+    CarDamage06(6,"需验车,验车资料后补"),
+    CarDamage07(7,"团单免验"),
+    CarDamage08(8,"新车本地上牌"),
+    CarDamage09(9,"已提供完税证明"),
+    CarDamage10(10,"其他"),;
+
+    private final Integer code;
+
+    private final String desc;
+
+    public static String getDesc(Integer code){
+        for( CarDamageVerification carDamageVerification : CarDamageVerification.values()){
+            if(carDamageVerification.getCode().equals(code)){
+                return carDamageVerification.getDesc();
+            }
+        }
+        return "";
+    }
+
+    public static List<Map<String, Object>> getAllList() {
+        List<Map<String, Object>> list = new ArrayList<>();
+        for (CarDamageVerification item : CarDamageVerification.values()) {
+            Map<String, Object> map = new HashMap<>();
+            map.put("code", item.getCode());
+            map.put("desc", item.getDesc());
+            list.add(map);
+        }
+        return list;
+    }
+}
+

+ 6 - 1
src/main/java/com/ydtech/modules/order/controller/InsCrawlerOrderController.java

@@ -9,6 +9,7 @@ import com.ydtech.modules.ins.model.vo.QuoteRespVo;
 import com.ydtech.modules.order.aop.AuditVerification;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.components.InsOrdersComponents;
+import com.ydtech.modules.order.constants.ya.CarDamageVerification;
 import com.ydtech.modules.order.entity.crawler.response.YaCrawlerVerifyCodeResponse;
 import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
@@ -160,6 +161,10 @@ public class InsCrawlerOrderController extends BaseController {
         }
     }
 
-
+    @GetMapping(value = "getYaCarDamageVerificationDict")
+    @ApiOperation(value = "永安车损验证字典获取")
+    public HttpResult getYaCarDamageVerificationDict() {
+        return HttpResult.ok(CarDamageVerification.getAllList());
+    }
 
 }

+ 5 - 0
src/main/java/com/ydtech/modules/order/entity/crawler/request/CrawlerQuoteRequest.java

@@ -71,4 +71,9 @@ public class CrawlerQuoteRequest extends BaseQuoteInfoVo {
      */
     private String netpointcode;
 
+    /**
+     * 永安车损验车事项
+     */
+    private String carChecker;
+
 }

+ 3 - 0
src/main/java/com/ydtech/modules/order/entity/vo/BaseQuoteVo.java

@@ -182,4 +182,7 @@ public class BaseQuoteVo<T> {
     // 人保车损保额折扣
     private String priceCoefficient;
 
+    @ApiModelProperty("永安车损验车事项")
+    private String carChecker;
+
 }

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

@@ -143,6 +143,8 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
         BeanUtils.copyProperties(quoteInfoVo, crawlerQuoteRequest);
         crawlerQuoteRequest.setMaxQuoteNum(maxQuoteNum);
         crawlerQuoteRequest.setUsername(ptlAgreementAttribution.getUsername());
+        // 永安验车事项
+        crawlerQuoteRequest.setCarChecker(t.getCarChecker());
         // 前端传入的驾意险信息
         crawlerQuoteRequest.setAccidentalDriving(t.getAccidentalDrivingVo());
         //  自主定价系数