From b58954795573ae066a2aebfafdac9c8b29b64ae2 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期四, 09 十月 2025 14:07:51 +0800
Subject: [PATCH] 刀具查询另开一个

---
 Controllers/MesCutterLedgerController.cs |   43 +++++++++++++++++++++
 Entites/DbModels/MesCutterLedger.cs      |    3 +
 Services/MesCutterLedgerManager.cs       |   32 ++++++++++++++++
 Services/MesOrderStaManager.cs           |   14 -------
 Controllers/MesOrderStaController.cs     |   25 ------------
 5 files changed, 78 insertions(+), 39 deletions(-)

diff --git a/Controllers/MesCutterLedgerController.cs b/Controllers/MesCutterLedgerController.cs
new file mode 100644
index 0000000..bc20798
--- /dev/null
+++ b/Controllers/MesCutterLedgerController.cs
@@ -0,0 +1,43 @@
+锘縰sing System.Dynamic;
+using Microsoft.AspNetCore.Mvc;
+using PadApplication.Entites.DbModels;
+using PadApplication.Entites.Dto;
+using PadApplication.Services;
+using PadApplication.util;
+
+namespace PadApplication.Controllers;
+
+/// <summary>
+/// 鍒�鍏峰彴璐︽帶鍒跺櫒锛屾彁渚涘垁鍏风浉鍏崇殑鎺ュ彛
+/// </summary>
+[ApiController]
+[Route("api/[controller]")]
+public class MesCutterLedgerController : ControllerBase
+{
+    private readonly MesCutterLedgerManager m = new();
+
+    /// <summary>
+    /// 鍒�鍏锋煡璇紙鏀寔缂栧彿鎴栧悕绉版ā绯婃煡璇級MesCutterLedger
+    /// </summary>
+    /// <param name="searchKey">鏌ヨ鍏抽敭瀛�</param>
+    /// <returns>鍒�鍏峰垪琛�</returns>
+    [HttpPost("QueryTools")]
+    public ResponseResult QueryTools([FromBody] string searchKey)
+    {
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            resultInfos.tbBillList = m.QueryTools(searchKey);
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+}
\ No newline at end of file
diff --git a/Controllers/MesOrderStaController.cs b/Controllers/MesOrderStaController.cs
index 829031d..d7075a2 100644
--- a/Controllers/MesOrderStaController.cs
+++ b/Controllers/MesOrderStaController.cs
@@ -388,29 +388,4 @@
             return ResponseResult.ResponseError(ex);
         }
     }
-
-    /// <summary>
-    /// 鍒�鍏锋煡璇紙鏀寔缂栧彿鎴栧悕绉版ā绯婃煡璇級
-    /// </summary>
-    /// <param name="searchKey">鏌ヨ鍏抽敭瀛�</param>
-    /// <returns>鍒�鍏峰垪琛�</returns>
-    [HttpPost("QueryTools")]
-    public ResponseResult QueryTools([FromBody] string searchKey)
-    {
-        try
-        {
-            dynamic resultInfos = new ExpandoObject();
-            resultInfos.tbBillList = m.QueryTools(searchKey);
-            return new ResponseResult
-            {
-                status = 0,
-                message = "OK",
-                data = resultInfos
-            };
-        }
-        catch (Exception ex)
-        {
-            return ResponseResult.ResponseError(ex);
-        }
-    }
 }
\ No newline at end of file
diff --git a/Entites/DbModels/MesCutterLedger.cs b/Entites/DbModels/MesCutterLedger.cs
index 195f262..bae2bdd 100644
--- a/Entites/DbModels/MesCutterLedger.cs
+++ b/Entites/DbModels/MesCutterLedger.cs
@@ -183,4 +183,7 @@
     /// </summary>
     [SugarColumn(ColumnName = "IS_CHOOSE")]
     public int? IsChoose { get; set; }
+
+    [SugarColumn(IsIgnore = true)]
+    public string? searchKey { get; set; }
 }
\ No newline at end of file
diff --git a/Services/MesCutterLedgerManager.cs b/Services/MesCutterLedgerManager.cs
new file mode 100644
index 0000000..4fb4a59
--- /dev/null
+++ b/Services/MesCutterLedgerManager.cs
@@ -0,0 +1,32 @@
+锘縰sing PadApplication.DB;
+using PadApplication.Entites.DbModels;
+using PadApplication.Entites.Dto;
+using System.Net.Http;
+using System.Text;
+using Newtonsoft.Json;
+using SqlSugar;
+
+namespace PadApplication.Services;
+
+/// <summary>
+///     宸ュ崟鐘舵�佺鐞嗙被,璐熻矗宸ュ崟鐘舵�佺浉鍏崇殑鏁版嵁鎿嶄綔
+///     缁ф壙鑷猂epository<MesCutterLedger>鍩虹被,鍖呭惈鍩虹鐨凜RUD鎿嶄綔
+/// </summary>
+public class MesCutterLedgerManager : Repository<MesCutterLedger>
+{
+    private readonly MesQaItemsDetect02Manager
+    mesQaItemsDetect02Manager = new();
+
+    /// <summary>
+    /// 鍒�鍏锋煡璇紙鏀寔缂栧彿鎴栧悕绉版ā绯婃煡璇級
+    /// </summary>
+    /// <param name="searchKey">鏌ヨ鍏抽敭瀛�</param>
+    /// <returns>鍒�鍏峰垪琛�</returns>
+    public List<MesCutterLedger> QueryTools(string searchKey)
+    {
+        return Db.Queryable<MesCutterLedger>()
+            .WhereIF(!string.IsNullOrEmpty(searchKey),
+                t => t.CutterId.Contains(searchKey) || t.CutterName.Contains(searchKey))
+            .ToList();
+    }
+}
\ No newline at end of file
diff --git a/Services/MesOrderStaManager.cs b/Services/MesOrderStaManager.cs
index 34bfe3c..95fab23 100644
--- a/Services/MesOrderStaManager.cs
+++ b/Services/MesOrderStaManager.cs
@@ -616,18 +616,4 @@
         // 鏇存柊宸ュ崟鏃堕棿鍜岀姸鎬�
         return UpdateTime(entity);
     }
-
-    /// <summary>
-    /// 鍒�鍏锋煡璇紙鏀寔缂栧彿鎴栧悕绉版ā绯婃煡璇級
-    /// </summary>
-    /// <param name="searchKey">鏌ヨ鍏抽敭瀛�</param>
-    /// <returns>鍒�鍏峰垪琛�</returns>
-    public List<MesCutterLedger> QueryTools(string searchKey)
-    {
-        return Db.Queryable<MesCutterLedger>()
-            .WhereIF(!string.IsNullOrEmpty(searchKey),
-                t => t.CutterId.Contains(searchKey) || t.CutterName.Contains(searchKey))
-            .ToList();
-    }
-
 }
\ No newline at end of file

--
Gitblit v1.9.3