using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WCS.BLL.HardWare; namespace WCS.DAL.DbModels { [SugarTable("wcs_location_info")] public class LocationInfo { /// /// 主键 自增Id /// [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsNullable = false, IsIdentity = true)] public int Id { get; set; } /// /// 位置编码 /// [SugarColumn(ColumnName = "location_code", Length = 64, IsNullable = false, ColumnDescription = "位置编码")] public string LocationCode { get; set; } /// /// 库位区域 /// [SugarColumn(ColumnName = "location_area_id", IsNullable = true, ColumnDescription = "库位区域Id")] public int LocationAreaId { get; set; } /// /// 库位区域 /// [SugarColumn(ColumnName = "location_area", Length = 64, IsNullable = false, ColumnDescription = "库位区域名称")] public string LocationArea { get; set; } /// /// RCS库位编号 /// [SugarColumn(ColumnName = "rcs_store_code", Length = 64, IsNullable = true, ColumnDescription = "RCS库位编号")] public string RcsStoreCode { get; set; } /// /// X坐标 /// [SugarColumn(ColumnName = "X", IsNullable = true, DefaultValue = "0", ColumnDescription = "X坐标")] public decimal X { get; set; } /// /// Y坐标 /// [SugarColumn(ColumnName = "Y", IsNullable = true, DefaultValue = "0", ColumnDescription = "Y坐标")] public decimal Y { get; set; } /// /// 可放置货架类型 /// [SugarColumn(ColumnName = "allow_shelf_types", Length = 256, IsNullable = true, ColumnDescription = "可放置货架类型", IsJson = true)] public List AllowShelfTypes { get; set; } /// /// 作为起点时 允许的目的地类型 /// [SugarColumn(ColumnName = "allow_destination_location_area", Length = 512, IsNullable = true, ColumnDescription = "可放置货架类型", IsJson = true)] public List AllowDestinationLocationArea { get; set; } /// /// 更新人 /// [SugarColumn(ColumnName = "modify_user", Length = 128, IsNullable = true, ColumnDescription = "更新人")] public string ModifyUser { get; set; } /// /// 更新时间 /// [SugarColumn(ColumnName = "modify_time", IsNullable = false, ColumnDescription = "更新时间")] public DateTime ModifyTime { get; set; } = DateTime.Now; /// /// 当前位置的状态 /// [SugarColumn(ColumnName = "location_status", IsNullable = false, DefaultValue = "0", ColumnDescription = "当前位置的状态")] public LocationStatusEnum LocationStatus { get; set; } = LocationStatusEnum.空闲; /// /// 是否启用 /// [SugarColumn(ColumnName = "is_enable", IsNullable = false, ColumnDescription = "是否启用")] public bool IsEnable { get; set; } = true; [SugarColumn(IsIgnore = true)] public string IsEnableStr { get { if (IsEnable) return "启用"; else return "禁用"; } } /// /// 序号 /// [SugarColumn(IsIgnore = true)] public int RowNumber { get; set; } [SugarColumn(IsIgnore = true)] public List AllowShelfTypesName { get; set; } = new List(); [SugarColumn(IsIgnore = true)] public string AllowShelfTypesNameStr { get { return string.Join(",", AllowShelfTypesName); } } /// /// 是否已经选择 /// [SugarColumn(IsIgnore = true)] public bool IsSelected { get; set; } } /// /// 货架运输状态 /// public enum LocationStatusEnum { 空闲 = 0,//位置上既没有货架 也没有送货架过来的任务 待占用 = 1,//位置上无货架 但是有送货架过来的任务 占用 = 2,//位置上有货架 待空闲 = 3,//位置上有货架 但是此货架已有送走的任务 } }