| | |
| | | using Rhea.Common; |
| | | using Microsoft.CodeAnalysis.Differencing; |
| | | using Rhea.Common; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | CurCmd = null; |
| | | PrintTimes = 0; |
| | | action = SavePkgData(input, action); |
| | | if (action.IsSuccessed) |
| | | { |
| | | CurStep?.SetStatusMessage(StepStatus.Success, Biz.L("扫描成功")); |
| | | action.Data.ShortMsg = new("扫描成功", ShortMessage.Types.Success); |
| | | } |
| | | //if (action.IsSuccessed) |
| | | //{ |
| | | // CurStep?.SetStatusMessage(StepStatus.Success, Biz.L("扫描成功")); |
| | | // action.Data.ShortMsg = new("扫描成功", ShortMessage.Types.Success); |
| | | //} |
| | | } |
| | | break; |
| | | //Print:打印,打印当前包装层级的标签 |
| | |
| | | else |
| | | { |
| | | var _pkgList = CurPkg.IsFinished ? GetPackageList(CurPkg.Item) : new(); |
| | | |
| | | //最外层包装已经完成包装,则把工序中暂存标记设为false,统一提交包装内产品的过站记录 |
| | | CurPosition.NeedTemporaryStoreDBCommitAction = false; |
| | | //保存数据 |
| | | var db = Biz.Db; |
| | | var dbTran = db.UseTran(() => |
| | | CurPosition.SaveStepsCommitActionToDB(() => |
| | | { |
| | | var db = CurPosition.GetCommitDB(); |
| | | if (_pkgList.Any()) |
| | | { |
| | | db.Storageable(_pkgList, CurPosition.UserCode).ExecuteCommand(); |
| | |
| | | } |
| | | } |
| | | }); |
| | | if (!dbTran.IsSuccess) |
| | | { |
| | | //抛出异常 |
| | | throw dbTran.ErrorException; |
| | | } |
| | | } |
| | | |
| | | if (CurPkg.IsFinished) |