| | |
| | | |
| | | namespace Tiger.Model |
| | | { |
| | | /// <summary> |
| | | /// 实体:生产过程记录 |
| | | /// </summary> |
| | | [Description("Primary:ID")] |
| | | [DisplayName("生产过程记录")] |
| | | [Serializable] |
| | | [SugarTable("MES_WIP_HIS")] |
| | | public class MES_WIP_HIS : DbEntityWithAuth |
| | | { |
| | | #region 构造函数 |
| | | /// <summary> |
| | | /// 实体:生产过程记录 |
| | | /// </summary> |
| | | public MES_WIP_HIS() {} |
| | | /// <summary> |
| | | /// 实体:生产过程记录 |
| | | /// </summary> |
| | | [Description("Primary:ID")] |
| | | [DisplayName("生产过程记录")] |
| | | [Serializable] |
| | | [SugarTable("MES_WIP_HIS")] |
| | | public class MES_WIP_HIS : DbEntityWithAuth |
| | | { |
| | | #region 构造函数 |
| | | /// <summary> |
| | | /// 实体:生产过程记录 |
| | | /// </summary> |
| | | public MES_WIP_HIS() { } |
| | | |
| | | /// <summary> |
| | | /// 实体:库存历史 |
| | | /// 实体:生产过程记录 |
| | | /// </summary> |
| | | /// <param name="data">历史的来源Item</param> |
| | | /// <param name="traceInfo">追溯信息</param> |
| | | public MES_WIP_HIS(MES_WIP_DATA data, string traceInfo) |
| | | { |
| | | ID = Guid.NewGuid().ToString("N"); |
| | | ID = Guid.NewGuid().ToString("N"); |
| | | CREATE_USER = data.CREATE_USER; |
| | | UPDATE_USER = data.UPDATE_USER; |
| | | AUTH_ORG = data.AUTH_ORG; |
| | | AUTH_PROD = data.AUTH_PROD; |
| | | AUTH_WH = data.AUTH_WH; |
| | | WIP_ID = data.ID; |
| | | SN = data.SN; |
| | | STATUS = data.STATUS; |
| | | ITEM_CODE = data.ITEM_CODE; |
| | | QTY = data.QTY; |
| | | WORK_ORDER = data.WORK_ORDER; |
| | | BATCH_NO = data.BATCH_NO; |
| | | ROT_CODE = data.ROT_CODE; |
| | |
| | | DFT_FLAG = data.DFT_FLAG; |
| | | DFT_COUNT = data.DFT_COUNT; |
| | | DFT_CODE = data.DFT_CODE; |
| | | REFLOW_NODE = data.REFLOW_NODE; |
| | | REFLOW_NODE = data.REFLOW_NODE; |
| | | FLOW_SN = data.FLOW_SN; |
| | | TRAY_SN = data.TRAY_SN; |
| | | CONTAINER_SN = data.CONTAINER_SN; |
| | | INNER_SN = data.INNER_SN; |
| | | CARTON_SN = data.CARTON_SN; |
| | | PALLET_SN = data.PALLET_SN; |
| | | INV_FLAG = data.INV_FLAG; |
| | |
| | | |
| | | #region 公共属性 |
| | | /// <summary> |
| | | /// 在制品ID |
| | | /// </summary> |
| | | [DisplayName("在制品ID")] |
| | | public string WIP_ID { get; set; } |
| | | /// <summary> |
| | | /// 过站条码 |
| | | /// </summary> |
| | | [DisplayName("过站条码")] |
| | | public string SN { get; set; } |
| | | /// <summary> |
| | | /// 状态(0Init初始化|1Input已投入|2OK良品过站|3NG不良过站|4Repair维修中|5Finished已完工|6Scrap已报废|7InStorage已入库|8Reject已拒收|9Shipped已出货) |
| | | /// </summary> |
| | | [DisplayName("状态(0Init初始化|1Input已投入|2OK良品过站|3NG不良过站|4Repair维修中|5Finished已完工|6Scrap已报废|7InStorage已入库|8Reject已拒收|9Shipped已出货)")] |
| | | public int STATUS { get; set; } |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | [DisplayName("物料编码")] |
| | | public string ITEM_CODE { get; set; } |
| | | /// <summary> |
| | | /// 工单号 |
| | | /// </summary> |
| | | [DisplayName("工单号")] |
| | | public string WORK_ORDER { get; set; } |
| | | /// <summary> |
| | | /// 工单批次号 |
| | | /// </summary> |
| | | [DisplayName("工单批次号")] |
| | | public string BATCH_NO { get; set; } |
| | | /// <summary> |
| | | /// 工艺路线编码 |
| | | /// </summary> |
| | | [DisplayName("工艺路线编码")] |
| | | public string ROT_CODE { get; set; } |
| | | /// <summary> |
| | | /// 工艺路线节点ID |
| | | /// </summary> |
| | | [DisplayName("工艺路线节点ID")] |
| | | public string NODE_ID { get; set; } |
| | | /// <summary> |
| | | /// 工艺路线节点名称 |
| | | /// </summary> |
| | | [DisplayName("工艺路线节点名称")] |
| | | public string NODE_NAME { get; set; } |
| | | /// <summary> |
| | | /// 工厂编码 |
| | | /// </summary> |
| | | [DisplayName("工厂编码")] |
| | | public string FTY_CODE { get; set; } |
| | | /// <summary> |
| | | /// 车间编码 |
| | | /// </summary> |
| | | [DisplayName("车间编码")] |
| | | public string WS_CODE { get; set; } |
| | | /// <summary> |
| | | /// 产线编码 |
| | | /// </summary> |
| | | [DisplayName("产线编码")] |
| | | public string LINE_CODE { get; set; } |
| | | /// <summary> |
| | | /// 岗位编码 |
| | | /// </summary> |
| | | [DisplayName("岗位编码")] |
| | | public string POST_CODE { get; set; } |
| | | /// <summary> |
| | | /// 工序编码 |
| | | /// </summary> |
| | | [DisplayName("工序编码")] |
| | | public string OPER_CODE { get; set; } |
| | | /// <summary> |
| | | /// 加工段 |
| | | /// </summary> |
| | | [DisplayName("加工段")] |
| | | public string SEGMENT { get; set; } |
| | | /// <summary> |
| | | /// 锁定标记 |
| | | /// </summary> |
| | | [DisplayName("锁定标记")] |
| | | public string HOLD_FLAG { get; set; } |
| | | /// <summary> |
| | | /// 返工标记 |
| | | /// </summary> |
| | | [DisplayName("返工标记")] |
| | | public string REWORK_FLAG { get; set; } |
| | | /// <summary> |
| | | /// 是否完工 |
| | | /// </summary> |
| | | [DisplayName("是否完工")] |
| | | public string FINISHED_FLAG { get; set; } |
| | | /// <summary> |
| | | /// 是否不良 |
| | | /// </summary> |
| | | [DisplayName("是否不良")] |
| | | public string DFT_FLAG { get; set; } |
| | | /// <summary> |
| | | /// 不良计数 |
| | | /// </summary> |
| | | [DisplayName("不良计数")] |
| | | public int DFT_COUNT { get; set; } |
| | | /// <summary> |
| | | /// 不良代码编码 |
| | | /// </summary> |
| | | [DisplayName("不良代码编码")] |
| | | public string DFT_CODE { get; set; } |
| | | public string SN { get; set; } |
| | | /// <summary> |
| | | /// 状态(0Init初始化|1Input已投入|2OK良品过站|3NG不良过站|4Repair维修中|5Finished已完工|6Scrap已报废|7InStorage已入库|8Reject已拒收|9Shipped已出货) |
| | | /// </summary> |
| | | [DisplayName("状态(0Init初始化|1Input已投入|2OK良品过站|3NG不良过站|4Repair维修中|5Finished已完工|6Scrap已报废|7InStorage已入库|8Reject已拒收|9Shipped已出货)")] |
| | | public int STATUS { get; set; } |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | [DisplayName("物料编码")] |
| | | public string ITEM_CODE { get; set; } |
| | | /// <summary> |
| | | /// 数量 |
| | | /// </summary> |
| | | [DisplayName("数量")] |
| | | public double QTY { get; set; } = 1; |
| | | /// <summary> |
| | | /// 工单号 |
| | | /// </summary> |
| | | [DisplayName("工单号")] |
| | | public string WORK_ORDER { get; set; } |
| | | /// <summary> |
| | | /// 工单批次号 |
| | | /// </summary> |
| | | [DisplayName("工单批次号")] |
| | | public string BATCH_NO { get; set; } |
| | | /// <summary> |
| | | /// 工艺路线编码 |
| | | /// </summary> |
| | | [DisplayName("工艺路线编码")] |
| | | public string ROT_CODE { get; set; } |
| | | /// <summary> |
| | | /// 工艺路线节点ID |
| | | /// </summary> |
| | | [DisplayName("工艺路线节点ID")] |
| | | public string NODE_ID { get; set; } |
| | | /// <summary> |
| | | /// 工艺路线节点名称 |
| | | /// </summary> |
| | | [DisplayName("工艺路线节点名称")] |
| | | public string NODE_NAME { get; set; } |
| | | /// <summary> |
| | | /// 工厂编码 |
| | | /// </summary> |
| | | [DisplayName("工厂编码")] |
| | | public string FTY_CODE { get; set; } |
| | | /// <summary> |
| | | /// 车间编码 |
| | | /// </summary> |
| | | [DisplayName("车间编码")] |
| | | public string WS_CODE { get; set; } |
| | | /// <summary> |
| | | /// 产线编码 |
| | | /// </summary> |
| | | [DisplayName("产线编码")] |
| | | public string LINE_CODE { get; set; } |
| | | /// <summary> |
| | | /// 岗位编码 |
| | | /// </summary> |
| | | [DisplayName("岗位编码")] |
| | | public string POST_CODE { get; set; } |
| | | /// <summary> |
| | | /// 工序编码 |
| | | /// </summary> |
| | | [DisplayName("工序编码")] |
| | | public string OPER_CODE { get; set; } |
| | | /// <summary> |
| | | /// 加工段 |
| | | /// </summary> |
| | | [DisplayName("加工段")] |
| | | public string SEGMENT { get; set; } |
| | | /// <summary> |
| | | /// 锁定标记 |
| | | /// </summary> |
| | | [DisplayName("锁定标记")] |
| | | public string HOLD_FLAG { get; set; } |
| | | /// <summary> |
| | | /// 返工标记 |
| | | /// </summary> |
| | | [DisplayName("返工标记")] |
| | | public string REWORK_FLAG { get; set; } |
| | | /// <summary> |
| | | /// 是否完工 |
| | | /// </summary> |
| | | [DisplayName("是否完工")] |
| | | public string FINISHED_FLAG { get; set; } |
| | | /// <summary> |
| | | /// 是否不良 |
| | | /// </summary> |
| | | [DisplayName("是否不良")] |
| | | public string DFT_FLAG { get; set; } |
| | | /// <summary> |
| | | /// 不良计数 |
| | | /// </summary> |
| | | [DisplayName("不良计数")] |
| | | public int DFT_COUNT { get; set; } |
| | | /// <summary> |
| | | /// 不良代码编码 |
| | | /// </summary> |
| | | [DisplayName("不良代码编码")] |
| | | public string DFT_CODE { get; set; } |
| | | /// <summary> |
| | | /// 维修回流工序名称(为空则不指定回流工序) |
| | | /// </summary> |
| | | [DisplayName("维修回流工序名称(为空则不指定回流工序)")] |
| | | public string REFLOW_NODE { get; set; } |
| | | /// <summary> |
| | | /// 厂内流转条码 |
| | | /// </summary> |
| | | [DisplayName("厂内流转条码")] |
| | | public string FLOW_SN { get; set; } |
| | | /// <summary> |
| | | /// 托盘/载具条码 |
| | | /// </summary> |
| | | [DisplayName("托盘/载具条码")] |
| | | public string TRAY_SN { get; set; } |
| | | /// <summary> |
| | | /// 容器/内包装条码 |
| | | /// </summary> |
| | | [DisplayName("容器/内包装条码")] |
| | | public string CONTAINER_SN { get; set; } |
| | | /// <summary> |
| | | /// 外箱条码 |
| | | /// </summary> |
| | | [DisplayName("外箱条码")] |
| | | public string CARTON_SN { get; set; } |
| | | /// <summary> |
| | | /// 栈板条码 |
| | | /// </summary> |
| | | [DisplayName("栈板条码")] |
| | | public string PALLET_SN { get; set; } |
| | | /// <summary> |
| | | /// 是否入库 |
| | | /// </summary> |
| | | [DisplayName("是否入库")] |
| | | public string INV_FLAG { get; set; } |
| | | /// <summary> |
| | | /// 入库日期 |
| | | /// </summary> |
| | | [DisplayName("入库日期")] |
| | | public DateTime INV_DATE { get; set; } = DateTime.MinValue; |
| | | /// <summary> |
| | | /// 投入时间 |
| | | /// </summary> |
| | | [DisplayName("投入时间")] |
| | | public DateTime INLINE_DATE { get; set; } = DateTime.MinValue; |
| | | /// <summary> |
| | | /// 产出时间 |
| | | /// </summary> |
| | | [DisplayName("产出时间")] |
| | | public DateTime OUTLINE_DATE { get; set; } = DateTime.MinValue; |
| | | /// <summary> |
| | | /// 当前操作时间 |
| | | /// </summary> |
| | | [DisplayName("当前操作时间")] |
| | | public DateTime OPERATION_TIME { get; set; } = DateTime.MinValue; |
| | | /// <summary> |
| | | /// 班制编码 |
| | | /// </summary> |
| | | [DisplayName("班制编码")] |
| | | public string SFTS_CODE { get; set; } |
| | | /// <summary> |
| | | /// 班次编码 |
| | | /// </summary> |
| | | [DisplayName("班次编码")] |
| | | public string SFT_CODE { get; set; } |
| | | /// <summary> |
| | | /// 时段编码 |
| | | /// </summary> |
| | | [DisplayName("时段编码")] |
| | | public string PRD_CODE { get; set; } |
| | | /// <summary> |
| | | /// 抽检状态(0Unsampled未抽检|1NoSampling不抽检|2WaitCheck待检验|3Checking检验中|4Completed检验完|5Locked已锁定) |
| | | /// </summary> |
| | | [DisplayName("抽检状态(0Unsampled未抽检|1NoSampling不抽检|2WaitCheck待检验|3Checking检验中|4Completed检验完|5Locked已锁定)")] |
| | | public int OBA_STATUS { get; set; } |
| | | /// <summary> |
| | | /// 抽检批次号 |
| | | /// </summary> |
| | | [DisplayName("抽检批次号")] |
| | | public string OBA_BATCH { get; set; } |
| | | /// <summary> |
| | | /// 锁定批次号 |
| | | /// </summary> |
| | | [DisplayName("锁定批次号")] |
| | | public string LOCK_BATCH { get; set; } |
| | | /// <summary> |
| | | /// 出货时间 |
| | | /// </summary> |
| | | [DisplayName("出货时间")] |
| | | public DateTime SHIPPING_DATE { get; set; } = DateTime.MinValue; |
| | | /// <summary> |
| | | /// 出货单号 |
| | | /// </summary> |
| | | [DisplayName("出货单号")] |
| | | public string SHIPPING_ORDER { get; set; } |
| | | /// <summary> |
| | | /// 备注 |
| | | /// </summary> |
| | | [DisplayName("备注")] |
| | | public string REMARK { get; set; } |
| | | /// <summary> |
| | | /// 追溯信息 |
| | | /// </summary> |
| | | [DisplayName("追溯信息")] |
| | | public string TRACE_INFO { get; set; } |
| | | #endregion |
| | | public string TRAY_SN { get; set; } |
| | | /// <summary> |
| | | /// 内包装条码 |
| | | /// </summary> |
| | | [DisplayName("内包装条码")] |
| | | public string INNER_SN { get; set; } |
| | | /// <summary> |
| | | /// 外箱条码 |
| | | /// </summary> |
| | | [DisplayName("外箱条码")] |
| | | public string CARTON_SN { get; set; } |
| | | /// <summary> |
| | | /// 栈板条码 |
| | | /// </summary> |
| | | [DisplayName("栈板条码")] |
| | | public string PALLET_SN { get; set; } |
| | | /// <summary> |
| | | /// 是否入库 |
| | | /// </summary> |
| | | [DisplayName("是否入库")] |
| | | public string INV_FLAG { get; set; } |
| | | /// <summary> |
| | | /// 入库日期 |
| | | /// </summary> |
| | | [DisplayName("入库日期")] |
| | | public DateTime INV_DATE { get; set; } = DateTime.MinValue; |
| | | /// <summary> |
| | | /// 投入时间 |
| | | /// </summary> |
| | | [DisplayName("投入时间")] |
| | | public DateTime INLINE_DATE { get; set; } = DateTime.MinValue; |
| | | /// <summary> |
| | | /// 产出时间 |
| | | /// </summary> |
| | | [DisplayName("产出时间")] |
| | | public DateTime OUTLINE_DATE { get; set; } = DateTime.MinValue; |
| | | /// <summary> |
| | | /// 当前操作时间 |
| | | /// </summary> |
| | | [DisplayName("当前操作时间")] |
| | | public DateTime OPERATION_TIME { get; set; } = DateTime.MinValue; |
| | | /// <summary> |
| | | /// 班制编码 |
| | | /// </summary> |
| | | [DisplayName("班制编码")] |
| | | public string SFTS_CODE { get; set; } |
| | | /// <summary> |
| | | /// 班次编码 |
| | | /// </summary> |
| | | [DisplayName("班次编码")] |
| | | public string SFT_CODE { get; set; } |
| | | /// <summary> |
| | | /// 时段编码 |
| | | /// </summary> |
| | | [DisplayName("时段编码")] |
| | | public string PRD_CODE { get; set; } |
| | | /// <summary> |
| | | /// 抽检状态(0Unsampled未抽检|1NoSampling不抽检|2WaitCheck待检验|3Checking检验中|4Completed检验完|5Locked已锁定) |
| | | /// </summary> |
| | | [DisplayName("抽检状态(0Unsampled未抽检|1NoSampling不抽检|2WaitCheck待检验|3Checking检验中|4Completed检验完|5Locked已锁定)")] |
| | | public int OBA_STATUS { get; set; } |
| | | /// <summary> |
| | | /// 抽检批次号 |
| | | /// </summary> |
| | | [DisplayName("抽检批次号")] |
| | | public string OBA_BATCH { get; set; } |
| | | /// <summary> |
| | | /// 锁定批次号 |
| | | /// </summary> |
| | | [DisplayName("锁定批次号")] |
| | | public string LOCK_BATCH { get; set; } |
| | | /// <summary> |
| | | /// 出货时间 |
| | | /// </summary> |
| | | [DisplayName("出货时间")] |
| | | public DateTime SHIPPING_DATE { get; set; } = DateTime.MinValue; |
| | | /// <summary> |
| | | /// 出货单号 |
| | | /// </summary> |
| | | [DisplayName("出货单号")] |
| | | public string SHIPPING_ORDER { get; set; } |
| | | /// <summary> |
| | | /// 备注 |
| | | /// </summary> |
| | | [DisplayName("备注")] |
| | | public string REMARK { get; set; } |
| | | /// <summary> |
| | | /// 追溯信息 |
| | | /// </summary> |
| | | [DisplayName("追溯信息")] |
| | | public string TRACE_INFO { get; set; } |
| | | #endregion |
| | | |
| | | #region 虚拟属性 |
| | | /*例子 |
| | | #region 虚拟属性 |
| | | /*例子 |
| | | [SugarColumn(IsIgnore = true)] |
| | | public string FieldName { get; set; } |
| | | */ |
| | | /// <summary> |
| | | /// 是否已经良品过站 |
| | | /// </summary> |
| | | [SugarColumn(IsIgnore = true)] |
| | | public bool IsFinished => DFT_FLAG == "Y"; |
| | | /// <summary> |
| | | /// 是否已经良品过站 |
| | | /// </summary> |
| | | [SugarColumn(IsIgnore = true)] |
| | | public bool IsFinished => DFT_FLAG != "Y"; |
| | | #endregion |
| | | |
| | | #region 外键属性 |
| | |
| | | /// 枚举:状态(0Init初始化|1Input已投入|2OK良品过站|3NG不良过站|4Repair维修中|5Finished已完工|6Scrap已报废|7InStorage已入库|8Reject已拒收|9Shipped已出货) |
| | | /// </summary> |
| | | public enum STATUSs |
| | | { |
| | | [Description("初始化")] |
| | | Init = 0, |
| | | [Description("已投入")] |
| | | Input = 1, |
| | | [Description("良品过站")] |
| | | OK = 2, |
| | | [Description("不良过站")] |
| | | NG = 3, |
| | | [Description("维修中")] |
| | | Repair = 4, |
| | | [Description("已完工")] |
| | | Finished = 5, |
| | | [Description("已报废")] |
| | | Scrap = 6, |
| | | [Description("已入库")] |
| | | InStorage = 7, |
| | | [Description("已拒收")] |
| | | Reject = 8, |
| | | [Description("已出货")] |
| | | Shipped = 9, |
| | | } |
| | | { |
| | | [Description("初始化")] |
| | | Init = 0, |
| | | [Description("已投入")] |
| | | Input = 1, |
| | | [Description("良品过站")] |
| | | OK = 2, |
| | | [Description("不良过站")] |
| | | NG = 3, |
| | | [Description("维修中")] |
| | | Repair = 4, |
| | | [Description("已完工")] |
| | | Finished = 5, |
| | | [Description("已报废")] |
| | | Scrap = 6, |
| | | [Description("已入库")] |
| | | InStorage = 7, |
| | | [Description("已拒收")] |
| | | Reject = 8, |
| | | [Description("已出货")] |
| | | Shipped = 9, |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 枚举:抽检状态(0Unsampled未抽检|1NoSampling不抽检|2WaitCheck待检验|3Checking检验中|4Completed检验完|5Locked已锁定) |
| | | /// </summary> |
| | | public enum OBA_STATUSs |
| | | { |
| | | [Description("未抽检")] |
| | | Unsampled = 0, |
| | | [Description("不抽检")] |
| | | NoSampling = 1, |
| | | [Description("待检验")] |
| | | WaitCheck = 2, |
| | | [Description("检验中")] |
| | | Checking = 3, |
| | | [Description("检验完")] |
| | | Completed = 4, |
| | | [Description("已锁定")] |
| | | Locked = 5, |
| | | } |
| | | #endregion |
| | | /// <summary> |
| | | /// 枚举:抽检状态(0Unsampled未抽检|1NoSampling不抽检|2WaitCheck待检验|3Checking检验中|4Completed检验完|5Locked已锁定) |
| | | /// </summary> |
| | | public enum OBA_STATUSs |
| | | { |
| | | [Description("未抽检")] |
| | | Unsampled = 0, |
| | | [Description("不抽检")] |
| | | NoSampling = 1, |
| | | [Description("待检验")] |
| | | WaitCheck = 2, |
| | | [Description("检验中")] |
| | | Checking = 3, |
| | | [Description("检验完")] |
| | | Completed = 4, |
| | | [Description("已锁定")] |
| | | Locked = 5, |
| | | } |
| | | #endregion |
| | | |
| | | #region 公共方法 |
| | | #region 公共方法 |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | }//endClass |
| | | }//endClass |
| | | } |