|
|
@@ -4,16 +4,19 @@ package com.jzg.quotation.taikang.service;
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
import com.jzg.quotation.commons.component.RequestComponent;
|
|
|
import com.jzg.quotation.commons.config.WebClientConfig;
|
|
|
+import com.jzg.quotation.taikang.JsonUtil;
|
|
|
import com.jzg.quotation.taikang.client.TaiKangHttpClient;
|
|
|
import com.jzg.quotation.taikang.entity.*;
|
|
|
import net.sf.cglib.beans.BeanCopier;
|
|
|
import org.junit.jupiter.api.*;
|
|
|
import org.springframework.web.reactive.function.client.WebClient;
|
|
|
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.LinkedList;
|
|
|
import java.util.List;
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
|
+import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|
|
|
|
|
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
|
|
public class TaiKangHttpServiceTest {
|
|
|
@@ -362,4 +365,173 @@ public class TaiKangHttpServiceTest {
|
|
|
//System.out.println(JSON.toJSONString(carModelinfoCheckVehicleTypeResult));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @Test
|
|
|
+ @Order(11)
|
|
|
+ public void saveBasicInfo() {
|
|
|
+ SaveBasicInfoParam.CarInfo carInfo = new SaveBasicInfoParam.CarInfo();
|
|
|
+ carInfo.setFuelType("0");
|
|
|
+ carInfo.setModelName("奥迪FV7251FBCBG轿车");
|
|
|
+ carInfo.setTonnageFlag("0");
|
|
|
+ carInfo.setCarType("A");
|
|
|
+ carInfo.setUseNatureCodeCode("8A");
|
|
|
+ carInfo.setVinNo("LFV5A24G2G3003652");
|
|
|
+ carInfo.setEngineNo("230596");
|
|
|
+ carInfo.setEnrollDate("2019-03-25");
|
|
|
+ carInfo.setBillDate("");
|
|
|
+ carInfo.setCarBookingTime("");
|
|
|
+ carInfo.setBillNo("");
|
|
|
+ carInfo.setChgOwnerFlag("0");
|
|
|
+ carInfo.setTransferDate("");
|
|
|
+ carInfo.setSelectedSeat("5");
|
|
|
+ carInfo.setLicenseType("02");
|
|
|
+ carInfo.setLicenseTypeChinese("小型汽车号牌");
|
|
|
+ carInfo.setLicenseNo("晋LEL232");
|
|
|
+ carInfo.setBrandName("奥迪FV7251FBCBG轿车");
|
|
|
+ carInfo.setPurchasePrice("380000");
|
|
|
+ carInfo.setExhaustScale("2498");
|
|
|
+ carInfo.setSeatFlag(1);
|
|
|
+
|
|
|
+ SaveBasicInfoParam.CarModel carModel = new SaveBasicInfoParam.CarModel();
|
|
|
+ carModel.setVehicleWeight(1800);
|
|
|
+ carModel.setLicenseNo("晋LEL232");
|
|
|
+ carModel.setMarketYear("201601");
|
|
|
+ carModel.setBrandCN("一汽奥迪");
|
|
|
+ carModel.setReplacementValue(380000);
|
|
|
+ carModel.setLicenseType("02");
|
|
|
+ carModel.setModelName("奥迪FV7251FBCBG轿车");
|
|
|
+ carModel.setFuelType("0");
|
|
|
+ carModel.setRatedPassengerCapacity(0);
|
|
|
+ carModel.setModelCode("ADAAFD0183");
|
|
|
+ carModel.setSeries("一汽奥迪A6");
|
|
|
+ carModel.setAirbagNum(0);
|
|
|
+ carModel.setTonnage(0);
|
|
|
+ carModel.setDisplacement(2498);
|
|
|
+ carModel.setIndustryModelName("奥迪FV7251FBCBG 舒适型");
|
|
|
+ carModel.setIndustryModelCode("BYQMAMUC0042");
|
|
|
+
|
|
|
+ SaveBasicInfoParam.VehicleJingyou vehicleJingyou = new SaveBasicInfoParam.VehicleJingyou();
|
|
|
+ vehicleJingyou.setFactoryCode("MK0887");
|
|
|
+ vehicleJingyou.setVehicleName("奥迪FV7251FBCBG轿车");
|
|
|
+ vehicleJingyou.setRemark("无级/手动一体式 舒适型 国Ⅴ");
|
|
|
+ vehicleJingyou.setSeatMax("5");
|
|
|
+ vehicleJingyou.setHfName("正常");
|
|
|
+ vehicleJingyou.setRiskType("正常车型");
|
|
|
+ vehicleJingyou.setPrice("380000.0");
|
|
|
+ vehicleJingyou.setFamilyName("一汽奥迪A6");
|
|
|
+ vehicleJingyou.setImportFlag("合资");
|
|
|
+ vehicleJingyou.setDisplacement("2.498");
|
|
|
+ vehicleJingyou.setMarketDate("201601");
|
|
|
+ vehicleJingyou.setVehicleClassCode("IC01");
|
|
|
+ vehicleJingyou.setTonnage("0.00");
|
|
|
+ vehicleJingyou.setJqxClassName("六座以下客车");
|
|
|
+ vehicleJingyou.setPower("150");
|
|
|
+ vehicleJingyou.setVehicleAlias("奥迪A6L 30FSI CVT舒适型");
|
|
|
+ vehicleJingyou.setVehicleHyCode("BYQMAMUC0042");
|
|
|
+ vehicleJingyou.setSyxClassName("六座以下客车");
|
|
|
+ vehicleJingyou.setSeatMin("5");
|
|
|
+ vehicleJingyou.setImportFlagCode("1");
|
|
|
+ vehicleJingyou.setKindredPriceTax(0);
|
|
|
+ vehicleJingyou.setBrandName("一汽奥迪");
|
|
|
+ vehicleJingyou.setFamilyCode("ADA1AF");
|
|
|
+ vehicleJingyou.setJqxClassId("KA");
|
|
|
+ vehicleJingyou.setFullWeightMax("1800.0");
|
|
|
+ vehicleJingyou.setVehicleCode("ADAAFD0183");
|
|
|
+ vehicleJingyou.setFactoryName("一汽-大众汽车有限公司");
|
|
|
+ vehicleJingyou.setVehicleClassName("轿车类");
|
|
|
+ vehicleJingyou.setSeat("5");
|
|
|
+ vehicleJingyou.setVehicleHyName("奥迪FV7251FBCBG 舒适型");
|
|
|
+ vehicleJingyou.setPowerTypeCode("D1");
|
|
|
+ vehicleJingyou.setKindredPrice(0);
|
|
|
+ vehicleJingyou.setFullWeight("1800");
|
|
|
+ vehicleJingyou.setTaxPrice(412479);
|
|
|
+ vehicleJingyou.setSyxClassId("KA");
|
|
|
+ vehicleJingyou.setFullWeightMin("1800.0");
|
|
|
+ vehicleJingyou.setHfCode("0");
|
|
|
+ vehicleJingyou.setPowerType("汽油");
|
|
|
+
|
|
|
+ carModel.setVehicleJingyou(vehicleJingyou);
|
|
|
+ carInfo.setCarModel(Arrays.asList(carModel));
|
|
|
+
|
|
|
+ SaveBasicInfoParam.CarOwner carOwner = new SaveBasicInfoParam.CarOwner();
|
|
|
+ carOwner.setCarOwnerNature("1");
|
|
|
+ carOwner.setBirthDate("1984-06-13");
|
|
|
+ carOwner.setName("马占君");
|
|
|
+ carOwner.setId("142625198406130411");
|
|
|
+ carOwner.setCertificateType("01");
|
|
|
+ carOwner.setSerialno("0");
|
|
|
+ carOwner.setSex(1);
|
|
|
+ carOwner.setInsuredAddress("");
|
|
|
+
|
|
|
+ SaveBasicInfoParam.OtherInfo otherInfo = new SaveBasicInfoParam.OtherInfo();
|
|
|
+ otherInfo.setIsQueryVehicleFlag(false);
|
|
|
+ otherInfo.setShowEngineNoFlag("0");
|
|
|
+ otherInfo.setJyQueryFlag(false);
|
|
|
+ otherInfo.setOcrFlag(2);
|
|
|
+ otherInfo.setNewCarFlag("0");
|
|
|
+ otherInfo.setKindLimitCode("1");
|
|
|
+ otherInfo.setRetrospectId("08293502-8eb2-449b-8c0b-7e04ae68c4eb");
|
|
|
+
|
|
|
+ SaveBasicInfoParam.InsureInfo insureInfo = new SaveBasicInfoParam.InsureInfo();
|
|
|
+
|
|
|
+ SaveBasicInfoParam.CarTax carTax = new SaveBasicInfoParam.CarTax();
|
|
|
+ carTax.setIsPayTax("1");
|
|
|
+
|
|
|
+ SaveBasicInfoParam.AreaInfo areaInfo = new SaveBasicInfoParam.AreaInfo();
|
|
|
+ areaInfo.setChannelCode("OffWeb");
|
|
|
+ areaInfo.setOrderID("WBPC202503061107430440000");
|
|
|
+ areaInfo.setBjFlag(0);
|
|
|
+ areaInfo.setLicenseNo("晋LEL232");
|
|
|
+ areaInfo.setIsNewCarWithoutLicense(0);
|
|
|
+ areaInfo.setProvinceName("山西省");
|
|
|
+ areaInfo.setProvinceCode("140000");
|
|
|
+ areaInfo.setCityName("太原市");
|
|
|
+ areaInfo.setCityCode("140100");
|
|
|
+ areaInfo.setAreaFlag("140100");
|
|
|
+ areaInfo.setComCode("0114");
|
|
|
+ areaInfo.setClientType("");
|
|
|
+ areaInfo.setFromID("67107");
|
|
|
+ areaInfo.setFormID("67107");
|
|
|
+ areaInfo.setTplatformId("feda77e829d4dedbbd8b4e236bacfac5");
|
|
|
+ areaInfo.setLeadsId("");
|
|
|
+
|
|
|
+ SaveBasicInfoParam.Agent agent = new SaveBasicInfoParam.Agent();
|
|
|
+ agent.setComCode("0114");
|
|
|
+ agent.setIntermediaryName("泰康人寿(个险)(64827)");
|
|
|
+ agent.setAgentCode("R35016546");
|
|
|
+ agent.setAgentName("褚友爱");
|
|
|
+ agent.setAgencyName("山西分公司");
|
|
|
+ agent.setAgencyCode("R10115");
|
|
|
+ agent.setAgentPhone("13613412686");
|
|
|
+ agent.setStatus("1");
|
|
|
+ agent.setIntermediaryCode("000000000004");
|
|
|
+ agent.setFromID("64827");
|
|
|
+ areaInfo.setAgent(agent);
|
|
|
+
|
|
|
+ SaveBasicInfoParam param = new SaveBasicInfoParam();
|
|
|
+ param.setChannelCode("OffWeb");
|
|
|
+ param.setOrderID("WBPC202503061106595800000");
|
|
|
+ param.setPreFilledLastPolicyFlag("");
|
|
|
+ param.setAreaInfoVo(areaInfo);
|
|
|
+ param.setIsJgFlag("");
|
|
|
+ param.setTplatLoginKey("5fb6bdba974e17ec0db8c8ad4faab1ba1");
|
|
|
+ param.setCarInfoVo(carInfo);
|
|
|
+ param.setCarOwnerVo(carOwner);
|
|
|
+ param.setOtherInfo(otherInfo);
|
|
|
+ param.setInsureInfo(insureInfo);
|
|
|
+ param.setCarTaxVo(carTax);
|
|
|
+ param.setTplatformId("feda77e829d4dedbbd8b4e236bacfac5");
|
|
|
+ param.setAuthFailContinueFlag("");
|
|
|
+ param.setFromId("67107");
|
|
|
+
|
|
|
+
|
|
|
+ SaveBasicInfoResult saveBasicInfoResult = taiKangHttpService.saveBasicInfo(param);
|
|
|
+
|
|
|
+
|
|
|
+ assertNotNull(saveBasicInfoResult);
|
|
|
+
|
|
|
+ System.out.println();
|
|
|
+ System.out.println(JSON.toJSONString(saveBasicInfoResult));
|
|
|
+ }
|
|
|
+
|
|
|
}
|