From 6e043e19f318e1ce90e296f58f31b3495f669f26 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期三, 11 三月 2026 19:15:34 +0800
Subject: [PATCH] 1
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 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 ca5fdbb..948a204 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"
@@ -78,6 +78,10 @@
case "outbin":
TaskFromCompleted(task, deviceTypeEnum);
break;
+ case "start":
+ task.TaskState = (int)TaskStatusEnum.Takeing;
+ TaskFeedback(task, 1);
+ break;
default:
task.TaskState = ReturnTaskStatus(hIKROBOT.extra.values.method, deviceTypeEnum);
BaseDal.UpdateData(task);
@@ -96,7 +100,8 @@
if (task.TaskType == (int)TaskTypeEnum.CPInbound && task.TaskState == (int)TaskStatusEnum.Execut)
{
task.TaskState = (int)TaskStatusEnum.WaiCheckShape;
- BaseDal.UpdateData(task);//缁欒川妫�闂ㄥ啓鍏ュ惎鍔ㄤ俊鍙�
+ //BaseDal.UpdateData(task);//缁欒川妫�闂ㄥ啓鍏ュ惎鍔ㄤ俊鍙�
+ TaskFeedback(task, 4);
var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "F1") as OtherDevice ?? throw new Exception("鏈壘鍒�1妤艰川妫�闂ㄨ澶囦俊鎭�");
device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, true, task.SourceAddress);
}
@@ -107,6 +112,7 @@
}
else if (Rgv.messageType == 10)
{
+ if (Rgv.content.status == 2) TaskFeedback(task, 1);
if (Rgv.content.status == 4)
{
if (task.TaskType == (int)TaskTypeEnum.CPInbound && task.TaskState == (int)TaskStatusEnum.TakeFinish)
@@ -356,8 +362,12 @@
boundCompleteFeedback.custStatus = "";
string response = HttpHelper.Post(apiInfo.ApiAddress, boundCompleteFeedback.Serialize());
agvContent = response.DeserializeObject<WMSReturn>();
- content.Data = agvContent;
- if (agvContent.code != 0) dt_Task.ExceptionMessage = agvContent.msg;
+ content.OK(data: agvContent);
+ if (agvContent.code != 200)
+ {
+ dt_Task.ExceptionMessage = agvContent.message;
+ content.Error(agvContent.message);
+ }
}
}
catch (Exception ex)
@@ -367,7 +377,7 @@
finally
{
_trackloginfoService.AddTrackLog(boundCompleteFeedback, content, "鍑哄叆搴撲换鍔$姸鎬佸弽棣圵MS", "", "");
- if (agvContent != null && agvContent.code == 0 && Status == 2)
+ if (agvContent != null && agvContent.code == 200 && Status == 2)
BaseDal.DeleteAndMoveIntoHty(dt_Task, OperateTypeEnum.鑷姩瀹屾垚);
else
BaseDal.UpdateData(dt_Task);
--
Gitblit v1.9.3