From 695571c6009ecbc12e7d4a4fb147df7967a1260e Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 07 七月 2025 20:21:19 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
index 87bf3af..98f3311 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
@@ -112,6 +112,7 @@
{
WarehouseId = stockInfos.FirstOrDefault().WarehouseId,
TakeStockStatus = TakeStockStatusEnum.鐩樼偣涓�.ObjToInt(),
+ OrderNo = _outboundService.OutboundOrderService.CreateCodeByRule(nameof(RuleCodeEnum.PDCodeRule)),
Details = new List<Dt_TakeStockOrderDetail>()
};
foreach (var item in stockInfos)
@@ -152,6 +153,10 @@
stockInfos.ForEach(x =>
{
x.StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt();
+ });
+ tasks.ForEach(x =>
+ {
+ x.OrderNo = takeStockOrder.OrderNo;
});
LocationStatusEnum locationStatus = LocationStatusEnum.Lock;
_unitOfWorkManage.BeginTran();
@@ -601,13 +606,14 @@
public List<Dt_Task> GetTasks(List<Dt_StockInfo> stockInfos, TaskTypeEnum taskType)
{
List<Dt_Task> tasks = new List<Dt_Task>();
+ List<Dt_LocationInfo> locationInfos = _basicService.LocationInfoService.Repository.QueryData(x => stockInfos.Select(x=>x.LocationCode).Contains(x.LocationCode));
for (int i = 0; i < stockInfos.Count; i++)
{
Dt_StockInfo stockInfo = stockInfos[i];
if (stockInfo != null)
{
- Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode);
+ Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.LocationCode == stockInfo.LocationCode);
if (!tasks.Exists(x => x.PalletCode == stockInfo.PalletCode))
{
Dt_Task task = new()
@@ -628,8 +634,8 @@
};
if (taskType != TaskTypeEnum.OutEmpty)
{
- task.MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
- task.Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.StockQuantity;
+ task.MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
+ task.Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
}
if (stockInfo.StockLength>0)
{
--
Gitblit v1.9.3