| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- package com.ydtech.modules.ins.model.vo;
- import com.ydtech.constants.enums.dict.insurance.EnergyType;
- import com.ydtech.modules.ins.model.ya.CarModelDTO;
- import com.ydtech.validation.annotation.CheckDateTime;
- import io.swagger.annotations.ApiModel;
- import io.swagger.annotations.ApiModelProperty;
- import lombok.Data;
- import org.hibernate.validator.constraints.Range;
- import javax.validation.constraints.Digits;
- import javax.validation.constraints.NotNull;
- /**
- * @author qinfenglong
- * @version 1.0.0
- * @description CarModelInfo
- * @since 2020/11/21 20:12
- */
- @Data
- @ApiModel(value = "车辆信息")
- public class CarInfoVo {
- // @NotNull(message = "品牌型号不能为空")
- @ApiModelProperty(value = "品牌型号")
- private String brandName;
- @ApiModelProperty(value = "车型品牌")
- private String carBrand;
- @ApiModelProperty(value = "行业车型名称")
- private String ciCarName;
- @ApiModelProperty(value = "行业车型编码")
- private String ciModelCode;
- @NotNull(message = "整备质量不能为空")
- @Range(message = "整备质量必须为整数")
- @ApiModelProperty(value = "整备质量")
- private String completeKerbMass;
- @NotNull(message = "发动机号不能为空")
- @ApiModelProperty(value = "发动机号")
- private String engineNo;
- @ApiModelProperty(value = "排量")
- private String exhaustScale;
- @ApiModelProperty(value = "工厂名称")
- private String factory;
- @ApiModelProperty(value = "工厂编码")
- private String factoryid;
- @NotNull(message = "车架号不能为空")
- @ApiModelProperty(value = "车架号")
- private String frameNo;
- // @NotNull(message = "车牌号不能为空")
- @ApiModelProperty(value = "车牌")
- private String licenseNo;
- @ApiModelProperty(value = "车牌种类")
- private String licenseTypeCode;
- @ApiModelProperty(value = "精友车型编码")
- private String modelCode;
- @NotNull(message = "新车购置价不能为空")
- @Range(message = "新车购置价必须为整数")
- @ApiModelProperty(value = "新车购置价")
- private String purchasePrice;
- @NotNull(message = "座位数不能为空")
- @Range(min = 1,max = 99,message = "座位数只能填写 1 - 99的整数")
- @ApiModelProperty(value = "座位数")
- private String seatCount;
- @ApiModelProperty(value = "车辆类型(轿车类,特种车类)")
- private String vehicleclass;
- @ApiModelProperty(value = "车辆类型(轿车类,特种车类)")
- private String importFlag;
- // @NotNull(message = "车架号不能为空")
- @ApiModelProperty(value = "车架号")
- private String vinNo;
- @NotNull(message = "车型不能为空")
- @ApiModelProperty(value = "车型")
- private String familyName;
- @NotNull(message = "车型名称不能为空")
- @ApiModelProperty(value = "车型名称")
- private String modelcname;
- @ApiModelProperty(value = "能源类型编码(D1天然气(NG/CNG/LNG) D3汽油 D2柴油)")
- private String powertypecode;
- /**
- * @Date 2023-03-15
- */
- /**
- * @see com.ydtech.constants.enums.dict.insurance.EnergyType
- */
- @NotNull(message = "能源种类不能为空")
- @ApiModelProperty(value = "能源种类")
- private String energyType;
- @ApiModelProperty(value = "总质量")
- private String vehicleweight;
- @Range(message = "核定载质量必须为整数")
- @ApiModelProperty(value = "核定载质量")
- private String limitLoad;
- @ApiModelProperty(value = "年款")
- private String caryear;
- /**
- * @see com.ydtech.constants.enums.dict.insurance.VehicleType
- */
- @NotNull(message = "车辆种类不能为空")
- @ApiModelProperty(value = "车辆种类")
- private String cimodelclass;
- @ApiModelProperty(value = "燃料类型")
- private String powertype;
- @Digits(integer = Integer.MAX_VALUE, fraction = 5, message = "排量必须是小数,且小数位最多5位")
- @ApiModelProperty(value = "排量(和exhaustScale区分开)")
- private String enginedesc;
- @NotNull(message = "行驶证注册日期不能空")
- @ApiModelProperty(value = "行驶证注册日期")
- @CheckDateTime(format = "yyyy-MM-dd", message = "行驶证注册日期的正确格式为yyyy-MM-dd")
- private String registerDate;
- @NotNull(message = "发证日期不能为空")
- @ApiModelProperty(value = "发证日期")
- @CheckDateTime(format = "yyyy-MM-dd", message = "发证日期的正确格式为yyyy-MM-dd")
- private String issueDate;
- @ApiModelProperty(value = "是否过户")
- private boolean transferFlag;
- //处理 @Data 中 boolean 无法get hxl 2024-07-17 设置为 Boolean 类型没有默认值,因此添加方法
- public boolean isTransferFlag() {
- return transferFlag;
- }
- public void setTransferFlag(boolean transferFlag) {
- this.transferFlag = transferFlag;
- }
- // 华农,太平,泰康,华泰
- @ApiModelProperty(value = "商业是否过户")
- private boolean transferFlagBi;
- /**
- * 国寿app
- *
- * @date: 2023/8/23 10:37
- **/
- @ApiModelProperty(value = "是否是二手车")
- private boolean usedCar;
- @ApiModelProperty(value = "是否脱保")
- private boolean outOfInsurance;
- @ApiModelProperty(value = "过户日期")
- @CheckDateTime(format = "yyyy-MM-dd", message = "发证日期的正确格式为yyyy-MM-dd")
- private String transferDate;
- @ApiModelProperty(value = "是否贷款车")
- private boolean loanStatus;
- @ApiModelProperty(value = "第一受益人(贷款车才有第一受益人)")
- private String firstBeneMan;
- @ApiModelProperty(value = "是否有车牌号(判断是否是新车)")
- private boolean noLicenseFlag;
- /**
- * @see com.ydtech.constants.enums.dict.insurance.TrafficManagementVehicleType
- */
- @ApiModelProperty(value = "车辆类型")
- private String cartype;
- /**
- * @see com.ydtech.constants.enums.dict.insurance.NatureOfVehicleUse
- */
- @ApiModelProperty(value = "使用性质")
- private String carnature;
- /**
- * 营业
- *
- * @see com.ydtech.constants.enums.dict.insurance.BusinessVehicleUse
- * 非营业
- * @see com.ydtech.constants.enums.dict.insurance.OutOfBusinessVehicleUse
- */
- @ApiModelProperty(value = "车辆用途")
- private String vehicleUse;
- /**
- * 所属性质
- *
- * @see com.ydtech.constants.enums.dict.insurance.Property
- */
- @ApiModelProperty(value = "所属性质(1个人 2企业 3机关)")
- private String property;
- @ApiModelProperty(value = "发动机功率")
- private String powerScale;
- // 判断是否是新能源车
- public boolean isNewEnergy() {
- return EnergyType.isNewEnergy(energyType);
- }
- /**
- * 获取核定载质量吨位
- * @return
- */
- public Double limitLoadTon(){
- return Double.parseDouble(limitLoad) / 1000;
- }
- public CarModelDTO toCarModelDTO() {
- CarModelDTO carModelDTO = new CarModelDTO();
- carModelDTO.setModelCode(this.modelCode);
- carModelDTO.setModelName(this.brandName);
- carModelDTO.setSeries(this.familyName);
- carModelDTO.setRatedPassengerCapacity(this.seatCount);
- carModelDTO.setDisplacement(this.enginedesc);
- carModelDTO.setMarketYear(this.caryear);
- carModelDTO.setReplacementValue(this.purchasePrice);
- carModelDTO.setFuelType(this.powertype);
- carModelDTO.setEnergyTypes(this.energyType);
- carModelDTO.setFuelTypeCode(this.energyType);
- return carModelDTO;
- }
- public void getTransferFlag() {
- }
- }
|