From 9984bb1eb673f4ea6d952e191040a674583d2f20 Mon Sep 17 00:00:00 2001 From: YangYuGang <1378265336@qq.com> Date: 星期五, 21 三月 2025 15:53:52 +0800 Subject: [PATCH] 添加声音 --- Tiger.Business.WMS/Transaction/In_Default.cs | 32 +++++----- Tiger.Business.WMS/Transaction/Out_Default.cs | 21 +++--- Tiger.Business.WMS/Transaction/Yada/Count_BIZ_U9_ASN.cs | 12 ++-- Tiger.Business.WMS/Transaction/Yada/In_BIZ_U9_RECEIPT.cs | 31 +++++----- Tiger.Business.WMS/Transaction/In_SemiProd.cs | 2 Tiger.Business.WMS/Common/WmsTask.cs | 56 ++++++++++++++++++ 6 files changed, 107 insertions(+), 47 deletions(-) diff --git a/Tiger.Business.WMS/Common/WmsTask.cs b/Tiger.Business.WMS/Common/WmsTask.cs index 62b3218..a9ddf36 100644 --- a/Tiger.Business.WMS/Common/WmsTask.cs +++ b/Tiger.Business.WMS/Common/WmsTask.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using Tiger.IBusiness; using Tiger.Model; +using Tiger.Model.Entitys.MES.Position; namespace Tiger.Business.WMS.Transaction { @@ -288,6 +289,61 @@ return result; } + /// <summary> + /// 璁剧疆褰撳墠鏉$爜鐨勫伐搴忎俊鎭� + /// </summary> + public ApiAction<ScanOutput> SetOutPutMqttMsg(ApiAction<ScanOutput> action, string locale = null) + { + MQTT.Message msg = new() + { + IsSuccessed = action.IsSuccessed, + Content = Biz.T(action.LocaleMsg, locale), + }; + switch (action.Status) + { + case ApiAction.StatusCodes.Success: + msg.Voice = MQTT.Voice.Success; + msg.Color = "#FF1E90FF"; + break; + case ApiAction.StatusCodes.Warning: + msg.Voice = MQTT.Voice.Warning; + msg.Color = "#FFB8860B"; + break; + case ApiAction.StatusCodes.Error: + case ApiAction.StatusCodes.Failed: + msg.Voice = MQTT.Voice.Fail; + msg.Color = "#FFFF0000"; + break; + case ApiAction.StatusCodes.Exception: + msg.Voice = MQTT.Voice.Fail; + msg.Color = "#FF8B0000"; + break; + case ApiAction.StatusCodes.Normal: + case ApiAction.StatusCodes.NeedConfrim: + case ApiAction.StatusCodes.Confrimed: + default: + msg.Voice = MQTT.Voice.Silent; + msg.Color = "#FF000000"; + break; + } + if (action.IsSuccessed) + { + msg.Voice = MQTT.Voice.Pass; + msg.Color = "#FF228B22"; + } + else if (!action.IsSuccessed) + { + msg.Voice = MQTT.Voice.Fail; + msg.Color = "#FFFF0000"; + } + else + { + msg.Voice = MQTT.Voice.Silent; + msg.Color = "#FF000000"; + } + action.Data.MqttMsg = msg; + return action; + } #endregion Functions public override bool Close(bool needSaveHistoryLog = false) diff --git a/Tiger.Business.WMS/Transaction/In_Default.cs b/Tiger.Business.WMS/Transaction/In_Default.cs index 9f0f1cd..a5ad68b 100644 --- a/Tiger.Business.WMS/Transaction/In_Default.cs +++ b/Tiger.Business.WMS/Transaction/In_Default.cs @@ -13,6 +13,8 @@ using Tiger.Business.WMS.Sharetronic.Shelf; //using Microsoft.IdentityModel.Tokens; using Tiger.Model.MES.Yada; +using static IronPython.Modules.PythonThread; +using Tiger.Model.Entitys.MES.Position; namespace Tiger.Business.WMS.Transaction { @@ -86,8 +88,8 @@ { action.IsSuccessed = false; action.LocaleMsg = result.LocaleMsg; - return action; - } + return SetOutPutMqttMsg(action, input.Locale); + } var inv = result.Data as Inventory; //楠岃瘉鏉$爜鏄惁姝g‘ @@ -96,7 +98,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L("鐘舵�乕{0}]寮傚父锛岃閲嶆柊鎵弿"); action.LocaleMsg = Biz.L("WMS.Default.ScanItem.StatusException", string.Join(',', inv.StatusList.Select(q => q.GetDesc()))); - return action; + return SetOutPutMqttMsg(action, input.Locale); } //鐗╂枡楠岃瘉 if (inv.ItemInfo.IsNullOrEmpty() || inv.ItemInfo.IS_ACTIVE == "N") @@ -104,7 +106,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L("鐗╂枡缂栫爜[{0}]涓嶅瓨鍦ㄦ垨鑰呰鐗╂枡鏈惎鐢�"); action.LocaleMsg = Biz.L("WMS.Default.ScanItem.ItemCodeNotExistsOrNotActive", inv.ItemInfo?.ITEM_CODE.IsNullOrEmpty(inv.Barcode.ItemCode)); - return action; + return SetOutPutMqttMsg(action, input.Locale); } if (inv.Items.Count == 0) @@ -194,7 +196,7 @@ action.Data.Command = Command = "ComfirmQty"; //action.LocaleMsg = Biz.L("璇风‘璁ゆ潯鐮乕{0}]鐨勬暟閲忔槸鍚︽纭�"); action.LocaleMsg = Biz.L("WMS.Default.ScanItem.ComfirmQty", input.SN); - return action; + return SetOutPutMqttMsg(action, input.Locale); } } @@ -208,8 +210,8 @@ action.Data.Data = CurInvItem.Items.Select(q => new { q.SN, q.QTY }); action.Data.Command = Command = "ComfirmQty"; //action.LocaleMsg = Biz.L("鏁伴噺涓嶈兘灏忎簬绛変簬闆讹紝璇烽噸鏂扮‘璁ゆ潯鐮乕{0}]鐨勬暟閲�"); - action.LocaleMsg = Biz.L("WMS.Default.ScanItem.ReComfirmQty", input.SN); - return action; + action.LocaleMsg = Biz.L("WMS.Default.ScanItem.ReComfirmQty", input.SN); + return SetOutPutMqttMsg(action, input.Locale); } else { @@ -235,7 +237,7 @@ { action.IsSuccessed = false; action.LocaleMsg = Biz.L(shelfApiResult.GetData<string>()); - return action; + return SetOutPutMqttMsg(action, input.Locale); } var reaultShelf = shelfApiResult.GetData<ShelfChangeModel>(); @@ -245,7 +247,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L($"璐ф灦[{0}]涓笉瀛樺湪id涓篬{1}]鐨勫偍浣嶏紝璇峰厛缁存姢璐ф灦淇℃伅"); action.LocaleMsg = Biz.L("WMS.Default.ScanItem.LocationNotExistsInShelf", CurScanShelf.Shelf.SHELF_CODE, reaultShelf.ledAddr); - return action; + return SetOutPutMqttMsg(action, input.Locale); } var locationData = MainDB.Queryable<WMS_ITEM>().Where(q => q.LOCATION_ID == nLocation.ID).First(); if (!locationData.IsNullOrEmpty()) @@ -253,7 +255,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L("鍌ㄤ綅[{0}]宸插瓨鏈夌墿鏂橻{1}]锛岃妫�鏌ョ郴缁熷簱瀛樹俊鎭�"); action.LocaleMsg = Biz.L($"WMS.Default.ScanShelf.ItemAlreadyExistsInLocation", nLocation.LOCATION_CODE, locationData.SN); - return action; + return SetOutPutMqttMsg(action, input.Locale); } CurScanShelf.LocationCode = nLocation.LOCATION_CODE; } @@ -264,7 +266,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L("璇疯緭鍏ユ垨鎵弿鏈夋晥鐨勮揣鏋�/鍌ㄤ綅鐮�"); action.LocaleMsg = Biz.L("WMS.Default.ScanShelf.ShelfCanNotEmpty"); - return action; + return SetOutPutMqttMsg(action, input.Locale); } nLocation = await MainDB.Queryable<WMS_LOCATION>().Where(t => t.LOCATION_CODE == CurScanShelf.LocationCode && t.AUTH_ORG == OrgCode).FirstAsync(); @@ -277,7 +279,7 @@ //action.LocaleMsg = Biz.L("鍌ㄤ綅[{0}]鍙兘瀛樻斁涓�涓墿鏂�"); action.LocaleMsg = Biz.L("WMS.Default.ScanItem.LocationSingleFailure", nLocation.LOCATION_CODE); ResetScan(); - return action; + return SetOutPutMqttMsg(action, input.Locale); } //鎵ц涓婃灦鏁版嵁澶勭悊 @@ -292,7 +294,7 @@ action.IsSuccessed = false; action.LocaleMsg = putonResult.LocaleMsg; ResetScan(); - return action; + return SetOutPutMqttMsg(action, input.Locale); } //瀹屾垚鎵�鏈夊鐞嗗悗浣跨敤浜嬪姟淇濆瓨鏁版嵁 @@ -305,7 +307,7 @@ //action.CatchExceptionWithLog(ex, $"鎵弿鏉$爜[{input.SN}]澶嶆牳寮傚父"); action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.ScanItem.ScanException", input.SN)); } - return action; + return SetOutPutMqttMsg(action, input.Locale); } /// <summary> @@ -429,7 +431,7 @@ //閲嶇疆鎵爜淇℃伅 ResetScanInfo(); - return action; + return SetOutPutMqttMsg(action, locale); } #endregion diff --git a/Tiger.Business.WMS/Transaction/In_SemiProd.cs b/Tiger.Business.WMS/Transaction/In_SemiProd.cs index 2d98e3c..8b103a4 100644 --- a/Tiger.Business.WMS/Transaction/In_SemiProd.cs +++ b/Tiger.Business.WMS/Transaction/In_SemiProd.cs @@ -81,7 +81,7 @@ { action.IsSuccessed = false; action.LocaleMsg = Biz.L("WMS.InSemiProd.ScanItem.WoEmptyFailure", input.SN); // $"宸ュ崟[{input.SN}]涓嶅瓨鍦�" - return action; + return SetOutPutMqttMsg(action, input.Locale); } var semiTemplateQty = (input.Data ?? "").JsonToObject<SemiTemplateQty>() ?? new SemiTemplateQty(); diff --git a/Tiger.Business.WMS/Transaction/Out_Default.cs b/Tiger.Business.WMS/Transaction/Out_Default.cs index f2521f5..aab2fe5 100644 --- a/Tiger.Business.WMS/Transaction/Out_Default.cs +++ b/Tiger.Business.WMS/Transaction/Out_Default.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Tiger.Model; using Tiger.IBusiness; +using Tiger.Model.Entitys.MES.Position; namespace Tiger.Business.WMS.Transaction { @@ -75,7 +76,7 @@ { action.IsSuccessed = false; action.LocaleMsg = result.LocaleMsg; - return action; + return SetOutPutMqttMsg(action, input.Locale); } var inv = result.Data as Inventory; @@ -85,7 +86,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L($"鐘舵�乕{0}]寮傚父锛岃閲嶆柊鎵弿"); action.LocaleMsg = Biz.L("WMS.Default.ScanItem.StatusException", string.Join(',', inv.StatusList.Select(x => x.GetDesc()))); - return action; + return SetOutPutMqttMsg(action, input.Locale); } //鍌ㄤ綅楠岃瘉 if (inv.Location.IsNullOrEmpty()) @@ -93,7 +94,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L($"鏉$爜[{0}]搴撳瓨淇℃伅寮傚父: 娌℃湁鍌ㄤ綅淇℃伅锛岃鍏堜笂鏋跺悗鍐嶆壂鎻�(鍌ㄤ綅Id: {1})"); action.LocaleMsg = Biz.L("WMS.Default.ScanItem.LocationIsNull", inv.CurPkg.SN, inv.CurPkg.LOCATION_ID); - return action; + return SetOutPutMqttMsg(action, input.Locale); } //鐗╂枡楠岃瘉 if (inv.ItemInfo.IsNullOrEmpty() || inv.ItemInfo.IS_ACTIVE == "N") @@ -101,7 +102,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L($"鐗╂枡缂栫爜[{0}]涓嶅瓨鍦ㄦ垨鑰呰鐗╂枡鏈惎鐢�"); action.LocaleMsg = Biz.L("WMS.Default.ScanItem.ItemCodeNotExistsOrNotActive", inv.ItemInfo.ITEM_CODE.IsNullOrEmpty(inv.Barcode.ItemCode)); - return action; + return SetOutPutMqttMsg(action, input.Locale); } CurInvItem = inv; @@ -112,7 +113,7 @@ action.Data.Command = Command = "ComfirmQty"; //action.LocaleMsg = Biz.L("璇风‘璁ゆ潯鐮乕{0}]瑕佷笅鏋剁殑鏁伴噺"); action.LocaleMsg = Biz.L("WMS.Default.ScanItem.ComfirmOutQty", input.SN); - return action; + return SetOutPutMqttMsg(action, input.Locale); } } @@ -128,7 +129,7 @@ action.Data.Command = Command = "ComfirmQty"; //action.LocaleMsg = Biz.L("涓嬫灦鏁伴噺涓嶈兘灏忎簬绛変簬闆讹紝璇烽噸鏂扮‘璁ゆ潯鐮乕{0}]鐨勪笅鏋舵暟閲�"); action.LocaleMsg = Biz.L("WMS.Default.ScanItem.ReComfirmOutQty", input.SN); - return action; + return SetOutPutMqttMsg(action, input.Locale); } else if (qtyList.Any(q => q.QTY > CurInvItem.Items.First(i => i.SN == q.SN).QTY)) { @@ -137,7 +138,7 @@ action.Data.Command = Command = "ComfirmQty"; //action.LocaleMsg = Biz.L("涓嬫灦鏁伴噺涓嶈兘瓒呰繃鍘熸潯鐮佹暟閲忥紝璇烽噸鏂扮‘璁ゆ潯鐮乕{0}]鐨勪笅鏋舵暟閲�"); action.LocaleMsg = Biz.L("WMS.Default.ScanItem.ReComfirmExceedOutQty", input.SN); - return action; + return SetOutPutMqttMsg(action, input.Locale); } else { @@ -158,7 +159,7 @@ action.IsSuccessed = false; action.LocaleMsg = downResult.LocaleMsg; ResetScan(); - return action; + return SetOutPutMqttMsg(action, input.Locale); } //鐏伅 @@ -176,7 +177,7 @@ //action.CatchExceptionWithLog(ex, $"鎵弿鏉$爜[{input.SN}]澶嶆牳寮傚父"); action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.ScanItem.ScanException", input.SN)); } - return action; + return SetOutPutMqttMsg(action, input.Locale); } /// <summary> @@ -292,7 +293,7 @@ //閲嶇疆宸ュ簭 ResetScan(); - return action; + return SetOutPutMqttMsg(action, locale); } #endregion diff --git a/Tiger.Business.WMS/Transaction/Yada/Count_BIZ_U9_ASN.cs b/Tiger.Business.WMS/Transaction/Yada/Count_BIZ_U9_ASN.cs index 9cb73f2..59baeb3 100644 --- a/Tiger.Business.WMS/Transaction/Yada/Count_BIZ_U9_ASN.cs +++ b/Tiger.Business.WMS/Transaction/Yada/Count_BIZ_U9_ASN.cs @@ -96,7 +96,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L("鏉$爜涓洪潪娉曟潯鐮�"); action.LocaleMsg = Biz.L("WMS.WmsItem.Barcode.IllegalFailure", input.SN); - return action; + return SetOutPutMqttMsg(action, input.Locale); ; } if (barcode.Type == Barcode.Types.OuterPackage) @@ -117,14 +117,14 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L("ASN鍗曚腑涓嶅瓨鍦ㄦ潯鐮乕{0}]"); action.LocaleMsg = Biz.L("WMS.Count_BIZ_U9_ASN.SnNotExists", input.SN); - return action; + return SetOutPutMqttMsg(action, input.Locale); ; } if (CurSn.First().AUTH_ORG != input.AuthOption.CurOrg) { action.IsSuccessed = false; //action.LocaleMsg = Biz.L($"鏉$爜鎵�灞炵粍缁嘯{0}]涓庡綋鍓嶇櫥褰曠粍缁嘯{1}]涓嶄竴鑷达紝璇烽噸鏂伴�夋嫨缁勭粐"); action.LocaleMsg = Biz.L("WMS.Count_BIZ_U9_ASN.OrgNotCorrect", CurSn.First().AUTH_ORG, input.AuthOption.CurOrg); - return action; + return SetOutPutMqttMsg(action, input.Locale); ; } //楠岃瘉鏉$爜鏄惁姝g‘ if (CurSn.First().STATUS > WMS_ITEM.STATUSs.Incoming.GetValue()) @@ -132,7 +132,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L("鐘舵�乕{0}]寮傚父锛岃閲嶆柊鎵弿"); action.LocaleMsg = Biz.L("WMS.Default.ScanItem.StatusException", CurSn.First().STATUS.GetEnumDesc<WMS_ITEM.STATUSs>()); - return action; + return SetOutPutMqttMsg(action, input.Locale); ; } //鎵ц娓呯偣鏁版嵁澶勭悊 @@ -164,7 +164,7 @@ //action.CatchExceptionWithLog(ex, $"鎵弿鏉$爜[{0}]澶嶆牳寮傚父"); action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.ScanItem.ScanException", input.SN)); } - return action; + return SetOutPutMqttMsg(action, input.Locale); } /// <summary> @@ -191,7 +191,7 @@ //閲嶇疆宸ュ簭 ResetScan(); - return action; + return SetOutPutMqttMsg(action, locale); ; } /// <summary> diff --git a/Tiger.Business.WMS/Transaction/Yada/In_BIZ_U9_RECEIPT.cs b/Tiger.Business.WMS/Transaction/Yada/In_BIZ_U9_RECEIPT.cs index cc3e82b..e57ede3 100644 --- a/Tiger.Business.WMS/Transaction/Yada/In_BIZ_U9_RECEIPT.cs +++ b/Tiger.Business.WMS/Transaction/Yada/In_BIZ_U9_RECEIPT.cs @@ -12,6 +12,7 @@ using Tiger.Model.Sharetronic.Shelf; using Tiger.Business.WMS.Sharetronic.Shelf; using Tiger.Model.Entitys.MES.U9C; +using Tiger.Model.Entitys.MES.Position; namespace Tiger.Business.WMS.Transaction { @@ -85,7 +86,7 @@ { action.IsSuccessed = false; action.LocaleMsg = result.LocaleMsg; - return action; + return SetOutPutMqttMsg(action, input.Locale); } var inv = result.Data as Inventory; @@ -95,7 +96,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L("鐘舵�乕{0}]寮傚父锛岃閲嶆柊鎵弿"); action.LocaleMsg = Biz.L("WMS.Default.ScanItem.StatusException", string.Join(',', inv.StatusList.Select(q => q.GetDesc()))); - return action; + return SetOutPutMqttMsg(action, input.Locale); } //鐗╂枡楠岃瘉 if (inv.ItemInfo.IsNullOrEmpty() || inv.ItemInfo.IS_ACTIVE == "N") @@ -103,7 +104,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L("鐗╂枡缂栫爜[{0}]涓嶅瓨鍦ㄦ垨鑰呰鐗╂枡鏈惎鐢�"); action.LocaleMsg = Biz.L("WMS.Default.ScanItem.ItemCodeNotExistsOrNotActive", inv.ItemInfo.ITEM_CODE.IsNullOrEmpty(inv.Barcode.ItemCode)); - return action; + return SetOutPutMqttMsg(action, input.Locale); } CurInvItem = inv; } @@ -114,7 +115,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L("鏀惰揣鍗曚腑鎵句笉鍒版潯鐮佹墍灞炵殑鍗曟嵁[{0}]淇℃伅锛岃閲嶆柊鎵弿鏀惰揣鍗曠殑鏉$爜鎴栭�夋嫨姝g‘鐨勫姛鑳戒笂鏋�"); action.LocaleMsg = Biz.L("WMS.In_BIZ_U9_RECEIPT.ScanItem.ReceiptNotExists", CurInvItem.Items.First().TRANS_NO); - return action; + return SetOutPutMqttMsg(action, input.Locale); } var receiptDtl = receipt.Details.First(q => q.LINE_NO == CurInvItem.Items.First().TRANS_LINE); if (receiptDtl.STATUS > BIZ_U9_RECEIPT.STATUSs.Storing.GetValue()) @@ -122,7 +123,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L("鏀惰揣鍗曚腑琛孾{0}]鐘舵�乕{1}]寮傚父锛岃鎵弿姝g‘鐨勬潯鐮�"); action.LocaleMsg = Biz.L("WMS.In_BIZ_U9_RECEIPT.ScanItem.ReceiptDtlStatusException", receiptDtl.LINE_NO, receiptDtl.STATUS.GetEnumDesc<BIZ_U9_RECEIPT.STATUSs>()); - return action; + return SetOutPutMqttMsg(action, input.Locale); } var receiptSn = receipt.SnList.Where(q => CurInvItem.Items.Any(i => i.SN == q.SN)).ToList(); if (receiptSn.Any(q => q.STATUS != WMS_ITEM.STATUSs.WaitIn.GetValue())) @@ -130,7 +131,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L("鏀惰揣鍗曚腑鏉$爜[{0}]鐘舵�乕{1}]寮傚父锛岃鎵弿姝g‘鐨勬潯鐮�"); action.LocaleMsg = Biz.L("WMS.In_BIZ_U9_RECEIPT.ScanItem.ReceiptSnStatusException", CurInvItem.SN, receiptSn.First(q => q.STATUS != WMS_ITEM.STATUSs.WaitIn.GetValue()).STATUS.GetEnumDesc<WMS_ITEM.STATUSs>()); - return action; + return SetOutPutMqttMsg(action, input.Locale); } var nLocation = new WMS_LOCATION(); @@ -142,7 +143,7 @@ { action.IsSuccessed = false; action.LocaleMsg = Biz.L(shelfApiResult.GetData<string>()); - return action; + return SetOutPutMqttMsg(action, input.Locale); } var reaultShelf = shelfApiResult.GetData<ShelfChangeModel>(); @@ -152,7 +153,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L($"璐ф灦[{0}]涓笉瀛樺湪id涓篬{1}]鐨勫偍浣嶏紝璇峰厛缁存姢璐ф灦淇℃伅"); action.LocaleMsg = Biz.L("WMS.Default.ScanItem.LocationNotExistsInShelf", CurScanShelf.Shelf.SHELF_CODE, reaultShelf.ledAddr); - return action; + return SetOutPutMqttMsg(action, input.Locale); } var locationData = MainDB.Queryable<WMS_ITEM>().Where(q => q.LOCATION_ID == nLocation.ID).First(); if (!locationData.IsNullOrEmpty()) @@ -160,7 +161,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L("鍌ㄤ綅[{0}]宸插瓨鏈夌墿鏂橻{1}]锛岃妫�鏌ョ郴缁熷簱瀛樹俊鎭�"); action.LocaleMsg = Biz.L($"WMS.Default.ScanShelf.ItemAlreadyExistsInLocation", nLocation.LOCATION_CODE, locationData.SN); - return action; + return SetOutPutMqttMsg(action, input.Locale); } CurScanShelf.LocationCode = nLocation.LOCATION_CODE; } @@ -171,7 +172,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L("璇疯緭鍏ユ垨鎵弿鏈夋晥鐨勮揣鏋�/鍌ㄤ綅鐮�"); action.LocaleMsg = Biz.L("WMS.Default.ScanShelf.ShelfCanNotEmpty"); - return action; + return SetOutPutMqttMsg(action, input.Locale); } nLocation = await MainDB.Queryable<WMS_LOCATION>().Where(t => t.LOCATION_CODE == CurScanShelf.LocationCode && t.AUTH_ORG == OrgCode).FirstAsync(); @@ -184,7 +185,7 @@ //action.LocaleMsg = Biz.L("鍌ㄤ綅[{0}]鍙兘瀛樻斁涓�涓墿鏂�"); action.LocaleMsg = Biz.L("WMS.Default.ScanItem.LocationSingleFailure", nLocation.LOCATION_CODE); ResetScan(); - return action; + return SetOutPutMqttMsg(action, input.Locale); } //鎵ц涓婃灦鏁版嵁澶勭悊 @@ -206,7 +207,7 @@ action.IsSuccessed = false; action.LocaleMsg = putonResult.LocaleMsg; ResetScan(); - return action; + return SetOutPutMqttMsg(action, input.Locale); } //鏇存柊鍗曟嵁淇℃伅 @@ -238,7 +239,7 @@ { action.IsSuccessed = false; action.LocaleMsg = result.LocaleMsg; - return action; + return SetOutPutMqttMsg(action, input.Locale); } } else @@ -277,7 +278,7 @@ //action.CatchExceptionWithLog(ex, $"鎵弿鏉$爜[{input.SN}]澶嶆牳寮傚父"); action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.ScanItem.ScanException", input.SN)); } - return action; + return SetOutPutMqttMsg(action, input.Locale); } /// <summary> @@ -401,7 +402,7 @@ //閲嶇疆宸ュ簭 ResetScanInfo(); - return action; + return SetOutPutMqttMsg(action, locale); } #endregion -- Gitblit v1.9.3