From 353ae2ebfdb15428e6891a095de13cd2731843b9 Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期三, 25 九月 2024 11:40:53 +0800 Subject: [PATCH] 包装投入检查增加判断是否在U9有投产记录 --- Tiger.Api/Language.db | 0 Tiger.Business.MES/WorkAction/PackageInputCheck.cs | 19 ++++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletions(-) diff --git a/Tiger.Api/Language.db b/Tiger.Api/Language.db index 6db317b..a026c7e 100644 --- a/Tiger.Api/Language.db +++ b/Tiger.Api/Language.db Binary files differ diff --git a/Tiger.Business.MES/WorkAction/PackageInputCheck.cs b/Tiger.Business.MES/WorkAction/PackageInputCheck.cs index 8d487a0..c924b92 100644 --- a/Tiger.Business.MES/WorkAction/PackageInputCheck.cs +++ b/Tiger.Business.MES/WorkAction/PackageInputCheck.cs @@ -26,6 +26,7 @@ public MES_CUST_SN FlowCSN { get; set; } public List<mes_MOPickList> MoPickList { get; set; } public BAS_ITEM_CUST CustInfo { get; set; } + public double U9Cost = 0; #endregion Propertys & Variables #region Functions @@ -101,6 +102,22 @@ } var wipSn = CurPosition.CurWipSNs.First(); + //鍒ゆ柇褰撳墠鏉$爜鏄惁鍦║9鎶曚骇 + var begin = DateTime.Now; + if (Biz.DataSource["YadaU9C"].Client.Queryable<mes_HisBoxBarCode>().Any(q => q.BarCode == wipSn.SN)) + { + CurStep.Message = Biz.L("鎶曟枡閿欒"); + CurStep.Status = StepStatus.Error; + action.Data.ShortMsg = new("鎶曟枡閿欒", ShortMessage.Types.Failed); + action.IsSuccessed = false; + //action.LocaleMsg = new($"鎶曟枡閿欒锛屾潯鐮乕{0}]宸茬粡鍦║9鏈夋姇浜ц褰曪紝涓嶅厑璁稿湪MES閲嶅鎶曞叆"); + action.LocaleMsg = new("MES.WorkAction.PackageInputCheck.U9HasHistory", wipSn.SN); + //閲嶇疆宸ュ簭鎿嶄綔 + CurPosition.ResetNode(); + return action; + } + U9Cost = (DateTime.Now - begin).TotalSeconds; + FlowCSN = Biz.Db.Queryable<MES_CUST_SN>().Where(q => q.FLOW_SN == wipSn.SN || q.CUST_SN == wipSn.SN).First(); //鎵句笉鍒扮敓浜ц褰曪紝璁や负鎵弿閿欒 if (FlowCSN.IsNullOrEmpty()) @@ -229,7 +246,7 @@ ACT_TYPE = NodeAct.ACT_TYPE, ACT_SN = wipSn.SN, ACT_RESULT = "Y", - TRACE_INFO = $"鏉$爜[{wipSn.SN}]鍙互鍦ㄥ伐鍗昜{wipSn.WORK_ORDER}]鎶曟枡鐢熶骇", + TRACE_INFO = $"鏉$爜[{wipSn.SN}]鍙互鍦ㄥ伐鍗昜{wipSn.WORK_ORDER}]鎶曟枡鐢熶骇锛屽叾涓璘9妫�鏌ヨ�楁椂{U9Cost:0.0000}绉�", }; wipActs.Add(wipAct); } -- Gitblit v1.9.3