From 970d9c5c36d526a587138232ae9dae719dbcd16d Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期一, 14 四月 2025 16:43:16 +0800
Subject: [PATCH] WCS添加获取设备信息
---
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs | 12 ++
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneExtend/SpeStackerCraneMethod.cs | 42 ++++++++++
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Interface/LargeScreenController.cs | 114 ++++++++++++++++++++++++++++
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs | 5 +
/dev/null | 0
项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9c8cada3-b3bb-4ea6-bf45-370eed22fb3b.vsidx | 0
项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e54860f2-6d66-4cfe-9a94-38de52447412.vsidx | 0
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs | 7 +
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommandR.cs | 20 ++++-
项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8464f263-f1dc-486c-b178-05aaf944fff3.vsidx | 0
项目代码/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo | 0
项目代码/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0353ae20-491a-42b6-b22d-658e70856a50.vsidx | 0
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/ConveyorLineExtend.cs | 1
13 files changed, 193 insertions(+), 8 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/50c56e15-47e1-4795-b6c9-2c025997ff34.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0353ae20-491a-42b6-b22d-658e70856a50.vsidx"
similarity index 68%
rename from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/50c56e15-47e1-4795-b6c9-2c025997ff34.vsidx"
rename to "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0353ae20-491a-42b6-b22d-658e70856a50.vsidx"
index 5fa2d41..fbef5ed 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/50c56e15-47e1-4795-b6c9-2c025997ff34.vsidx"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0353ae20-491a-42b6-b22d-658e70856a50.vsidx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6855f602-a964-45db-8412-82429bed1009.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8464f263-f1dc-486c-b178-05aaf944fff3.vsidx"
similarity index 76%
rename from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6855f602-a964-45db-8412-82429bed1009.vsidx"
rename to "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8464f263-f1dc-486c-b178-05aaf944fff3.vsidx"
index 459f6b7..3ffe259 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/6855f602-a964-45db-8412-82429bed1009.vsidx"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8464f263-f1dc-486c-b178-05aaf944fff3.vsidx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/84f959ce-ebac-4741-9ac4-ce8d64779034.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/84f959ce-ebac-4741-9ac4-ce8d64779034.vsidx"
deleted file mode 100644
index 5a9a802..0000000
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/84f959ce-ebac-4741-9ac4-ce8d64779034.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9c8cada3-b3bb-4ea6-bf45-370eed22fb3b.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9c8cada3-b3bb-4ea6-bf45-370eed22fb3b.vsidx"
new file mode 100644
index 0000000..78fbf67
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9c8cada3-b3bb-4ea6-bf45-370eed22fb3b.vsidx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e54860f2-6d66-4cfe-9a94-38de52447412.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e54860f2-6d66-4cfe-9a94-38de52447412.vsidx"
new file mode 100644
index 0000000..d152b23
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e54860f2-6d66-4cfe-9a94-38de52447412.vsidx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/fa8502a9-61dd-4861-9163-b1d608a7f9fc.vsidx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/fa8502a9-61dd-4861-9163-b1d608a7f9fc.vsidx"
deleted file mode 100644
index 5af81fb..0000000
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/fa8502a9-61dd-4861-9163-b1d608a7f9fc.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Interface/LargeScreenController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Interface/LargeScreenController.cs"
new file mode 100644
index 0000000..d5be0f7
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Interface/LargeScreenController.cs"
@@ -0,0 +1,114 @@
+锘縰sing Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using OfficeOpenXml.FormulaParsing.Excel.Functions.Information;
+using WIDESEAWCS_Core;
+using WIDESEAWCS_Core.Caches;
+using WIDESEAWCS_QuartzJob;
+using WIDESEAWCS_QuartzJob.Repository;
+using WIDESEAWCS_QuartzJob.Service;
+using WIDESEAWCS_Tasks.ConveyorLineJob;
+using WIDESEAWCS_Tasks.ShuttleCarJob;
+using WIDESEAWCS_Tasks.StackerCraneJob;
+
+namespace WIDESEAWCS_Server.Controllers
+{
+ [Route("api/LargeScreen")]
+ [ApiController, AllowAnonymous]
+ public class LargeScreenController : Controller
+ {
+ private readonly IDeviceInfoRepository _deviceInfoRepository;
+ private readonly IRouterService _routerService;
+ private readonly ICacheService _cacheService;
+ public LargeScreenController(ICacheService cacheService, IRouterService routerService, IDeviceInfoRepository deviceInfoRepository)
+ {
+ _deviceInfoRepository = deviceInfoRepository;
+ _routerService = routerService;
+ _cacheService = cacheService;
+ }
+
+ /// <summary>
+ /// 鑾峰彇璁惧淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost, Route("GetDeviceInfos")]
+ public WebResponseContent GetDeviceInfos()
+ {
+ WebResponseContent webResponseContent = new WebResponseContent();
+ try
+ {
+ List<DeviceInfo> devices = new List<DeviceInfo>();
+ var DeviceInfos = _deviceInfoRepository.QueryData(x => x.DeviceStatus == "1").ToList();
+ foreach (var item in DeviceInfos)
+ {
+ switch (item.DeviceType)
+ {
+ case "SpeStackerCrane"://鍫嗗灈鏈�
+ {
+ var Device = _cacheService.Get(typeof(StackerCraneTaskCommandR), item.DeviceCode);
+ if (Device != null)
+ {
+ DeviceInfo deviceInfo = new DeviceInfo()
+ {
+ DeviceName = item.DeviceName,
+ Deviceinfo = Device
+ };
+ devices.Add(deviceInfo);
+ }
+ }
+ break;
+ case "CommonConveyorLine"://杈撻�佺嚎
+ {
+ List<string> childDeviceCodes = _routerService.QueryAllPositions(item.DeviceCode);
+ foreach (var childDeviceCode in childDeviceCodes)
+ {
+ var Device = _cacheService.Get(typeof(ConveyorLineTaskCommandR), childDeviceCode);
+ if (Device != null)
+ {
+ DeviceInfo deviceInfo = new DeviceInfo()
+ {
+ DeviceName = item.DeviceName,
+ Deviceinfo = Device
+ };
+ devices.Add(deviceInfo);
+ }
+ }
+ }
+ break;
+ case "ShuttleCar"://绌挎杞�
+ {
+ var Device = _cacheService.Get(typeof(ShuttleCarTaskCommandR), item.DeviceCode);
+ if (Device != null)
+ {
+ DeviceInfo deviceInfo = new DeviceInfo()
+ {
+ DeviceName = item.DeviceName,
+ Deviceinfo = Device
+ };
+ devices.Add(deviceInfo);
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ webResponseContent.OK(data: new
+ {
+ devices
+ });
+ }
+ catch (Exception ex)
+ {
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+ return webResponseContent;
+ }
+ public class DeviceInfo
+ {
+ //public string DeviceCode { get; set; }
+ public string DeviceName { get; set; }
+ public object Deviceinfo { get; set; }
+ }
+ }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
index 4aff7fe..23d87bb 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
@@ -28,6 +28,7 @@
using WIDESEAWCS_Common.ShuttleCarEnum;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
+using WIDESEAWCS_Core.Caches;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_DTO.WMSInfo;
using WIDESEAWCS_ITaskInfoService;
@@ -48,14 +49,16 @@
private readonly ITaskExecuteDetailService _taskExecuteDetailService;
private readonly IRouterService _routerService;
private readonly IRouterRepository _routerRepository;
+ private readonly ICacheService _cacheService;
private readonly IMapper _mapper;
- public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IRouterRepository routerRepository, IMapper mapper)
+ public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IRouterRepository routerRepository,ICacheService cacheService, IMapper mapper)
{
_taskService = taskService;
_taskExecuteDetailService = taskExecuteDetailService;
_routerService = routerService;
_routerRepository = routerRepository;
+ _cacheService = cacheService;
_mapper = mapper;
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/ConveyorLineExtend.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/ConveyorLineExtend.cs"
index bc2fa25..f6d095f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/ConveyorLineExtend.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/ConveyorLineExtend.cs"
@@ -32,6 +32,7 @@
try
{
ConveyorLineTaskCommandR command = conveyorLine.ReadCustomer<ConveyorLineTaskCommandR>(childDeviceCode);
+ _cacheService.AddOrUpdate(childDeviceCode, command);
if (command != null)
{
if (childDeviceCode == "1002" && command.Status == (ushort)ConveyorStatus.Wait)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs"
index dfe8b78..3514ad3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs"
@@ -11,7 +11,9 @@
using WIDESEAWCS_Common.ShuttleCarEnum;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
+using WIDESEAWCS_Core.Caches;
using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_DTO.System;
using WIDESEAWCS_DTO.WMSInfo;
using WIDESEAWCS_IShuttleCar;
using WIDESEAWCS_ITaskInfoRepository;
@@ -37,9 +39,10 @@
private readonly IShuttleCarService _shuttleCarService;
private readonly ITaskExecuteDetailService _taskExecuteDetailService;
private readonly IRouterService _routerService;
+ private readonly ICacheService _cacheService;
private readonly IMapper _mapper;
- public CommonShuttleCarJob(ITaskService taskService, ITaskRepository taskRepository, ITaskHtyService taskHtyService, IShuttleCarService shuttleCarService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper)
+ public CommonShuttleCarJob(ITaskService taskService, ITaskRepository taskRepository, ITaskHtyService taskHtyService, IShuttleCarService shuttleCarService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, ICacheService cacheService, IMapper mapper)
{
_taskService = taskService;
_taskRepository = taskRepository;
@@ -47,6 +50,7 @@
_shuttleCarService = shuttleCarService;
_taskExecuteDetailService = taskExecuteDetailService;
_routerService = routerService;
+ _cacheService = cacheService;
_mapper = mapper;
}
@@ -59,6 +63,7 @@
{
shuttleCar.Communicator.IsReadAfterWrite = false;
ShuttleCarTaskCommandR command = ReadCustomer<ShuttleCarTaskCommandR>(shuttleCar, shuttleCar.DeviceCode);//璇诲彇绌挎杞︿俊鎭�
+ _cacheService.AddOrUpdate(shuttleCar.DeviceCode, command);
if (command != null && command.JoinStatus == 1)
{
#region 绌挎杞︿换鍔″畬鎴�
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs"
index 7a9f88c..60abfe5 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs"
@@ -16,6 +16,7 @@
using WIDESEAWCS_Common.StackerCraneEnum;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
+using WIDESEAWCS_Core.Caches;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_IShuttleCar;
using WIDESEAWCS_ITaskInfoRepository;
@@ -29,6 +30,7 @@
using WIDESEAWCS_QuartzJob.StackerCrane.Enum;
using WIDESEAWCS_TaskInfoService;
using WIDESEAWCS_Tasks.ConveyorLineJob;
+using WIDESEAWCS_Tasks.ShuttleCarJob;
using WIDESEAWCS_Tasks.StackerCraneJob;
namespace WIDESEAWCS_Tasks
@@ -41,14 +43,16 @@
private readonly ITaskRepository _taskRepository;
private readonly IRouterService _routerService;
private readonly IShuttleCarService _shuttleCarService;
+ private readonly ICacheService _cacheService;
- public CommonStackerCraneJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IShuttleCarService shuttleCarService)
+ public CommonStackerCraneJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IShuttleCarService shuttleCarService, ICacheService cacheService)
{
_taskService = taskService;
_taskExecuteDetailService = taskExecuteDetailService;
_taskRepository = taskRepository;
_routerService = routerService;
_shuttleCarService = shuttleCarService;
+ _cacheService = cacheService;
}
public Task Execute(IJobExecutionContext context)
@@ -59,6 +63,10 @@
if (commonStackerCrane != null)
{
commonStackerCrane.Communicator.IsReadAfterWrite = false;
+ #region 鑾峰彇鍫嗗灈鏈轰俊鎭�
+ StackerCraneTaskCommandR common = ReadCustomer<StackerCraneTaskCommandR>(commonStackerCrane, commonStackerCrane.DeviceCode);
+ _cacheService.AddOrUpdate(commonStackerCrane.DeviceCode, common);
+ #endregion
#region 淇″彿浜や簰澶勭悊
//Heartbeat(commonStackerCrane);
ShuttleCarSignal(commonStackerCrane);
@@ -66,7 +74,7 @@
#region 浠诲姟瀹屾垚
var completeStatus = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.CompleteStatus);
- if (completeStatus == 2 || completeStatus == 3)
+ if (common.CompleteStatus == 2 || common.CompleteStatus == 3)
{
NormalCompleted(commonStackerCrane);
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneExtend/SpeStackerCraneMethod.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneExtend/SpeStackerCraneMethod.cs"
new file mode 100644
index 0000000..db96385
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneExtend/SpeStackerCraneMethod.cs"
@@ -0,0 +1,42 @@
+锘縰sing HslCommunication;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEAWCS_QuartzJob.DTO;
+using WIDESEAWCS_QuartzJob;
+
+namespace WIDESEAWCS_Tasks
+{
+ public partial class CommonStackerCraneJob
+ {
+ /// <summary>
+ /// 璇诲彇鍫嗗灈鏈轰俊鎭�
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="shuttleCar"></param>
+ /// <param name="deviceChildCode"></param>
+ /// <returns></returns>
+ /// <exception cref="Exception"></exception>
+ public T ReadCustomer<T>(SpeStackerCrane commonStackerCrane, string deviceChildCode) where T : IDataTransfer, new()
+ {
+ string deviceChildCode2 = deviceChildCode;
+ if (!commonStackerCrane.IsConnected)
+ {
+ throw new Exception("閫氳杩炴帴閿欒锛岃妫�鏌ョ綉缁�");
+ }
+
+ DeviceProDTO? deviceProDTO = (from x in commonStackerCrane.DeviceProDTOs
+ where x.DeviceProParamType == "ReadDeviceCommand" && x.DeviceChildCode == deviceChildCode2
+ orderby x.DeviceProOffset
+ select x).FirstOrDefault();
+ if (deviceProDTO == null)
+ {
+ throw new Exception("鏈壘鍒板崗璁俊鎭�");
+ }
+
+ return commonStackerCrane.Communicator.ReadCustomer<T>(deviceProDTO.DeviceProAddress);
+ }
+ }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommandR.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommandR.cs"
index 6e844cc..69e2d70 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommandR.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommandR.cs"
@@ -28,6 +28,18 @@
public class StackerCraneTaskCommandR : DeviceCommand
{
/// <summary>
+ /// 鍦ㄧ嚎鐘舵��
+ /// </summary>
+ public ushort Onlinestate { get; set; }
+ /// <summary>
+ /// 杩愯鐘舵��
+ /// </summary>
+ public ushort RunStatus { get; set; }
+ /// <summary>
+ /// 鍐欏叆鐘舵��
+ /// </summary>
+ public ushort WriteStatus { get; set; }
+ /// <summary>
/// 瀹屾垚鐘舵��
/// </summary>
public ushort CompleteStatus { get; set; }
@@ -36,6 +48,10 @@
/// </summary>
public int CurrentTaskNum { get; set; }
/// <summary>
+ /// 褰撳墠鎺�
+ /// </summary>
+ public ushort AccuRow { get; set; }
+ /// <summary>
/// 褰撳墠鍒�
/// </summary>
public ushort AccuColumn { get; set; }
@@ -43,10 +59,6 @@
/// 褰撳墠灞�
/// </summary>
public ushort AccuLayer { get; set; }
- /// <summary>
- /// 褰撳墠鎺�
- /// </summary>
- public ushort AccuRow { get; set; }
/// <summary>
/// 鏁呴殰浠g爜
/// </summary>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo"
index edf4a70..735cd6f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo"
Binary files differ
--
Gitblit v1.9.3