using SqlSugar; using System; using System.ComponentModel; using System.Runtime.Serialization; namespace WCS.Entity { /// /// AGV任务中间表 /// [SugarTable(nameof(WCS_AgvTaskInfo) + "_{year}{month}{day}", "AGV任务中间表")] [SplitTable(SplitType.Week)]//按年分表 (自带分表支持 年、季、月、周、日) [DataContract] public class WCS_AgvTaskInfo { // // 摘要: // ID [SugarColumn(IsPrimaryKey = true, ColumnDescription = "ID")] [DataMember(Order = 0)] public int ID { get; set; } // // 摘要: // AGVID [SugarColumn(ColumnDescription = "AGVID", Length = 50, IsNullable = true)] [DataMember(Order = 1)] public string AgvID { get; set; } // // 摘要: // 任务类型 [SugarColumn(ColumnDescription = "任务类型")] [DataMember(Order = 2)] public AGVTaskType TaskType { get; set; } // // 摘要: // WCS AGV任务状态 [SugarColumn(ColumnDescription = "WCS AGV任务状态")] [DataMember(Order = 3)] public AGVTaskStatus Status { get; set; } // // 摘要: // AGV自身状态 [SugarColumn(ColumnDescription = "AGV自身状态")] [DataMember(Order = 4)] public AGVTaskStatus AgvStatus { get; set; } // // 摘要: // 车间 [SugarColumn(ColumnDescription = "车间")] [DataMember(Order = 5)] public int WorkShop { get; set; } // // 摘要: // 站台 [SugarColumn(ColumnDescription = "站台", Length = 20, IsNullable = true)] [DataMember(Order = 6)] public string Station { get; set; } // // 摘要: // 位置 [SugarColumn(ColumnDescription = "位置", Length = 20, IsNullable = true)] [DataMember(Order = 7)] public string Position { get; set; } // // 摘要: // 货物数量(1.两个位置放1个货物,2.两个位置放2个货物) [SugarColumn(ColumnDescription = "货物数量(1.两个位置放1个货物,2.两个位置放2个货物)")] [DataMember(Order = 11)] public int GoodsSum { get; set; } // // 摘要: // 创建用户 仅记录用户ID [SugarColumn(ColumnDescription = "创建用户", Length = 50)] public string AddWho { get; set; } // // 摘要: // 创建时间 [SugarColumn(ColumnDescription = "创建时间", InsertServerTime = true)] public DateTime AddTime { get; set; } // // 摘要: // AGV更新时间 [SugarColumn(ColumnDescription = "AGV更新时间", UpdateServerTime = true, IsNullable = true)] [DataMember(Order = 10)] public DateTime AgvUpdateTime { get; set; } // // 摘要: // 更新用户 仅记录用户ID [SugarColumn(ColumnDescription = "更新用户", Length = 50, IsNullable = true)] public string EditWho { get; set; } // // 摘要: // 更新时间 [SugarColumn(ColumnDescription = "更新时间", IsNullable = true, UpdateServerTime = true)] public DateTime EditTime { get; set; } } /// /// AGV任务状态 /// public enum AGVTaskStatus { // // 摘要: // 新建 [Description("新建")] NewBuild = 0, // // 摘要: // 确认 [Description("确认")] Confirm = 5, // // 摘要: // 执行 [Description("执行")] Execution = 10, // // 摘要: // 走出储位 ExitStorage = 11, // // 摘要: // 走入储位 WalkIntoStorage = 12, // // 摘要: // 巷道/工位分配申请 [Description("巷道/工位分配申请")] RequestOrPermission1 = 20, // // 摘要: // 完成巷道/工位分配申请 [Description("完成巷道/工位分配申请")] Complete1 = 21, // // 摘要: // 取放站台前安全交互申请 [Description("取放站台前安全交互申请")] RequestOrPermission2 = 30, // // 摘要: // 完成取放站台前安全交互申请 [Description("完成取放站台前安全交互申请")] Complete2 = 0x1F, // // 摘要: // 小车离开取货位 [Description("小车离开取货位")] Complete3 = 0x20, // // 摘要: // 任务完成 [Description("任务完成")] MissionCompleted = 99, // // 摘要: // 完成扫码 [Description("完成扫码")] CompleteScanCode = 100, // // 摘要: // 取消 [Description("取消")] Cancel = 106 } /// /// AGV任务类型 /// public enum AGVTaskType { /// /// 入库 /// [Description("入库")] EnterDepot = 1, /// /// 叫料 /// [Description("叫料")] CallForMaterial = 2 } }