服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-10-16 869738d1cdf4385203e7a5fc5e4f2735e9840d46
Tiger.Business.MES/WorkAction/ThreeInOne.cs
@@ -268,7 +268,7 @@
            var isOK = true;
            //客户条码已绑定其他厂内条码
            if (!CustCSN.IsNullOrEmpty() && !CustCSN.FLOW_SN.IsNullOrEmpty() && CustCSN.FLOW_SN != FlowCSN.FLOW_SN)
            if (isOK && !CustCSN.IsNullOrEmpty() && !CustCSN.FLOW_SN.IsNullOrEmpty() && CustCSN.FLOW_SN != FlowCSN.FLOW_SN)
            {
                CurStep.SetStatusMessage(StepStatus.Error, Biz.L("请扫描正确的客户标签"));
                action.Data.ShortMsg = new("请扫描正确的客户标签", ShortMessage.Types.Failed);
@@ -277,7 +277,7 @@
                action.LocaleMsg = new("MES.WorkAction.ThreeInOne.BindingOtherSN", CurPosition.CurWipSNs.First().SN, CustCSN.CUST_SN, CustCSN.FLOW_SN);
            }
            //客户条码不属于当前工单的客户
            if (!CustCSN.IsNullOrEmpty() && CustCSN.CUST_CODE.IsNullOrEmpty(CurPosition.WorkBatch.WO.CUST_CODE) != CurPosition.WorkBatch.WO.CUST_CODE)
            if (isOK && !CustCSN.IsNullOrEmpty() && CustCSN.CUST_CODE.IsNullOrEmpty(CurPosition.WorkBatch.WO.CUST_CODE) != CurPosition.WorkBatch.WO.CUST_CODE)
            {
                CurStep.SetStatusMessage(StepStatus.Error, Biz.L("请扫描正确的客户标签"));
                action.Data.ShortMsg = new("请扫描正确的客户标签", ShortMessage.Types.Failed);
@@ -286,7 +286,7 @@
                action.LocaleMsg = new("MES.WorkAction.ThreeInOne.NotSameCustomer", CustCSN.CUST_SN, CustCSN.CUST_CODE, CurPosition.WorkBatch.WO.CUST_CODE);
            }
            //验证产品客户标签条码规则
            if (!CustInfo.RULE_CODE.IsNullOrEmpty() && !Biz.CodeRule[CustInfo.RULE_CODE].IsNullOrEmpty())
            if (isOK && !CustInfo.IsNullOrEmpty() && !CustInfo.RULE_CODE.IsNullOrEmpty() && !Biz.CodeRule[CustInfo.RULE_CODE].IsNullOrEmpty())
            {
                var result = Biz.CodeRule[CustInfo.RULE_CODE].Verify(CustCSN.CUST_SN);
                if (!result.IsSuccessed)
@@ -326,8 +326,8 @@
            //更新厂内流程码
            FlowCSN.CUST_CODE = CurPosition.WorkBatch.WO.CUST_CODE;
            FlowCSN.WORK_ORDER = CurPosition.WorkBatch.WO.ORDER_NO;
            FlowCSN.ITEM_CODE = CurPosition.WorkBatch.WO.ITEM_CODE;
            FlowCSN.PKG_ORDER = CurPosition.WorkBatch.WO.ORDER_NO;
            FlowCSN.PROD_CODE = CurPosition.WorkBatch.WO.ITEM_CODE;
            //记录行为操作记录
            var wipActs = new List<MES_WIP_ACT>();
@@ -378,9 +378,10 @@
                    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_VALUE_1 = Label?.LABEL_CODE,
                    ACT_VALUE_2 = Label?.Variables.ToJson(),
                    ACT_RESULT = "Y",
                    ELAPSED_TIME = CurStep.GetElapsedTime().TotalMilliseconds.ToInt64(),
                    TRACE_INFO = $"厂内条码[{FlowCSN.FLOW_SN}]绑定客户条码[{FlowCSN.CUST_SN}]成功",
                };
                wipActs.Add(wipAct);