wks 2 лет назад
Родитель
Сommit
ac6e251c16

+ 2 - 0
src/main/java/com/ydtech/modules/order/entity/api/huatai/constants/MotorTypeCode.java

@@ -22,4 +22,6 @@ public enum MotorTypeCode {
 
     private final String desc;
 
+    public static final String TITLE = "MTC_";
+
 }

+ 2 - 2
src/main/java/com/ydtech/modules/order/entity/api/huatai/request/HuaTaiActualValueRequest.java

@@ -65,10 +65,10 @@ public class HuaTaiActualValueRequest extends HuaTaiBaseRequest {
         this.purchasePrice = Double.parseDouble(fullCarDataDto.getPurchasePrice());
         this.approvedPassengersCapacity = fullCarDataDto.getApprovedPassengersCapacity();
 
-        MotorUsageTypeCode usageTypeCode = Enum.valueOf(MotorUsageTypeCode.class, carInfo.getVehicleUse());
+        MotorUsageTypeCode usageTypeCode = Enum.valueOf(MotorUsageTypeCode.class, MotorUsageTypeCode.TITLE + carInfo.getVehicleUse());
         this.motorUsageTypeCode = usageTypeCode.getCode();
 
-        MotorTypeCode motorTypeCode1 = Enum.valueOf(MotorTypeCode.class, carInfo.getCimodelclass());
+        MotorTypeCode motorTypeCode1 = Enum.valueOf(MotorTypeCode.class,MotorTypeCode.TITLE + carInfo.getCimodelclass());
         this.motorTypeCode = motorTypeCode1.getCode();
     }
 }

+ 4 - 4
src/main/java/com/ydtech/modules/order/entity/api/huatai/request/HuaTaiQuotedPriceRequest.java

@@ -320,10 +320,11 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
                     this.unladenMass = carInfoVo.getCompleteKerbMass();
                     this.FullType = fullCarDataDto.getEnergyTypes();
 
-                    MotorUsageTypeCode usageTypeCode = Enum.valueOf(MotorUsageTypeCode.class, carInfoVo.getVehicleUse());
+                    MotorUsageTypeCode usageTypeCode = Enum.valueOf(MotorUsageTypeCode.class,
+                            MotorUsageTypeCode.TITLE + carInfoVo.getVehicleUse());
                     this.motorUsageTypeCode = usageTypeCode.getCode();
 
-                    MotorTypeCode motorTypeCode1 = Enum.valueOf(MotorTypeCode.class, carInfoVo.getCimodelclass());
+                    MotorTypeCode motorTypeCode1 = Enum.valueOf(MotorTypeCode.class, MotorTypeCode.TITLE + carInfoVo.getCimodelclass());
                     this.motorTypeCode = motorTypeCode1.getCode();
 
                     this.plateType = "02";
