From fb79dc54d6484146b74d29bf5644df880fc1fa01 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 19 六月 2025 12:16:54 +0800
Subject: [PATCH] WMS添加AGV任务完成取消
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/OutboundOrderDetailService.cs | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/OutboundOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/OutboundOrderDetailService.cs"
index 945fcd4..b1d7c3c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/OutboundOrderDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/OutboundOrderDetailService.cs"
@@ -147,14 +147,8 @@
});
outboundOrderDetail.LockQuantity += assignQuantity;
- outStocks.ForEach(x =>
- {
- x.Details.ForEach(v =>
- {
- v.OutboundQuantity = v.StockQuantity;
- });
- });
needQuantity -= assignQuantity;
+ outboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.AssignOver.ObjToInt();
if (outboundOrderDetail.OrderQuantity > outboundOrderDetail.LockQuantity)
{
List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(outboundOrderDetail.MaterielCode);
@@ -162,13 +156,21 @@
List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutboundStocks(stockInfos, outboundOrderDetail.MaterielCode, needQuantity, out decimal residueQuantity);
outboundOrderDetail.LockQuantity += needQuantity - residueQuantity;
outStocks.AddRange(autoAssignStocks);
- outboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.AssignOver.ObjToInt();
if (residueQuantity > 0)
{
outboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.AssignOverPartial.ObjToInt();
}
}
+ outStocks.ForEach(x =>
+ {
+ x.StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt();
+ x.Details.ForEach(v =>
+ {
+ v.OutboundQuantity = v.StockQuantity;
+ v.Status = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt();
+ });
+ });
List<Dt_OutStockLockInfo> outStockLockInfos = _outStockLockInfoService.GetOutStockLockInfos(outboundOrder, outboundOrderDetail, outStocks);
List<Dt_LocationInfo> locationInfos = _basicService.LocationInfoService.Repository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList());
@@ -273,7 +275,7 @@
_outStockLockInfoService.Repository.UpdateData(updateOutStockLockInfos);
}
- _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, locationStatus.ObjToInt(), StockChangeType.Outbound.ObjToInt(), "", tasks?.Select(x => x.TaskNum).ToList());
+ _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, locationStatus.ObjToInt(), StockChangeType.StockLock.ObjToInt(), "", tasks?.Select(x => x.TaskNum).ToList());
_basicService.LocationInfoService.Repository.UpdateLocationStatus(locationInfos, locationStatus);
return WebResponseContent.Instance.OK();
}
@@ -314,9 +316,11 @@
{
stocks.ForEach(x =>
{
+ x.StockStatus = StockStatusEmun.宸插叆搴�.ObjToInt();
x.Details.ForEach(v =>
{
v.OutboundQuantity = 0;
+ v.Status = StockStatusEmun.宸插叆搴�.ObjToInt();
});
});
--
Gitblit v1.9.3