From 61736620010bd0eaa85d501c9525de2410a771e9 Mon Sep 17 00:00:00 2001 From: hutongqing <hutongqing@hnkhzn.com> Date: 星期二, 20 八月 2024 12:03:51 +0800 Subject: [PATCH] 后端删除文件 --- WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs | 150 ++++++++++++++++++++++++------------------------- 1 files changed, 74 insertions(+), 76 deletions(-) diff --git a/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs b/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs index 2b099b1..1e28b0a 100644 --- a/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs +++ b/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs @@ -35,13 +35,11 @@ { private readonly ITaskService _taskService; private readonly ITaskExecuteDetailService _taskExecuteDetailService; - private readonly IStationManagerService _stationManagerService; - public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IStationManagerService stationManagerService) + public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService) { _taskService = taskService; _taskExecuteDetailService = taskExecuteDetailService; - _stationManagerService = stationManagerService; } public Task Execute(IJobExecutionContext context) @@ -49,83 +47,83 @@ try { CommonConveyorLine conveyorLine = (CommonConveyorLine)context.JobDetail.JobDataMap.Get("JobParams"); - List<Dt_StationManager> stationManagers = _stationManagerService.GetStationManagers(); - foreach (var item in stationManagers) - { - try - { - ushort value = conveyorLine.GetValue<ConveyorLineDBName, ushort>(ConveyorLineDBName.InteractiveSignal, item.StationCode); + // List<Dt_StationManager> stationManagers = _stationManagerService.GetStationManagers(); + // foreach (var item in stationManagers) + // { + // try + // { + // ushort value = conveyorLine.GetValue<ConveyorLineDBName, ushort>(ConveyorLineDBName.InteractiveSignal, item.StationCode); - DeviceProtocolDetailDTO? deviceProtocolDetail = conveyorLine.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.ProtocalDetailValue == value.ToString()); + // DeviceProtocolDetailDTO? deviceProtocolDetail = conveyorLine.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.ProtocalDetailValue == value.ToString()); - if (deviceProtocolDetail != null) - { - ConveyorLineTaskCommand? command = new ConveyorLineTaskCommand() - { - InteractiveSignal = 0, - Barcode = "", - TargetAddress = Convert.ToInt32(item.DeviceCode), - TaskNum = 9988, - TrayType = 3 - }; + // if (deviceProtocolDetail != null) + // { + // ConveyorLineTaskCommand? command = new ConveyorLineTaskCommand() + // { + // InteractiveSignal = 0, + // Barcode = "", + // TargetAddress = Convert.ToInt32(item.DeviceCode), + // TaskNum = 9988, + // TrayType = 3 + // }; - SignalType signalType = Enum.Parse<SignalType>(deviceProtocolDetail.ProtocolDetailType); - switch (signalType) - { - case SignalType.InEntranceRequest: - command.Barcode = "InEntranceRequest"; - break; - case SignalType.InEntranceResponse: - command.Barcode = "InEntranceResponse"; - break; - case SignalType.InEntranceRequestReset: - command.Barcode = "InEntranceRequestReset"; - break; - case SignalType.OutEntranceRequest: - command.Barcode = "OutEntranceRequest"; - break; - case SignalType.OutEntranceResponse: - command.Barcode = "OutEntranceResponse"; - break; - case SignalType.OutEntranceRequestReset: - command.Barcode = "OutEntranceRequestReset"; - break; - case SignalType.InStationRequest: - command.Barcode = "InStationRequest"; - break; - case SignalType.InStationResponse: - command.Barcode = "InStationResponse"; - break; - case SignalType.InStationRequestReset: - command.Barcode = "InStationRequestReset"; - break; - case SignalType.OutStationRequest: - command.Barcode = "OutStationRequest"; - break; - case SignalType.OutStationResponse: - command.Barcode = "OutStationResponse"; - break; - case SignalType.OutStationRequestReset: - command.Barcode = "OutStationRequestReset"; - break; - default: - command = null; - break; - } - if (command != null) - { - conveyorLine.SendCommand(command, item.StationCode); - Console.Out.WriteLine(command.Serialize()); - } - - } + // SignalType signalType = Enum.Parse<SignalType>(deviceProtocolDetail.ProtocolDetailType); + // switch (signalType) + // { + // case SignalType.InEntranceRequest: + // command.Barcode = "InEntranceRequest"; + // break; + // case SignalType.InEntranceResponse: + // command.Barcode = "InEntranceResponse"; + // break; + // case SignalType.InEntranceRequestReset: + // command.Barcode = "InEntranceRequestReset"; + // break; + // case SignalType.OutEntranceRequest: + // command.Barcode = "OutEntranceRequest"; + // break; + // case SignalType.OutEntranceResponse: + // command.Barcode = "OutEntranceResponse"; + // break; + // case SignalType.OutEntranceRequestReset: + // command.Barcode = "OutEntranceRequestReset"; + // break; + // case SignalType.InStationRequest: + // command.Barcode = "InStationRequest"; + // break; + // case SignalType.InStationResponse: + // command.Barcode = "InStationResponse"; + // break; + // case SignalType.InStationRequestReset: + // command.Barcode = "InStationRequestReset"; + // break; + // case SignalType.OutStationRequest: + // command.Barcode = "OutStationRequest"; + // break; + // case SignalType.OutStationResponse: + // command.Barcode = "OutStationResponse"; + // break; + // case SignalType.OutStationRequestReset: + // command.Barcode = "OutStationRequestReset"; + // break; + // default: + // command = null; + // break; + // } + // if (command != null) + // { + // conveyorLine.SendCommand(command, item.StationCode); + // Console.Out.WriteLine(command.Serialize()); + // } - } - catch (Exception ex) - { - Console.Out.WriteLine(item.StationCode + ":" + ex.ToString()); - } - } + // } + + // } + // catch (Exception ex) + // { + // Console.Out.WriteLine(item.StationCode + ":" + ex.ToString()); + // } + // } } catch (Exception ex) { -- Gitblit v1.9.3