From 02fdb8204bee8c7edb67544946e452ad0396f90c Mon Sep 17 00:00:00 2001
From: z8018 <1282578289@qq.com>
Date: 星期一, 15 十二月 2025 15:42:04 +0800
Subject: [PATCH] Update OutboundService.cs
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 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_OutboundService/OutboundService.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_OutboundService/OutboundService.cs"
index fa22378..f2f1977 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_OutboundService/OutboundService.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_OutboundService/OutboundService.cs"
@@ -825,7 +825,7 @@
string[] ids = lockInfo.OrderDetailIds.Split(",");
foreach (string id in ids)
{
- if(int.TryParse(id, out int detailId))
+ if (int.TryParse(id, out int detailId))
{
detailIds.Add(detailId);
}
@@ -853,7 +853,7 @@
return WebResponseContent.Instance.Error($"鏃犳硶鍑哄簱锛屾潯鐮侊細{request.Barcode}锛屽簱瀛橈細{stockDetail.StockQuantity}锛屽凡鍑哄簱锛歿totalAllocatedQuantity}锛屽垎閰嶉噺锛歿lockInfo.AssignQuantity}锛屾槑缁嗗墿浣欙細{detailRemainingQuantity}");
}
- if(actualOutboundQuantity + lockInfo.SortedQuantity > lockInfo.AssignQuantity)
+ if (actualOutboundQuantity + lockInfo.SortedQuantity > lockInfo.AssignQuantity)
{
response.Success = false;
response.Message = $"鏃犳硶鍑哄簱锛屾潯鐮侊細{request.Barcode}锛屽簱瀛橈細{stockDetail.StockQuantity}锛屽嚭搴撻噺{actualOutboundQuantity + lockInfo.SortedQuantity}澶т簬鍒嗛厤閲弡lockInfo.AssignQuantity}";
@@ -901,8 +901,15 @@
lockInfo.SortedQuantity = lockInfo.SortedQuantity + actualOutboundQuantity;
- // 鏇存柊閿佸畾璁板綍
- _outboundLockInfoService.Repository.UpdateData(lockInfo);
+ if (lockInfo.SortedQuantity == lockInfo.AssignQuantity)
+ {
+ _outboundLockInfoService.Repository.DeleteAndMoveIntoHty(lockInfo, WIDESEA_Core.Enums.OperateTypeEnum.鑷姩瀹屾垚);
+ }
+ else
+ {
+ // 鏇存柊閿佸畾璁板綍
+ _outboundLockInfoService.Repository.UpdateData(lockInfo);
+ }
// 鏇存柊鍑哄簱鍗曟槑缁嗙殑宸插嚭搴撴暟閲�
_detailService.Repository.UpdateData(updateDetails);
--
Gitblit v1.9.3