From 17e5dbd7bd0364e27a33f1a7dab91cf33d5dcabc Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期三, 04 三月 2026 11:52:12 +0800
Subject: [PATCH] 增强Redis缓存服务与设备通信优化
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Common/CommonStackerCrane.cs | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Common/CommonStackerCrane.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Common/CommonStackerCrane.cs
index 5e746e7..76aff9c 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Common/CommonStackerCrane.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Common/CommonStackerCrane.cs
@@ -24,6 +24,7 @@
using WIDESEAWCS_QuartzJob.DeviceBase;
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_QuartzJob.StackerCrane;
+using WIDESEAWCS_QuartzJob.StackerCrane.Common;
using WIDESEAWCS_QuartzJob.StackerCrane.Enum;
namespace WIDESEAWCS_QuartzJob
@@ -32,7 +33,7 @@
/// 涓�鑸爢鍨涙満瀹炵幇绫伙紝瀹炵幇鍫嗗灈鏈烘帴鍙e眰
/// </summary>
[Description("鍫嗗灈鏈�")]
- public class CommonStackerCrane : IStackerCrane
+ public class CommonStackerCrane : StackerCraneBase, IStackerCrane
{
#region Private Member
@@ -157,6 +158,11 @@
public bool IsConnected => Communicator.IsConnected && _isConnected;
/// <summary>
+ /// 鍫嗗灈鏈哄畬鎴愪簨浠舵槸鍚﹀凡璁㈤槄
+ /// </summary>
+ public bool IsEventSubscribed => StackerCraneTaskCompletedEventHandler != null;
+
+ /// <summary>
/// 鍫嗗灈鏈轰换鍔″畬鎴愪簨浠�
/// </summary>
public event EventHandler<StackerCraneTaskCompletedEventArgs> StackerCraneTaskCompletedEventHandler;
@@ -166,10 +172,6 @@
/// </summary>
public object StackerCraneTaskCommand { get; set; }
- /// <summary>
- /// 鍫嗗灈鏈哄畬鎴愪簨浠舵槸鍚﹀凡璁㈤槄
- /// </summary>
- public bool IsEventSubscribed => StackerCraneTaskCompletedEventHandler != null;
/// <summary>
/// 涓婁竴娆′换鍔$殑绫诲瀷
@@ -385,10 +387,10 @@
_isChecked = true;
try
{
- DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == nameof(StackerCraneWorkStatus));
+ DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == nameof(StackerCraneCompleted));
if (devicePro != null)
{
- DeviceProtocolDetailDTO? deviceProtocolDetail = _deviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == devicePro.DeviceProParamName && x.ProtocolDetailType == StackerCraneWorkStatus.WorkCompleted.ToString());
+ DeviceProtocolDetailDTO? deviceProtocolDetail = _deviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == devicePro.DeviceProParamName && x.ProtocolDetailType == StackerCraneCompleted.Completed.ToString());
if (deviceProtocolDetail != null)
{
OperateResult<TimeSpan> operateResult = new OperateResult<TimeSpan>();
--
Gitblit v1.9.3