@@ -416,8 +417,7 @@ public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
         private List<ChargingPostDto> chargingPost;
 
         public List<ContractDto> getContract(List<RiskInfoVo> riskInfoVos, List<KindInfoVo> kindInfoVos, Integer quantity,
-                                             VehicleAndVesselTax vesselTax,
-                                             HuaTaiActualValueResponse actualValueResponse,
+                                             VehicleAndVesselTax vesselTax, HuaTaiActualValueResponse actualValueResponse,
                                              HuaTaiConfigureParameters huaTaiConfigureParameters,
                                              HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto fullCarDataDto) {
             List<ContractDto> contractDTOS = new ArrayList<>();

+ 57 - 0
src/main/java/com/ydtech/modules/order/entity/api/zijin/constants/enums/CarKindCode.java

@@ -0,0 +1,57 @@
+package com.ydtech.modules.order.entity.api.zijin.constants.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+public enum CarKindCode {
+
+    CKC_A0("A0", "客车"),
+    CKC_B3("B3", "三轮汽车"),
+    CKC_G0("G0", "挂车"),
+    CKC_G1("G1", "特二挂车"),
+    CKC_G2("G2", "特一挂车"),
+    CKC_GD("GD", "特二挂车:非油、汽、液罐体挂车"),
+    CKC_GE("GE", "特二挂车:冷藏、保温设备挂车"),
+    CKC_GF("GF", "特三挂车:固定专业仪器挂车"),
+    CKC_A1("H0", "货车"),
+    CKC_H1("H1", "低速载货汽车"),
+    CKC_T1("T1", "特种车二:起重车"),
+    CKC_T2("T2", "特种车二:装卸车"),
+    CKC_T3("T3", "特种车二:工程车"),
+    CKC_T4("T4", "特种车三:监测车"),
+    CKC_T5("T5", "特种车三:邮电车"),
+    CKC_T6("T6", "特种车三:消防车"),
+    CKC_T7("T7", "特种车二:清洁车"),
+    CKC_T8("T8", "特种车三:医疗车"),
+    CKC_T9("T9", "特种车三:救护车"),
+    CKC_TA("TA", "特种车二:牵引车"),
+    CKC_TB("TB", "特种车二:清障车"),
+    CKC_TC("TC", "特种车二:清扫车"),
+    CKC_TD("TD", "特种车二:升降车"),
+    CKC_TE("TE", "特种车二:搅拌车"),
+    CKC_TF("TF", "特种车二:推土车"),
+    CKC_TG("TG", "特种车三:电视转播车"),
+    CKC_TH("TH", "特种车二:挖掘车"),
+    CKC_TI("TI", "特种车二:罐式货车"),
+    CKC_TJ("TJ", "特种车二:其他车"),
+    CKC_TK("TK", "特种车三:其他车"),
+    CKC_TL("TL", "特种车二:泵车"),
+    CKC_TM("TM", "特种车二:净水车"),
+    CKC_TN("TN", "特种车二:保温车"),
+    CKC_TP("TP", "特种车一:油罐车"),
+    CKC_TQ("TQ", "特种车一:汽罐车"),
+    CKC_TR("TR", "特种车一:液罐车"),
+    CKC_TS("TS", "特种车二:冷藏车"),
+    CKC_TT("TT", "特种车四:集装箱拖头"),
+    CKC_TY("TY", "特种车三:运钞车"),
+    CKC_TZ("TZ", "特种车三:专项作业车");
+
+    private final String code;
+
+    private final String desc;
+
+    public static final String TITLE = "CKC_";
+
+}

+ 26 - 0
src/main/java/com/ydtech/modules/order/entity/api/zijin/constants/enums/UseNatureCode.java

@@ -0,0 +1,26 @@
+package com.ydtech.modules.order.entity.api.zijin.constants.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+public enum UseNatureCode {
+
+    UNC_06("84",	"非营业机关"),
+    UNC_05("85",	"家庭自用"),
+    UNC_07("83",	"非营业企业"),
+    UNC_01("9A",	"营业出租租赁"),
+    UNC_02("9B",	"营业城市公交"),
+    UNC_03("9C",	"营业公路客运"),
+    UNC_04("9D",	"营业货运"),
+    UNC_08("82",	"非营业货运");
+
+    private final String code;
+
+    private final String desc;
+
+    public static final String TITLE = "UNC_";
+
+}

+ 10 - 2
src/main/java/com/ydtech/modules/order/entity/api/zijin/request/CalculatePremiumRequest.java

@@ -894,13 +894,21 @@ public class CalculatePremiumRequest implements Serializable {
             this.noLicenseFlag = "1";
             this.purchasePrice = vehicleModelInfosDTO.getPurchasePrice();
             this.seatCount = carInfo.getSeatCount();
-            this.useNatureCode = "85";
+
+            // 车辆使用性质代码
+            UseNatureCode useNatureCode1 = Enum.valueOf(UseNatureCode.class, UseNatureCode.TITLE + carInfo.getVehicleUse());
+            this.useNatureCode = useNatureCode1.getCode();
+
             this.vehicleId = vehicleModelInfosDTO.getVehicleId();
 
             this.vinNo = carInfo.getVinNo();
             this.brandName = vehicleModelInfosDTO.getModelName();
             this.carInsuredRelation = "1";
-            this.carKindCode = "A0";
+
+            // 车辆种类代码
+            CarKindCode carKindCode1 = Enum.valueOf(CarKindCode.class, CarKindCode.TITLE + carInfo.getCimodelclass());
+            this.carKindCode = carKindCode1.getCode();
+
             this.carKindDetailId = getCarKindDetailId(Integer.parseInt(carInfo.getSeatCount()));
             this.exhaustCapacity = vehicleModelInfosDTO.getExhaustCapacity();
             this.oriCarKindName = carInfo.getCartype();