From e883d7e4bf057f7a2ed7cc001fe27083d82baa22 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期二, 16 四月 2024 19:17:44 +0800
Subject: [PATCH] 优化NG下料位任务触发逻辑

---
 代码管理/WMS/WMS_Server/WIDESEA_WMS/Services/system/Partial/dt_inventoryService.cs |   30 +++++++++++++++++++++++++++++-
 1 files changed, 29 insertions(+), 1 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Services/system/Partial/dt_inventoryService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Services/system/Partial/dt_inventoryService.cs"
index a893838..c00277e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Services/system/Partial/dt_inventoryService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Services/system/Partial/dt_inventoryService.cs"
@@ -17,6 +17,10 @@
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.AspNetCore.Http;
 using WIDESEA_WMS.IRepositories;
+using System.Configuration;
+using WIDESEA_Comm.LogInfo;
+using WIDESEA_Core.ManageUser;
+using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
 
 namespace WIDESEA_WMS.Services
 {
@@ -37,5 +41,29 @@
             //澶氱鎴蜂細鐢ㄥ埌杩檌nit浠g爜锛屽叾浠栨儏鍐靛彲浠ヤ笉鐢�
             //base.Init(dbRepository);
         }
-  }
+
+        public override WebResponseContent Del(object[] keys, bool delList = true)
+        {
+            WebResponseContent content = new WebResponseContent();
+            string str = "";
+            try
+            {
+                List<string> KeyList = new List<string>();
+                foreach ( string key in keys )
+                {
+                    KeyList.Add(key);
+                }
+                var inventoryList= _repository.Find(x=>KeyList.Contains(x.ID.ToString())).ToList();
+                 str = $"{string.Join('銆�', inventoryList.Select(t => t.SN).ToArray())}";
+                content = base.Del(keys, delList);
+                WriteDBLog.Write($"鎵嬪姩鍒犻櫎搴撳瓨 ", str, LogState.Sucess, "WMS", UserContext.Current.UserName);
+            }
+            catch (Exception ex)
+            {
+                WriteDBLog.Write($"鎵嬪姩鍒犻櫎搴撳瓨 ", new { 閿欒淇℃伅 = ex.Message, 鏁版嵁 = str }, LogState.Error, "WMS", UserContext.Current.UserName);
+            }
+
+            return content;
+        }
+    }
 }

--
Gitblit v1.9.3