Просмотр исходного кода

中煤处理进口车型返回没有整备质量的问题

Qchen 1 месяц назад
Родитель
Сommit
0bbe62b310

+ 8 - 3
tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quotation/zhongmei/crawler/entity/Request/ZmCrawlerQuotedPriceRequest.java

@@ -404,7 +404,7 @@ public class ZmCrawlerQuotedPriceRequest extends BaseRequest {
             private ModelDetailsDTO modelDetails;
 
             public InsuredObjectDTO(ZmCrawlerModelQueryResponse.FullCarDataDTO fullCarDataDTO, QuoteVo quoteVo, ZmCrawlerActualValueResponse actualValueResponse) {
-                SimpleStadarCarDTO stadarCarDTO = new SimpleStadarCarDTO(fullCarDataDTO.getFullCarData());
+                SimpleStadarCarDTO stadarCarDTO = new SimpleStadarCarDTO(fullCarDataDTO.getFullCarData(),quoteVo.getCarInfoVo());
                 this.simpleStadarCar = stadarCarDTO;
 
                 PlatformCarDTO platformCarDTO = new PlatformCarDTO();
@@ -823,7 +823,7 @@ public class ZmCrawlerQuotedPriceRequest extends BaseRequest {
                 @JsonProperty("series")
                 private String series;
 
-                public SimpleStadarCarDTO(ZmCrawlerModelQueryResponse.FullCarDataDTO.FullCarData fullCarData){
+                public SimpleStadarCarDTO(ZmCrawlerModelQueryResponse.FullCarDataDTO.FullCarData fullCarData,CarInfoVo carInfo){
                     this.approvedLoad = fullCarData.getApprovedLoad();
                     this.approvedPassengersCapacity = fullCarData.getApprovedPassengersCapacity();
                     this.brand = fullCarData.getModelName();
@@ -842,7 +842,12 @@ public class ZmCrawlerQuotedPriceRequest extends BaseRequest {
                     this.purchasePrice = fullCarData.getPurchasePrice();
                     this.purchasePriceCopy = fullCarData.getPurchasePrice();
                     this.series = fullCarData.getSeries();
-                    this.unladenMass = fullCarData.getUnladenMass();
+                    if (fullCarData.getUnladenMass() != null && !fullCarData.getUnladenMass().equals(0.00)) {
+                        this.unladenMass = fullCarData.getUnladenMass();
+                    } else {
+                        this.unladenMass = Double.parseDouble(carInfo.getCompleteKerbMass())/1000;
+                    }
+
                 }
             }