From aa4aa67abfdf69e30d5076451716e5aba11d5ec0 Mon Sep 17 00:00:00 2001
From: yangpeixing <yangpeixing@hnkhzn.com>
Date: 星期二, 14 四月 2026 16:12:40 +0800
Subject: [PATCH] 1
---
WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/NewOutboundOrderDetailService.cs | 21 ++++++++-------------
1 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/NewOutboundOrderDetailService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/NewOutboundOrderDetailService.cs
index dcaf0c6..8690286 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/NewOutboundOrderDetailService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/NewOutboundOrderDetailService.cs
@@ -30,7 +30,7 @@
/// <summary>
- /// 浣庢俯銆佽嵂姘村簱瀛樺垎閰�
+ /// 鎴愬搧鍒嗛厤
/// </summary>
/// <param name="outboundOrderDetails"></param>
/// <returns></returns>
@@ -64,7 +64,7 @@
foreach (var stockInfoDetail in dt_StockInfoDetails)
{
dt_StockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.Id == stockInfoDetail.StockId && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt());
- if (dt_StockInfo != null)
+ if (dt_StockInfo != null && !PalletCodes.Any(x => x == dt_StockInfo.PalletCode))
{
PalletCodes.Add(dt_StockInfo.PalletCode);
}
@@ -114,12 +114,9 @@
}
List<Dt_StockInfo> autoAssignStocks = new List<Dt_StockInfo>();
List<IStockInfoService.residueQuantity> newResidueQuantitys = new List<IStockInfoService.residueQuantity>();
- if (warehouse.Any(x => x.WarehouseCode.Contains("DW")) || warehouse.Any(x => x.WarehouseCode.Contains("YS")))
- {
- autoAssignStocks = _stockService.StockInfoService.CPGetOutboundStocks(stockInfos, dt_OutboundOrderDetails, out List<IStockInfoService.residueQuantity> residueQuantitys);
- newResidueQuantitys.AddRange(residueQuantitys);
- outStocks.AddRange(autoAssignStocks);
- }
+ autoAssignStocks = _stockService.StockInfoService.CPGetOutboundStocks(stockInfos, dt_OutboundOrderDetails, out List<IStockInfoService.residueQuantity> residueQuantitys);
+ newResidueQuantitys.AddRange(residueQuantitys);
+ outStocks.AddRange(autoAssignStocks);
foreach (var residueQuantity in newResidueQuantitys)
{
foreach (var item in dt_OutboundOrderDetails)
@@ -130,7 +127,7 @@
decimal needQuantity = originalNeedQuantity - item.LockQuantity;
- item.LockQuantity += needQuantity - residueQuantity.NewNeendQuantity;
+ //item.LockQuantity += needQuantity - residueQuantity.NewNeendQuantity;
decimal assignQuantity = needQuantity - residueQuantity.NewNeendQuantity;
@@ -149,11 +146,9 @@
palletAssignQuantity = outStockLockInfos.Where(x => x.MaterielCode == item.MaterielCode && x.PalletCode == autoAssignStocks[j].PalletCode).Sum(x => x.AssignQuantity);//鍑哄簱璇︽儏宸插垎閰嶆暟閲�
}
decimal palletOutboundQuantity = 0;
- if (warehouse.Any(x => x.WarehouseCode.Contains("DW")) || warehouse.Any(x => x.WarehouseCode.Contains("YS")))
- {
- palletOutboundQuantity = autoAssignStocks[j].Details.Where(x => x.MaterielCode == item.MaterielCode).Sum(x => x.OutboundQuantity);
- }
+ palletOutboundQuantity = autoAssignStocks[j].Details.Where(x => x.MaterielCode == item.MaterielCode).Sum(x => x.OutboundQuantity);
+
if (palletAssignQuantity < palletOutboundQuantity)//濡傛灉鍑哄簱璇︽儏宸插垎閰嶆暟閲忓皬浜庢墭鐩樺凡鍒嗛厤鏁伴噺锛屽垯鍙互缁х画娣诲姞璇ユ墭鐩樺嚭搴撲俊鎭�
{
decimal orderDetailNeedQuantity = details[i].OrderQuantity - detailAssignQuantity;
--
Gitblit v1.9.3