From c1a7481b105fcf74d819fee180788f6b5115c417 Mon Sep 17 00:00:00 2001
From: cnf <3283105747@qq.com>
Date: 星期三, 05 十一月 2025 14:28:58 +0800
Subject: [PATCH] 委外功能修改测通

---
 Controllers/Wom/WwGdController.cs |  127 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 125 insertions(+), 2 deletions(-)

diff --git a/Controllers/Wom/WwGdController.cs b/Controllers/Wom/WwGdController.cs
index 4e39fb9..7918a9b 100644
--- a/Controllers/Wom/WwGdController.cs
+++ b/Controllers/Wom/WwGdController.cs
@@ -1,9 +1,10 @@
-锘縰sing System.Dynamic;
-using Microsoft.AspNetCore.Mvc;
+锘縰sing Microsoft.AspNetCore.Mvc;
 using NewPdaSqlServer.Dto.service;
 using NewPdaSqlServer.entity;
+using NewPdaSqlServer.service.@base;
 using NewPdaSqlServer.service.Wom;
 using NewPdaSqlServer.util;
+using System.Dynamic;
 
 namespace NewPdaSqlServer.Controllers.Wom;
 
@@ -12,6 +13,128 @@
 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("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>
     ///     鎵爜

--
Gitblit v1.9.3