Prechádzať zdrojové kódy

交强报价单详情

785834757 2 rokov pred
rodič
commit
25d48120c1

+ 34 - 0
src/main/java/com/ydtech/modules/order/constants/JqInsuranceType.java

@@ -0,0 +1,34 @@
+package com.ydtech.modules.order.constants;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+public enum JqInsuranceType {
+
+    SIWANG(1, "死亡伤残赔偿",180000),
+    YILIAO(2,"医疗费用赔偿",18000),
+    CAICHAN(3,"财产损失赔偿",2000);
+
+    private Integer code;
+    private String name;
+    private Integer amount;
+
+
+    public static JSONArray toJsonArray(){
+        JqInsuranceType[] insuranceTypes = JqInsuranceType.values();
+        JSONArray jsonArray = new JSONArray();
+        for (JqInsuranceType insuranceType : insuranceTypes) {
+            JSONObject jsonObject = new JSONObject();
+            jsonObject.put("code", insuranceType.getCode());
+            jsonObject.put("name", insuranceType.getName());
+            jsonObject.put("amount", insuranceType.getAmount());
+
+            jsonArray.add(jsonObject);
+        }
+        return jsonArray;
+    }
+}

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

@@ -457,4 +457,10 @@ public class OrderVo implements Serializable {
     @ApiModelProperty(value = "拨号权限密码")
     private String dialPassWord;
 
+    /**
+     * 交强险种信息
+     */
+    @TableField(exist = false,typeHandler = FastjsonTypeHandler.class)
+    private JSONArray jqInsuranceType;
+
 }

+ 3 - 0
src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java

@@ -43,6 +43,7 @@ import com.ydtech.modules.ins.model.ya.CarModelDTO;
 import com.ydtech.modules.ins.model.ya.ExtendInfoDto;
 import com.ydtech.modules.ins.model.ya.ResponseDataC2;
 import com.ydtech.modules.inv.utils.EasyExcelUtils;
+import com.ydtech.modules.order.constants.JqInsuranceType;
 import com.ydtech.modules.order.dao.InsOrdersMapper;
 import com.ydtech.modules.order.entity.*;
 import com.ydtech.modules.order.entity.crawler.response.CrawlerVerifyPaymentResponse;
@@ -644,6 +645,8 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
             orderAndAreaCompany.setAccidentInfo(accidentInfo);
         }
 
+        //获取交强险种信息
+        orderAndAreaCompany.setJqInsuranceType(JqInsuranceType.toJsonArray());
         return HttpResult.ok("success", orderAndAreaCompany);
     }
     /**