|
|
@@ -1,9 +1,9 @@
|
|
|
package com.ydtech.modules.ins.model.yc.ruote;
|
|
|
|
|
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
|
|
-import com.ydtech.modules.ins.model.ya.YaQuoteInfoVo;
|
|
|
import com.ydtech.modules.ins.model.vo.CarInfoVo;
|
|
|
import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
|
|
|
+import com.ydtech.modules.ins.model.yc.modelsQuery.ModelsQueryResponse;
|
|
|
import com.ydtech.utils.StringUtils;
|
|
|
import lombok.Data;
|
|
|
import org.apache.http.client.utils.DateUtils;
|
|
|
@@ -139,7 +139,7 @@ public class Vhl {
|
|
|
// private String TTransferTm;
|
|
|
/**
|
|
|
* 是否外地车
|
|
|
- *
|
|
|
+ * <p>
|
|
|
* 本地0,省内异地1,省外异地2
|
|
|
*/
|
|
|
@JacksonXmlProperty(localName = "CEcdemicMrk")
|
|
|
@@ -331,36 +331,23 @@ public class Vhl {
|
|
|
/**
|
|
|
* @description: 车辆信息
|
|
|
*/
|
|
|
- public static Vhl buildVhl(CarInfoVo carInfo,CustomerInfoVo ownerInfo) {
|
|
|
-
|
|
|
+ public static Vhl buildVhl(CarInfoVo carInfo, CustomerInfoVo ownerInfo, ModelsQueryResponse.VehicleInfo vehicleInfo) {
|
|
|
Vhl vhl = new Vhl();
|
|
|
-// //3 车辆信息
|
|
|
-// CarInfoVo carInfo = yaQuoteInfoVo.getCarInfo();
|
|
|
-//
|
|
|
-// //2.2车主
|
|
|
-// CustomerInfoVo ownerInfo = yaQuoteInfoVo.getOwnerInfo();
|
|
|
-
|
|
|
+ vhl.setCPlateModelCde(vehicleInfo.getVehicleId());
|
|
|
+ vhl.setCModelCde(vehicleInfo.getVehicleId());
|
|
|
|
|
|
- vhl.setCPlateModelCde(carInfo.getCiModelCode());
|
|
|
- vhl.setCModelCde(carInfo.getModelCode());
|
|
|
vhl.setCRegOwner(ownerInfo.getName());
|
|
|
vhl.setCPlateNo(carInfo.getLicenseNo());
|
|
|
-// <CModelNme>威志CA7150BUE5S轿车</CModelNme>
|
|
|
- vhl.setCModelNme(carInfo.getModelcname());
|
|
|
-// vhl.setNResvNum1(carInfo.getSeatCount());
|
|
|
-
|
|
|
-
|
|
|
+ vhl.setCModelNme(vehicleInfo.getVehicleName());
|
|
|
LocalDate lDate = LocalDate.parse(carInfo.getRegisterDate());
|
|
|
LocalDate newlDate = LocalDate.now();
|
|
|
int years = newlDate.getYear() - lDate.getYear();
|
|
|
vhl.setCUseYear(years + "");
|
|
|
-
|
|
|
//玻璃类型 303011001 国产 303011002 进口
|
|
|
vhl.setCGlassTyp("303011001");
|
|
|
vhl.setCEcdemicMrk("1");
|
|
|
-
|
|
|
//过户
|
|
|
- if (carInfo.isTransferFlag() == true) {
|
|
|
+ if (carInfo.isTransferFlag()) {
|
|
|
//必传。过户车传1;非过户车传0
|
|
|
vhl.setCChgOwnerFlag("1");
|
|
|
vhl.setTTransferDate(carInfo.getTransferDate());
|
|
|
@@ -379,19 +366,19 @@ public class Vhl {
|
|
|
String enginedesc = carInfo.getEnginedesc();
|
|
|
vhl.setNDisplacement(enginedesc);
|
|
|
vhl.setNDefDisplacement(enginedesc);
|
|
|
- String fullType="32773001";//默认燃油
|
|
|
- if("0".equals(carInfo.getEnergyType())){
|
|
|
- fullType="32773001"; //燃油
|
|
|
- }else if("1".equals(carInfo.getEnergyType())){
|
|
|
- fullType="32773002"; //纯电动
|
|
|
- }else if("2".equals(carInfo.getEnergyType())){
|
|
|
- fullType="32773003"; //燃料电池
|
|
|
- }else if("3".equals(carInfo.getEnergyType())){
|
|
|
- fullType="32773004"; //插电式混合动力
|
|
|
- }else if("4".equals(carInfo.getEnergyType())){
|
|
|
- fullType="32773005"; //其他混合动力
|
|
|
- }else if("5".equals(carInfo.getEnergyType())){
|
|
|
- fullType="32773006"; //其他
|
|
|
+ String fullType = "32773001";//默认燃油
|
|
|
+ if ("0".equals(carInfo.getEnergyType())) {
|
|
|
+ fullType = "32773001"; //燃油
|
|
|
+ } else if ("1".equals(carInfo.getEnergyType())) {
|
|
|
+ fullType = "32773002"; //纯电动
|
|
|
+ } else if ("2".equals(carInfo.getEnergyType())) {
|
|
|
+ fullType = "32773003"; //燃料电池
|
|
|
+ } else if ("3".equals(carInfo.getEnergyType())) {
|
|
|
+ fullType = "32773004"; //插电式混合动力
|
|
|
+ } else if ("4".equals(carInfo.getEnergyType())) {
|
|
|
+ fullType = "32773005"; //其他混合动力
|
|
|
+ } else if ("5".equals(carInfo.getEnergyType())) {
|
|
|
+ fullType = "32773006"; //其他
|
|
|
}
|
|
|
vhl.setFuelType(fullType);
|
|
|
// vhl.setNActualValue(String.valueOf((Double.parseDouble(carInfo.getPurchasePrice()) * 0.9)));
|
|
|
@@ -401,17 +388,11 @@ public class Vhl {
|
|
|
// vhl.setCDisplacementLvl("67");
|
|
|
vhl.setCFstRegYm(carInfo.getRegisterDate());
|
|
|
vhl.setNNewPriceValue(carInfo.getPurchasePrice());
|
|
|
-
|
|
|
-
|
|
|
//
|
|
|
-
|
|
|
vhl.setCEngNo(carInfo.getEngineNo());
|
|
|
vhl.setCFrmNo(carInfo.getVinNo());
|
|
|
-
|
|
|
vhl.setCPlateTyp(carInfo.getLicenseTypeCode());
|
|
|
-
|
|
|
vhl.setCUsageCde("336001");
|
|
|
-
|
|
|
//所属性质(1个人 2企业 3机关)
|
|
|
if (carInfo.getProperty().equals("1")) {
|
|
|
vhl.setCBizMrk("338001");
|
|
|
@@ -421,20 +402,15 @@ public class Vhl {
|
|
|
vhl.setCBizMrk("338002");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//座位数 NResvNum1 数值(10,0) N 默认核定载客数-1
|
|
|
vhl.setNResvNum1(StringUtils.toString(StringUtils.toInt(carInfo.getSeatCount()) - 1));
|
|
|
//核定载客数 取的座位数
|
|
|
vhl.setNSeatNum(carInfo.getSeatCount());
|
|
|
-
|
|
|
vhl.setCVhlTyp(StringUtils.toInt(vhl.getNSeatNum()) < 6 ? "337001" : "337002");
|
|
|
// //新旧车标志 0 新车,1 旧车
|
|
|
vhl.setCNewMrk("1");
|
|
|
-
|
|
|
//轿车
|
|
|
- vhl.setCRegVhlTyp("K33");
|
|
|
-
|
|
|
-
|
|
|
+ vhl.setCRegVhlTyp(carInfo.getCartype());
|
|
|
return vhl;
|
|
|
}
|
|
|
|