|
|
@@ -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;
|
|
|
+ }
|
|
|
+}
|