From ba9c1994b95624b88ef606ec00394990d8f2009f Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期三, 15 四月 2026 19:41:27 +0800
Subject: [PATCH] refactor(TaskService): 重构任务服务代码结构,拆分文件并优化逻辑
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskEnumHelper.cs | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskEnumHelper.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskEnumHelper.cs
index 81b46d6..cd86fc7 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskEnumHelper.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskEnumHelper.cs
@@ -46,6 +46,10 @@
{
return TaskTypeGroup.OtherGroup;
}
+ else if(!int.TryParse(Enum.Parse<RobotTaskTypeEnum>(taskTypeStr).ToString(), out result))
+ {
+ return TaskTypeGroup.OtherGroup;
+ }
// 濡傛灉浠ヤ笂杞崲閮戒笉鎴愬姛锛屾姏鍑篘otImplementedException寮傚父
else
{
@@ -82,6 +86,12 @@
// 鑾峰彇TaskOutStatusEnum鏋氫妇绫诲瀷鐨勭储寮曞垪琛�
return type.GetEnumIndexList().Where(x => x > currentStatus && x < (int)TaskRobotStatusEnum.RobotFinish).OrderBy(x => x).FirstOrDefault();
}
+ // 濡傛灉type鏄疶askRobotStatusEnum鏋氫妇绫诲瀷
+ else if (type == typeof(TaskRelocationStatusEnum))
+ {
+ // 鑾峰彇TaskOutStatusEnum鏋氫妇绫诲瀷鐨勭储寮曞垪琛�
+ return type.GetEnumIndexList().Where(x => x > currentStatus && x < (int)TaskRelocationStatusEnum.RelocationFinish).OrderBy(x => x).FirstOrDefault();
+ }
// 濡傛灉浠ヤ笂鏉′欢閮戒笉婊¤冻锛屾姏鍑篘otImplementedException寮傚父
else
{
--
Gitblit v1.9.3