From 9f12ec67045443d165eae2670bfb22e17e4186ad Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期二, 26 十一月 2024 21:54:02 +0800 Subject: [PATCH] 优化了一些已知问题 --- Tiger.Business.MES/Transaction/YadaPacking.cs | 34 ++++++++++++++++++---------------- 1 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Tiger.Business.MES/Transaction/YadaPacking.cs b/Tiger.Business.MES/Transaction/YadaPacking.cs index 5f40414..2efbd3f 100644 --- a/Tiger.Business.MES/Transaction/YadaPacking.cs +++ b/Tiger.Business.MES/Transaction/YadaPacking.cs @@ -413,23 +413,25 @@ } ShippingOrder = IsPrintCustomerLabel ? ship?.ShipDoc ?? "" : ""; //缂撳瓨鍑鸿揣鏁伴噺 - if (Context.ContainsKey("CurShipQty")) - { - Context["CurShipQty"] = CurShipQty; - } - else - { - Context.Add("CurShipQty", CurShipQty); - } + Context.SetOrAdd("CurShipQty", CurShipQty); + //if (Context.ContainsKey("CurShipQty")) + //{ + // Context["CurShipQty"] = CurShipQty; + //} + //else + //{ + // Context.Add("CurShipQty", CurShipQty); + //} //缂撳瓨鍑鸿揣绠辨暟 - if (Context.ContainsKey("CurWaitShipmentCarton")) - { - Context["CurWaitShipmentCarton"] = WaitShipmentCarton; - } - else - { - Context.Add("CurWaitShipmentCarton", WaitShipmentCarton); - } + Context.SetOrAdd("CurWaitShipmentCarton", WaitShipmentCarton); + //if (Context.ContainsKey("CurWaitShipmentCarton")) + //{ + // Context["CurWaitShipmentCarton"] = WaitShipmentCarton; + //} + //else + //{ + // Context.Add("CurWaitShipmentCarton", WaitShipmentCarton); + //} curtime = DateTime.Now; Logger.Console.Info($"{CurSN} : ***** 12 : {(curtime - prevtime).TotalSeconds}s", ConsoleColor.Green); prevtime = curtime; //缁戝畾鏉$爜鍒板伐鍗� -- Gitblit v1.9.3