From a204df28fd20b4908bba80deb482f9c91ecc0877 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期三, 08 一月 2025 16:22:23 +0800
Subject: [PATCH] 11

---
 Controllers/Wom/WwGdController.cs |  133 ++++++++++++++++++++++++--------------------
 1 files changed, 72 insertions(+), 61 deletions(-)

diff --git a/Controllers/Warehouse/WomdaaController.cs b/Controllers/Wom/WwGdController.cs
similarity index 74%
copy from Controllers/Warehouse/WomdaaController.cs
copy to Controllers/Wom/WwGdController.cs
index 9de2fe2..a1a34f0 100644
--- a/Controllers/Warehouse/WomdaaController.cs
+++ b/Controllers/Wom/WwGdController.cs
@@ -2,75 +2,37 @@
 using Microsoft.AspNetCore.Mvc;
 using NewPdaSqlServer.Dto.service;
 using NewPdaSqlServer.entity;
-using NewPdaSqlServer.service.Warehouse;
+using NewPdaSqlServer.service.Wom;
 using NewPdaSqlServer.util;
 
-namespace NewPdaSqlServer.Controllers.Warehouse;
+namespace NewPdaSqlServer.Controllers.Wom;
 
 [ApiController]
 [Route("api/[controller]")]
-public class WomdaaController : ControllerBase
+public class WwGdController : ControllerBase
 {
-    private readonly WomdaaManager m = new();
+    private readonly WwGdManager m = new();
 
-    #region 鐢熶骇棰嗘枡
-
-    //GetProductionPickDaa001
     /// <summary>
-    ///     妯$硦鏌ヨ宸ュ崟鍙峰苟杩斿洖
+    ///     鎵爜
     /// </summary>
-    /// <returns></returns>
-    [HttpPost("GetProductionPickDaa001")]
-    public ResponseResult GetProductionPickDaa001(WarehouseQuery query)
-    {
-        try
-        {
-            dynamic resultInfos = new ExpandoObject();
-            resultInfos.tbBillList = m.GetProductionPickDaa001(query);
-            return new ResponseResult
-            {
-                status = 0,
-                message = "OK",
-                data = resultInfos
-            };
-        }
-        catch (Exception ex)
-        {
-            return ResponseResult.ResponseError(ex);
-        }
-    }
-
-    //GetItemsByDaa001
-    /// <summary>
-    ///     鏍规嵁宸ュ崟鍙疯幏鍙栦唬棰嗙墿鏂欐槑缁�
-    /// </summary>
-    /// <returns></returns>
-    [HttpPost("GetItemsByDaa001")]
-    public ResponseResult GetItemsByDaa001(WarehouseQuery query)
-    {
-        try
-        {
-            dynamic resultInfos = new ExpandoObject();
-            resultInfos.tbBillList = m.GetItemsByDaa001(query);
-            return new ResponseResult
-            {
-                status = 0,
-                message = "OK",
-                data = resultInfos
-            };
-        }
-        catch (Exception ex)
-        {
-            return ResponseResult.ResponseError(ex);
-        }
-    }
-
-    //ScanCode
+    /// <param name="query">鎵爜璇锋眰鍙傛暟</param>
+    /// <returns>ResponseResult瀵硅薄锛屽寘鍚姸鎬併�佹秷鎭拰鏁版嵁</returns>
+    /// // Demo Request:
+    // POST /api/WwGdController/ScanCode
+    // Body:
+    // {
+    //     "query": {
+    //         "Code": "SampleCode",
+    //         "Type": 1
+    //     }
+    // }
     [HttpPost("ScanCode")]
     public ResponseResult ScanCode(WarehouseQuery query)
     {
         try
         {
+            // 璋冪敤WwGdManager鐨凷canCode鏂规硶杩涜鎵爜鎿嶄綔
             dynamic resultInfos = new ExpandoObject();
             resultInfos.tbBillList = m.ScanCode(query);
             return new ResponseResult
@@ -82,16 +44,31 @@
         }
         catch (Exception ex)
         {
+            // 濡傛灉鍙戠敓寮傚父锛岃繑鍥為敊璇俊鎭�
             return ResponseResult.ResponseError(ex);
         }
     }
 
-    //ScanCodeCF
+    /// <summary>
+    ///     鎵爜纭
+    /// </summary>
+    /// <param name="query">鎵爜纭璇锋眰鍙傛暟</param>
+    /// <returns>ResponseResult瀵硅薄锛屽寘鍚姸鎬併�佹秷鎭拰鏁版嵁</returns>
+    /// // Demo Request:
+    // POST /api/WwGdController/ScanCodeCF
+    // Body:
+    // {
+    //     "query": {
+    //         "Code": "SampleCode",
+    //         "Type": 1
+    //     }
+    // }
     [HttpPost("ScanCodeCF")]
     public ResponseResult ScanCodeCF(WarehouseQuery query)
     {
         try
         {
+            // 璋冪敤WwGdManager鐨凷canCodeCF鏂规硶杩涜鎵爜纭鎿嶄綔
             dynamic resultInfos = new ExpandoObject();
             resultInfos.tbBillList = m.ScanCodeCF(query);
             return new ResponseResult
@@ -103,6 +80,42 @@
         }
         catch (Exception ex)
         {
+            // 濡傛灉鍙戠敓寮傚父锛岃繑鍥為敊璇俊鎭�
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    /// <summary>
+    ///     鏍规嵁宸ュ崟鍙疯幏鍙栦唬棰嗙墿鏂欐槑缁�
+    /// </summary>
+    /// <param name="query">宸ュ崟鍙疯姹傚弬鏁�</param>
+    /// <returns>ResponseResult瀵硅薄锛屽寘鍚姸鎬併�佹秷鎭拰鏁版嵁</returns>
+    // Demo Request:
+    // POST /api/WwGdController/GetItemsByDaa001
+    // Body:
+    // {
+    //     "query": {
+    //         "BillNo": "SampleBillNo"
+    //     }
+    // }
+    [HttpPost("GetItemsByDaa001")]
+    public ResponseResult GetItemsByDaa001(WarehouseQuery query)
+    {
+        try
+        {
+            // 璋冪敤WwGdManager鐨凣etItemsByDaa001鏂规硶鑾峰彇浠i鐗╂枡鏄庣粏
+            dynamic resultInfos = new ExpandoObject();
+            resultInfos.tbBillList = m.GetItemsByDaa001(query);
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            // 濡傛灉鍙戠敓寮傚父锛岃繑鍥為敊璇俊鎭�
             return ResponseResult.ResponseError(ex);
         }
     }
@@ -185,7 +198,7 @@
     /// </summary>
     /// <returns></returns>
     [HttpPost("Insert")]
-    public ResponseResult Add([FromBody] Womdaa data)
+    public ResponseResult Add([FromBody] WwGd data)
     {
         try
         {
@@ -209,7 +222,7 @@
     /// </summary>
     /// <returns></returns>
     [HttpPost("InsertReturnIdentity")]
-    public ResponseResult InsertReturnIdentity([FromBody] Womdaa data)
+    public ResponseResult InsertReturnIdentity([FromBody] WwGd data)
     {
         try
         {
@@ -233,7 +246,7 @@
     /// </summary>
     /// <returns></returns>
     [HttpPost("Update")]
-    public ResponseResult Update([FromBody] Womdaa data)
+    public ResponseResult Update([FromBody] WwGd data)
     {
         try
         {
@@ -251,6 +264,4 @@
             return ResponseResult.ResponseError(ex);
         }
     }
-
-    #endregion
 }
\ No newline at end of file

--
Gitblit v1.9.3