package com.ruoyi.system.domain; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; import java.util.List; import java.io.Serializable; /** * 车辆信息对象 tb_vehicle_info */ public class VehicleInfo extends BaseEntity implements Serializable { private static final long serialVersionUID = 1L; /** 车辆ID */ private Long vehicleId; /** 旧系统车辆ID(SQL Server CarID) */ @Excel(name = "旧系统车辆ID") private Integer carId; /** 设备ID */ @Excel(name = "设备ID") private String deviceId; /** 车牌号 */ @Excel(name = "车牌号") private String vehicleNo; /** 车辆类型 */ @Excel(name = "车辆类型") private String vehicleType; /** 车辆品牌 */ @Excel(name = "车辆品牌") private String vehicleBrand; /** 车辆型号 */ @Excel(name = "车辆型号") private String vehicleModel; /** 状态(0正常 1停用) */ @Excel(name = "状态", readConverterExp = "0=正常,1=停用") private String status; /** 平台标识 */ @Excel(name = "平台标识") private String platformCode; /** 归属部门ID */ @Excel(name = "归属部门ID") private Long deptId; /** 归属部门名称 */ @Excel(name = "归属部门") private String deptName; /** 归属的多个分公司ID列表(用于查询和显示) */ private List deptIds; /** 归属的多个分公司名称列表(用于显示) */ private List deptNames; public void setVehicleId(Long vehicleId) { this.vehicleId = vehicleId; } public Long getVehicleId() { return vehicleId; } public void setCarId(Integer carId) { this.carId = carId; } public Integer getCarId() { return carId; } public void setDeviceId(String deviceId) { this.deviceId = deviceId; } public String getDeviceId() { return deviceId; } public void setVehicleNo(String vehicleNo) { this.vehicleNo = vehicleNo; } public String getVehicleNo() { return vehicleNo; } public void setVehicleType(String vehicleType) { this.vehicleType = vehicleType; } public String getVehicleType() { return vehicleType; } public void setVehicleBrand(String vehicleBrand) { this.vehicleBrand = vehicleBrand; } public String getVehicleBrand() { return vehicleBrand; } public void setVehicleModel(String vehicleModel) { this.vehicleModel = vehicleModel; } public String getVehicleModel() { return vehicleModel; } public void setStatus(String status) { this.status = status; } public String getStatus() { return status; } public String getPlatformCode() { return platformCode; } public void setPlatformCode(String platformCode) { this.platformCode = platformCode; } public Long getDeptId() { return deptId; } public void setDeptId(Long deptId) { this.deptId = deptId; } public String getDeptName() { return deptName; } public void setDeptName(String deptName) { this.deptName = deptName; } public List getDeptIds() { return deptIds; } public void setDeptIds(List deptIds) { this.deptIds = deptIds; } public List getDeptNames() { return deptNames; } public void setDeptNames(List deptNames) { this.deptNames = deptNames; } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) .append("vehicleId", getVehicleId()) .append("carId", getCarId()) .append("deviceId", getDeviceId()) .append("vehicleNo", getVehicleNo()) .append("vehicleType", getVehicleType()) .append("vehicleBrand", getVehicleBrand()) .append("vehicleModel", getVehicleModel()) .append("status", getStatus()) .append("platformCode", getPlatformCode()) .append("deptId", getDeptId()) .append("deptName", getDeptName()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) .append("remark", getRemark()) .toString(); } /** * 初始化延迟加载的属性,避免序列化问题 */ public void initializeLazyProperties() { if (this.deptIds != null) { this.deptIds.size(); // 触发加载 } if (this.deptNames != null) { this.deptNames.size(); // 触发加载 } } }