From 07d83d2d583f96ddd7df98bbb202c98f3b073cd4 Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期二, 10 三月 2026 13:41:02 +0800
Subject: [PATCH] 添加前端任务状态枚举,以及历史任务页面
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 40 +++++++++++++++++++++-------------------
1 files changed, 21 insertions(+), 19 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index bf08104..57bffd8 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -97,7 +97,8 @@
if (!content.Status) throw new Exception(content.Message);
if (BaseDal.QueryFirst(x => x.WMSTaskNum == task.taskCode || x.PalletCode == task.containerCode) != null)
{
- continue;
+ throw new Exception($"浠诲姟鍙枫�恵task.taskCode}銆�/鎵樼洏鍙枫�恵task.containerCode}銆戝凡瀛樺湪浠诲姟");
+ //continue;
}
switch (item.taskType)
{
@@ -180,11 +181,11 @@
{
//鐩存帴绉诲叆鍘嗗彶
BaseDal.DeleteAndMoveIntoHty(dt_Task, OperateTypeEnum.鑷姩瀹屾垚);
- content.OK("鍙栨秷浠诲姟鎴愬姛", dt_Task);
+ content.OK($"鍙栨秷{dt_Task.WMSTaskNum}浠诲姟鎴愬姛", dt_Task);
}
else
{
- content.Error($"浠诲姟澶辫触{agvContent.data.returnInfo}");
+ content.Error($"浠诲姟{dt_Task.WMSTaskNum}澶辫触{agvContent.data.returnInfo}");
}
}
@@ -195,7 +196,8 @@
{
cancelSXCTake = new CancelSXCTake
{
- taskID = dt_Task.RGVTaskId
+ taskID = dt_Task.RGVTaskId,
+ withoutRunning = 1
};
Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(CancelSXCTake));
if (apiInfo == null) throw new Exception("鏈壘鍒板洓鍚戣溅AGV浠诲姟涓嬪彂鎺ュ彛閰嶇疆淇℃伅锛佽妫�鏌ユ帴鍙i厤缃�");
@@ -205,11 +207,11 @@
{
//鐩存帴绉诲叆鍘嗗彶
BaseDal.DeleteAndMoveIntoHty(dt_Task, OperateTypeEnum.鑷姩瀹屾垚);
- content.OK("鍙栨秷浠诲姟鎴愬姛", dt_Task);
+ content.OK($"鍙栨秷{dt_Task.WMSTaskNum}浠诲姟鎴愬姛", dt_Task);
}
else
{
- content.Error($"浠诲姟澶辫触{fOURBOTReturn.data}");
+ content.Error($"浠诲姟{dt_Task.WMSTaskNum}澶辫触{fOURBOTReturn.data}");
}
}
#endregion
@@ -229,11 +231,11 @@
{
//鐩存帴绉诲叆鍘嗗彶
BaseDal.DeleteAndMoveIntoHty(dt_Task, OperateTypeEnum.鑷姩瀹屾垚);
- content.OK("鍙栨秷浠诲姟鎴愬姛", dt_Task);
+ content.OK("鍙栨秷{dt_Task.WMSTaskNum}浠诲姟鎴愬姛", dt_Task);
}
else
{
- content.Error($"浠诲姟澶辫触{hIKROBOTReturn.data}");
+ content.Error($"浠诲姟{dt_Task.WMSTaskNum}澶辫触锛岄敊璇俊鎭細{hIKROBOTReturn.data}");
}
}
@@ -268,7 +270,7 @@
if (logObject != null)
{
- _trackloginfoService.AddTrackLog(logObject, content, $"鍙栨秷{deviceName}浠诲姟", "", "");
+ _trackloginfoService.AddTrackLog(logObject, content, $"鍙栨秷{deviceName}浠诲姟,", "", "");
}
}
return content;
@@ -309,7 +311,6 @@
{
taskId = dt_Task.WMSTaskNum,
reportTime = DateTime.Now.ToString(),
- district = dt_Task.Roadway,//浠诲姟搴撳尯
priorityCode = updateTaskPriority.taskPriority,
};
Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(UpdateGALAXISTaskGrade));
@@ -320,11 +321,11 @@
{
BaseDal.UpdateData(dt_Task);
- content.OK("淇敼浠诲姟浼樺厛绾ф垚鍔�", dt_Task);
+ content.OK($"淇敼{dt_Task.WMSTaskNum}浠诲姟浼樺厛绾ф垚鍔�", dt_Task);
}
else
{
- content.Error($"浠诲姟澶辫触{agvContent.data.returnInfo}");
+ content.Error($"{dt_Task.WMSTaskNum}浠诲姟澶辫触,閿欒淇℃伅锛歿agvContent.data.returnInfo}");
}
}
#endregion
@@ -338,17 +339,17 @@
priority = updateTaskPriority.taskPriority
};
Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(UpdateAgvSXCTake));
- if (apiInfo == null) throw new Exception("鏈壘鍒板洓鍚戣溅AGV浠诲姟涓嬪彂鎺ュ彛閰嶇疆淇℃伅锛佽妫�鏌ユ帴鍙i厤缃�");
+ if (apiInfo == null) throw new Exception("鏈壘鍒版洿鏂板洓鍚戣溅浠诲姟浼樺厛绾ф帴鍙i厤缃俊鎭紒璇锋鏌ユ帴鍙i厤缃�");
string response = HttpHelper.Post(apiInfo.ApiAddress, request.Serialize());
FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
if (fOURBOTReturn.returnCode == 0 && fOURBOTReturn.returnUserMsg == "鎴愬姛")
{
BaseDal.UpdateData(dt_Task);
- content.OK("淇敼浠诲姟浼樺厛绾ф垚鍔�", dt_Task);
+ content.OK("淇敼{dt_Task.WMSTaskNum}浠诲姟浼樺厛绾ф垚鍔�", dt_Task);
}
else
{
- content.Error($"浠诲姟澶辫触{fOURBOTReturn.data}");
+ content.Error($"浠诲姟{dt_Task.WMSTaskNum}澶辫触锛岄敊璇俊鎭細{fOURBOTReturn.data}");
}
}
@@ -368,11 +369,11 @@
if (hIKROBOTReturn.code == "SUCCESS0" && hIKROBOTReturn.message == "鎴愬姛")
{
BaseDal.UpdateData(dt_Task);
- content.OK("淇敼浠诲姟浼樺厛绾ф垚鍔�", dt_Task);
+ content.OK("淇敼{dt_Task.WMSTaskNum}浠诲姟浼樺厛绾ф垚鍔�", dt_Task);
}
else
{
- content.Error($"浠诲姟澶辫触{hIKROBOTReturn.data}");
+ content.Error($"浠诲姟{dt_Task.WMSTaskNum}澶辫触锛岄敊璇俊鎭瘂hIKROBOTReturn.data}");
}
}
#endregion
@@ -1118,7 +1119,8 @@
};
string response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOToccupyStation.Serialize());
FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
- if (fOURBOTReturn.returnCode != 0) throw new Exception(fOURBOTReturn.returnUserMsg);
+ if (fOURBOTReturn.returnCode != 0 && fOURBOTReturn.returnUserMsg != $"绔欑偣宸茶鍗犵敤,(podID={iQC.ContainerCode})")
+ throw new Exception(fOURBOTReturn.returnUserMsg);
#endregion
#region 鍒涘缓鍥涘悜杞︿换鍔�
@@ -1166,7 +1168,7 @@
var Agvlocation = _rGVLocationInfoService.Repository.QueryData(x => fOURBOTStorageStatusNotify.storageCode.Contains(x.LocationCode));
foreach (var item in Agvlocation)
{
- item.LocationStatus = (int)(fOURBOTStorageStatusNotify.disable == 0 ? EnableStatusEnum.Normal : EnableStatusEnum.Disable);
+ item.EnableStatus = (int)(fOURBOTStorageStatusNotify.disable == 0 ? EnableStatusEnum.Normal : EnableStatusEnum.Disable);
}
_rGVLocationInfoService.UpdateData(Agvlocation);
return WebResponseContent.Instance.OK();
--
Gitblit v1.9.3