| | |
| | | { |
| | | action.Data.ShortMsg = new("工序异常", ShortMessage.Types.Error); |
| | | action.Data.OperInfo = CurOperInfo(input.Locale); |
| | | RemoveCurSnFromCurPackage(Context.ContainsKey("CurPackage") ? (Context["CurPackage"] as WipPkg).Item : null); |
| | | ResetNode(); |
| | | //action.CatchExceptionWithLog(ex, $"包装工序:提交操作数据异常"); |
| | | action.CatchExceptionWithLog(ex, Biz.L("MES.Transaction.PackingNode.SubmitException")); |
| | | } |
| | |
| | | FLOW_SN = input.SN, |
| | | STATUS = MES_WIP_DATA.STATUSs.Init.GetValue(), |
| | | ITEM_CODE = CurBatch.WO.ITEM_CODE, |
| | | QTY = 1, |
| | | WORK_ORDER = CurBatch.Batch.ORDER_NO, |
| | | BATCH_NO = CurBatch.Batch.BATCH_NO, |
| | | FTY_CODE = CurFactory.FTY_CODE, |
| | |
| | | FLOW_SN = wipSN.SN, |
| | | TRAY_SN = wipSN.TRAY_SN, |
| | | STATUS = BIZ_MES_WO_SN.STATUSs.NotInput.GetValue(), |
| | | QTY = 1, |
| | | }); |
| | | } |
| | | } |
| | |
| | | catch (Exception ex) |
| | | { |
| | | action.Data.ShortMsg = new("工步异常", ShortMessage.Types.Error); |
| | | RemoveCurSnFromCurPackage(Context.ContainsKey("CurPackage") ? (Context["CurPackage"] as WipPkg).Item : null); |
| | | ResetNode(); |
| | | //action.CatchExceptionWithLog(ex, $"{curNode.NODE_NAME}:工序节点工步提交数据异常,请检查工序节点设置"); |
| | | action.CatchExceptionWithLog(ex, Biz.L("MES.Transaction.PackingNode.NodeSubmitException", curNode.NODE_NAME)); |
| | |
| | | NodeCmd = null; |
| | | } |
| | | |
| | | public void RemoveCurSnFromCurPackage(WipPkgItem pkgItem) |
| | | { |
| | | if (!pkgItem.IsNullOrEmpty()) |
| | | { |
| | | var delItem = pkgItem.Items.Where(q => CurWipSNs.Any(sn => q.WipSNs.ContainsKey(sn.ID))).ToList(); |
| | | if (delItem.Any()) |
| | | { |
| | | pkgItem.Items.RemoveAll(q => CurWipSNs.Any(sn => q.WipSNs.ContainsKey(sn.ID))); |
| | | pkgItem.IsFinished = false; |
| | | } |
| | | else |
| | | { |
| | | foreach (var item in pkgItem.Items) |
| | | { |
| | | RemoveCurSnFromCurPackage(item); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public override bool Close(bool needSaveHistoryLog = false) |
| | | { |
| | | //needSaveHistoryLog = true; |