소스 검색

添加泰康 测试

wlq 1 년 전
부모
커밋
8b00ac9fdb

+ 6 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/SummaryQuotationApplication.java

@@ -10,6 +10,8 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
 import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
 import org.springframework.data.mongodb.repository.support.SimpleMongoRepository;
 import org.springframework.data.mongodb.repository.support.SimpleMongoRepository;
+import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
+import org.springframework.data.mongodb.repository.support.SimpleMongoRepository;
 
 
 
 
 @ComponentScan(basePackages = {"com.jzg"})
 @ComponentScan(basePackages = {"com.jzg"})
@@ -21,6 +23,10 @@ import org.springframework.data.mongodb.repository.support.SimpleMongoRepository
         basePackages = "com.jzg.quotation.*.*.repository",
         basePackages = "com.jzg.quotation.*.*.repository",
         repositoryBaseClass = SimpleMongoRepository.class // 强制同步模式
         repositoryBaseClass = SimpleMongoRepository.class // 强制同步模式
 )
 )
+//@EnableMongoRepositories(
+//        basePackages = {"com.jzg.quotation.**.repository", "com.jzg.quote.**.repository"},
+//        repositoryBaseClass = SimpleMongoRepository.class // 强制同步模式
+//)
 public class SummaryQuotationApplication {
 public class SummaryQuotationApplication {
 
 
     public static void main(String[] args) {
     public static void main(String[] args) {

+ 8 - 0
tenant/insurance/quotation-summary/src/test/java/com/jzg/quotation/taikang/service/TKQuotationBaseServiceImplTest.java

@@ -1,6 +1,8 @@
 package com.jzg.quotation.taikang.service;
 package com.jzg.quotation.taikang.service;
 
 
 import com.jzg.commons.entity.quote.vo.CarInfoVo;
 import com.jzg.commons.entity.quote.vo.CarInfoVo;
+import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
+import com.jzg.quotation.commons.constant.enums.quote.CarKindCode;
 import com.jzg.quotation.commons.entity.vo.aggregated.QuoteResultsVo;
 import com.jzg.quotation.commons.entity.vo.aggregated.QuoteResultsVo;
 import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
 import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
 import com.jzg.quotation.summary.SummaryQuotationApplication;
 import com.jzg.quotation.summary.SummaryQuotationApplication;
@@ -17,6 +19,12 @@ public class TKQuotationBaseServiceImplTest {
     @Test
     @Test
     public void test() {
     public void test() {
         CarInfoVo commonCarInfoVo = new CarInfoVo();
         CarInfoVo commonCarInfoVo = new CarInfoVo();
+        commonCarInfoVo.setLicenseNo("晋K7059T");
+        commonCarInfoVo.setCarKindCode(CarKindCode.CAR_KIND_CODE_A0.getCode());
+
+        CustomerInfoVo customerInfoVo = new CustomerInfoVo();
+        customerInfoVo.setName("刘书君");
+        customerInfoVo.setIdentifyNumber("372501198303144024");
 
 
         QuoteVo commonQuoteVo = new QuoteVo();
         QuoteVo commonQuoteVo = new QuoteVo();
         commonQuoteVo.setCarInfoVo(commonCarInfoVo);
         commonQuoteVo.setCarInfoVo(commonCarInfoVo);

+ 5 - 3
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/model/api/CarModelinfoQueryResult.java

@@ -44,12 +44,14 @@ public class CarModelinfoQueryResult extends UnknownFieldEntity {
     /**
     /**
      * 车辆模型信息列表
      * 车辆模型信息列表
      */
      */
-    private List<TKCarModel> TKCarModel;
+    private List<TKCarModel> carModel;
+
+    private String orderID;
 
 
     @Override
     @Override
     protected void addChildUnknownFields() {
     protected void addChildUnknownFields() {
         addChildUnknownField("carInfoDto", carInfoDto);
         addChildUnknownField("carInfoDto", carInfoDto);
-        addChildUnknownField("carModel", TKCarModel);
+        addChildUnknownField("carModel", carModel);
     }
     }
 
 
     public static List<TKCarModel> hasModel(CarModelinfoQueryResult carModelinfoQueryResult) {
     public static List<TKCarModel> hasModel(CarModelinfoQueryResult carModelinfoQueryResult) {
@@ -57,7 +59,7 @@ public class CarModelinfoQueryResult extends UnknownFieldEntity {
             return null;
             return null;
         }
         }
 
 
-        List<TKCarModel> TKCarModel = carModelinfoQueryResult.getTKCarModel();
+        List<TKCarModel> TKCarModel = carModelinfoQueryResult.getCarModel();
 
 
         if (TKCarModel == null) {
         if (TKCarModel == null) {
             return null;
             return null;

+ 2 - 2
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/model/entity/TKCarModel.java

@@ -20,7 +20,7 @@ public class TKCarModel extends UnknownFieldEntity implements CarModelsFilter {
      * 车辆信息,车辆经营信息
      * 车辆信息,车辆经营信息
      *
      *
      */
      */
-    private TKVehicleJingyou TKVehicleJingyou;
+    private TKVehicleJingyou vehicleJingyou;
 
 
     /**
     /**
      * 车牌号
      * 车牌号
@@ -112,7 +112,7 @@ public class TKCarModel extends UnknownFieldEntity implements CarModelsFilter {
 
 
     @Override
     @Override
     protected void addChildUnknownFields() {
     protected void addChildUnknownFields() {
-        addChildUnknownField("vehicleJingyou", TKVehicleJingyou);
+        addChildUnknownField("vehicleJingyou", vehicleJingyou);
     }
     }
 
 
     @Override
     @Override

+ 1 - 1
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/service/TKHttpAPIService.java

@@ -401,7 +401,7 @@ public class TKHttpAPIService {
      */
      */
     public CarModelinfoQueryResult carModelinfoQuery(String token, CarModelinfoQueryParam param) {
     public CarModelinfoQueryResult carModelinfoQuery(String token, CarModelinfoQueryParam param) {
         HttpHeaders httpHeaders = new HttpHeaders();
         HttpHeaders httpHeaders = new HttpHeaders();
-        httpHeaders.add("tkCarRequestToken", token);
+        httpHeaders.add("tkcarrequesttoken", token);
 
 
         StringResponse response = client.request(HttpURL.carModelinfoQuery, param, httpHeaders, StringResponse.class);
         StringResponse response = client.request(HttpURL.carModelinfoQuery, param, httpHeaders, StringResponse.class);
 
 

+ 5 - 0
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/service/TKSimpleService.java

@@ -332,6 +332,7 @@ public class TKSimpleService {
 
 
         CarModelinfoQueryParam carModelinfoQueryParam = new CarModelinfoQueryParam();
         CarModelinfoQueryParam carModelinfoQueryParam = new CarModelinfoQueryParam();
         carModelinfoQueryParam.setTplatformId(session.getTplatformId());
         carModelinfoQueryParam.setTplatformId(session.getTplatformId());
+        carModelinfoQueryParam.setTplatLoginKey(session.getTplatLoginKey());
         carModelinfoQueryParam.setFromId(session.getFromid());
         carModelinfoQueryParam.setFromId(session.getFromid());
         //抓包观察到每次查车型前,都要获取一个新的订单id, 不知道为什么
         //抓包观察到每次查车型前,都要获取一个新的订单id, 不知道为什么
         carModelinfoQueryParam.setOrderID(tempOrderId);
         carModelinfoQueryParam.setOrderID(tempOrderId);
@@ -422,6 +423,10 @@ public class TKSimpleService {
             throw new RuntimeException("没有找到车型!(1)");
             throw new RuntimeException("没有找到车型!(1)");
         }
         }
 
 
+        if (TKCarModels.size() == 1) {
+            return TKCarModels.get(0);
+        }
+
         // 找到车型,后面要使用
         // 找到车型,后面要使用
         TKCarModel TKCarModel = CarModelsFilterUtils.to(TKCarModels, commonCarInfoVo);
         TKCarModel TKCarModel = CarModelsFilterUtils.to(TKCarModels, commonCarInfoVo);
 
 

+ 5 - 6
tenant/insurance/quotation-taikang/src/test/java/com/jzg/quotation/taikang/service/TKHttpAPIServiceTest1.java

@@ -376,7 +376,7 @@ public class TKHttpAPIServiceTest1 {
 
 
     @Test
     @Test
     @Order(9)
     @Order(9)
-    @Disabled
+    //@Disabled
     public void carModelinfoQuery1() {
     public void carModelinfoQuery1() {
         // feda77e829d4dedbbd8b4e236bacfac5
         // feda77e829d4dedbbd8b4e236bacfac5
         String tplatformId = TKHttpAPIServiceTest1.loginResult.getTplatformId();
         String tplatformId = TKHttpAPIServiceTest1.loginResult.getTplatformId();
@@ -395,11 +395,10 @@ public class TKHttpAPIServiceTest1 {
 
 
 
 
 
 
-        BeanCopier beanCopier1 = BeanCopier.create(TKAgentQueryResult.class, TKAgent.class, false);
+        TKAgent agent = TKHttpAPIServiceTest1.agentQueryResult;
 
 
-        TKAgent agent = new TKAgent();
-
-        beanCopier1.copy(TKHttpAPIServiceTest1.agentQueryResult, agent, null);
+//        BeanCopier beanCopier1 = BeanCopier.create(TKAgentQueryResult.class, TKAgent.class, false);
+//        beanCopier1.copy(TKHttpAPIServiceTest1.agentQueryResult, agent, null);
 
 
         AgentFuzzyResult agentFuzzyResult = TKHttpAPIServiceTest1.agentFuzzyResults.get(TKHttpAPIServiceTest1.agentFuzzyResults.size() - 1);
         AgentFuzzyResult agentFuzzyResult = TKHttpAPIServiceTest1.agentFuzzyResults.get(TKHttpAPIServiceTest1.agentFuzzyResults.size() - 1);
 
 
@@ -759,7 +758,7 @@ public class TKHttpAPIServiceTest1 {
         TKVehicleJingyou.setHfCode("0");
         TKVehicleJingyou.setHfCode("0");
         TKVehicleJingyou.setPowerType("汽油");
         TKVehicleJingyou.setPowerType("汽油");
 
 
-        TKCarModel.setTKVehicleJingyou(TKVehicleJingyou);
+        TKCarModel.setVehicleJingyou(TKVehicleJingyou);
         carInfo.setCarModel(Arrays.asList(TKCarModel));
         carInfo.setCarModel(Arrays.asList(TKCarModel));
 
 
         TKCarOwnerVo carOwner = new TKCarOwnerVo();
         TKCarOwnerVo carOwner = new TKCarOwnerVo();