From 257d09aff7ec7b858b037607869d23ec61ac75bc Mon Sep 17 00:00:00 2001
From: helongyang <647556386@qq.com>
Date: 星期二, 19 八月 2025 09:03:49 +0800
Subject: [PATCH] 1
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGV_CSJExtend.cs | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGV_CSJExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGV_CSJExtend.cs"
index eb4e385..9e7bf06 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGV_CSJExtend.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGV_CSJExtend.cs"
@@ -13,6 +13,7 @@
using WIDESEAWCS_DTO.Agv;
using SqlSugar;
using static Dm.net.buffer.ByteArrayBuffer;
+using WIDESEAWCS_Core.Enums;
namespace WIDESEAWCS_Tasks
{
@@ -190,6 +191,8 @@
}
}
_taskService.UpdateData(WaitToTasks);
+
+ //鍙栨斁璐у畬鎴愬啓鍏ュ紓甯稿鐞�
Dt_Task? TakeErroeTask = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.AGV_TakeError.ObjToInt() && nameof(AGV_CSJJob).Contains(x.DeviceCode)).First();
if (TakeErroeTask!=null)
{
@@ -207,8 +210,31 @@
otherDevice.SetValue(GroundStationDBName.W_TakeFinish, true, stationManger.StationCode);
Thread.Sleep(1000);
otherDevice.SetValue(GroundStationDBName.W_TakeFinish, false, stationManger.StationCode);
+ TakeErroeTask.TaskState = TaskStatusEnum.AGV_Finish.ObjToInt();
+ var up = _taskRepository.DeleteAndMoveIntoHty(TakeErroeTask, OperateTypeEnum.鑷姩瀹屾垚);
_taskService.TaskCompleted(TakeErroeTask.TaskNum);
}
+ Dt_Task? PutErroeTask = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.AGV_PutError.ObjToInt() && nameof(AGV_CSJJob).Contains(x.DeviceCode)).First();
+ if (PutErroeTask != null)
+ {
+ Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.AGVStationCode == PutErroeTask.NextAddress);
+ if (stationManger == null)
+ {
+ throw new Exception($"鏈壘鍒扮珯鍙伴厤缃�");
+ }
+ IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
+ if (device == null)
+ {
+ throw new Exception($"鏈壘鍒扮珯鍙伴厤缃�");
+ }
+ OtherDevice otherDevice = (OtherDevice)device;
+ otherDevice.SetValue(GroundStationDBName.W_PutFinish, true, stationManger.StationCode);
+ PutErroeTask.CurrentAddress = stationManger.StationCode;
+ PutErroeTask.NextAddress = "";
+ PutErroeTask.TaskState = TaskStatusEnum.AGV_Finish.ObjToInt();
+ PutErroeTask.DeviceCode = "SC01_CSJ";
+ var up = _taskRepository.UpdateData(PutErroeTask);
+ }
}
catch (Exception ex)
{
--
Gitblit v1.9.3