From 19f73f3d2370c821355d0cc0fa5b0f7cdcb898e8 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期一, 23 六月 2025 08:48:32 +0800
Subject: [PATCH] 增强任务处理和更新版本信息在 `TaskController.cs` 中添加了对 `WIDESEAWCS_ITaskInfoRepository` 和 `WIDESEAWCS_ITaskInfoService` 的引用,以提升任务信息处理能力。在 `CommonConveyorLineJob.cs` 中引入 `platformNotusable` 列表,确保查询平台信息时的可用性检查。在 `RequestInbound.cs` 中添加对 并优化 `outJZTask` 的查询条件。修改 `CommonStackerCraneJob.cs` 中静置出库任务的判断逻辑,确保任务执行前的适当检查。
---
CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile1.pubxml.user | 2 +-
CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs | 1 -
CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_StoragIntegrationRepository.AssemblyInfo.cs | 2 +-
CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs | 3 ++-
CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_IStoragIntegrationRepository.AssemblyInfo.cs | 2 +-
CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs | 11 +++++++----
CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs | 1 +
7 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs
index d2293fa..7173b01 100644
--- a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs
+++ b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs
@@ -4,6 +4,7 @@
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseController;
using WIDESEAWCS_DTO.TaskInfo;
+using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
diff --git a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile1.pubxml.user b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile1.pubxml.user
index a6932e5..9bacb85 100644
--- a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile1.pubxml.user
+++ b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile1.pubxml.user
@@ -5,7 +5,7 @@
<Project>
<PropertyGroup>
<_PublishTargetUrl>E:\GET\BaiBuSanLouNew\CodeManagement\WCS\WIDESEAWCS_Server\WIDESEAWCS_Server\bin\Release\net6.0\publish\</_PublishTargetUrl>
- <History>True|2025-06-12T08:02:45.3477017Z||;True|2025-06-06T09:30:09.4409029+08:00||;True|2025-06-05T14:22:11.1558952+08:00||;True|2025-06-05T14:21:15.0801810+08:00||;</History>
+ <History>True|2025-06-13T06:06:02.3387675Z||;True|2025-06-13T12:12:05.8571668+08:00||;True|2025-06-13T11:07:21.0883921+08:00||;True|2025-06-13T10:58:41.4512589+08:00||;True|2025-06-12T16:02:45.3477017+08:00||;True|2025-06-06T09:30:09.4409029+08:00||;True|2025-06-05T14:22:11.1558952+08:00||;True|2025-06-05T14:21:15.0801810+08:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
\ No newline at end of file
diff --git a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
index 17cd702..73763b3 100644
--- a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
+++ b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -257,7 +257,8 @@
// 鏌ヨ骞冲彴淇℃伅
Platform platform = _platFormRepository.QueryFirst(x => x.DeviceCode == conveyorLine.DeviceCode && x.PlatCode == childDeviceCode && x.Status == "Active");
- if (platform != null && !string.IsNullOrEmpty(platform.Location))
+ var platformNotusable = new List<string> { "2028", "2024","2032","2036","2040" };
+ if (platform != null && !string.IsNullOrEmpty(platform.Location) && !platformNotusable.Contains(platform.PlatCode))
{
var strings = platform.Location.Split(',').ToList();
foreach (var ite in strings)
diff --git a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs
index 0af8f2e..3f735b3 100644
--- a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs
+++ b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs
@@ -6,6 +6,8 @@
using Microsoft.VisualBasic;
using MoYu.Logging;
using Newtonsoft.Json;
+using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
+using SqlSugar;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using WIDESEAWCS_Common;
@@ -17,6 +19,7 @@
using WIDESEAWCS_DTO.WMS;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
+using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_Tasks.ConveyorLineJob;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
@@ -573,11 +576,9 @@
else if (task.Roadway.Contains("JZ"))
{
// 鏌ヨ鏄惁瀛樺湪闈欑疆鍑哄簱浠诲姟
- var outJZTask = _taskRepository.QueryData(x => x.Roadway == task.Roadway && task.TaskType == (int)TaskOutboundTypeEnum.Outbound &&
- (x.TaskState == (int)TaskOutStatusEnum.SC_OutExecuting ||
- x.TaskState == (int)TaskOutStatusEnum.SC_OutFinish || x.TaskState == (int)TaskOutStatusEnum.OutNew));
+ var outJZTask = _taskRepository.QueryData(x => x.Roadway == task.Roadway && x.TaskType == (int)TaskOutboundTypeEnum.Outbound && (x.TaskState == (int)TaskOutStatusEnum.SC_OutExecuting || x.TaskState == (int)TaskOutStatusEnum.SC_OutFinish || x.TaskState == (int)TaskOutStatusEnum.OutNew));
- if (!outJZTask.Any())
+ if (!outJZTask.Any() || outJZTask.Count() == 0)
{
// 鏄犲皠浠诲姟鍛戒护
var taskCommand = MapTaskCommand(task, command);
@@ -590,6 +591,8 @@
// 鏇存柊浠诲姟鐘舵��
_taskService.UpdateTaskStatusToNext(task);
+
+ WriteInfo(conveyorLine.DeviceName, $"闈欑疆瀛樺湪鍑哄簱浠诲姟{outJZTask.Count()}");
}
else
{
diff --git a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
index 65bf6f2..e1f3e5a 100644
--- a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
+++ b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -264,7 +264,6 @@
if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
{
#region 闈欑疆鍑哄簱鍒ゆ柇鏄惁鑳芥墽琛屼换鍔�
- //if (task != null && task.Roadway.Contains("JZ") && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
if (task != null && task.Roadway.Contains("JZ") && task.TaskType==(int)TaskOutboundTypeEnum.Outbound)
{
// 鏌ヨ鏄惁瀛樺湪闈欑疆鍏ュ簱浠诲姟
diff --git a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_IStoragIntegrationRepository.AssemblyInfo.cs b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_IStoragIntegrationRepository.AssemblyInfo.cs
index 701afaa..23ab86d 100644
--- a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_IStoragIntegrationRepository.AssemblyInfo.cs
+++ b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_IStoragIntegrationRepository.AssemblyInfo.cs
@@ -14,7 +14,7 @@
[assembly: System.Reflection.AssemblyCompanyAttribute("WIDESEA_IStoragIntegrationRepository")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f1996d265dc9ab8768814c6c72e25dc780d39051")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9d6f25decd9d01a85fec002ecb59ecb742fe0e70")]
[assembly: System.Reflection.AssemblyProductAttribute("WIDESEA_IStoragIntegrationRepository")]
[assembly: System.Reflection.AssemblyTitleAttribute("WIDESEA_IStoragIntegrationRepository")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_StoragIntegrationRepository.AssemblyInfo.cs b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_StoragIntegrationRepository.AssemblyInfo.cs
index 873e08d..fcf3953 100644
--- a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_StoragIntegrationRepository.AssemblyInfo.cs
+++ b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_StoragIntegrationRepository.AssemblyInfo.cs
@@ -14,7 +14,7 @@
[assembly: System.Reflection.AssemblyCompanyAttribute("WIDESEA_StoragIntegrationRepository")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f1996d265dc9ab8768814c6c72e25dc780d39051")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9d6f25decd9d01a85fec002ecb59ecb742fe0e70")]
[assembly: System.Reflection.AssemblyProductAttribute("WIDESEA_StoragIntegrationRepository")]
[assembly: System.Reflection.AssemblyTitleAttribute("WIDESEA_StoragIntegrationRepository")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
--
Gitblit v1.9.3