From 1bb1d55920fcf8f41b13e233031c1eb75e8587df Mon Sep 17 00:00:00 2001 From: wxw <Administrator@DESKTOP-5BIMHQ3> Date: 星期五, 18 七月 2025 08:29:20 +0800 Subject: [PATCH] 修改问题 --- Wms/WMS.BLL/BllTransServer/RcsServer.cs | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Wms/WMS.BLL/BllTransServer/RcsServer.cs b/Wms/WMS.BLL/BllTransServer/RcsServer.cs index 08815b0..b809a4c 100644 --- a/Wms/WMS.BLL/BllTransServer/RcsServer.cs +++ b/Wms/WMS.BLL/BllTransServer/RcsServer.cs @@ -27,7 +27,8 @@ { public class RcsServer:IRcsServer { - private readonly object RcsLock = new object(); + private readonly object GetPalleLock = new object(); + private readonly object ApplyLocatLock = new object(); private static readonly SqlSugarScope Db = DataContext.Db; /// <summary> @@ -39,7 +40,7 @@ /// <exception cref="Exception"></exception> public void GetPalletNo(Pallnetmsg model, string url, out string taskNo) { - lock (RcsLock) + lock (GetPalleLock) { try { @@ -448,7 +449,7 @@ /// <exception cref="Exception"></exception> public void ApplyLocatNo(Pallnetmsg model, string url, out string taskNo) { - lock (RcsLock) + lock (ApplyLocatLock) { try { @@ -1345,7 +1346,7 @@ var taskIng= Db.Queryable<LogTask>().First(w => w.IsDel == "0" && (w.Status == "0" || w.Status == "1") && w.PalletNo == palletNo); if (taskIng != null) { - throw new Exception("鍒嗛厤鐨勬《鏈夋鍦ㄦ墽琛岀殑浠诲姟锛岃绋嶅悗鍐嶈瘯"); + throw new Exception($"鍒嗛厤鐨勬《{palletNo}鏈夋鍦ㄦ墽琛岀殑浠诲姟锛岃绋嶅悗鍐嶈瘯"); } //鍒嗛厤妗剁殑鍌ㄤ綅淇℃伅 var locatInfo = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.LocatNo == palletInfo.LocatNo); -- Gitblit v1.8.0