From b04cbd531a75c620d82b4b09dd3d4d2be927198f Mon Sep 17 00:00:00 2001
From: xxyy <cathay_xy@163.com>
Date: 星期六, 01 三月 2025 13:23:17 +0800
Subject: [PATCH] 更新 .gitignore 和 Dt_TaskService.cs 文件
---
.gitignore | 1 +
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs | 17 +++++++++++++++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 64bfc2f..ba5af80 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1678,3 +1678,4 @@
/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.13.433.20974/SemanticSymbols.db
/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.13.433.20974/SemanticSymbols.db-shm
/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.13.433.20974/SemanticSymbols.db-wal
+/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/copilot-chat/bef6627e/sessions/e6132757-6fba-4638-b3d2-dfa6125d4331
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
index d185ef3..efea336 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -2105,19 +2105,32 @@
if (stock.IsFull)
{
+ // 鏌ヨ绗﹀悎鏉′欢鐨勫簱瀛樹俊鎭�
var stocks = _stockInfoRepository.QueryData(x => x.AreaCode == stock.AreaCode && x.ProductionLine == stock.ProductionLine && x.SpecialParameterDuration != stock.SpecialParameterDuration);
+
+ // 鏌ヨ浠诲姟淇℃伅
+ var tasks = BaseDal.QueryData(x => x.PalletCode != stock.PalletCode && x.ProductionLine == stock.ProductionLine).Select(x => x.PalletCode).ToList();
+
if (stocks != null && stocks.Count > 0)
{
- foreach (var item in stocks)
+ // 杩囨护鍑洪渶瑕佹洿鏂扮殑搴撳瓨淇℃伅
+ var stocksToUpdate = stocks.Where(item => !tasks.Contains(item.PalletCode)).ToList();
+ foreach (var item in stocksToUpdate)
{
+ // 鏇存柊搴撳瓨淇℃伅鐨勭壒瀹氬弬鏁�
item.SpecialParameterDuration = stock.SpecialParameterDuration;
item.ParameterInfos = stock.ParameterInfos;
item.OutboundTime = Convert.ToDateTime(item.LinedProcessFeedbackTime == null ? item.CreateDate : item.LinedProcessFeedbackTime).AddHours(Convert.ToDouble(stock.SpecialParameterDuration));
}
- var isUpdates = await _stockInfoRepository.UpdateDataAsync(stocks);
+ if (stocksToUpdate.Count > 0)
+ {
+ // 寮傛鏇存柊搴撳瓨淇℃伅
+ var isUpdates = await _stockInfoRepository.UpdateDataAsync(stocksToUpdate);
+ }
}
}
+
// 娣诲姞鍘嗗彶浠诲姟
var isTaskHtyAdd = await _task_HtyRepository.AddDataAsync(taskHty) > 0;
--
Gitblit v1.9.3