From d4fc143136f77f0bb68e0ec7579d250a6ae550b6 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期五, 24 十月 2025 16:31:28 +0800
Subject: [PATCH] 优化出库单分配逻辑及平库出库任务生成
---
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Allocat.cs | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Allocat.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Allocat.cs"
index 357a147..97a1ef4 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Allocat.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/extend/Allocat.cs"
@@ -9,6 +9,7 @@
using WIDESEA_Common.OrderEnum;
using WIDESEA_Common.StockEnum;
using WIDESEA_Common.TaskEnum;
+using WIDESEA_Common.WareHouseEnum;
using WIDESEA_Core;
using WIDESEA_ISquareCabinServices;
using WIDESEA_Model.Models;
@@ -30,8 +31,13 @@
try
{
if (materielInfo.Business_qty >= materielInfo.MinQty) return response;
+ Dt_Tactics tactics = _tacticsService.Repository.QueryFirst(x => x.TacticeName == "鍑哄簱绛栫暐");
List<Dt_SupplyTask> supplyTasks = new List<Dt_SupplyTask>();
- List<Dt_InventoryInfo> dt_InventoryInfos = _inventoryInfoService.Repository.QueryData(x => x.MaterielCode == materielInfo.MaterielCode && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt() && x.StockQuantity > x.OutboundQuantity && x.LocationCode != "绔嬪簱").OrderBy(x => x.InDate).ToList();
+ List<Dt_InventoryInfo> dt_InventoryInfos = _inventoryInfoService.Repository.QueryData(x => x.MaterielCode == materielInfo.MaterielCode && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt() && x.StockQuantity > x.OutboundQuantity && x.WarehouseCode == WarehouseEnum.澶т欢搴�.ObjToInt().ToString("000"));
+ if (tactics.SelectTactice == TacticsEnum.ComeOutonFirstTime.ObjToInt())
+ dt_InventoryInfos = dt_InventoryInfos.OrderBy(x => x.ValidityPeriod).ToList();
+ else
+ dt_InventoryInfos = dt_InventoryInfos.OrderBy(x => x.InDate).ToList();
decimal Qty = 0;
foreach (var item in dt_InventoryInfos)
{
@@ -43,8 +49,11 @@
materielInfo.Business_qty += materielInfo.BoxQty;
item.OutboundQuantity += materielInfo.BoxQty;
}
+ item.AvailableQuantity = item.StockQuantity - item.OutboundQuantity;
}
+ #region 澶т欢搴撹ˉ绔嬪簱鍚庣珛搴撲笟鍔″簱瀛樻暟杩樻槸灏忎簬绔嬪簱鏈�灏忓簱瀛樻暟锛屾坊鍔犳彁绀轰俊鎭�
+ #endregion
#region 娣诲姞璋冩嫧鍑哄簱鍗�
Dt_DeliveryOrder deliveryOrder = new Dt_DeliveryOrder()
{
--
Gitblit v1.9.3