| | |
| | | using Newtonsoft.Json; |
| | | using Quartz; |
| | | using SqlSugar; |
| | | using System.ComponentModel.Design; |
| | | using System.Reflection; |
| | | using WIDESEAWCS_BasicInfoRepository; |
| | | using WIDESEAWCS_Common; |
| | |
| | | return; |
| | | } |
| | | ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | //conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | |
| | | SendCommand(taskCommand, conveyorLine, childDeviceCode); |
| | | |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, Convert.ToInt16(1), childDeviceCode); |
| | | _taskService.UpdateTaskStatusToNext(task); |
| | | } |
| | |
| | | if (newTask != null) |
| | | { |
| | | ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(newTask); |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | //conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | |
| | | SendCommand(taskCommand, conveyorLine, childDeviceCode); |
| | | |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, Convert.ToInt16(1), childDeviceCode); |
| | | _taskService.UpdateData(newTask); |
| | | } |
| | |
| | | if (task != null) |
| | | { |
| | | ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | //conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | |
| | | SendCommand(taskCommand, conveyorLine, childDeviceCode); |
| | | |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, Convert.ToInt16(1), childDeviceCode); |
| | | |
| | | _taskService.UpdateTaskStatusToNext(task); |
| | |
| | | if (newTask != null) |
| | | { |
| | | ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(newTask); |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | //conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | |
| | | SendCommand(taskCommand, conveyorLine, childDeviceCode); |
| | | |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, Convert.ToInt16(1), childDeviceCode); |
| | | _taskService.UpdateData(newTask); |
| | | } |
| | |
| | | { |
| | | ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); |
| | | taskCommand.ConveyorLineTargetAddress = Convert.ToInt16(stationManager.stationNGChildCode); |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | //conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | |
| | | SendCommand(taskCommand, conveyorLine, childDeviceCode); |
| | | |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, Convert.ToInt16(1), childDeviceCode); |
| | | _taskService.UpdateTaskStatusToNext(task); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | //conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | SendCommand(taskCommand, conveyorLine, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, Convert.ToInt16(1), childDeviceCode); |
| | | content = _taskService.UpdateTaskStatusToNext(task); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | //conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | SendCommand(taskCommand, conveyorLine, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, Convert.ToInt16(1), childDeviceCode); |
| | | |
| | | taskNext.ExceptionMessage = log; |
| | |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | public void SendCommand(ConveyorLineTaskCommand_After taskCommand, CommonConveyorLine_GW conveyorLine, string childDeviceCode) |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, taskCommand.ConveyorLineTargetAddress, childDeviceCode); |
| | | Thread.Sleep(100); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, taskCommand.ConveyorLineBarcode, childDeviceCode); |
| | | Thread.Sleep(100); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, taskCommand.ConveyorLineTaskNum, childDeviceCode); |
| | | } |
| | | } |
| | | } |
| | | |