package com.fzzy.igds.dzhwk.domain; import com.bstek.dorado.annotation.PropertyDef; import com.fasterxml.jackson.annotation.JsonFormat; import com.fzzy.igds.dzhwk.constant.*; import com.ruoyi.common.annotation.Excel; import lombok.Data; import javax.persistence.*; import java.io.Serializable; import java.util.Date; /** * @Description 货位实体 * @Author CZT * @Date 2025/05/28 18:45 */ @Data @Entity @Table(name = "D_DEPOT") public class Depot implements Serializable { @Id @Column(name = "ID_", length = 50) @PropertyDef(label = "货位编号") private String id; @Column(name = "COMPANY_ID_", length = 10) @PropertyDef(label = "组织编码") private String companyId; @Column(name = "DEPT_ID_", length = 40) @PropertyDef(label = "所属分库") private String deptId; @Excel(name = "货位名称", sort = 1) @Column(name = "NAME_", length = 50) @PropertyDef(label = "货位名称") private String name; @Column(name = "BUILDING_ID_", length = 40) @PropertyDef(label = "所属仓房") private String buildingId; @Column(name = "GRANARY_ID_", length = 40) @PropertyDef(label = "所属廒间") private String granaryId; @Excel(name = "仓库类型", sort = 11, readConverterExp = "01=平房仓,02=立筒仓,03=浅圆仓,04=储油罐,05=楼房仓,99=其他") @Column(name = "DEPOT_TYPE_", length = 10) @PropertyDef(label = "仓库类型", description = "根据国标配置类型,平房仓、立筒仓、浅圆仓、储油罐") private String depotType; @Excel(name = "货位状态", sort = 2, readConverterExp = "1=空仓,2=入库中,3=封仓,31=封仓-气调中,32=封仓-熏蒸中,33=封仓-通风中") @Column(name = "DEPOT_STATUS_", length = 10) @PropertyDef(label = "仓库状态", description = "与库存表关联,通过库存变更") private String depotStatus; @Column(name = "STORE_TYPE_", length = 6) @PropertyDef(label = "储粮方式", description = "与库存表关联") private String storeType; @Column(name = "STORAGE_MAX_") @PropertyDef(label = "设计储量", description = "单位:KG") private Double storageMax; @Excel(name = "实际储量(KG)", sort = 6) @Column(name = "STORAGE_REAL_") @PropertyDef(label = "实际储量", description = "单位:KG,通过库存变更") private Double storageReal; @Excel(name = "粮食性质", sort = 4, dictType = "FOOD_TYPE_") @Column(name = "FOOD_TYPE_", length = 10) @PropertyDef(label = "粮食性质", description = "与库存表关联,通过库存变更") private String foodType; @Excel(name = "粮食品种", sort = 3, dictType = "FOOD_VARIETY_") @Column(name = "FOOD_VARIETY_", length = 10) @PropertyDef(label = "粮食品种", description = "与库存表关联,通过库存变更") private String foodVariety; @Excel(name = "粮食等级", sort = 5, dictType = "FOOD_LEVEL_") @Column(name = "FOOD_LEVEL_", length = 10) @PropertyDef(label = "粮食等级", description = "与库存表关联,通过库存变更") private String foodLevel; @Column(name = "FOOD_LOCATION_ID_", length = 50) @PropertyDef(label = "粮食产地") private String foodLocationId; @Excel(name = "粮食产地", sort = 8) @Column(name = "FOOD_LOCATION_", length = 50) @PropertyDef(label = "粮食产地", description = "与库存表关联,通过库存变更") private String foodLocation; @Excel(name = "粮食年份", sort = 7) @Column(name = "FOOD_YEAR_", length = 10) @PropertyDef(label = "粮食年份", description = "与库存表关联,通过库存变更") private String foodYear; @Column(name = "PER_WET_") @PropertyDef(label = "水分", description = "百分比,默认为空,来源质检信息") private Double perWet; @Column(name = "PER_IMPURITY_") @PropertyDef(label = "杂质", description = "百分比,默认为空,来源质检信息") private Double perImpurity; @Column(name = "BULK_WEIGHT_") @PropertyDef(label = "容重 g/L", description = "容重 g/L") private Double bulkWeight; @Column(name = "STORE_KEEPER_", length = 30) @PropertyDef(label = "保管员账号") private String storeKeeper; @Excel(name = "保管员", sort = 10) @Column(name = "STORE_KEEPER_NAME_", length = 50) @PropertyDef(label = "保管员", description = "中文名称") private String storeKeeperName; @Excel(name = "入库日期", sort = 9, dateFormat = "yyyy-MM-dd") @Column(name = "STORE_DATE_") @PropertyDef(label = "入库时间", description = "默认空,通过库存变更") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date storeDate; @Column(name = "CHECK_DATE_") @PropertyDef(label = "最后质检时间", description = "默认空,来源质检信息") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date checkDate; @Column(name = "REMARK_", length = 200) @PropertyDef(label = "备注", description = "备注信息") private String remark; @Column(name = "UPDATE_TIME_") @PropertyDef(label = "数据更新时间") private Date updateTime; @Column(name = "BH_ID_", length = 50) @PropertyDef(label = "邦海粮情分机仓库编码") private String bhId; @Column(name = "ORDER_NUM_") @PropertyDef(label = "显示顺序") private Integer orderNum = 1; // ------------其他属性信息------------// @Transient @PropertyDef(label = "粮食品种") private String foodVarietyName; @Transient @PropertyDef(label = "粮食性质") private String foodTypeName; @Transient @PropertyDef(label = "仓库类型") private String depotTypeName; @Transient @PropertyDef(label = "仓库类型") private String depotStatusName; @Transient @PropertyDef(label = "粮食等级") private String foodLevelName; @Transient @PropertyDef(label = "X坐标", description = "三维模型中坐标,页面无需维护") private Double posX; @Transient @PropertyDef(label = "Y坐标", description = "三维模型中坐标,页面无需维护") private Double posY; @Transient @PropertyDef(label = "保管员等级") private String storeKeeperLevel = "高级保管员"; @Transient @PropertyDef(label = "保管员等级") private String storeKeeperPhone = "####"; @Transient @PropertyDef(label = "保管员头像路径") private String userImgPath; public String getFoodLevelName() { if (null != this.foodLevel) { return FoodLevel.getMsg(this.foodLevel); } return null; } public String getFoodVarietyName() { if (null != this.foodVariety) { return FoodVariety.getMsg(this.foodVariety); } return null; } public String getFoodTypeName() { if (null != this.foodType) { return FoodType.getMsg(this.foodType); } return null; } public String getDepotTypeName() { if (null != this.depotType) { return DepotType.getMsg(this.depotType); } return null; } public String getDepotStatusName() { if (null != this.depotStatus) { return DepotStatus.getMsg(this.depotStatus); } return null; } }