From 266e4bf654c55ce2f7e9271048e4625f1b8b49f6 Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期一, 29 十二月 2025 14:36:08 +0800
Subject: [PATCH] Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs |   55 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 50 insertions(+), 5 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs"
index dab5a3a..c024a34 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs"
@@ -2,6 +2,7 @@
 using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Mvc;
+using System.Threading.Tasks;
 using WIDESEA_Core;
 using WIDESEA_DTO.CalcOut;
 
@@ -40,22 +41,54 @@
             }
         }
 
+        object lockObj = new object();
+
         [HttpPost, Route("CompleteOutboundWithBarcode"), AllowAnonymous]
         public WebResponseContent CompleteOutboundWithBarcode([FromBody] OutboundCompleteRequestDTO request)
         {
             try
             {
-                if (!ModelState.IsValid)
-                    return WebResponseContent.Instance.Error(string.Join("; ", ModelState.Values
-                        .SelectMany(v => v.Errors)
-                        .Select(e => e.ErrorMessage)));
+                lock (lockObj)
+                {
+                    if (!ModelState.IsValid)
+                        return WebResponseContent.Instance.Error(string.Join("; ", ModelState.Values
+                            .SelectMany(v => v.Errors)
+                            .Select(e => e.ErrorMessage)));
 
-                return _outboundService.CompleteOutboundWithBarcode(request);
+                    return _outboundService.CompleteOutboundWithBarcode(request);
+                }
             }
             catch (Exception ex)
             {
                 return WebResponseContent.Instance.Error($"鍑哄簱鎵弿鎿嶄綔澶辫触: {ex.Message}");
             }
+        }
+
+        [HttpPost, Route("CompleteOutboundWithPallet"), AllowAnonymous]
+        public WebResponseContent CompleteOutboundWithPallet([FromBody] OutboundCompletePalletRequestDTO request)
+        {
+            try
+            {
+                lock (lockObj)
+                {
+                    if (!ModelState.IsValid)
+                        return WebResponseContent.Instance.Error(string.Join("; ", ModelState.Values
+                            .SelectMany(v => v.Errors)
+                            .Select(e => e.ErrorMessage)));
+
+                    return _outboundService.CompleteOutboundWithPallet(request);
+                }
+            }
+            catch (Exception ex)
+            {
+                return WebResponseContent.Instance.Error($"鏁寸鍑哄簱鎿嶄綔澶辫触: {ex.Message}");
+            }
+        }
+
+        [HttpPost,HttpGet, Route("GetOrderInfo"), AllowAnonymous]
+        public WebResponseContent GetOrderInfo(string orderNo)
+        {
+            return _outboundService.GetOrderInfo(orderNo);
         }
 
         [HttpPost, Route("QueryPickingTasks"), AllowAnonymous]
@@ -69,5 +102,17 @@
         {
             return _outboundService.QueryPickedList(orderNo, palletCode);
         }
+
+        [HttpPost, Route("EmptyBox"), AllowAnonymous]
+        public async Task<WebResponseContent> EmptyBox([FromBody] ReturnToWarehouseDTO returnToWarehouse)
+        {
+            return await _outboundService.EmptyBox(returnToWarehouse.palletCode);
+        }
+
+        [HttpPost, Route("ReturnToWarehouse"), AllowAnonymous]
+        public async Task<WebResponseContent> ReturnToWarehouse([FromBody]ReturnToWarehouseDTO returnToWarehouse)
+        {
+            return await _outboundService.ReturnToWarehouse(returnToWarehouse.palletCode, returnToWarehouse.orderNo, returnToWarehouse.station);
+        }
     }
 }

--
Gitblit v1.9.3