服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-08-06 c598e4bf57de2b4703d6c0e4d0905c9159273d26
条码增加托盘批量过站逻辑和包装外箱过站逻辑
已修改19个文件
1291 ■■■■■ 文件已修改
Tiger.Api/Language.db 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/Transaction/CollectNode.cs 186 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/Transaction/PackingNode.cs 219 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/Transaction/Position.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/Transaction/TestNode.cs 186 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/WorkAction/Assembly.cs 153 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/WorkAction/IPQC.cs 77 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/WorkAction/PackingAction.cs 150 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/WorkAction/PrintLabel.cs 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/WorkAction/WipExtInfo.cs 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business/MES/Biz.WorkBatch.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.IBusiness/MES/Transaction/IPosition.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Model.Net/Entitys/MES/BIZ_MES_WO_SN.cs 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Model.Net/Entitys/SYS/V_USER_MENU.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Model.Net/Entitys/SYS/V_USER_ORG.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Model.Net/Entitys/SYS/V_USER_PROD.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Model.Net/Entitys/SYS/V_USER_WH.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Model.Net/Entitys/WMS/V_SRM_ITEM.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Api/Language.db
Binary files differ
Tiger.Business.MES/Transaction/CollectNode.cs
@@ -52,25 +52,25 @@
                    //当前岗位在当前工单不是首站,则查找条码已绑定的工单当作当前工单
                    else
                    {
                        var wosn = Biz.Db.Queryable<BIZ_MES_WO_BATCH, BIZ_MES_WO_SN>((q, s) => new JoinQueryInfos(JoinType.Inner, q.ORDER_NO == s.WORK_ORDER))
                                                        .ByAuth(input.AuthOption).Where((q, s) => s.SN == input.SN).Select((q, s) => new { Batch = q, SN = s }).First();
                        var wosns = Biz.Db.Queryable<BIZ_MES_WO_BATCH, BIZ_MES_WO_SN>((q, s) => new JoinQueryInfos(JoinType.Inner, q.ORDER_NO == s.WORK_ORDER))
                                                        .ByAuth(input.AuthOption).Where((q, s) => s.SN == input.SN || s.TRAY_SN == input.SN).Select((q, s) => new { Batch = q, SN = s }).ToList();
                        //查找到条码已绑定的工单
                        if (!wosn.IsNullOrEmpty())
                        if (!wosns.IsNullOrEmpty())
                        {
                            if (wosn.Batch.ACT_LINE != CurLine.LINE_CODE)
                            if (wosns.First().Batch.ACT_LINE != CurLine.LINE_CODE)
                            {
                                action.IsSuccessed = false;
                                //action.LocaleMsg = new($"条码[{0}]已在产线[{1}]投入生产,请在正确岗位扫描");
                                action.LocaleMsg = new("MES.Transaction.PackingNode.Submit.NotCorrectLine", input.SN, wosn.Batch.ACT_LINE);
                                action.LocaleMsg = new("MES.Transaction.PackingNode.Submit.NotCorrectLine", input.SN, wosns.First().Batch.ACT_LINE);
                                return action;
                            }
                            else
                            {
                                if (CurBatch?.Batch?.ORDER_NO != wosn.Batch.ORDER_NO)
                                if (CurBatch?.Batch?.ORDER_NO != wosns.First().Batch.ORDER_NO)
                                {
                                    //条码已绑定的工单不等于当前工单则重新选择工单
                                    var result = await SelectOrder(new() { AuthOption = input.AuthOption, OrderNo = wosn.Batch.ORDER_NO });
                                    var result = await SelectOrder(new() { AuthOption = input.AuthOption, OrderNo = wosns.First().Batch.ORDER_NO });
                                    if (!result.IsSuccessed)
                                    {
                                        action.IsSuccessed = result.IsSuccessed;
@@ -175,21 +175,26 @@
                    return woStatus;
                }
                //非法过站防呆:进入工序时要增加判断条码是否按流程过站
                var wipSN = Biz.Db.Queryable<MES_WIP_DATA>().IncludesAllFirstLayer().First(q => q.SN == input.SN && q.WORK_ORDER == CurBatch.WO.ORDER_NO) ?? new MES_WIP_DATA()
                var wipSNs = Biz.Db.Queryable<MES_WIP_DATA>().IncludesAllFirstLayer().Where(q => (q.SN == input.SN || q.TRAY_SN == input.SN) && q.WORK_ORDER == CurBatch.WO.ORDER_NO).ToList();
                if (wipSNs.IsNullOrEmpty())
                {
                    SN = input.SN,
                    STATUS = MES_WIP_DATA.STATUSs.Init.GetValue(),
                    ITEM_CODE = CurBatch.WO.ITEM_CODE,
                    WORK_ORDER = CurBatch.Batch.ORDER_NO,
                    BATCH_NO = CurBatch.Batch.BATCH_NO,
                    HOLD_FLAG = "N",
                    REWORK_FLAG = CurBatch.WO.ORDER_TYPE == BIZ_MES_WO.ORDER_TYPEs.Rework.GetValue() ? "Y" : "N",
                    FINISHED_FLAG = "N",
                    INV_FLAG = "N",
                    DFT_FLAG = "N",
                    DFT_COUNT = 0,
                };
                var canGotoNext = CurBatch.CanGotoNext(input, wipSN, curNode);
                    var wipSN = new MES_WIP_DATA()
                    {
                        SN = input.SN,
                        STATUS = MES_WIP_DATA.STATUSs.Init.GetValue(),
                        ITEM_CODE = CurBatch.WO.ITEM_CODE,
                        WORK_ORDER = CurBatch.Batch.ORDER_NO,
                        BATCH_NO = CurBatch.Batch.BATCH_NO,
                        HOLD_FLAG = "N",
                        REWORK_FLAG = CurBatch.WO.ORDER_TYPE == BIZ_MES_WO.ORDER_TYPEs.Rework.GetValue() ? "Y" : "N",
                        FINISHED_FLAG = "N",
                        INV_FLAG = "N",
                        DFT_FLAG = "N",
                        DFT_COUNT = 0,
                    };
                    wipSNs.Add(wipSN);
                }
                var canGotoNext = CurBatch.CanGotoNext(input, wipSNs.First(), curNode);
                if (!canGotoNext.IsSuccessed)
                {
                    return canGotoNext;
@@ -199,67 +204,88 @@
                if (Steps.IsNullOrEmpty())
                {
                    //绑定条码到工单
                    if (!CurBatch.WoSNs.Any(q => q.SN == input.SN))
                    foreach (var wipSN in wipSNs)
                    {
                        CurBatch.WoSNs.Add(new()
                        if (!CurBatch.WoSNs.Any(q => q.SN == wipSN.SN))
                        {
                            WORK_ORDER = CurBatch.Batch.ORDER_NO,
                            SN = input.SN,
                            STATUS = BIZ_MES_WO_SN.STATUSs.NotInput.GetValue(),
                        });
                            CurBatch.WoSNs.Add(new()
                            {
                                WORK_ORDER = CurBatch.Batch.ORDER_NO,
                                SN = wipSN.SN,
                                TRAY_SN = wipSN.TRAY_SN,
                                STATUS = BIZ_MES_WO_SN.STATUSs.NotInput.GetValue(),
                            });
                        }
                    }
                    var woSN = CurBatch.WoSNs.First(q => q.SN == input.SN);
                    woSN.AUTH_ORG = CurBatch.WO.AUTH_ORG;
                    woSN.AUTH_PROD = CurLine.LINE_CODE;
                    woSN.BATCH_NO = CurBatch.Batch.BATCH_NO;
                    //更新工单条码明细信息
                    var woSNs = CurBatch.WoSNs.Where(q => wipSNs.Any(w => q.SN == w.SN)).ToList();
                    foreach (var woSN in woSNs)
                    {
                        woSN.AUTH_ORG = CurBatch.WO.AUTH_ORG;
                        woSN.AUTH_PROD = CurLine.LINE_CODE;
                        woSN.BATCH_NO = CurBatch.Batch.BATCH_NO;
                    }
                    //条码过站
                    wipSN.AUTH_ORG = CurBatch.WO.AUTH_ORG;
                    wipSN.AUTH_PROD = CurLine.LINE_CODE;
                    wipSN.STATUS = MES_WIP_DATA.STATUSs.OK.GetValue();//wipSN.STATUS > 0 ? MES_WIP_DATA.STATUSs.OK.GetValue() : wipSN.STATUS;
                    wipSN.ROT_CODE = CurBatch.WO.ROUTE_CODE;
                    wipSN.NODE_ID = curNode.ID;
                    wipSN.NODE_NAME = curNode.NODE_NAME;
                    wipSN.FTY_CODE = CurFactory.FTY_CODE;
                    wipSN.WS_CODE = CurWorkshop.WS_CODE;
                    wipSN.LINE_CODE = CurLine.LINE_CODE;
                    wipSN.POST_CODE = CurPosition.POST_CODE;
                    wipSN.OPER_CODE = curNode.OPER_CODE;
                    wipSN.SEGMENT = curNode.SEGMENT;
                    wipSN.OPERATION_TIME = DateTime.Now;
                    var curShiftPeriod = GetShiftPeriodForNow();
                    if (!curShiftPeriod.IsNullOrEmpty())
                    foreach (var wipSN in wipSNs)
                    {
                        wipSN.SFTS_CODE = curShiftPeriod.ShiftSys.SFTS_CODE;
                        wipSN.SFT_CODE = curShiftPeriod.Shift.SFT_CODE;
                        wipSN.PRD_CODE = curShiftPeriod.Period.PRD_CODE;
                        wipSN.AUTH_ORG = CurBatch.WO.AUTH_ORG;
                        wipSN.AUTH_PROD = CurLine.LINE_CODE;
                        wipSN.STATUS = MES_WIP_DATA.STATUSs.OK.GetValue();//wipSN.STATUS > 0 ? MES_WIP_DATA.STATUSs.OK.GetValue() : wipSN.STATUS;
                        wipSN.ROT_CODE = CurBatch.WO.ROUTE_CODE;
                        wipSN.NODE_ID = curNode.ID;
                        wipSN.NODE_NAME = curNode.NODE_NAME;
                        wipSN.FTY_CODE = CurFactory.FTY_CODE;
                        wipSN.WS_CODE = CurWorkshop.WS_CODE;
                        wipSN.LINE_CODE = CurLine.LINE_CODE;
                        wipSN.POST_CODE = CurPosition.POST_CODE;
                        wipSN.OPER_CODE = curNode.OPER_CODE;
                        wipSN.SEGMENT = curNode.SEGMENT;
                        wipSN.OPERATION_TIME = DateTime.Now;
                        var curShiftPeriod = GetShiftPeriodForNow();
                        if (!curShiftPeriod.IsNullOrEmpty())
                        {
                            wipSN.SFTS_CODE = curShiftPeriod.ShiftSys.SFTS_CODE;
                            wipSN.SFT_CODE = curShiftPeriod.Shift.SFT_CODE;
                            wipSN.PRD_CODE = curShiftPeriod.Period.PRD_CODE;
                        }
                        //如果是投入站
                        if (curNode.IS_INPUT == "Y")
                        {
                            var woSN = woSNs.First(q => q.SN == wipSN.SN);
                            woSN.STATUS = BIZ_MES_WO_SN.STATUSs.Inputed.GetValue();
                            wipSN.STATUS = MES_WIP_DATA.STATUSs.Input.GetValue();
                            wipSN.INLINE_DATE = DateTime.Now;
                        }
                        //如果是产出站
                        if (curNode.IS_OUTPUT == "Y")
                        {
                            var woSN = woSNs.First(q => q.SN == wipSN.SN);
                            woSN.STATUS = BIZ_MES_WO_SN.STATUSs.Finished.GetValue();
                            wipSN.STATUS = MES_WIP_DATA.STATUSs.Finished.GetValue();
                            wipSN.OUTLINE_DATE = DateTime.Now;
                        }
                        //如果有提交不良
                        if (!input.DFT_CODE.IsNullOrEmpty())
                        {
                            wipSN.STATUS = MES_WIP_DATA.STATUSs.NG.GetValue();
                            wipSN.DFT_FLAG = "Y";
                            wipSN.DFT_COUNT++;
                            wipSN.DFT_CODE = input.DFT_CODE;
                        }
                    }
                    //工单开工
                    CurBatch.StartWorking(UserCode);
                    //如果是投入站
                    if (curNode.IS_INPUT == "Y")
                    //把当前条码增加到当前条码列表
                    CurWipSNs = wipSNs;
                    CurWipSNHiss.Clear();
                    foreach (var wipSN in wipSNs)
                    {
                        woSN.STATUS = BIZ_MES_WO_SN.STATUSs.Inputed.GetValue();
                        wipSN.STATUS = MES_WIP_DATA.STATUSs.Input.GetValue();
                        wipSN.INLINE_DATE = DateTime.Now;
                        CurWipSNHiss.Add(new MES_WIP_HIS(wipSN, $"工单[{wipSN.WORK_ORDER}]条码[{wipSN.SN}]在岗位[{wipSN.POST_CODE}]过站工序[{wipSN.NODE_NAME}]成功"));
                    }
                    //如果是产出站
                    if (curNode.IS_OUTPUT == "Y")
                    {
                        woSN.STATUS = BIZ_MES_WO_SN.STATUSs.Finished.GetValue();
                        wipSN.STATUS = MES_WIP_DATA.STATUSs.Finished.GetValue();
                        wipSN.OUTLINE_DATE = DateTime.Now;
                    }
                    //如果有提交不良
                    if (!input.DFT_CODE.IsNullOrEmpty())
                    {
                        wipSN.STATUS = MES_WIP_DATA.STATUSs.NG.GetValue();
                        wipSN.DFT_FLAG = "Y";
                        wipSN.DFT_COUNT++;
                        wipSN.DFT_CODE = input.DFT_CODE;
                    }
                    CurWipSNHis = new MES_WIP_HIS(CurWipSN = wipSN, $"工单[{wipSN.WORK_ORDER}]条码[{wipSN.SN}]在岗位[{wipSN.POST_CODE}]过站工序[{wipSN.NODE_NAME}]成功");
                    //初始化工步列表
                    Steps.Clear();
@@ -270,20 +296,20 @@
                        DBSubmitAction = () =>
                        {
                            var db = GetCommitDB();
                            db.Storageable(woSN, UserCode).ExecuteCommand();
                            db.Storageable(wipSN, UserCode).ExecuteCommand();
                            db.Storageable(CurWipSNHis, UserCode).ExecuteCommand();
                            db.Storageable(woSNs, UserCode).ExecuteCommand();
                            db.Storageable(wipSNs, UserCode).ExecuteCommand();
                            db.Storageable(CurWipSNHiss, UserCode).ExecuteCommand();
                            //如果是投入站
                            if (curNode.IS_INPUT == "Y")
                            {
                                db.Updateable<BIZ_MES_WO>().SetColumns(q => q.INPUT_QTY == q.INPUT_QTY + 1).Where(q => q.ORDER_NO == CurBatch.WO.ORDER_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO_BATCH>().SetColumns(q => q.INPUT_QTY == q.INPUT_QTY + 1).Where(q => q.BATCH_NO == CurBatch.Batch.BATCH_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO>().SetColumns(q => q.INPUT_QTY == q.INPUT_QTY + wipSNs.Count).Where(q => q.ORDER_NO == CurBatch.WO.ORDER_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO_BATCH>().SetColumns(q => q.INPUT_QTY == q.INPUT_QTY + wipSNs.Count).Where(q => q.BATCH_NO == CurBatch.Batch.BATCH_NO).ExecuteCommand();
                            }
                            //如果是产出站
                            if (curNode.IS_OUTPUT == "Y")
                            {
                                db.Updateable<BIZ_MES_WO>().SetColumns(q => q.OUTPUT_QTY == q.OUTPUT_QTY + 1).Where(q => q.ORDER_NO == CurBatch.WO.ORDER_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO_BATCH>().SetColumns(q => q.OUTPUT_QTY == q.OUTPUT_QTY + 1).Where(q => q.BATCH_NO == CurBatch.Batch.BATCH_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO>().SetColumns(q => q.OUTPUT_QTY == q.OUTPUT_QTY + wipSNs.Count).Where(q => q.ORDER_NO == CurBatch.WO.ORDER_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO_BATCH>().SetColumns(q => q.OUTPUT_QTY == q.OUTPUT_QTY + wipSNs.Count).Where(q => q.BATCH_NO == CurBatch.Batch.BATCH_NO).ExecuteCommand();
                            }
                        }
                    };
@@ -376,8 +402,8 @@
            SaveStepsCommitActionToDB();
            //保存成功,返回过站消息
            //action.LocaleMsg = new($"工单[{CurWipSN.WORK_ORDER}]的条码[{CurWipSN.SN}]在岗位[{CurWipSN.POST_CODE}]工序[{CurWipSN.NODE_NAME}]过站成功,状态[{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME, CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>());
            action.LocaleMsg = new("MES.Transaction.CollectNode.ScanSn.PassSuccess", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME,CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>());
            //action.LocaleMsg = new($"工单[{CurWipSN.WORK_ORDER}]的条码[{CurWipSN.SN}]在岗位[{CurWipSN.POST_CODE}]工序[{CurWipSN.NODE_NAME}]过站成功,状态[{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]");
            action.LocaleMsg = new("MES.Transaction.CollectNode.ScanSn.PassSuccess", CurWipSNs.First().WORK_ORDER, CurSN, CurWipSNs.First().POST_CODE, CurWipSNs.First().NODE_NAME,CurWipSNs.First().STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>());
            //重置工序
            ResetNode();
            return action;
Tiger.Business.MES/Transaction/PackingNode.cs
@@ -75,25 +75,32 @@
                        //当前岗位在当前工单不是首站,则查找条码已绑定的工单当作当前工单
                        else
                        {
                            var wosn = Biz.Db.Queryable<BIZ_MES_WO_BATCH, BIZ_MES_WO_SN>((q, s) => new JoinQueryInfos(JoinType.Inner, q.ORDER_NO == s.WORK_ORDER))
                                                        .ByAuth(input.AuthOption).Where((q, s) => s.SN == input.SN).Select((q, s) => new { Batch = q, SN = s }).First();
                            var wosns = Biz.Db.Queryable<BIZ_MES_WO_BATCH, BIZ_MES_WO_SN>((q, s) => new JoinQueryInfos(JoinType.Inner, q.ORDER_NO == s.WORK_ORDER))
                                                        .ByAuth(input.AuthOption).Where((q, s) => s.SN == input.SN || s.TRAY_SN == input.SN).Select((q, s) => new { Batch = q, SN = s }).ToList();
                                                        
                            //查找到条码已绑定的工单
                            if (!wosn.IsNullOrEmpty())
                            if (!wosns.IsNullOrEmpty())
                            {
                                if (wosn.Batch.ACT_LINE != CurLine.LINE_CODE)
                                if (wosns.Count > 1 && wosns.Any(q => q.SN.TRAY_SN != q.SN.OUTER_SN))
                                {
                                    action.IsSuccessed = false;
                                    action.LocaleMsg = new($"条码[{0}]是载具条码,请扫描载具中的产品条码继续包装操作");
                                    action.LocaleMsg = new("MES.Transaction.PackingNode.Submit.OnlyMinPackage", input.SN);
                                    return action;
                                }
                                if (wosns.First().Batch.ACT_LINE != CurLine.LINE_CODE)
                                {
                                    action.IsSuccessed = false;
                                    //action.LocaleMsg = new($"条码[{0}]已在产线[{1}]投入生产,请在正确岗位扫描");
                                    action.LocaleMsg = new("MES.Transaction.PackingNode.Submit.NotCorrectLine", input.SN, wosn.Batch.ACT_LINE);
                                    action.LocaleMsg = new("MES.Transaction.PackingNode.Submit.NotCorrectLine", input.SN, wosns.First().Batch.ACT_LINE);
                                    return action;
                                } 
                                else
                                {
                                    if (CurBatch?.Batch?.ORDER_NO != wosn.Batch.ORDER_NO)
                                    if (CurBatch?.Batch?.ORDER_NO != wosns.First().Batch.ORDER_NO)
                                    {
                                        //条码已绑定的工单不等于当前工单则重新选择工单
                                        var result = await SelectOrder(new() { AuthOption = input.AuthOption, OrderNo = wosn.Batch.ORDER_NO });
                                        var result = await SelectOrder(new() { AuthOption = input.AuthOption, OrderNo = wosns.First().Batch.ORDER_NO });
                                        if (!result.IsSuccessed)
                                        {
                                            action.IsSuccessed = result.IsSuccessed;
@@ -199,21 +206,26 @@
                    return woStatus;
                }
                //非法过站防呆:进入工序时要增加判断条码是否按流程过站
                var wipSN = Biz.Db.Queryable<MES_WIP_DATA>().IncludesAllFirstLayer().First(q => q.SN == input.SN && q.WORK_ORDER == CurBatch.WO.ORDER_NO) ?? new MES_WIP_DATA()
                var wipSNs = Biz.Db.Queryable<MES_WIP_DATA>().IncludesAllFirstLayer().Where(q => (q.SN == input.SN || q.TRAY_SN == input.SN) && q.WORK_ORDER == CurBatch.WO.ORDER_NO).ToList();
                if (wipSNs.IsNullOrEmpty())
                {
                    SN = input.SN,
                    STATUS = MES_WIP_DATA.STATUSs.Init.GetValue(),
                    ITEM_CODE = CurBatch.WO.ITEM_CODE,
                    WORK_ORDER = CurBatch.Batch.ORDER_NO,
                    BATCH_NO = CurBatch.Batch.BATCH_NO,
                    HOLD_FLAG = "N",
                    REWORK_FLAG = CurBatch.WO.ORDER_TYPE == BIZ_MES_WO.ORDER_TYPEs.Rework.GetValue() ? "Y" : "N",
                    FINISHED_FLAG = "N",
                    INV_FLAG = "N",
                    DFT_FLAG = "N",
                    DFT_COUNT = 0,
                };
                var canGotoNext = CurBatch.CanGotoNext(input, wipSN, curNode);
                    var wipSN = new MES_WIP_DATA()
                    {
                        SN = input.SN,
                        STATUS = MES_WIP_DATA.STATUSs.Init.GetValue(),
                        ITEM_CODE = CurBatch.WO.ITEM_CODE,
                        WORK_ORDER = CurBatch.Batch.ORDER_NO,
                        BATCH_NO = CurBatch.Batch.BATCH_NO,
                        HOLD_FLAG = "N",
                        REWORK_FLAG = CurBatch.WO.ORDER_TYPE == BIZ_MES_WO.ORDER_TYPEs.Rework.GetValue() ? "Y" : "N",
                        FINISHED_FLAG = "N",
                        INV_FLAG = "N",
                        DFT_FLAG = "N",
                        DFT_COUNT = 0,
                    };
                    wipSNs.Add(wipSN);
                }
                var canGotoNext = CurBatch.CanGotoNext(input, wipSNs.First(), curNode);
                if (!canGotoNext.IsSuccessed)
                {
                    return canGotoNext;
@@ -223,70 +235,91 @@
                if (Steps.IsNullOrEmpty())
                {
                    //绑定条码到工单
                    if (!CurBatch.WoSNs.Any(q => q.SN == input.SN))
                    {
                        CurBatch.WoSNs.Add(new()
                        {
                            WORK_ORDER = CurBatch.Batch.ORDER_NO,
                            SN = input.SN,
                            STATUS = BIZ_MES_WO_SN.STATUSs.NotInput.GetValue(),
                        });
                    }
                    var woSN = CurBatch.WoSNs.First(q => q.SN == input.SN);
                    woSN.AUTH_ORG = CurBatch.WO.AUTH_ORG;
                    woSN.AUTH_PROD = CurLine.LINE_CODE;
                    woSN.BATCH_NO = CurBatch.Batch.BATCH_NO;
                    //条码过站
                    wipSN.AUTH_ORG = CurBatch.WO.AUTH_ORG;
                    wipSN.AUTH_PROD = CurLine.LINE_CODE;
                    wipSN.STATUS = MES_WIP_DATA.STATUSs.OK.GetValue();//wipSN.STATUS > 0 ? MES_WIP_DATA.STATUSs.OK.GetValue() : wipSN.STATUS;
                    wipSN.ROT_CODE = CurBatch.WO.ROUTE_CODE;
                    wipSN.NODE_ID = curNode.ID;
                    wipSN.NODE_NAME = curNode.NODE_NAME;
                    wipSN.FTY_CODE = CurFactory.FTY_CODE;
                    wipSN.WS_CODE = CurWorkshop.WS_CODE;
                    wipSN.LINE_CODE = CurLine.LINE_CODE;
                    wipSN.POST_CODE = CurPosition.POST_CODE;
                    wipSN.OPER_CODE = curNode.OPER_CODE;
                    wipSN.SEGMENT = curNode.SEGMENT;
                    wipSN.OPERATION_TIME = DateTime.Now;
                    var curShiftPeriod = GetShiftPeriodForNow();
                    if (!curShiftPeriod.IsNullOrEmpty())
                    foreach (var wipSN in wipSNs)
                    {
                        wipSN.SFTS_CODE = curShiftPeriod.ShiftSys.SFTS_CODE;
                        wipSN.SFT_CODE = curShiftPeriod.Shift.SFT_CODE;
                        wipSN.PRD_CODE = curShiftPeriod.Period.PRD_CODE;
                        if (!CurBatch.WoSNs.Any(q => q.SN == wipSN.SN))
                        {
                            CurBatch.WoSNs.Add(new()
                            {
                                WORK_ORDER = CurBatch.Batch.ORDER_NO,
                                SN = wipSN.SN,
                                TRAY_SN = wipSN.TRAY_SN,
                                STATUS = BIZ_MES_WO_SN.STATUSs.NotInput.GetValue(),
                            });
                        }
                    }
                    CurBatch.StartWorking(UserCode);
                    //如果是投入站
                    if (curNode.IS_INPUT == "Y")
                    {
                        woSN.STATUS = BIZ_MES_WO_SN.STATUSs.Inputed.GetValue();
                        wipSN.STATUS = MES_WIP_DATA.STATUSs.Input.GetValue();
                        wipSN.INLINE_DATE = DateTime.Now;
                    }
                    //如果是产出站
                    if (curNode.IS_OUTPUT == "Y")
                    {
                        woSN.STATUS = BIZ_MES_WO_SN.STATUSs.Finished.GetValue();
                        wipSN.STATUS = MES_WIP_DATA.STATUSs.Finished.GetValue();
                        wipSN.OUTLINE_DATE = DateTime.Now;
                    }
                    //如果有提交不良
                    if (!input.DFT_CODE.IsNullOrEmpty())
                    {
                        wipSN.STATUS = MES_WIP_DATA.STATUSs.NG.GetValue();
                        wipSN.DFT_FLAG = "Y";
                        wipSN.DFT_COUNT++;
                        wipSN.DFT_CODE = input.DFT_CODE;
                    }
                    CurWipSNHis = new MES_WIP_HIS(CurWipSN = wipSN, $"工单[{wipSN.WORK_ORDER}]的条码[{wipSN.SN}]在岗位[{wipSN.POST_CODE}]工序[{wipSN.NODE_NAME}]过站成功,状态[{wipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]");
                    //初始化工步列表
                    Steps.Clear();
                    //更新工单条码明细信息
                    var woSNs = CurBatch.WoSNs.Where(q => wipSNs.Any(w => q.SN == w.SN)).ToList();
                    foreach (var woSN in woSNs)
                    {
                        woSN.AUTH_ORG = CurBatch.WO.AUTH_ORG;
                        woSN.AUTH_PROD = CurLine.LINE_CODE;
                        woSN.BATCH_NO = CurBatch.Batch.BATCH_NO;
                    }
                    //条码过站
                    foreach (var wipSN in wipSNs)
                    {
                        wipSN.AUTH_ORG = CurBatch.WO.AUTH_ORG;
                        wipSN.AUTH_PROD = CurLine.LINE_CODE;
                        wipSN.STATUS = MES_WIP_DATA.STATUSs.OK.GetValue();//wipSN.STATUS > 0 ? MES_WIP_DATA.STATUSs.OK.GetValue() : wipSN.STATUS;
                        wipSN.ROT_CODE = CurBatch.WO.ROUTE_CODE;
                        wipSN.NODE_ID = curNode.ID;
                        wipSN.NODE_NAME = curNode.NODE_NAME;
                        wipSN.FTY_CODE = CurFactory.FTY_CODE;
                        wipSN.WS_CODE = CurWorkshop.WS_CODE;
                        wipSN.LINE_CODE = CurLine.LINE_CODE;
                        wipSN.POST_CODE = CurPosition.POST_CODE;
                        wipSN.OPER_CODE = curNode.OPER_CODE;
                        wipSN.SEGMENT = curNode.SEGMENT;
                        wipSN.OPERATION_TIME = DateTime.Now;
                        var curShiftPeriod = GetShiftPeriodForNow();
                        if (!curShiftPeriod.IsNullOrEmpty())
                        {
                            wipSN.SFTS_CODE = curShiftPeriod.ShiftSys.SFTS_CODE;
                            wipSN.SFT_CODE = curShiftPeriod.Shift.SFT_CODE;
                            wipSN.PRD_CODE = curShiftPeriod.Period.PRD_CODE;
                        }
                        //如果是投入站
                        if (curNode.IS_INPUT == "Y")
                        {
                            var woSN = woSNs.First(q => q.SN == wipSN.SN);
                            woSN.STATUS = BIZ_MES_WO_SN.STATUSs.Inputed.GetValue();
                            wipSN.STATUS = MES_WIP_DATA.STATUSs.Input.GetValue();
                            wipSN.INLINE_DATE = DateTime.Now;
                        }
                        //如果是产出站
                        if (curNode.IS_OUTPUT == "Y")
                        {
                            var woSN = woSNs.First(q => q.SN == wipSN.SN);
                            woSN.STATUS = BIZ_MES_WO_SN.STATUSs.Finished.GetValue();
                            wipSN.STATUS = MES_WIP_DATA.STATUSs.Finished.GetValue();
                            wipSN.OUTLINE_DATE = DateTime.Now;
                        }
                        //如果有提交不良
                        if (!input.DFT_CODE.IsNullOrEmpty())
                        {
                            wipSN.STATUS = MES_WIP_DATA.STATUSs.NG.GetValue();
                            wipSN.DFT_FLAG = "Y";
                            wipSN.DFT_COUNT++;
                            wipSN.DFT_CODE = input.DFT_CODE;
                        }
                    }
                    //工单开工
                    CurBatch.StartWorking(UserCode);
                    //把当前条码增加到当前条码列表
                    CurWipSNs = wipSNs;
                    CurWipSNHiss.Clear();
                    foreach (var wipSN in wipSNs)
                    {
                        CurWipSNHiss.Add(new MES_WIP_HIS(wipSN, $"工单[{wipSN.WORK_ORDER}]条码[{wipSN.SN}]在岗位[{wipSN.POST_CODE}]过站工序[{wipSN.NODE_NAME}]成功"));
                    }
                    //初始化工步列表
                    Steps.Clear();
                    var curStep = new Biz.WorkStep(IWorkStep.Types.Node, this) 
                    {
                        Sequence = Steps.Count + 1,
@@ -294,20 +327,20 @@
                        DBSubmitAction = () =>
                        {
                            var db = GetCommitDB();
                            db.Storageable(woSN, UserCode).ExecuteCommand();
                            db.Storageable(wipSN, UserCode).ExecuteCommand();
                            db.Storageable(CurWipSNHis, UserCode).ExecuteCommand();
                            db.Storageable(woSNs, UserCode).ExecuteCommand();
                            db.Storageable(wipSNs, UserCode).ExecuteCommand();
                            db.Storageable(CurWipSNHiss, UserCode).ExecuteCommand();
                            //如果是投入站
                            if (curNode.IS_INPUT == "Y")
                            {
                                db.Updateable<BIZ_MES_WO>().SetColumns(q => q.INPUT_QTY == q.INPUT_QTY + 1).Where(q => q.ORDER_NO == CurBatch.WO.ORDER_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO_BATCH>().SetColumns(q => q.INPUT_QTY == q.INPUT_QTY + 1).Where(q => q.BATCH_NO == CurBatch.Batch.BATCH_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO>().SetColumns(q => q.INPUT_QTY == q.INPUT_QTY + wipSNs.Count).Where(q => q.ORDER_NO == CurBatch.WO.ORDER_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO_BATCH>().SetColumns(q => q.INPUT_QTY == q.INPUT_QTY + wipSNs.Count).Where(q => q.BATCH_NO == CurBatch.Batch.BATCH_NO).ExecuteCommand();
                            }
                            //如果是产出站
                            if (curNode.IS_OUTPUT == "Y")
                            {
                                db.Updateable<BIZ_MES_WO>().SetColumns(q => q.OUTPUT_QTY == q.OUTPUT_QTY + 1).Where(q => q.ORDER_NO == CurBatch.WO.ORDER_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO_BATCH>().SetColumns(q => q.OUTPUT_QTY == q.OUTPUT_QTY + 1).Where(q => q.BATCH_NO == CurBatch.Batch.BATCH_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO>().SetColumns(q => q.OUTPUT_QTY == q.OUTPUT_QTY + wipSNs.Count).Where(q => q.ORDER_NO == CurBatch.WO.ORDER_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO_BATCH>().SetColumns(q => q.OUTPUT_QTY == q.OUTPUT_QTY + wipSNs.Count).Where(q => q.BATCH_NO == CurBatch.Batch.BATCH_NO).ExecuteCommand();
                            }
                        }
                    };
@@ -399,8 +432,8 @@
            SaveStepsCommitActionToDB();
            //保存成功,返回过站消息
            //action.LocaleMsg = new($"工单[{CurWipSN.WORK_ORDER}]的条码[{CurWipSN.SN}]在岗位[{CurWipSN.POST_CODE}]工序[{CurWipSN.NODE_NAME}]过站成功,状态[{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME, CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>());
            action.LocaleMsg = new("MES.Transaction.PackingNode.ScanSn.PassSuccess", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME, CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>());
            //action.LocaleMsg = new($"工单[{CurWipSN.WORK_ORDER}]的条码[{CurWipSN.SN}]在岗位[{CurWipSN.POST_CODE}]工序[{CurWipSN.NODE_NAME}]过站成功,状态[{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]");
            action.LocaleMsg = new("MES.Transaction.CollectNode.ScanSn.PassSuccess", CurWipSNs.First().WORK_ORDER, CurSN, CurWipSNs.First().POST_CODE, CurWipSNs.First().NODE_NAME,CurWipSNs.First().STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>());
            //重置工序
            ResetNode();
            return action;
@@ -441,7 +474,7 @@
                        case "NodeSubmit":
                            action.IsSuccessed = false;
                            //action.LocaleMsg = new($"正在进行条码[{CurWipSN.SN}]的过站业务,不允许手动结束包装");
                            action.LocaleMsg = new("MES.Transaction.PackingNode.WorkingOnNodeSubmit", CurWipSN.SN);
                            action.LocaleMsg = new("MES.Transaction.PackingNode.WorkingOnNodeSubmit", CurSN);
                            break;
                        default:
                            break;
Tiger.Business.MES/Transaction/Position.cs
@@ -55,8 +55,9 @@
        public MES_SHIFT_SYS CurShiftSys { get; set; }
        public WorkBatch CurBatch { get; set; }
        public IWorkBatch WorkBatch => CurBatch;
        public MES_WIP_DATA CurWipSN { get; set; }
        public MES_WIP_HIS CurWipSNHis { get; set; }
        public List<MES_WIP_DATA> CurWipSNs { get; set; }
        public string CurSN => CurWipSNs.First().TRAY_SN.IsNullOrEmpty() ? CurWipSNs.First().SN : CurWipSNs.First().TRAY_SN;
        public List<MES_WIP_HIS> CurWipSNHiss { get; set; }
        public Dictionary<string, object> Context { get; set; } = new();
        public List<WorkStep> Steps { get; set; } = new();
        public WorkStep CurStep { get; set; }
@@ -174,8 +175,8 @@
        public virtual void ResetNode()
        {
            Steps.Clear();
            CurWipSN = null;
            CurWipSNHis = null;
            CurWipSNs = null;
            CurWipSNHiss = null;
            CurStep = null;
        }
@@ -411,7 +412,9 @@
                            switch (pv.VAR_METHOD)
                            {
                                case "GetSN":
                                    return CurWipSN.SN;
                                    return string.Join(",", CurWipSNs.Select(q => q.SN));
                                case "GetTraySN":
                                    return CurSN;
                                case "GetBAS_ITEM":
                                    return WorkBatch.Product.ToJson();
                                case "GetCustomer":
Tiger.Business.MES/Transaction/TestNode.cs
@@ -52,25 +52,25 @@
                    //当前岗位在当前工单不是首站,则查找条码已绑定的工单当作当前工单
                    else
                    {
                        var wosn = Biz.Db.Queryable<BIZ_MES_WO_BATCH, BIZ_MES_WO_SN>((q, s) => new JoinQueryInfos(JoinType.Inner, q.ORDER_NO == s.WORK_ORDER))
                                                        .ByAuth(input.AuthOption).Where((q, s) => s.SN == input.SN).Select((q, s) => new { Batch = q, SN = s }).First();
                        var wosns = Biz.Db.Queryable<BIZ_MES_WO_BATCH, BIZ_MES_WO_SN>((q, s) => new JoinQueryInfos(JoinType.Inner, q.ORDER_NO == s.WORK_ORDER))
                                                        .ByAuth(input.AuthOption).Where((q, s) => s.SN == input.SN || s.TRAY_SN == input.SN).Select((q, s) => new { Batch = q, SN = s }).ToList();
                        //查找到条码已绑定的工单
                        if (!wosn.IsNullOrEmpty())
                        if (!wosns.IsNullOrEmpty())
                        {
                            if (wosn.Batch.ACT_LINE != CurLine.LINE_CODE)
                            if (wosns.First().Batch.ACT_LINE != CurLine.LINE_CODE)
                            {
                                action.IsSuccessed = false;
                                //action.LocaleMsg = new($"条码[{0}]已在产线[{1}]投入生产,请在正确岗位扫描");
                                action.LocaleMsg = new("MES.Transaction.PackingNode.Submit.NotCorrectLine", input.SN, wosn.Batch.ACT_LINE);
                                action.LocaleMsg = new("MES.Transaction.PackingNode.Submit.NotCorrectLine", input.SN, wosns.First().Batch.ACT_LINE);
                                return action;
                            }
                            else
                            {
                                if (CurBatch?.Batch?.ORDER_NO != wosn.Batch.ORDER_NO)
                                if (CurBatch?.Batch?.ORDER_NO != wosns.First().Batch.ORDER_NO)
                                {
                                    //条码已绑定的工单不等于当前工单则重新选择工单
                                    var result = await SelectOrder(new() { AuthOption = input.AuthOption, OrderNo = wosn.Batch.ORDER_NO });
                                    var result = await SelectOrder(new() { AuthOption = input.AuthOption, OrderNo = wosns.First().Batch.ORDER_NO });
                                    if (!result.IsSuccessed)
                                    {
                                        action.IsSuccessed = result.IsSuccessed;
@@ -176,21 +176,26 @@
                    return woStatus;
                }
                //非法过站防呆:进入工序时要增加判断条码是否按流程过站
                var wipSN = Biz.Db.Queryable<MES_WIP_DATA>().IncludesAllFirstLayer().First(q => q.SN == input.SN && q.WORK_ORDER == CurBatch.WO.ORDER_NO) ?? new MES_WIP_DATA()
                var wipSNs = Biz.Db.Queryable<MES_WIP_DATA>().IncludesAllFirstLayer().Where(q => (q.SN == input.SN || q.TRAY_SN == input.SN) && q.WORK_ORDER == CurBatch.WO.ORDER_NO).ToList();
                if (wipSNs.IsNullOrEmpty())
                {
                    SN = input.SN,
                    STATUS = MES_WIP_DATA.STATUSs.Init.GetValue(),
                    ITEM_CODE = CurBatch.WO.ITEM_CODE,
                    WORK_ORDER = CurBatch.Batch.ORDER_NO,
                    BATCH_NO = CurBatch.Batch.BATCH_NO,
                    HOLD_FLAG = "N",
                    REWORK_FLAG = CurBatch.WO.ORDER_TYPE == BIZ_MES_WO.ORDER_TYPEs.Rework.GetValue() ? "Y" : "N",
                    FINISHED_FLAG = "N",
                    INV_FLAG = "N",
                    DFT_FLAG = "N",
                    DFT_COUNT = 0,
                };
                var canGotoNext = CurBatch.CanGotoNext(input, wipSN, curNode);
                    var wipSN = new MES_WIP_DATA()
                    {
                        SN = input.SN,
                        STATUS = MES_WIP_DATA.STATUSs.Init.GetValue(),
                        ITEM_CODE = CurBatch.WO.ITEM_CODE,
                        WORK_ORDER = CurBatch.Batch.ORDER_NO,
                        BATCH_NO = CurBatch.Batch.BATCH_NO,
                        HOLD_FLAG = "N",
                        REWORK_FLAG = CurBatch.WO.ORDER_TYPE == BIZ_MES_WO.ORDER_TYPEs.Rework.GetValue() ? "Y" : "N",
                        FINISHED_FLAG = "N",
                        INV_FLAG = "N",
                        DFT_FLAG = "N",
                        DFT_COUNT = 0,
                    };
                    wipSNs.Add(wipSN);
                }
                var canGotoNext = CurBatch.CanGotoNext(input, wipSNs.First(), curNode);
                if (!canGotoNext.IsSuccessed)
                {
                    return canGotoNext;
@@ -200,67 +205,88 @@
                if (Steps.IsNullOrEmpty())
                {
                    //绑定条码到工单
                    if (!CurBatch.WoSNs.Any(q => q.SN == input.SN))
                    foreach (var wipSN in wipSNs)
                    {
                        CurBatch.WoSNs.Add(new()
                        if (!CurBatch.WoSNs.Any(q => q.SN == wipSN.SN))
                        {
                            WORK_ORDER = CurBatch.Batch.ORDER_NO,
                            SN = input.SN,
                            STATUS = BIZ_MES_WO_SN.STATUSs.NotInput.GetValue(),
                        });
                            CurBatch.WoSNs.Add(new()
                            {
                                WORK_ORDER = CurBatch.Batch.ORDER_NO,
                                SN = wipSN.SN,
                                TRAY_SN = wipSN.TRAY_SN,
                                STATUS = BIZ_MES_WO_SN.STATUSs.NotInput.GetValue(),
                            });
                        }
                    }
                    var woSN = CurBatch.WoSNs.First(q => q.SN == input.SN);
                    woSN.AUTH_ORG = CurBatch.WO.AUTH_ORG;
                    woSN.AUTH_PROD = CurLine.LINE_CODE;
                    woSN.BATCH_NO = CurBatch.Batch.BATCH_NO;
                    //更新工单条码明细信息
                    var woSNs = CurBatch.WoSNs.Where(q => wipSNs.Any(w => q.SN == w.SN)).ToList();
                    foreach (var woSN in woSNs)
                    {
                        woSN.AUTH_ORG = CurBatch.WO.AUTH_ORG;
                        woSN.AUTH_PROD = CurLine.LINE_CODE;
                        woSN.BATCH_NO = CurBatch.Batch.BATCH_NO;
                    }
                    //条码过站
                    wipSN.AUTH_ORG = CurBatch.WO.AUTH_ORG;
                    wipSN.AUTH_PROD = CurLine.LINE_CODE;
                    wipSN.STATUS = MES_WIP_DATA.STATUSs.OK.GetValue();//wipSN.STATUS > 0 ? MES_WIP_DATA.STATUSs.OK.GetValue() : wipSN.STATUS;
                    wipSN.ROT_CODE = CurBatch.WO.ROUTE_CODE;
                    wipSN.NODE_ID = curNode.ID;
                    wipSN.NODE_NAME = curNode.NODE_NAME;
                    wipSN.FTY_CODE = CurFactory.FTY_CODE;
                    wipSN.WS_CODE = CurWorkshop.WS_CODE;
                    wipSN.LINE_CODE = CurLine.LINE_CODE;
                    wipSN.POST_CODE = CurPosition.POST_CODE;
                    wipSN.OPER_CODE = curNode.OPER_CODE;
                    wipSN.SEGMENT = curNode.SEGMENT;
                    wipSN.OPERATION_TIME = DateTime.Now;
                    var curShiftPeriod = GetShiftPeriodForNow();
                    if (!curShiftPeriod.IsNullOrEmpty())
                    foreach (var wipSN in wipSNs)
                    {
                        wipSN.SFTS_CODE = curShiftPeriod.ShiftSys.SFTS_CODE;
                        wipSN.SFT_CODE = curShiftPeriod.Shift.SFT_CODE;
                        wipSN.PRD_CODE = curShiftPeriod.Period.PRD_CODE;
                        wipSN.AUTH_ORG = CurBatch.WO.AUTH_ORG;
                        wipSN.AUTH_PROD = CurLine.LINE_CODE;
                        wipSN.STATUS = MES_WIP_DATA.STATUSs.OK.GetValue();//wipSN.STATUS > 0 ? MES_WIP_DATA.STATUSs.OK.GetValue() : wipSN.STATUS;
                        wipSN.ROT_CODE = CurBatch.WO.ROUTE_CODE;
                        wipSN.NODE_ID = curNode.ID;
                        wipSN.NODE_NAME = curNode.NODE_NAME;
                        wipSN.FTY_CODE = CurFactory.FTY_CODE;
                        wipSN.WS_CODE = CurWorkshop.WS_CODE;
                        wipSN.LINE_CODE = CurLine.LINE_CODE;
                        wipSN.POST_CODE = CurPosition.POST_CODE;
                        wipSN.OPER_CODE = curNode.OPER_CODE;
                        wipSN.SEGMENT = curNode.SEGMENT;
                        wipSN.OPERATION_TIME = DateTime.Now;
                        var curShiftPeriod = GetShiftPeriodForNow();
                        if (!curShiftPeriod.IsNullOrEmpty())
                        {
                            wipSN.SFTS_CODE = curShiftPeriod.ShiftSys.SFTS_CODE;
                            wipSN.SFT_CODE = curShiftPeriod.Shift.SFT_CODE;
                            wipSN.PRD_CODE = curShiftPeriod.Period.PRD_CODE;
                        }
                        //如果是投入站
                        if (curNode.IS_INPUT == "Y")
                        {
                            var woSN = woSNs.First(q => q.SN == wipSN.SN);
                            woSN.STATUS = BIZ_MES_WO_SN.STATUSs.Inputed.GetValue();
                            wipSN.STATUS = MES_WIP_DATA.STATUSs.Input.GetValue();
                            wipSN.INLINE_DATE = DateTime.Now;
                        }
                        //如果是产出站
                        if (curNode.IS_OUTPUT == "Y")
                        {
                            var woSN = woSNs.First(q => q.SN == wipSN.SN);
                            woSN.STATUS = BIZ_MES_WO_SN.STATUSs.Finished.GetValue();
                            wipSN.STATUS = MES_WIP_DATA.STATUSs.Finished.GetValue();
                            wipSN.OUTLINE_DATE = DateTime.Now;
                        }
                        //如果有提交不良
                        if (!input.DFT_CODE.IsNullOrEmpty())
                        {
                            wipSN.STATUS = MES_WIP_DATA.STATUSs.NG.GetValue();
                            wipSN.DFT_FLAG = "Y";
                            wipSN.DFT_COUNT++;
                            wipSN.DFT_CODE = input.DFT_CODE;
                        }
                    }
                    //工单开工
                    CurBatch.StartWorking(UserCode);
                    //如果是投入站
                    if (curNode.IS_INPUT == "Y")
                    //把当前条码增加到当前条码列表
                    CurWipSNs = wipSNs;
                    CurWipSNHiss.Clear();
                    foreach (var wipSN in wipSNs)
                    {
                        woSN.STATUS = BIZ_MES_WO_SN.STATUSs.Inputed.GetValue();
                        wipSN.STATUS = MES_WIP_DATA.STATUSs.Input.GetValue();
                        wipSN.INLINE_DATE = DateTime.Now;
                        CurWipSNHiss.Add(new MES_WIP_HIS(wipSN, $"工单[{wipSN.WORK_ORDER}]条码[{wipSN.SN}]在岗位[{wipSN.POST_CODE}]过站工序[{wipSN.NODE_NAME}]成功"));
                    }
                    //如果是产出站
                    if (curNode.IS_OUTPUT == "Y")
                    {
                        woSN.STATUS = BIZ_MES_WO_SN.STATUSs.Finished.GetValue();
                        wipSN.STATUS = MES_WIP_DATA.STATUSs.Finished.GetValue();
                        wipSN.OUTLINE_DATE = DateTime.Now;
                    }
                    //如果有提交不良
                    if (!input.DFT_CODE.IsNullOrEmpty())
                    {
                        wipSN.STATUS = MES_WIP_DATA.STATUSs.NG.GetValue();
                        wipSN.DFT_FLAG = "Y";
                        wipSN.DFT_COUNT++;
                        wipSN.DFT_CODE = input.DFT_CODE;
                    }
                    CurWipSNHis = new MES_WIP_HIS(CurWipSN = wipSN, $"工单[{wipSN.WORK_ORDER}]条码[{wipSN.SN}]在岗位[{wipSN.POST_CODE}]过站工序[{wipSN.NODE_NAME}]成功");
                    //初始化工步列表
                    Steps.Clear();
@@ -271,20 +297,20 @@
                        DBSubmitAction = () =>
                        {
                            var db = GetCommitDB();
                            db.Storageable(woSN, UserCode).ExecuteCommand();
                            db.Storageable(wipSN, UserCode).ExecuteCommand();
                            db.Storageable(CurWipSNHis, UserCode).ExecuteCommand();
                            db.Storageable(woSNs, UserCode).ExecuteCommand();
                            db.Storageable(wipSNs, UserCode).ExecuteCommand();
                            db.Storageable(CurWipSNHiss, UserCode).ExecuteCommand();
                            //如果是投入站
                            if (curNode.IS_INPUT == "Y")
                            {
                                db.Updateable<BIZ_MES_WO>().SetColumns(q => q.INPUT_QTY == q.INPUT_QTY + 1).Where(q => q.ORDER_NO == CurBatch.WO.ORDER_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO_BATCH>().SetColumns(q => q.INPUT_QTY == q.INPUT_QTY + 1).Where(q => q.BATCH_NO == CurBatch.Batch.BATCH_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO>().SetColumns(q => q.INPUT_QTY == q.INPUT_QTY + wipSNs.Count).Where(q => q.ORDER_NO == CurBatch.WO.ORDER_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO_BATCH>().SetColumns(q => q.INPUT_QTY == q.INPUT_QTY + wipSNs.Count).Where(q => q.BATCH_NO == CurBatch.Batch.BATCH_NO).ExecuteCommand();
                            }
                            //如果是产出站
                            if (curNode.IS_OUTPUT == "Y")
                            {
                                db.Updateable<BIZ_MES_WO>().SetColumns(q => q.OUTPUT_QTY == q.OUTPUT_QTY + 1).Where(q => q.ORDER_NO == CurBatch.WO.ORDER_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO_BATCH>().SetColumns(q => q.OUTPUT_QTY == q.OUTPUT_QTY + 1).Where(q => q.BATCH_NO == CurBatch.Batch.BATCH_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO>().SetColumns(q => q.OUTPUT_QTY == q.OUTPUT_QTY + wipSNs.Count).Where(q => q.ORDER_NO == CurBatch.WO.ORDER_NO).ExecuteCommand();
                                db.Updateable<BIZ_MES_WO_BATCH>().SetColumns(q => q.OUTPUT_QTY == q.OUTPUT_QTY + wipSNs.Count).Where(q => q.BATCH_NO == CurBatch.Batch.BATCH_NO).ExecuteCommand();
                            }
                        }
                    };
@@ -376,8 +402,8 @@
            SaveStepsCommitActionToDB();
            //保存成功,返回过站消息
            //action.LocaleMsg = new($"工单[{CurWipSN.WORK_ORDER}]的条码[{CurWipSN.SN}]在岗位[{CurWipSN.POST_CODE}]工序[{CurWipSN.NODE_NAME}]过站成功,状态[{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME, CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>());
            action.LocaleMsg = new("MES.Transaction.TestNode.ScanSn.PassSuccess", CurWipSN.WORK_ORDER, CurWipSN.SN, CurWipSN.POST_CODE, CurWipSN.NODE_NAME, CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>());
            //action.LocaleMsg = new($"工单[{CurWipSN.WORK_ORDER}]的条码[{CurWipSN.SN}]在岗位[{CurWipSN.POST_CODE}]工序[{CurWipSN.NODE_NAME}]过站成功,状态[{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]");
            action.LocaleMsg = new("MES.Transaction.CollectNode.ScanSn.PassSuccess", CurWipSNs.First().WORK_ORDER, CurSN, CurWipSNs.First().POST_CODE, CurWipSNs.First().NODE_NAME, CurWipSNs.First().STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>());
            //重置工序
            ResetNode();
            return action;
Tiger.Business.MES/WorkAction/Assembly.cs
@@ -69,6 +69,7 @@
                        ItemInfo = info,  
                        RuleCode = assy.RULE_CODE,
                        LoadQty = assy.QTY,
                        IsBatchItem = assy.IsBatchItem,
                    };
                    var bom = Boms.FirstOrDefault(q => q.ITEM_CODE == assy.ITEM_CODE);
                    if (!bom.IsNullOrEmpty())
@@ -104,7 +105,7 @@
        {
            var action = new ApiAction<SubmitOutput>(new SubmitOutput());
            if (input.SN != CurPosition.CurWipSN.SN)
            if (!CurPosition.CurWipSNs.Any(w => w.SN == input.SN))
            {
                action = SaveAssembly(input, action);
                return action;
@@ -170,31 +171,65 @@
                    //验证通过则保存上料信息
                    if (isOK)
                    {
                        var record = new MES_WIP_ASSY()
                        //批次物料则只记录一次,非批次物料则要按个数验证数量
                        if (item.IsBatchItem)
                        {
                            AUTH_ORG = CurPosition.WorkBatch.WO.AUTH_ORG,
                            AUTH_PROD = CurPosition.CurLine.LINE_CODE,
                            SN = input.SN,
                            PROD_SN = CurPosition.CurWipSN.SN,
                            ITEM_CODE = item.ItemInfo.ITEM_CODE,
                            QTY = 1,
                            UNIT = item.ItemInfo.UNIT,
                            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,
                            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,
                        };
                        item.Records.Add(record);
                        if (item.Records.Sum(q => q.QTY) >= item.LoadQty)
                            foreach (var wipSn in CurPosition.CurWipSNs)
                            {
                                var record = new MES_WIP_ASSY()
                                {
                                    AUTH_ORG = CurPosition.WorkBatch.WO.AUTH_ORG,
                                    AUTH_PROD = CurPosition.CurLine.LINE_CODE,
                                    SN = input.SN,
                                    PROD_SN = wipSn.SN,
                                    ITEM_CODE = item.ItemInfo.ITEM_CODE,
                                    QTY = 1,
                                    UNIT = item.ItemInfo.UNIT,
                                    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,
                                    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,
                                };
                                item.Records.Add(record);
                            }
                            item.IsFinished = true;
                        }
                        else
                        {
                            item.IsFinished = true;
                            var record = new MES_WIP_ASSY()
                            {
                                AUTH_ORG = CurPosition.WorkBatch.WO.AUTH_ORG,
                                AUTH_PROD = CurPosition.CurLine.LINE_CODE,
                                SN = input.SN,
                                PROD_SN = CurPosition.CurSN,
                                ITEM_CODE = item.ItemInfo.ITEM_CODE,
                                QTY = 1,
                                UNIT = item.ItemInfo.UNIT,
                                WORK_ORDER = CurPosition.CurWipSNs.First().WORK_ORDER,
                                BATCH_NO = CurPosition.CurWipSNs.First().BATCH_NO,
                                ROT_CODE = CurPosition.CurWipSNs.First().ROT_CODE,
                                NODE_ID = CurPosition.CurWipSNs.First().NODE_ID,
                                NODE_NAME = CurPosition.CurWipSNs.First().NODE_NAME,
                                FTY_CODE = CurPosition.CurWipSNs.First().FTY_CODE,
                                WS_CODE = CurPosition.CurWipSNs.First().WS_CODE,
                                LINE_CODE = CurPosition.CurWipSNs.First().LINE_CODE,
                                POST_CODE = CurPosition.CurWipSNs.First().POST_CODE,
                                OPER_CODE = CurPosition.CurWipSNs.First().OPER_CODE,
                                SEGMENT = CurPosition.CurWipSNs.First().SEGMENT,
                            };
                            item.Records.Add(record);
                            if (item.Records.Sum(q => q.QTY) >= item.LoadQty * CurPosition.CurWipSNs.Count)
                            {
                                item.IsFinished = true;
                            }
                        }
                        action.IsSuccessed = true;
@@ -235,38 +270,44 @@
            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 = CurAssembly.ToJson(),
                ACT_RESULT = "Y",
                TRACE_INFO = $"以下物料上料完成:{string.Join(",", CurAssembly.Items.Select(q => $"{q.ItemInfo.ITEM_NAME}({q.ItemInfo.ITEM_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 = CurAssembly.ToJson(),
                    ACT_RESULT = "Y",
                    TRACE_INFO = $"以下物料上料完成:{string.Join(",", CurAssembly.Items.Select(q => $"{q.ItemInfo.ITEM_NAME}({q.ItemInfo.ITEM_CODE})"))}",
                };
                wipActs.Add(wipAct);
            }
            //整理上料记录
            var records = new List<MES_WIP_ASSY>();
            foreach (var item in CurAssembly.Items)
            {
@@ -277,7 +318,7 @@
            CurStep.DBSubmitAction = () =>
            {
                var db = CurPosition.GetCommitDB();
                db.Storageable(wipAct, CurPosition.UserCode).ExecuteCommand();
                db.Storageable(wipActs, CurPosition.UserCode).ExecuteCommand();
                db.Insertable(records, CurPosition.UserCode).ExecuteCommand();
            };
Tiger.Business.MES/WorkAction/IPQC.cs
@@ -106,48 +106,53 @@
            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 = "",
                ACT_VALUE_2 = "",
                ACT_VALUE_3 = "",
                ACT_VALUE_4 = "",
                ACT_VALUE_5 = "",
                ACT_RESULT = "Y",
                TRACE_INFO = $"执行成功",
            };
                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 = "",
                    ACT_VALUE_2 = "",
                    ACT_VALUE_3 = "",
                    ACT_VALUE_4 = "",
                    ACT_VALUE_5 = "",
                    ACT_RESULT = "Y",
                    TRACE_INFO = $"执行成功",
                };
                wipActs.Add(wipAct);
            }
            //保存数据
            CurStep.DBSubmitAction = () =>
            {
                var db = CurPosition.GetCommitDB();
                db.Storageable(wipAct, CurPosition.UserCode).ExecuteCommand();
                db.Storageable(wipActs, CurPosition.UserCode).ExecuteCommand();
            };
            IsFinished = true;
Tiger.Business.MES/WorkAction/PackingAction.cs
@@ -123,7 +123,7 @@
            //行为设定的OPTION_1是第一层包装的标签模板代码,如果为空则不需要打印
            if (LabelDic[min.PKG_LEVEL].IsNullOrEmpty())
            {
                var msg = new Locale("MES.WorkAction.PackingAction.BeginMsg", min.PKG_LEVEL, min.PkgType.PKG_NAME, CurPosition.CurWipSN.SN);
                var msg = new Locale("MES.WorkAction.PackingAction.BeginMsg", min.PKG_LEVEL, min.PkgType.PKG_NAME, CurPosition.CurSN);
                //var msg = new Locale($"已扫描第{dtl.PKG_LEVEL}层包装[{dtl.PkgType.PKG_NAME}]的标签条码[{CurPosition.CurWipSN.SN}]");
                return msg;
            }
@@ -145,7 +145,7 @@
            action.LocaleMsg = GetBeginMsg();
            var min = PkgRule.Details.OrderBy(q => q.PKG_LEVEL).First();
            //行为设定的OPTION_1-9是包装不同层级的标签模板代码,如果为空则不需要打印
            //根据包装不同层级的标签模板代码,如果为空则不需要打印
            if (LabelDic[min.PKG_LEVEL].IsNullOrEmpty())
            {
                input.Data = new PackingActionInput()
@@ -153,7 +153,7 @@
                    ExecCode = "Scan",
                    IsFinish = true,
                    PkgLevel = min.PKG_LEVEL,
                    PkgSN = CurPosition.CurWipSN.SN,
                    PkgSN = CurPosition.CurSN,
                }.ToJson();
                action = Submit(input);
            }
@@ -344,20 +344,20 @@
                            AUTH_PROD = CurPosition.CurLine.LINE_CODE,
                            SN = pInput.PkgSN,
                            PKG_TYPE = dtl.PkgType.PKG_NAME,
                            ITEM_CODE = CurPosition.CurWipSN.ITEM_CODE,
                            QTY = CurPosition.CurWipSN.QTY,
                            ITEM_CODE = CurPosition.CurWipSNs.First().ITEM_CODE,
                            QTY = CurPosition.CurWipSNs.First().QTY,
                            UNIT = dtl.PkgType.PKG_NAME,
                            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,
                            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,
                            WORK_ORDER = CurPosition.CurWipSNs.First().WORK_ORDER,
                            BATCH_NO = CurPosition.CurWipSNs.First().BATCH_NO,
                            ROT_CODE = CurPosition.CurWipSNs.First().ROT_CODE,
                            NODE_ID = CurPosition.CurWipSNs.First().NODE_ID,
                            NODE_NAME = CurPosition.CurWipSNs.First().NODE_NAME,
                            FTY_CODE = CurPosition.CurWipSNs.First().FTY_CODE,
                            WS_CODE = CurPosition.CurWipSNs.First().WS_CODE,
                            LINE_CODE = CurPosition.CurWipSNs.First().LINE_CODE,
                            POST_CODE = CurPosition.CurWipSNs.First().POST_CODE,
                            OPER_CODE = CurPosition.CurWipSNs.First().OPER_CODE,
                            SEGMENT = CurPosition.CurWipSNs.First().SEGMENT,
                        }
                    };
                    FinishLevel++;
@@ -376,20 +376,20 @@
                            AUTH_PROD = CurPosition.CurLine.LINE_CODE,
                            SN = pInput.PkgSN,
                            PKG_TYPE = dtl.PkgType.PKG_NAME,
                            ITEM_CODE = CurPosition.CurWipSN.ITEM_CODE,
                            ITEM_CODE = CurPosition.CurWipSNs.First().ITEM_CODE,
                            QTY = CurPkgItem.Items.Sum(q => q.Package.QTY),
                            UNIT = dtl.PkgType.PKG_NAME,
                            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,
                            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,
                            WORK_ORDER = CurPosition.CurWipSNs.First().WORK_ORDER,
                            BATCH_NO = CurPosition.CurWipSNs.First().BATCH_NO,
                            ROT_CODE = CurPosition.CurWipSNs.First().ROT_CODE,
                            NODE_ID = CurPosition.CurWipSNs.First().NODE_ID,
                            NODE_NAME = CurPosition.CurWipSNs.First().NODE_NAME,
                            FTY_CODE = CurPosition.CurWipSNs.First().FTY_CODE,
                            WS_CODE = CurPosition.CurWipSNs.First().WS_CODE,
                            LINE_CODE = CurPosition.CurWipSNs.First().LINE_CODE,
                            POST_CODE = CurPosition.CurWipSNs.First().POST_CODE,
                            OPER_CODE = CurPosition.CurWipSNs.First().OPER_CODE,
                            SEGMENT = CurPosition.CurWipSNs.First().SEGMENT,
                        };
                        FinishLevel++;
                        //完成包装的层级小于最外层包装层级
@@ -522,9 +522,6 @@
                throw dbTran.ErrorException;
            }
            //删除工序上下文中的包装记录
            CurPosition.Context.Remove("CurPackage");
            var data = new PackingActionOutput() { PkgInfo = CurPkg };
            data.ExecCode = "Complete";
            data.PkgLevel = CurPkg.Item.PKG_LEVEL;
@@ -551,58 +548,75 @@
            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_RESULT = "Y",
                TRACE_INFO = $"产品条码[{CurPosition.CurWipSN.SN}]包装完成",
            };
                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_RESULT = "Y",
                    TRACE_INFO = $"产品条码[{string.Join(",", CurPosition.CurSN)}]包装完成",
                };
                wipActs.Add(wipAct);
            }
            //保存数据
            CurStep.DBSubmitAction = () =>
            {
                var db = CurPosition.GetCommitDB();
                db.Storageable(wipAct, CurPosition.UserCode).ExecuteCommand();
                db.Storageable(wipActs, CurPosition.UserCode).ExecuteCommand();
            };
            //如果工序上下文中没有包装记录则新建一个
            if (CurPosition.Context.ContainsKey("CurPackage"))
            if (CurPkg.IsFinished)
            {
                CurPosition.Context["CurPackage"] = CurPkg;
                //最外层包装已经完成包装,则把工序中暂存标记设为false,统一提交包装内产品的过站记录
                CurPosition.NeedTemporaryStoreDBCommitAction = false;
                //删除工序上下文中的包装记录
                CurPosition.Context.Remove("CurPackage");
            }
            else
            {
                CurPosition.Context.Add("CurPackage", CurPkg);
                //最外层包装未完成包装,则把工序中暂存标记设为true,待全部包装完成再统一提交包装内产品的过站记录
                CurPosition.NeedTemporaryStoreDBCommitAction = true;
                //如果工序上下文中没有包装记录则新建一个
                if (CurPosition.Context.ContainsKey("CurPackage"))
                {
                    CurPosition.Context["CurPackage"] = CurPkg;
                }
                else
                {
                    CurPosition.Context.Add("CurPackage", CurPkg);
                }
            }
            IsFinished = true;
            action.LocaleMsg = new($"产品条码[{CurPosition.CurWipSN.SN}]包装完成");
            action.LocaleMsg = new("MES.WorkAction.PackingAction.PackingSuccess", CurPosition.CurWipSN.SN);
            action.LocaleMsg = new($"产品条码[{CurPosition.CurSN}]包装完成");
            action.LocaleMsg = new("MES.WorkAction.PackingAction.PackingSuccess", CurPosition.CurSN);
            return action;
        }
Tiger.Business.MES/WorkAction/PrintLabel.cs
@@ -50,7 +50,7 @@
        /// <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;
        }
@@ -107,45 +107,51 @@
            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;
Tiger.Business.MES/WorkAction/WipExtInfo.cs
@@ -23,7 +23,7 @@
        public MES_WO_ACTION Setting { get; set; }
        #endregion
        public BAS_WIP_EXT ExtInfo { get; set; } 
        public MES_WIP_EXT CurWipExt { get; set; }
        public List<MES_WIP_EXT> CurWipExt { get; set; }
        #endregion Propertys & Variables
        #region Functions
@@ -44,12 +44,19 @@
            var seq = Setting.ITEM_CODE.ToInt32();
            ExtInfo = Biz.Db.Queryable<BAS_WIP_EXT>().Where(q => q.SEQ == seq).First();
            //获取当前SN的扩展信息
            CurWipExt = Biz.Db.Queryable<MES_WIP_EXT>().Where(q => q.SN == CurPosition.CurWipSN.SN).First() ?? new ()
            CurWipExt = Biz.Db.Queryable<MES_WIP_EXT>().Where(q => CurPosition.CurWipSNs.Any(w => w.SN == q.SN)).ToList();
            foreach (var wipSN in CurPosition.CurWipSNs)
            {
                AUTH_ORG = CurPosition.CurWipSN.AUTH_ORG,
                AUTH_PROD = CurPosition.CurWipSN.AUTH_PROD,
                SN = CurPosition.CurWipSN.SN,
            };
                if (!CurWipExt.Any(q => q.SN == wipSN.SN))
                {
                    CurWipExt.Add(new()
                    {
                        AUTH_ORG = wipSN.AUTH_ORG,
                        AUTH_PROD = wipSN.AUTH_PROD,
                        SN = wipSN.SN,
                    });
                }
            }
        }
        /// <summary>
@@ -111,7 +118,7 @@
                    //action.LocaleMsg = new Locale($"错误:[{ExtInfo.FIELD_NAME}]标签条码不能为空,请重新扫描");
                    action.LocaleMsg = new Locale("MES.WorkAction.WipExtInfo.SnEmptyError", ExtInfo.FIELD_NAME);
                }
                if (input.SN == CurPosition.CurWipSN.SN)
                if (CurPosition.CurWipSNs.Any(w => w.SN == input.SN))
                {
                    action.IsSuccessed = isOK = false;
                    //action.LocaleMsg = new Locale($"错误:扫描到产品条码[{input.SN}],请重新扫描[{ExtInfo.FIELD_NAME}]标签条码");
@@ -130,10 +137,10 @@
            }
            catch (System.Exception ex)
            {
                action.CatchExceptionWithLog(ex, $"扩展信息绑定行为:产品[{CurPosition.CurWipSN.SN}]绑定[{ExtInfo.FIELD_NAME}]标签条码[{input.SN}]保存异常");
                action.CatchExceptionWithLog(ex, $"扩展信息绑定行为:产品[{CurPosition.CurSN}]绑定[{ExtInfo.FIELD_NAME}]标签条码[{input.SN}]保存异常");
                action.IsSuccessed = false;
                //action.LocaleMsg = new($"产品[{CurPosition.CurWipSN.SN}]绑定[{ExtInfo.FIELD_NAME}]标签条码[{input.SN}]保存异常,工序已重置,请重新扫描进站产品条码");
                action.LocaleMsg = new("MES.WorkAction.WipExtInfo.SaveExtInfoException", CurPosition.CurWipSN.SN, ExtInfo.FIELD_NAME, input.SN);
                action.LocaleMsg = new("MES.WorkAction.WipExtInfo.SaveExtInfoException", CurPosition.CurSN, ExtInfo.FIELD_NAME, input.SN);
                CurPosition.ResetNode();
            }
            return action;
@@ -148,50 +155,55 @@
            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 = CurWipExt.ToJson(),
                ACT_RESULT = "Y",
                TRACE_INFO = $"产品[{CurPosition.CurWipSN.SN}]绑定[{ExtInfo.FIELD_NAME}]标签条码[{CurWipExt.GetType().GetProperty($"FIELD_{ExtInfo.SEQ.ToString("00")}")?.GetValue(CurWipExt)?.ToString()}]保存成功",
            };
                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 = CurWipExt.ToJson(),
                    ACT_RESULT = "Y",
                    TRACE_INFO = $"产品[{CurPosition.CurSN}]绑定[{ExtInfo.FIELD_NAME}]标签条码[{CurWipExt.GetType().GetProperty($"FIELD_{ExtInfo.SEQ.ToString("00")}")?.GetValue(CurWipExt)?.ToString()}]保存成功",
                };
                wipActs.Add(wipAct);
            }
            //保存数据
            CurStep.DBSubmitAction = () =>
            {
                var db = CurPosition.GetCommitDB();
                db.Storageable(wipAct, CurPosition.UserCode).ExecuteCommand();
                db.Storageable(wipActs, CurPosition.UserCode).ExecuteCommand();
                db.Storageable(CurWipExt, CurPosition.UserCode).ExecuteCommand();
            };
            IsFinished = true;
            //action.LocaleMsg = new($"产品[{CurPosition.CurWipSN.SN}]绑定[{ExtInfo.FIELD_NAME}]标签条码[{CurWipExt.GetType().GetProperty($"FIELD_{ExtInfo.SEQ.ToString("00")}")?.GetValue(CurWipExt)?.ToString()}]保存成功");
            action.LocaleMsg = new("MES.WorkAction.WipExtInfo.SaveSuccess", CurPosition.CurWipSN.SN, ExtInfo.FIELD_NAME, CurWipExt.GetType().GetProperty($"FIELD_{ExtInfo.SEQ.ToString("00")}")?.GetValue(CurWipExt)?.ToString());
            action.LocaleMsg = new("MES.WorkAction.WipExtInfo.SaveSuccess", CurPosition.CurSN, ExtInfo.FIELD_NAME, CurWipExt.GetType().GetProperty($"FIELD_{ExtInfo.SEQ.ToString("00")}")?.GetValue(CurWipExt)?.ToString());
            return action;
        }
Tiger.Business/MES/Biz.WorkBatch.cs
@@ -244,7 +244,7 @@
                        action.IsSuccessed = false;
                        action.Data.SetValue(this, null);
                        var nextList = Nodes.Where(q => q.IS_FIRST_NODE == "Y");
                        action.LocaleMsg = new("MES.WorkBatch.GotoNextNodeException", wipSN.SN, nextNode.NODE_NAME, string.Join(", ", nextList.Select(q => q.NODE_NAME + (q.CAN_SKIP == "Y" ? $"({T(L("MES.WorkBatch.Optional"), input.Locale)})" : ""))));
                        action.LocaleMsg = new("MES.WorkBatch.GotoNextNodeException", input.SN, nextNode.NODE_NAME, string.Join(", ", nextList.Select(q => q.NODE_NAME + (q.CAN_SKIP == "Y" ? $"({T(L("MES.WorkBatch.Optional"), input.Locale)})" : ""))));
                        return action;
                    }
                }
@@ -279,7 +279,7 @@
                            action.IsSuccessed = false;
                            action.Data.SetValue(this, null);
                            var nextList = reflowNodes.Where(q => wipSN.REFLOW_NODE.IsNullOrEmpty() || wipSN.REFLOW_NODE == q.NODE_NAME);
                            action.LocaleMsg = new("MES.WorkBatch.ReflowToNodeException", nextNode.NODE_NAME, wipSN.SN, curNode.NODE_NAME, string.Join(", ", nextList.Select(q => q.NODE_NAME + (q.CAN_SKIP == "Y" ? $"({T(L("MES.WorkBatch.Optional"), input.Locale)})" : ""))));
                            action.LocaleMsg = new("MES.WorkBatch.ReflowToNodeException", nextNode.NODE_NAME, input.SN, curNode.NODE_NAME, string.Join(", ", nextList.Select(q => q.NODE_NAME + (q.CAN_SKIP == "Y" ? $"({T(L("MES.WorkBatch.Optional"), input.Locale)})" : ""))));
                            return action;
                        }
                    }
@@ -289,7 +289,7 @@
                    {
                        action.IsSuccessed = false;
                        action.Data.SetValue(this, null);
                        action.LocaleMsg = new("MES.WorkBatch.PleaseGotoRepair", curNode.NODE_NAME, wipSN.SN);
                        action.LocaleMsg = new("MES.WorkBatch.PleaseGotoRepair", curNode.NODE_NAME, input.SN);
                        return action;
                    }
                    //正常工序过站
@@ -310,7 +310,7 @@
                            action.IsSuccessed = false;
                            action.Data.SetValue(this, null);
                            var nextList = nextNodes.Where(q => NodeSets.Any(s => s.NODE_ID == q.ID && s.IS_ACTIVE == "Y" && s.CAN_SKIP != "Y"));
                            action.LocaleMsg = new("MES.WorkBatch.GotoNextNodeException", wipSN.SN, nextNode.NODE_NAME, string.Join(", ", nextList.Select(q => q.NODE_NAME + (q.CAN_SKIP == "Y" ? $"({T(L("MES.WorkBatch.Optional"), input.Locale)})" : ""))));
                            action.LocaleMsg = new("MES.WorkBatch.GotoNextNodeException", input.SN, nextNode.NODE_NAME, string.Join(", ", nextList.Select(q => q.NODE_NAME + (q.CAN_SKIP == "Y" ? $"({T(L("MES.WorkBatch.Optional"), input.Locale)})" : ""))));
                            return action;
                        }
                        //如果当前工序没有必须执行的后续工序,则在前置工序查找还有没有后续工序没完成的工序,有则尝试执行
@@ -339,7 +339,7 @@
                                action.IsSuccessed = false;
                                action.Data.SetValue(this, null);
                                var nextList = nextNodes.Where(q => NodeSets.Any(s => s.NODE_ID == q.ID && s.IS_ACTIVE == "Y"));
                                action.LocaleMsg = new("MES.WorkBatch.GotoNextNodeException", wipSN.SN, nextNode.NODE_NAME, string.Join(", ", nextList.Select(q => q.NODE_NAME + (q.CAN_SKIP == "Y" ? $"({T(L("MES.WorkBatch.Optional"), input.Locale)})" : ""))));
                                action.LocaleMsg = new("MES.WorkBatch.GotoNextNodeException", input.SN, nextNode.NODE_NAME, string.Join(", ", nextList.Select(q => q.NODE_NAME + (q.CAN_SKIP == "Y" ? $"({T(L("MES.WorkBatch.Optional"), input.Locale)})" : ""))));
                                return action;
                            }
                        }
Tiger.IBusiness/MES/Transaction/IPosition.cs
@@ -18,8 +18,9 @@
        public MES_LINE CurLine { get; set; }
        public MES_POSITION CurPosition { get; set; }
        public IWorkBatch WorkBatch { get; }
        public MES_WIP_DATA CurWipSN { get; set; }
        public MES_WIP_HIS CurWipSNHis { get; set; }
        public List<MES_WIP_DATA> CurWipSNs { get; set; }
        public string CurSN { get; }
        public List<MES_WIP_HIS> CurWipSNHiss { get; set; }
        public Dictionary<string, object> Context { get; set; }
        /// <summary>
        /// 是否需要临时存储数据库提交操作,待需要的时候再提交
Tiger.Model.Net/Entitys/MES/BIZ_MES_WO_SN.cs
@@ -6,48 +6,58 @@
namespace Tiger.Model
{
    /// <summary>
    /// 实体:工单条码明细
    /// </summary>
    [Description("Primary:ID")]
    [DisplayName("工单条码明细")]
    [Serializable]
    [SugarTable("BIZ_MES_WO_SN")]
    public class BIZ_MES_WO_SN : DbEntityWithAuth
    {
        #region 构造函数
        /// <summary>
        /// 实体:工单条码明细
        /// </summary>
        public BIZ_MES_WO_SN() {}
        #endregion
        #region 公共属性
        /// <summary>
        /// 关联工单号
        /// </summary>
        [DisplayName("关联工单号")]
        public string WORK_ORDER { get; set; }
        /// <summary>
        /// 条码
        /// </summary>
        [DisplayName("条码")]
        public string SN { get; set; }
    /// <summary>
    /// 实体:工单条码明细
    /// </summary>
    [Description("Primary:ID")]
    [DisplayName("工单条码明细")]
    [Serializable]
    [SugarTable("BIZ_MES_WO_SN")]
    public class BIZ_MES_WO_SN : DbEntityWithAuth
    {
        #region 构造函数
        /// <summary>
        /// 状态(0NotInput未投入|1Inputed已投入|2Finished已完工)
        /// 实体:工单条码明细
        /// </summary>
        [DisplayName("状态(0NotInput未投入|1Inputed已投入|2Finished已完工)")]
        public int STATUS { get; set; }
        public BIZ_MES_WO_SN() { }
        #endregion
        #region 公共属性
        /// <summary>
        /// 关联工单号
        /// </summary>
        [DisplayName("关联工单号")]
        public string WORK_ORDER { get; set; }
        /// <summary>
        /// 工单批次号
        /// </summary>
        [DisplayName("工单批次号")]
        public string BATCH_NO { get; set; }
        /// <summary>
        /// 条码
        /// </summary>
        [DisplayName("条码")]
        public string SN { get; set; }
        /// <summary>
        /// 托盘/载具条码
        /// </summary>
        [DisplayName("托盘/载具条码")]
        public string TRAY_SN { get; set; }
        /// <summary>
        /// 最外层包装条码
        /// </summary>
        [DisplayName("最外层包装条码")]
        public string OUTER_SN { get; set; }
        /// <summary>
        /// 状态(0NotInput未投入|1Inputed已投入|2Finished已完工)
        /// </summary>
        [DisplayName("状态(0NotInput未投入|1Inputed已投入|2Finished已完工)")]
        public int STATUS { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [DisplayName("备注")]
        public string REMARK { get; set; }
        public string REMARK { get; set; }
        #endregion
        #region 虚拟属性
@@ -86,19 +96,19 @@
        /// 枚举:状态(0NotInput未投入|1Inputed已投入|2Finished已完工)
        /// </summary>
        public enum STATUSs
        {
            [Description("未投入")]
            NotInput = 0,
            [Description("已投入")]
            Inputed = 1,
        {
            [Description("未投入")]
            NotInput = 0,
            [Description("已投入")]
            Inputed = 1,
            [Description("已完工")]
            Finished = 2,
        }
        #endregion
        #endregion
        #region 公共方法
        #region 公共方法
        #endregion
        #endregion
    }//endClass
    }//endClass
}
Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs
@@ -170,8 +170,15 @@
    public class AssemblySetting
    {
        public string ITEM_CODE { get; set; }
        public string RULE_CODE { get; set; }
        public int QTY { get; set; }
        public string RULE_CODE { get; set; }
        /// <summary>
        /// 是否批次物料
        /// </summary>
        public bool IsBatchItem { get; set; }
        /// <summary>
        /// 上料数量
        /// </summary>
        public int QTY { get; set; }
    }
    /// <summary>
@@ -192,6 +199,10 @@
        public BAS_ITEM ItemInfo { get; set; }
        public string RuleCode { get; set; }
        public int LoadQty { get; set; }
        /// <summary>
        /// 是否批次物料
        /// </summary>
        public bool IsBatchItem { get; set; }
        public List<MES_WIP_ASSY> Records { get; set; } = new List<MES_WIP_ASSY>();
        public bool IsFinished { get; set; } = false;
Tiger.Model.Net/Entitys/SYS/V_USER_MENU.cs
@@ -23,10 +23,6 @@
        #region 公共属性
        /// <summary>
        /// GUID
        /// </summary>
        public string ID { get; set; }
        /// <summary>
        /// 用户ID
        /// </summary>
        public string USER_ID { get; set; }
Tiger.Model.Net/Entitys/SYS/V_USER_ORG.cs
@@ -23,10 +23,6 @@
        #region 公共属性
        /// <summary>
        /// GUID
        /// </summary>
        public string ID { get; set; }
        /// <summary>
        /// 用户ID
        /// </summary>
        public string USER_ID { get; set; }
Tiger.Model.Net/Entitys/SYS/V_USER_PROD.cs
@@ -23,10 +23,6 @@
        #region 公共属性
        /// <summary>
        /// GUID
        /// </summary>
        public string ID { get; set; }
        /// <summary>
        /// 用户ID
        /// </summary>
        public string USER_ID { get; set; }
Tiger.Model.Net/Entitys/SYS/V_USER_WH.cs
@@ -23,10 +23,6 @@
        #region 公共属性
        /// <summary>
        /// GUID
        /// </summary>
        public string ID { get; set; }
        /// <summary>
        /// 用户ID
        /// </summary>
        public string USER_ID { get; set; }
Tiger.Model.Net/Entitys/WMS/V_SRM_ITEM.cs
@@ -1,5 +1,4 @@
using System;
using System;
using SqlSugar;
using System.Linq;
using System.ComponentModel;