From 53719f76ffb7a71db70c8b71bb5dd975904fbc83 Mon Sep 17 00:00:00 2001
From: z8018 <1282578289@qq.com>
Date: 星期三, 17 十二月 2025 21:33:49 +0800
Subject: [PATCH] 整箱出库
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs | 36 +++++++++++++++++++++++++++++++-----
1 files changed, 31 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..152fb90 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"
@@ -40,17 +40,22 @@
}
}
+ 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)
{
@@ -58,6 +63,27 @@
}
}
+ [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, Route("QueryPickingTasks"), AllowAnonymous]
public WebResponseContent QueryPickingTasks(string palletCode, string orderNo)
{
--
Gitblit v1.9.3