wlzboy
2 天以前 8cb5d3440208a3be3e772e65f1bd0ec63031ba62
ruoyi-system/src/main/java/com/ruoyi/system/domain/VehicleInfo.java
@@ -5,14 +5,21 @@
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 {
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")
@@ -38,12 +45,38 @@
    @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<Long> deptIds;
    /** 归属的多个分公司名称列表(用于显示) */
    private List<String> 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) {
@@ -94,16 +127,60 @@
        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<Long> getDeptIds() {
        return deptIds;
    }
    public void setDeptIds(List<Long> deptIds) {
        this.deptIds = deptIds;
    }
    public List<String> getDeptNames() {
        return deptNames;
    }
    public void setDeptNames(List<String> 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())
@@ -111,4 +188,16 @@
                .append("remark", getRemark())
                .toString();
    }
}
    /**
     * 初始化延迟加载的属性,避免序列化问题
     */
    public void initializeLazyProperties() {
        if (this.deptIds != null) {
            this.deptIds.size(); // 触发加载
        }
        if (this.deptNames != null) {
            this.deptNames.size(); // 触发加载
        }
    }
}