From ceb8c334e8ca10d569b4c7f72b74126ce1877e48 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期二, 07 一月 2025 21:51:51 +0800 Subject: [PATCH] 添加辅料仓功能,优化测试架仓代码 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGV_CSJExtend.cs | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGVExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGV_CSJExtend.cs" similarity index 92% rename from "\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGVExtend.cs" rename to "\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGV_CSJExtend.cs" index 0afac43..788399b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGVExtend.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGV_CSJExtend.cs" @@ -14,7 +14,7 @@ namespace WIDESEAWCS_Tasks { - public partial class AGVJob + public partial class AGV_CSJJob { /// <summary> /// 涓嬪彂AGV浠诲姟 @@ -23,7 +23,7 @@ { try { - var newTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.AGV_Execute.ObjToInt()).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList(); + var newTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.AGV_Execute.ObjToInt() && nameof(AGV_CSJJob).Contains(x.DeviceCode)).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList(); foreach (var agvTask in newTasks) { try @@ -66,14 +66,14 @@ agvTask.TaskState = TaskStatusEnum.Exception.ObjToInt(); //agvTask.Remark = content.Data.ObjToString(); agvTask.ExceptionMessage = ex.Message; - WriteError(nameof(AGVJob), ex.Message, ex); + WriteError(nameof(AGV_CSJJob), ex.Message, ex); } } _taskService.UpdateData(newTasks); } catch (Exception ex) { - WriteError(nameof(AGVJob), ex.Message, ex); + WriteError(nameof(AGV_CSJJob), ex.Message, ex); } } /// <summary> @@ -83,10 +83,10 @@ { try { - var WaitToTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.AGV_WaitToExecute.ObjToInt()).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList(); + var WaitToTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.AGV_WaitToExecute.ObjToInt() && nameof(AGV_CSJJob).Contains(x.DeviceCode)).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList(); foreach (var WaitToTask in WaitToTasks) { - if(WaitToTask.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) + if (WaitToTask.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) { Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.AGVStationCode == WaitToTask.NextAddress); if (stationManger == null) @@ -101,7 +101,7 @@ OtherDevice otherDevice = (OtherDevice)device; bool canPut = otherDevice.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanPut, stationManger.StationCode); bool requestPut = otherDevice.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_PutRequest, stationManger.StationCode); - if(!requestPut) + if (!requestPut) { otherDevice.SetValue(GroundStationDBName.W_PutRequest, true, stationManger.StationCode); continue; @@ -157,7 +157,7 @@ } catch (Exception ex) { - Console.Out.WriteLine(nameof(AGVJob) + ":" + ex.Message); + Console.Out.WriteLine(nameof(AGV_CSJJob) + ":" + ex.Message); } } -- Gitblit v1.9.3