Răsfoiți Sursa

1.处理商业险报价问题
2.商业险无法报价,无法确定唯一车辆

hxl13994548489 2 ani în urmă
părinte
comite
01368fcf8b

+ 3 - 3
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/CarConfirmRequest.java

@@ -417,16 +417,16 @@ public class CarConfirmRequest extends PingAnBaseRequest {
             this.engineNo = carInfo.getEngineNo();
            // this.frameNo = "VNN3ZYKS1X8H05E4D";
             // 货车 modelCode KMD1129SDH,家用车用 OYI1004SKD
-            //this.modelCode = "OYI1004SKD";
+           // this.modelCode = "OYI1004SKD";
             this.paModelCode = modelsDto.getPaModelCode();
             // this.modelIndex = modelsDto.getModelIndex();
 //            this.vehicleStyleUniqueId = vehicleStyleUniqueId;
-            this.autoModelName = modelsDto.getModelName();
+            this.autoModelName = carInfo.getCarBrand();
             this.seats = carInfo.getSeatCount();
             //这辆参数货车传递
            // this.wholeWeight = String.valueOf(Float.parseFloat(carInfo.getCompleteKerbMass()) / 1000);
           //  this.tonNumber = carInfo.getCompleteKerbMass();
-            this.exhaustMeasure = modelsDto.getExhaustMeasure();
+            this.exhaustMeasure = carInfo.getExhaustScale();
             this.power = carInfo.getPowerScale();
            // this.vehicleCertiType = vehicleCertiType;
            // this.vehicleCertiNo = vehicleCertiNo;

+ 2 - 2
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/QuoteRequest.java

@@ -80,7 +80,7 @@ public class QuoteRequest extends PingAnBaseRequest {
      * 机动车损失保险保额
      * c
      */
-    @PingAnQuoteRequest(key="MR",remark="机动车损失保险保额取车辆确认中的默认保额",flag="FXNY")
+    @PingAnQuoteRequest(key="A_YN",remark="机动车损失保险保额取车辆确认中的默认保额",flag="FXNY")
     private String inputAmount;
     /***
      * 车损险绝对免赔额(元)
@@ -540,7 +540,7 @@ public class QuoteRequest extends PingAnBaseRequest {
      * 新能源汽车损失保险保额
      * C
      */
-    @PingAnQuoteRequest(key="MR",remark="新能源汽车损失保险",flag="XNY")
+    @PingAnQuoteRequest(key="A_YN",remark="新能源汽车损失保险",flag="XNY")
     private String inputAmountXNY;
     /***
      * 车损险绝对免赔额(元)

+ 6 - 1
src/main/java/com/ydtech/modules/order/service/impl/PingAnOrderApiServiceImpl.java

@@ -249,6 +249,7 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
             if (models != null && models.size() == 1) {
                 model = models.get(0);
             } else if (models != null && models.size() > 1) {
+                /**
                 //通过年款和新车购置价确定唯一
                 String purchasePrice = carInfo.getPurchasePrice();
                 String caryear = carInfo.getPurchasePrice();
@@ -270,9 +271,13 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
                 }
                 if(models.size()>1){
                     throw new SystemException("请确认车型,检索出多个下车型,请填写正确信息");
-                }else{
+                }else if(models.size()==0){
+                    throw new SystemException("未匹配到车型");
+                }else if(models.size()==1){
                     model = models.get(0);
                 }
+                 **/
+                model = models.get(0);
             }
             // 3. 车辆信息确认
             pinganApiLog.setId(null);

+ 2 - 2
src/main/java/com/ydtech/modules/order/utils/pingan/PingAnQuoteRequestAnnotationParser.java

@@ -49,8 +49,8 @@ public class PingAnQuoteRequestAnnotationParser {
                         String nycflag = annotation.flag();
                         KindInfoVo kindInfoVo_A = map.get("A");
                         KindInfoVo kindInfoVo = map.get(key);
-                        if (nycflag.contains(flag)) {
-                            if ("MR".equals(key)) {
+                        if (nycflag.contains(flag) && kindInfoVo!=null) {
+                            if ((InsurKind.A.getCode() + "_YN").equals(key)) {
                                 field.set(quoteRequest, kindInfoVo_A.getAmount() == 0 ? "0" : amount01Default);
                             } else {
                                 if (InsurKind.A.getCode().equals(key) || (InsurKind.A.getCode() + "_YN").equals(key)) {