服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-10-13 6c781d6e14d4fbd6903006d71acdf45ec87632c1
修复手动结束包装后支持检查条工单完工
已修改3个文件
16 ■■■■ 文件已修改
Tiger.Business.MES/Transaction/PackingNode.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/WorkAction/PackingAction.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/Transaction/PackingNode.cs
@@ -621,12 +621,18 @@
        /// <returns></returns>
        public ApiAction<SubmitOutput> DoIfFinishAllSteps(ApiAction<SubmitOutput> action, string locale)
        {
            var curPkg = Context.ContainsKey("CurPackage") ? Context["CurPackage"] as WipPkg : null;
            var operInfo = SetOperNodeInfo(CurOperInfo(locale));
            Action endAction = null;
            //如果当前条码已经走到流程终点则记录条码完工
            if (operInfo.IsReachedEndNode)
            {
                //标记当前包装信息为终点站
                if (!curPkg.IsNullOrEmpty())
                {
                    curPkg.IsReachedEndNode = true;
                }
                //更新工单条码明细信息
                var woSNs = CurBatch.WoSNs.Where(q => CurWipSNs.Any(w => q.WIP_ID == w.ID)).ToList();
                foreach (var woSN in woSNs)
@@ -673,7 +679,7 @@
            //保存成功,返回过站消息
            CurOperInfo(locale).InputQty += CurWipSNs.Count;
            action.Data.Data = new PackingActionOutput() { PkgInfo = Context.ContainsKey("CurPackage") ? Context["CurPackage"] as WipPkg : null };
            action.Data.Data = new PackingActionOutput() { PkgInfo = curPkg };
            action.Data.OperInfo = operInfo;
            action.Data.ShortMsg = new(CurWipSNs.Any(q => q.DFT_FLAG == "Y") ? "不良过站" : "良品过站", ShortMessage.Types.Success);
            //action.LocaleMsg = new($"工单[{CurWipSN.WORK_ORDER}]的条码[{CurWipSN.SN}]在岗位[{CurWipSN.POST_CODE}]工序[{CurWipSN.NODE_NAME}]过站成功,状态[{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]");
Tiger.Business.MES/WorkAction/PackingAction.cs
@@ -893,7 +893,9 @@
            }
            else
            {
                var _pkgList = CurPkg.IsFinished ? GetPackageList(CurPkg.Item) : new();
                if (CurPkg.IsFinished)
                {
                    var _pkgList = GetPackageList(CurPkg.Item);
               
                //最外层包装已经完成包装,则把工序中暂存标记设为false,统一提交包装内产品的过站记录
                CurPosition.NeedTemporaryStoreDBCommitAction = false;
@@ -923,11 +925,12 @@
                    }
                });
                //如果当前条码已经完工,检查当前工单批次和工单是否完工
                //if (action.Data.OperInfo.IsReachedEndNode)
                    if (CurPkg.IsReachedEndNode)
                {
                    CurPosition.WorkBatch.CheckIsComplete(CurPosition.UserCode);
                }
            }
            }
            if (CurPkg.IsFinished)
            {
Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs
@@ -168,6 +168,7 @@
        public bool IsWeighed { get; set; } = false;
        public WeightInfo WeightInfo { get; set; } = new WeightInfo();
        public bool IsFinished => Item.IsFinished;
        public bool IsReachedEndNode { get; set; } = false;
    }
    /// <summary>