| | |
| | | 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 */ |
| | |
| | | /** 归属部门名称 */ |
| | | @Excel(name = "归属部门") |
| | | private String deptName; |
| | | |
| | | /** 归属的多个分公司ID列表(用于查询和显示) */ |
| | | private List<Long> deptIds; |
| | | |
| | | /** 归属的多个分公司名称列表(用于显示) */ |
| | | private List<String> deptNames; |
| | | |
| | | public void setVehicleId(Long vehicleId) { |
| | | this.vehicleId = vehicleId; |
| | |
| | | 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() { |
| | |
| | | .append("remark", getRemark()) |
| | | .toString(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 初始化延迟加载的属性,避免序列化问题 |
| | | */ |
| | | public void initializeLazyProperties() { |
| | | if (this.deptIds != null) { |
| | | this.deptIds.size(); // 触发加载 |
| | | } |
| | | if (this.deptNames != null) { |
| | | this.deptNames.size(); // 触发加载 |
| | | } |
| | | } |
| | | } |