From 4b483d9d06bead231b88ca212fd799196668a057 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期二, 28 四月 2026 22:58:27 +0800
Subject: [PATCH] fix(任务服务): 修复出库任务选择逻辑和货位分配问题
---
Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
index 10f0047..483e4f2 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
@@ -201,6 +201,17 @@
}
/// <summary>
+ /// 妫�绱㈡寚瀹氳揣浣嶅湪缁欏畾浠撳簱鐨勫簱瀛樿缁嗕俊鎭�
+ /// </summary>
+ /// <param name="warehouseId">浠撳簱ID</param>
+ /// <param name="locationCode">璐т綅缂栫爜</param>
+ /// <returns>搴撳瓨淇℃伅</returns>
+ public async Task<Dt_StockInfo> GetStockInfoAsync(int warehouseId, string locationCode)
+ {
+ return await BaseDal.QueryDataNavFirstAsync(x => x.WarehouseId == warehouseId && x.LocationCode == locationCode);
+ }
+
+ /// <summary>
/// 鑾峰彇浠撳簱3D甯冨眬鏁版嵁
/// </summary>
/// <param name="warehouseId">浠撳簱ID</param>
@@ -257,12 +268,12 @@
// 绌烘墭鐩樹篃鏈夊簱瀛樿褰曪紝鍙槸涓嶅寘鍚槑缁�
item.PalletCode = stockInfo.PalletCode;
item.StockStatus = stockInfo.StockStatus; // 鐩存帴浣跨敤鍚庣搴撳瓨鐘舵��
-
+
// 鍙湁褰揇etails涓嶄负null涓旀湁鏁版嵁鏃舵墠澶勭悊搴撳瓨鏄庣粏
if (stockInfo.Details != null && stockInfo.Details.Any())
{
item.StockQuantity = stockInfo.Details.Sum(d => d.StockQuantity);
-
+ item.OutboundDate = stockInfo.OutboundDate;
// 鑾峰彇绗竴涓槑缁嗙殑鐗╂枡淇℃伅锛堝鏋滃瓨鍦級
var firstDetail = stockInfo.Details.FirstOrDefault();
if (firstDetail != null)
@@ -278,6 +289,7 @@
Id = d.Id,
MaterielCode = d.MaterielCode,
MaterielName = d.MaterielName,
+ SerialNumber = d.SerialNumber,
BatchNo = d.BatchNo,
StockQuantity = d.StockQuantity,
Unit = d.Unit,
--
Gitblit v1.9.3