ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0353ae20-491a-42b6-b22d-658e70856a50.vsidxBinary files differ
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8464f263-f1dc-486c-b178-05aaf944fff3.vsidxBinary files differ
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/84f959ce-ebac-4741-9ac4-ce8d64779034.vsidxBinary files differ
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/9c8cada3-b3bb-4ea6-bf45-370eed22fb3b.vsidxBinary files differ
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e54860f2-6d66-4cfe-9a94-38de52447412.vsidxBinary files differ
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/fa8502a9-61dd-4861-9163-b1d608a7f9fc.vsidxBinary files differ
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Interface/LargeScreenController.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,114 @@ using 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; } } } } ÏîÄ¿´úÂë/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; } ÏîÄ¿´úÂë/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) ÏîÄ¿´úÂë/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 ç©¿æ¢è½¦ä»»å¡å®æ ÏîÄ¿´úÂë/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); } ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneExtend/SpeStackerCraneMethod.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,42 @@ using 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); } } } ÏîÄ¿´úÂë/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> /// æ é代ç /// </summary> ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suoBinary files differ