using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WCS.BLL.DbModels.Task; using WCS.DAL.DbModels; namespace WCS.BLL.DbModels { /// /// 当前正在进行中的任务 /// [SugarTable("wcs_task_current")] public class CurrentTask { /// /// 主键 自增Id /// [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsNullable = false, IsIdentity = true)] public int Id { get; set; } #region 库位属性 /// /// 货架Id /// [SugarColumn(ColumnName = "shelf_id", IsNullable = false, ColumnDescription = "货架Id")] public int ShelfId { get; set; } /// /// 货架号 /// [SugarColumn(ColumnName = "shelf_code", Length = 50, IsNullable = false, ColumnDescription = "货架编码;货架一般按照报警灯来区分 一个报警灯指示的是一个货架")] public string ShelfCode { get; set; } /// /// 模组Id /// [SugarColumn(ColumnName = "module_id", IsNullable = false, ColumnDescription = "模组Id")] public int ModuleId { get; set; } /// /// 模组编号 /// [SugarColumn(ColumnName = "module_code", Length = 50, IsNullable = false, ColumnDescription = "模组编码")] public string ModuleCode { get; set; } /// /// 入库的库位表ID /// [SugarColumn(ColumnName = "store_id", IsNullable = true, ColumnDescription = "库位ID")] public int StoreId { get; set; } /// /// 入库的库位编码 /// [SugarColumn(ColumnName = "store_code", Length = 50, IsNullable = true, ColumnDescription = "库位编码")] public string StoreCode { get; set; } #endregion #region 任务属性 /// /// 任务Id /// [SugarColumn(ColumnName = "task_id", IsNullable = false, ColumnDescription = "任务Id,同一个库位只支持1-7")] public int TaskID { get; set; } = 0; ///真主键 [SugarColumn(ColumnName = "item_no", Length = 128, IsNullable = false, ColumnDescription = "出库单据号")] public string ItemNo { get; set; } = string.Empty; /// /// Guid /// [SugarColumn(ColumnName = "guid", IsNullable = false, ColumnDescription = "Guid 系统那边任务的唯一ID")] public Guid Guid { get; set; } /// /// 任务模式:入库模式 = 1, 出库模式 = 2, 盘点模式 = 3 /// [SugarColumn(ColumnName = "task_mode", IsNullable = false, ColumnDescription = "任务模式:入库模式 = 0, 出库模式 = 1, 盘点模式 = 2")] public TaskModeEnum TaskMode { get; set; } /// /// 出库单据号 /// [SugarColumn(ColumnName = "order_number", Length = 128, IsNullable = false, ColumnDescription = "出库单据号")] public string OrderNumber { get; set; } /// /// 按钮颜色 /// [SugarColumn(ColumnName = "button_color", IsNullable = false, ColumnDescription = "按钮颜色 红色 = 1, 绿色 = 2, 黄色 = 3, 蓝色 = 4, 紫色 = 5, 青色 = 6, 白色 = 7,")] public ButtonColorEnum ButtonColor { get; set; } /// /// 物料编码 /// [SugarColumn(ColumnName = "mat_code", Length = 100, IsNullable = true, ColumnDescription = "物料编号")] public string MatCode { get; set; } /// /// 物料名称 /// [SugarColumn(ColumnName = "mat_name", Length = 150, IsNullable = true, ColumnDescription = "物料名称")] public string MatName { get; set; } /// /// 物料规格 /// [SugarColumn(ColumnName = "mat_spec", Length = 150, IsNullable = true, ColumnDescription = "物料规格")] public string MatSpec { get; set; } /// /// 物料批次 /// [SugarColumn(ColumnName = "mat_batch", Length = 150, IsNullable = true, ColumnDescription = "物料批次")] public string MatBatch { get; set; } /// /// 物料SN 物料唯一码 /// [SugarColumn(ColumnName = "mat_sn", Length = 150, IsNullable = true, ColumnDescription = "物料SN物料唯一码")] public string MatSN { get; set; } /// /// 物料数量 /// [SugarColumn(ColumnName = "qty", IsNullable = false, ColumnDescription = "目标数量")] public int Qty { get; set; } /// /// 创建时间 /// [SugarColumn(ColumnName = "create_time", IsNullable = false, ColumnDescription = "创建时间")] public DateTime CreateTime { get; set; } = DateTime.Now; /// /// 任务是否被挂起 用于入库时取消入库,还没切换库位时 认为任务被挂起 同时只支持一个库位的任务被挂起 /// [SugarColumn(ColumnName = "is_suspended", IsNullable = false, ColumnDescription = "任务是否被挂起 用于入库时取消入库,还没切换库位时 认为任务被挂起")] public bool IsSuspended { get; set; } = false; /// /// 任务是否被取消 /// [SugarColumn(ColumnName = "is_cancel", IsNullable = false, ColumnDescription = "任务是否被取消")] public bool IsCancel { get; set; } = false; /// /// 任务是否已发送至标签 /// [SugarColumn(ColumnName = "is_sended", IsNullable = false, ColumnDescription = "任务是否已发送至标签")] public bool IsSended { get; set; } = false; #endregion } }