From c5afc23437b37d717e892b16b23923907825d2cd Mon Sep 17 00:00:00 2001
From: helongyang <647556386@qq.com>
Date: 星期一, 13 十月 2025 23:09:20 +0800
Subject: [PATCH] 钉钉推送完善,任务取消优化
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/阻焊仓/StackerCraneJob_ZH.cs | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs"
index 7f7aa5b..7450280 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs"
@@ -27,6 +27,8 @@
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_Core.Caches;
using AutoMapper;
+using WIDESEAWCS_Tasks.闃荤剨浠�;
+using HslCommunication.WebSocket;
namespace WIDESEAWCS_Tasks
{
@@ -35,14 +37,16 @@
{
private readonly ITaskService _taskService;
private readonly ITaskExecuteDetailService _taskExecuteDetailService;
+ public static ZHReadData zHReadData = new ZHReadData();
private readonly ITaskRepository _taskRepository;
private readonly IRouterService _routerService;
private readonly IStationMangerRepository _stationMangerRepository;
private readonly ICacheService _cacheService;
private readonly IMapper _mapper;
+ private WebSocketServer _webSocketServer;
private List<Dt_ApiInfo> apiInfos;
- public StackerCraneJob_ZH(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository,ICacheService cacheService, IMapper mapper)
+ public StackerCraneJob_ZH(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository,ICacheService cacheService, IMapper mapper, WebSocketServer webSocketServer)
{
_taskService = taskService;
_taskExecuteDetailService = taskExecuteDetailService;
@@ -51,6 +55,7 @@
_stationMangerRepository = stationMangerRepository;
_cacheService = cacheService;
_mapper = mapper;
+ _webSocketServer = webSocketServer;
string? apiInfoStr = _cacheService.Get("apiInfos");
if (!string.IsNullOrEmpty(apiInfoStr))
{
@@ -100,6 +105,14 @@
}
}
}
+ zHReadData.R_ZH_Status = ((short)commonStackerCrane.StackerCraneStatusValue);
+ zHReadData.R_ZH_AutoStatus = ((short)commonStackerCrane.StackerCraneAutoStatusValue);
+ zHReadData.R_ZH_WorkStatus = ((short)commonStackerCrane.StackerCraneWorkStatusValue);
+ zHReadData.R_ZH_TaskNum = commonStackerCrane.CurrentTaskNum.ObjToInt();
+ zHReadData.R_ZH_WorkType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType);
+ zHReadData.R_ZH_TrayType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.TrayType);
+ string zHData = JsonConvert.SerializeObject(zHReadData);
+ _webSocketServer.PublishAllClientPayload(zHData);
}
}
catch (Exception ex)
@@ -294,7 +307,10 @@
}
}
-
+ if (task == null)
+ {
+ task = _taskService.QueryStackerCraneRelocationTask(commonStackerCrane.DeviceCode);
+ }
return task;
}
--
Gitblit v1.9.3