From a4c0e9759befb4e8efa91e322370afe9d4673d4b Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期一, 02 三月 2026 10:36:56 +0800
Subject: [PATCH] 优化
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
index 0b14d18..b542669 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Reflection.Metadata;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
@@ -30,11 +31,14 @@
/// <exception cref="NotImplementedException"></exception>
public WebResponseContent UpdateTaskStatus(object TaskDTO, DeviceTypeEnum deviceTypeEnum)
{
+
+ WebResponseContent content = new WebResponseContent();
+ GALAXISUpdateTaskStatus gALAXIS = new();
try
{
if (deviceTypeEnum == DeviceTypeEnum.GALAXIS)
{
- GALAXISUpdateTaskStatus? gALAXIS = TaskDTO.Serialize().DeserializeObject<GALAXISUpdateTaskStatus>();
+ //GALAXISUpdateTaskStatus? gALAXIS = TaskDTO.Serialize().DeserializeObject<GALAXISUpdateTaskStatus>();
if (gALAXIS == null) throw new Exception("鍙傛暟杞崲澶辫触锛�");
var task = BaseDal.QueryFirst(x => x.WMSTaskNum == gALAXIS.taskId);
if (task == null) throw new Exception($"鏈壘鍒颁换鍔�,浠诲姟缂栧彿銆恵gALAXIS.taskId}銆�");
@@ -64,9 +68,13 @@
}
catch (Exception ex)
{
- throw new Exception(ex.Message);
+ return WebResponseContent.Instance.Error(ex.Message);
}
- }
+ finally
+ {
+ _trackloginfoService.AddTrackLog(gALAXIS, content, "涓嬪彂鍑箰澹獳GV浠诲姟", "", "");
+ }
+ }
#endregion
#region 浠诲姟鐘舵�佽浆鎹�
@@ -85,6 +93,7 @@
6 => TaskStatusEnum.TaskTypeError,
7 => TaskStatusEnum.ParameterError,
8 => TaskStatusEnum.RCSError,
+ 10 => TaskStatusEnum.Takeing,
13 => TaskStatusEnum.Cancel,
_ => throw new ArgumentOutOfRangeException(
nameof(status),
@@ -107,7 +116,7 @@
{
throw new Exception(ex.Message);
}
- }
+ }
#endregion
#region 浠诲姟璧风偣瀹屾垚
@@ -133,7 +142,7 @@
Db.Ado.RollbackTran();
throw new Exception(ex.Message);
}
- }
+ }
#endregion
#region 浠诲姟瀹屾垚
@@ -159,7 +168,7 @@
Db.Ado.RollbackTran();
throw new Exception(ex.Message);
}
- }
+ }
#endregion
#region 鏇存柊璐т綅鐘舵��
@@ -211,7 +220,7 @@
{
throw new Exception(ex.Message);
}
- }
+ }
#endregion
}
}
--
Gitblit v1.9.3