| | |
| | | /// <returns></returns> |
| | | public Locale GetBeginMsg() |
| | | { |
| | | var msg = new Locale("MES.WorkAction.PrintLabel.BeginMsg", CurPosition.CurWipSN.SN, Label.LABEL_CODE, Label.LABEL_NAME); |
| | | var msg = new Locale("MES.WorkAction.PrintLabel.BeginMsg", CurPosition.CurSN, Label.LABEL_CODE, Label.LABEL_NAME); |
| | | //var msg = new Locale($"开始打印条码[{CurPosition.CurWipSN.SN}]的标签[{Label.LABEL_CODE}: {Label.LABEL_NAME}]"); |
| | | return msg; |
| | | } |
| | |
| | | var action = new ApiAction<SubmitOutput>(new SubmitOutput()); |
| | | |
| | | //记录行为操作记录 |
| | | var wipAct = new MES_WIP_ACT() |
| | | var wipActs = new List<MES_WIP_ACT>(); |
| | | foreach (var wipSn in CurPosition.CurWipSNs) |
| | | { |
| | | AUTH_ORG = CurPosition.WorkBatch.WO.AUTH_ORG, |
| | | AUTH_PROD = CurPosition.CurLine.LINE_CODE, |
| | | HIS_ID = CurPosition.CurWipSNHis.ID, |
| | | SN = CurPosition.CurWipSN.SN, |
| | | STATUS = CurPosition.CurWipSN.STATUS, |
| | | ITEM_CODE = CurPosition.CurWipSN.ITEM_CODE, |
| | | WORK_ORDER = CurPosition.CurWipSN.WORK_ORDER, |
| | | BATCH_NO = CurPosition.CurWipSN.BATCH_NO, |
| | | ROT_CODE = CurPosition.CurWipSN.ROT_CODE, |
| | | NODE_ID = CurPosition.CurWipSN.NODE_ID, |
| | | NODE_NAME = CurPosition.CurWipSN.NODE_NAME, |
| | | ACT_ID = NodeAct.ID, |
| | | ACT_NAME = NodeAct.ACT_NAME, |
| | | FTY_CODE = CurPosition.CurWipSN.FTY_CODE, |
| | | WS_CODE = CurPosition.CurWipSN.WS_CODE, |
| | | LINE_CODE = CurPosition.CurWipSN.LINE_CODE, |
| | | POST_CODE = CurPosition.CurWipSN.POST_CODE, |
| | | OPER_CODE = CurPosition.CurWipSN.OPER_CODE, |
| | | SEGMENT = CurPosition.CurWipSN.SEGMENT, |
| | | TRAY_SN = CurPosition.CurWipSN.TRAY_SN, |
| | | OPERATION_TIME = DateTime.Now, |
| | | SFTS_CODE = CurPosition.CurWipSN.SFTS_CODE, |
| | | SFT_CODE = CurPosition.CurWipSN.SFT_CODE, |
| | | PRD_CODE = CurPosition.CurWipSN.PRD_CODE, |
| | | ACT_TYPE = NodeAct.ACT_TYPE, |
| | | ACT_SN = CurPosition.CurWipSN.SN, |
| | | ACT_VALUE_1 = Label.LABEL_CODE, |
| | | ACT_VALUE_2 = Label.Variables.ToJson(), |
| | | ACT_RESULT = "Y", |
| | | TRACE_INFO = $"标签{Label.LABEL_NAME}[{Label.LABEL_CODE}]打印成功", |
| | | }; |
| | | var wipAct = new MES_WIP_ACT() |
| | | { |
| | | AUTH_ORG = CurPosition.WorkBatch.WO.AUTH_ORG, |
| | | AUTH_PROD = CurPosition.CurLine.LINE_CODE, |
| | | HIS_ID = CurPosition.CurWipSNHiss.First(q => q.SN == wipSn.SN).ID, |
| | | SN = wipSn.SN, |
| | | STATUS = wipSn.STATUS, |
| | | ITEM_CODE = wipSn.ITEM_CODE, |
| | | WORK_ORDER = wipSn.WORK_ORDER, |
| | | BATCH_NO = wipSn.BATCH_NO, |
| | | ROT_CODE = wipSn.ROT_CODE, |
| | | NODE_ID = wipSn.NODE_ID, |
| | | NODE_NAME = wipSn.NODE_NAME, |
| | | ACT_ID = NodeAct.ID, |
| | | ACT_NAME = NodeAct.ACT_NAME, |
| | | FTY_CODE = wipSn.FTY_CODE, |
| | | WS_CODE = wipSn.WS_CODE, |
| | | LINE_CODE = wipSn.LINE_CODE, |
| | | POST_CODE = wipSn.POST_CODE, |
| | | OPER_CODE = wipSn.OPER_CODE, |
| | | SEGMENT = wipSn.SEGMENT, |
| | | TRAY_SN = wipSn.TRAY_SN, |
| | | OPERATION_TIME = DateTime.Now, |
| | | SFTS_CODE = wipSn.SFTS_CODE, |
| | | SFT_CODE = wipSn.SFT_CODE, |
| | | PRD_CODE = wipSn.PRD_CODE, |
| | | ACT_TYPE = NodeAct.ACT_TYPE, |
| | | ACT_SN = wipSn.SN, |
| | | ACT_VALUE_1 = Label.LABEL_CODE, |
| | | ACT_VALUE_2 = Label.Variables.ToJson(), |
| | | ACT_RESULT = "Y", |
| | | TRACE_INFO = $"标签{Label.LABEL_NAME}[{Label.LABEL_CODE}]打印成功", |
| | | }; |
| | | wipActs.Add(wipAct); |
| | | } |
| | | |
| | | |
| | | //保存数据 |
| | | CurStep.DBSubmitAction = () => |
| | | { |
| | | var db = CurPosition.GetCommitDB(); |
| | | db.Storageable(wipAct, CurPosition.UserCode).ExecuteCommand(); |
| | | db.Storageable(wipActs, CurPosition.UserCode).ExecuteCommand(); |
| | | }; |
| | | |
| | | IsFinished = true; |