From 63b8880e08f489986edc9e24b09462ac916d7f72 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期四, 18 九月 2025 09:22:12 +0800
Subject: [PATCH] 受托退料:前端界面规范,列表与明细转为存储过程,添加组织隔离、拆分、库位列表、已扫待扫、完结功能

---
 Controllers/Warehouse/MesSttlController.cs |   74 ++++++++++++++++++++++++++++++++++--
 1 files changed, 69 insertions(+), 5 deletions(-)

diff --git a/Controllers/Warehouse/MesSttlController.cs b/Controllers/Warehouse/MesSttlController.cs
index 2496b66..73cc308 100644
--- a/Controllers/Warehouse/MesSttlController.cs
+++ b/Controllers/Warehouse/MesSttlController.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.Warehouse;
 using NewPdaSqlServer.util;
+using System.Dynamic;
 using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
 
 namespace NewPdaSqlServer.Controllers.Warehouse;
@@ -13,9 +14,11 @@
 /// </summary>
 [Route("api/[controller]")]
 [ApiController]
-public class MesSttlController : ControllerBase
+public class MesSttlController : BaseController
 {
     private readonly MesSttlManager _manager = new();
+
+    private readonly MesPrintMangeer _mCf = new();
 
     #region 鍩虹
     /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
@@ -178,7 +181,7 @@
         try
         {
             dynamic resultInfos = new ExpandoObject();
-            resultInfos.tbBillList = _manager.GetSttlBillNo(query);
+            resultInfos.tbBillList = _manager.GetSttlBillNo(query,RequestInfo);
             return new ResponseResult
             {
                 status = 0,
@@ -204,7 +207,7 @@
         try
         {
             dynamic resultInfos = new ExpandoObject();
-            resultInfos.tbBillList = _manager.GetMesItemDetailByBillNo(query);
+            resultInfos.tbBillList = _manager.GetMesItemDetailByBillNo(query, RequestInfo);
 
             if (resultInfos.tbBillList.Count < 1)
             {
@@ -262,5 +265,66 @@
         }
     }
 
+    /// <summary>
+    ///     鍙楁墭閫�鏂欐潯鐮佹媶鍒�
+    /// </summary>
+    /// <param name="query">鏌ヨ鍙傛暟</param>
+    /// <returns>鎷嗗垎缁撴灉鍜屽緟澶勭悊鍒楄〃</returns>
+    /// <remarks>
+    ///     璇锋眰绀轰緥:
+    ///     POST /api/MesItemBl/SplitBarcode
+    ///     {
+    ///     "billNo": "WO202401010001",  // 宸ュ崟鍙�(蹇呭~)
+    ///     "barcode": "BC001",          // 鏉$爜鍙�(蹇呭~)
+    ///     "userName": "admin",          // 鐢ㄦ埛鍚�(蹇呭~)
+    ///     "blNo": "BL202401010001",    // 琛ユ枡鍗曞彿(蹇呭~)
+    ///     "Num": 10                    // 鎷嗗垎鏁伴噺(蹇呭~,蹇呴』澶т簬0)
+    ///     }
+    ///     涓氬姟澶勭悊锛�
+    ///     - 楠岃瘉琛ユ枡鍗曠姸鎬�
+    ///     - 楠岃瘉鏉$爜搴撳瓨淇℃伅
+    ///     - 楠岃瘉鎷嗗垎鏁伴噺鏄惁鍚堢悊
+    ///     - 鎵ц鏉$爜鎷嗗垎浜嬪姟澶勭悊
+    ///     - 鏇存柊宸ュ崟鍜岃ˉ鏂欏崟鐩稿叧鏁伴噺
+    ///     杩斿洖鏁版嵁鍖呭惈锛�
+    ///     - success: 鎷嗗垎鏄惁鎴愬姛
+    ///     - pendingList: 寰呭鐞嗘槑缁嗗垪琛紝鍖呭惈锛�
+    ///     * Bld012: 鐗╂枡ID
+    ///     * Bld002: 鐗╂枡缂栧彿
+    ///     * Bld003: 鐗╂枡鍚嶇О
+    ///     * Bld004: 鐗╂枡瑙勬牸
+    ///     * Bld007: 璁″垝鏁伴噺
+    ///     * Bld008: 宸茶ˉ鏁伴噺
+    /// </remarks>
+    /// <response code="200">鎷嗗垎鎴愬姛</response>
+    /// <response code="400">鎷嗗垎澶辫触锛岃繑鍥炲叿浣撻敊璇俊鎭�</response>
+    [HttpPost("SplitBarcode")]
+    public ResponseResult SplitBarcode(WarehouseQuery query)
+    {
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            resultInfos.tbBillList = new ExpandoObject();
+            resultInfos.tbBillList.printInfo = _mCf.getPrintInfo(query);
+            var scanResult = _manager.SplitBarcode(query);
+            resultInfos.tbBillList.cfBarInfo = _mCf.getCfInfo(scanResult);
+
+            //dynamic resultInfos = new ExpandoObject();
+            //var (success, pendingList) = _manager.SplitBarcode(query);
+            //resultInfos.success = success;
+            //resultInfos.pendingList = pendingList;
+
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
 
 }
\ No newline at end of file

--
Gitblit v1.9.3