From 416304996b01a829b969c05e623f6c3b735ee34f Mon Sep 17 00:00:00 2001
From: cnf <3283105747@qq.com>
Date: 星期三, 05 十一月 2025 16:19:59 +0800
Subject: [PATCH] 委外修改

---
 Controllers/Wom/WwGdController.cs |  215 +++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 158 insertions(+), 57 deletions(-)

diff --git a/Controllers/Wom/WwGdController.cs b/Controllers/Wom/WwGdController.cs
index 4e39fb9..4058058 100644
--- a/Controllers/Wom/WwGdController.cs
+++ b/Controllers/Wom/WwGdController.cs
@@ -1,9 +1,11 @@
-锘縰sing System.Dynamic;
-using Microsoft.AspNetCore.Mvc;
+锘縰sing Microsoft.AspNetCore.Mvc;
 using NewPdaSqlServer.Dto.service;
 using NewPdaSqlServer.entity;
+using NewPdaSqlServer.entity.Base;
+using NewPdaSqlServer.service.@base;
 using NewPdaSqlServer.service.Wom;
 using NewPdaSqlServer.util;
+using System.Dynamic;
 
 namespace NewPdaSqlServer.Controllers.Wom;
 
@@ -12,6 +14,160 @@
 public class WwGdController : BaseController
 {
     private readonly WwGdManager m = new();
+    private readonly MesPrintMangeer _mCf = new();
+
+    /// <summary>
+    /// 閫夊彇鍒楄〃
+    /// </summary>
+    /// <param name="query"></param>
+    /// <returns></returns>
+    /// <summary>
+    /// 鐜板満鏀舵枡鑾峰彇鍙�夊伐鍗曚俊鎭�
+    /// </summary>
+    /// <param name="query"></param>
+    /// <returns></returns>
+    [HttpPost("GetXcslDaa")]
+    public ResponseResult GetXcslDaa([FromBody] dynamic query)
+    {
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            resultInfos.tbBillList = m.GetXcslDaa(query, RequestInfo);
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+
+    /// <summary>
+    /// 閫夊彇鍒楄〃
+    /// </summary>
+    /// <param name="query"></param>
+    /// <returns></returns>
+    /// <summary>
+    /// 
+    /// 鑾峰彇濮斿鍑哄簱鐢宠鍗曞彿
+    /// </summary>
+    /// <param name="query"></param>
+    /// <returns></returns>
+    [HttpPost("GetWWCKsq")]
+    public ResponseResult GetWWCKsq([FromBody] dynamic query)
+    {
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            resultInfos.tbBillList = m.GetWWCKsq(query, RequestInfo);
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+
+    /// <summary>
+    ///     鏍规嵁濮斿棰嗘枡鐢宠鍗曡幏鍙栨槑缁�
+    /// </summary>
+    /// <param name="query">宸ュ崟鍙疯姹傚弬鏁�</param>
+    /// <returns>ResponseResult瀵硅薄锛屽寘鍚姸鎬併�佹秷鎭拰鏁版嵁</returns>
+    [HttpPost("GetItemsByWwckNo")]
+    public ResponseResult GetItemsByWwckNo(WarehouseQuery query)
+    {
+        try
+        {
+            // 璋冪敤WwGdManager鐨凣etItemsByDaa001鏂规硶鑾峰彇浠i鐗╂枡鏄庣粏
+            dynamic resultInfos = new ExpandoObject();
+            resultInfos.tbBillList = m.GetItemsByWwckNo(query, RequestInfo);
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            // 濡傛灉鍙戠敓寮傚父锛岃繑鍥為敊璇俊鎭�
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+
+    [HttpPost("WwckScanCode")]
+    public ResponseResult WwckScanCode(WarehouseQuery query)
+    {
+        try
+        {
+            // 璋冪敤WwGdManager鐨凷canCode鏂规硶杩涜鎵爜鎿嶄綔
+            dynamic resultInfos = new ExpandoObject();
+            resultInfos.tbBillList = m.WwckScanCode(query);
+            if (resultInfos.tbBillList.result == "2")
+            {
+                return new ResponseResult
+                {
+                    status = Convert.ToInt32(resultInfos.tbBillList.result),
+                    message = resultInfos.tbBillList.strMsg,
+                    data = resultInfos
+                };
+            }
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            // 濡傛灉鍙戠敓寮傚父锛岃繑鍥為敊璇俊鎭�
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    /// <summary>
+    /// 濮斿鐢宠鍑哄簱鎷嗗垎
+    /// </summary>
+    /// <param name="query"></param>
+    /// <returns></returns>
+    [HttpPost("WwckScanCodeCF")]
+    public ResponseResult WwckScanCodeCF(WarehouseQuery query)
+    {
+        try
+        {
+            // 璋冪敤WwGdManager鐨凷canCodeCF鏂规硶杩涜鎵爜纭鎿嶄綔
+            dynamic resultInfos = new ExpandoObject();
+            resultInfos.tbBillList = new ExpandoObject();
+            resultInfos.tbBillList.printInfo = _mCf.getPrintInfo(query);
+            var scanResult = m.WwckScanCodeCF(query);
+            resultInfos.tbBillList.cfBarInfo = _mCf.getCfInfo(scanResult);
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            // 濡傛灉鍙戠敓寮傚父锛岃繑鍥為敊璇俊鎭�
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
 
     /// <summary>
     ///     鎵爜
@@ -90,61 +246,6 @@
         catch (Exception ex)
         {
             // 濡傛灉鍙戠敓寮傚父锛岃繑鍥為敊璇俊鎭�
-            return ResponseResult.ResponseError(ex);
-        }
-    }
-
-
-    /// <summary>
-    ///     鑾峰彇搴撲綅淇℃伅
-    /// </summary>
-    /// <returns></returns>
-    [HttpPost("GetBarKwByItem")]
-    public ResponseResult GetBarKwByItem(dynamic unity)
-    {
-        try
-        {
-            dynamic resultInfos = new ExpandoObject();
-            resultInfos.tbBillList = m.GetBarKwByItem(unity);
-            return new ResponseResult
-            {
-                status = 0,
-                message = "OK",
-                data = resultInfos
-            };
-        }
-        catch (Exception ex)
-        {
-            return ResponseResult.ResponseError(ex);
-        }
-    }
-
-    /// <summary>
-    /// 閫夊彇鍒楄〃
-    /// </summary>
-    /// <param name="query"></param>
-    /// <returns></returns>
-    /// <summary>
-    /// 鐜板満鏀舵枡鑾峰彇鍙�夊伐鍗曚俊鎭�
-    /// </summary>
-    /// <param name="query"></param>
-    /// <returns></returns>
-    [HttpPost("GetXcslDaa")]
-    public ResponseResult GetXcslDaa([FromBody] dynamic query)
-    {
-        try
-        {
-            dynamic resultInfos = new ExpandoObject();
-            resultInfos.tbBillList = m.GetXcslDaa(query, RequestInfo);
-            return new ResponseResult
-            {
-                status = 0,
-                message = "OK",
-                data = resultInfos
-            };
-        }
-        catch (Exception ex)
-        {
             return ResponseResult.ResponseError(ex);
         }
     }

--
Gitblit v1.9.3