From eec9f268552af1d0ce8c95312930770669f1cc18 Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期五, 16 八月 2024 22:40:16 +0800 Subject: [PATCH] 增加客户端需要的工序信息和短消息 --- Tiger.Business.MES/WorkAction/WipExtInfo.cs | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/Tiger.Business.MES/WorkAction/WipExtInfo.cs b/Tiger.Business.MES/WorkAction/WipExtInfo.cs index 7f445e4..14a059c 100644 --- a/Tiger.Business.MES/WorkAction/WipExtInfo.cs +++ b/Tiger.Business.MES/WorkAction/WipExtInfo.cs @@ -83,6 +83,7 @@ //濡傛灉杩斿洖鎴愬姛鍒欒涓哄綋鍓嶈涓哄彲浠ュ紑濮嬫墽琛岋紝鍚﹀垯杩斿洖澶辫触 action.IsSuccessed = true; + action.Data.ShortMsg = new("缁戝畾寮�濮�", ShortMessage.Types.Success); return action; } @@ -115,12 +116,14 @@ //楠岃瘉鎵弿鐨勬潯鐮佹槸鍚N鐨勬墿灞曚俊鎭殑鏍囩 if (input.SN.IsNullOrEmpty()) { + action.Data.ShortMsg = new("缁戝畾澶辫触", ShortMessage.Types.Failed); action.IsSuccessed = isOK = false; //action.LocaleMsg = new Locale($"閿欒锛歔{ExtInfo.FIELD_NAME}]鏍囩鏉$爜涓嶈兘涓虹┖锛岃閲嶆柊鎵弿"); action.LocaleMsg = new Locale("MES.WorkAction.WipExtInfo.SnEmptyError", ExtInfo.FIELD_NAME); } if (CurPosition.CurWipSNs.Any(w => w.SN == input.SN)) { + action.Data.ShortMsg = new("缁戝畾澶辫触", ShortMessage.Types.Failed); action.IsSuccessed = isOK = false; //action.LocaleMsg = new Locale($"閿欒锛氭壂鎻忓埌浜у搧鏉$爜[{input.SN}]锛岃閲嶆柊鎵弿[{ExtInfo.FIELD_NAME}]鏍囩鏉$爜"); action.LocaleMsg = new Locale("MES.WorkAction.WipExtInfo.ScanProdSnError", input.SN, ExtInfo.FIELD_NAME); @@ -137,6 +140,7 @@ } catch (System.Exception ex) { + action.Data.ShortMsg = new("缁戝畾寮傚父", ShortMessage.Types.Exception); action.CatchExceptionWithLog(ex, $"鎵╁睍淇℃伅缁戝畾琛屼负锛氫骇鍝乕{CurPosition.CurSN}]缁戝畾[{ExtInfo.FIELD_NAME}]鏍囩鏉$爜[{input.SN}]淇濆瓨寮傚父"); action.IsSuccessed = false; //action.LocaleMsg = new($"浜у搧[{CurPosition.CurWipSN.SN}]缁戝畾[{ExtInfo.FIELD_NAME}]鏍囩鏉$爜[{input.SN}]淇濆瓨寮傚父锛屽伐搴忓凡閲嶇疆锛岃閲嶆柊鎵弿杩涚珯浜у搧鏉$爜"); @@ -210,6 +214,7 @@ }; IsFinished = true; + action.Data.ShortMsg = new("缁戝畾瀹屾垚", ShortMessage.Types.Success); //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.CurSN, ExtInfo.FIELD_NAME, CurWipExt.GetType().GetProperty($"FIELD_{ExtInfo.SEQ.ToString("00")}")?.GetValue(CurWipExt)?.ToString()); return action; -- Gitblit v1.9.3