| | |
| | | data.PkgLevel = min.PKG_LEVEL; |
| | | data.PrintLable = LabelDic[min.PKG_LEVEL]; |
| | | data.RealPrint = data.PkgLevel != CurPkg.Item.PKG_LEVEL || CurPosition is not YadaPacking || (CurPosition as YadaPacking).IsPrintCustomerLabel; |
| | | //手动结束包装时,如果是RealPrint为false,则返回当前包装信息的入库标签并打印 |
| | | if (IsManually && !data.RealPrint && !CurPkg.InStoreLabel.IsNullOrEmpty()) |
| | | { |
| | | data.RealPrint = true; |
| | | data.PrintLable = CurPkg.InStoreLabel; |
| | | } |
| | | CurCmd = data; |
| | | PrintTimes++; |
| | | CurStep?.SetStatusMessage(StepStatus.Normal, Biz.L("打印标签")); |
| | |
| | | data.PkgLevel = dtl.PKG_LEVEL; |
| | | data.PrintLable = LabelDic[dtl.PKG_LEVEL]; |
| | | data.RealPrint = data.PkgLevel != CurPkg.Item.PKG_LEVEL || CurPosition is not YadaPacking || (CurPosition as YadaPacking).IsPrintCustomerLabel; |
| | | //手动结束包装时,如果是RealPrint为false,则返回当前包装信息的入库标签并打印 |
| | | if (IsManually && !data.RealPrint && !CurPkg.InStoreLabel.IsNullOrEmpty()) |
| | | { |
| | | data.RealPrint = true; |
| | | data.PrintLable = CurPkg.InStoreLabel; |
| | | } |
| | | CurCmd = data; |
| | | PrintTimes++; |
| | | CurStep?.SetStatusMessage(StepStatus.Normal, Biz.L("打印标签")); |
| | |
| | | data.PkgLevel = dtl.PKG_LEVEL; |
| | | data.PrintLable = LabelDic[dtl.PKG_LEVEL]; |
| | | data.RealPrint = data.PkgLevel != CurPkg.Item.PKG_LEVEL || CurPosition is not YadaPacking || (CurPosition as YadaPacking).IsPrintCustomerLabel; |
| | | //手动结束包装时,如果是RealPrint为false,则返回当前包装信息的入库标签并打印 |
| | | if (IsManually && !data.RealPrint && !CurPkg.InStoreLabel.IsNullOrEmpty()) |
| | | { |
| | | data.RealPrint = true; |
| | | data.PrintLable = CurPkg.InStoreLabel; |
| | | } |
| | | CurCmd = data; |
| | | PrintTimes++; |
| | | CurStep?.SetStatusMessage(StepStatus.Normal, Biz.L("打印标签")); |
| | |
| | | data.PkgLevel = dtl.PKG_LEVEL; |
| | | data.PrintLable = LabelDic[dtl.PKG_LEVEL]; |
| | | data.RealPrint = data.PkgLevel != CurPkg.Item.PKG_LEVEL || CurPosition is not YadaPacking || (CurPosition as YadaPacking).IsPrintCustomerLabel; |
| | | //手动结束包装时,如果是RealPrint为false,则返回当前包装信息的入库标签并打印 |
| | | if (IsManually && !data.RealPrint && !CurPkg.InStoreLabel.IsNullOrEmpty()) |
| | | { |
| | | data.RealPrint = true; |
| | | data.PrintLable = CurPkg.InStoreLabel; |
| | | } |
| | | CurCmd = data; |
| | | PrintTimes++; |
| | | CurStep?.SetStatusMessage(StepStatus.Normal, Biz.L("打印标签")); |
| | |
| | | if (CurPkg.IsFinished) |
| | | { |
| | | var _pkgList = CurPosition.GetPackageList(CurPkg.Item).Clone(); |
| | | var _lastWipID = CurPosition.LastWipSNs?.FirstOrDefault()?.ID; |
| | | |
| | | //最外层包装已经完成包装,则把工序中暂存标记设为false,统一提交包装内产品的过站记录 |
| | | CurPosition.NeedTemporaryStoreDBCommitAction = false; |
| | |
| | | .SetColumns(q => q.CARTON_SN == CurPkg.Item.Package.SN) |
| | | .Where(q => q.WORK_ORDER == wo && q.NODE_ID == nodeID && q.ACT_ID == actID && wipIDs.Contains(q.WIP_ID)) |
| | | .ExecuteCommand(); |
| | | db.Updateable<MES_WIP_ACT>() |
| | | .SetColumns(q => q.ACT_VALUE_1 == (CurPkg.IsFinished ? "Y" : "N")) |
| | | .SetColumns(q => q.ACT_VALUE_2 == CurPkg.ToJson()) |
| | | .SetColumns(q => q.ACT_VALUE_3 == (CurPkg.IsFinished ? LabelDic[CurPkg.Item.PKG_LEVEL].ToJson() : "")) |
| | | .Where(q => q.WORK_ORDER == wo && q.NODE_ID == nodeID && q.ACT_ID == actID && q.WIP_ID == _lastWipID) |
| | | .ExecuteCommand(); |
| | | //包装信息保存到工单条码明细表 |
| | | db.Updateable<BIZ_MES_WO_SN>() |
| | | .SetColumns(q => q.TRAY_SN == CurPkg.Item.Package.SN) |
| | |
| | | } |
| | | }); |
| | | //如果当前条码已经完工,检查当前工单批次和工单是否完工 |
| | | if (CurPkg.IsReachedEndNode) |
| | | //if (CurPkg.IsReachedEndNode) |
| | | { |
| | | CurPosition.WorkBatch.CheckIsComplete(CurPosition.UserCode); |
| | | } |