| | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | public class CommonConveyorLineJob : IJob |
| | | public class CommonConveyorLineJob : JobBase, IJob |
| | | { |
| | | private readonly ITaskService _taskService; |
| | | private readonly ITaskExecuteDetailService _taskExecuteDetailService; |
| | |
| | | case "104": |
| | | ConveyorLineInFinish(conveyorLine, command, childDeviceCode); |
| | | break; |
| | | case "105": |
| | | RequestOutbound(conveyorLine, command, childDeviceCode); |
| | | break; |
| | | //case "105": |
| | | // RequestOutbound(conveyorLine, command, childDeviceCode); |
| | | // break; |
| | | case "108": |
| | | ConveyorLineOutFinish(conveyorLine, command, childDeviceCode); |
| | | break; |
| | | default: |
| | | RequestInNextAddress(conveyorLine, command, childDeviceCode); |
| | | RequestOutNextAddress(conveyorLine, command, childDeviceCode); |
| | | break; |
| | | //default: |
| | | // RequestInNextAddress(conveyorLine, command, childDeviceCode); |
| | | // RequestOutNextAddress(conveyorLine, command, childDeviceCode); |
| | | // break; |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | ConveyorLineDTO lineDTO = new ConveyorLineDTO() |
| | | { |
| | | TaskNum = task.TaskNum, |
| | | //TaskNum = task.TaskNum, |
| | | stationCode = childDeviceCode, |
| | | Barcode = command.Barcode, |
| | | Spec = command.Spec, |
| | |
| | | |
| | | if (content.Status) |
| | | { |
| | | task.TargetAddress = "104"; |
| | | task.NextAddress = "103"; |
| | | task.TargetAddress = AppSettings.Configuration["OKAddress"]; |
| | | task.NextAddress = task.TargetAddress; |
| | | ConveyorLineTaskCommandW taskCommand = _mapper.Map<ConveyorLineTaskCommandW>(task); |
| | | |
| | | if (conveyorLine.SendCommand(taskCommand, childDeviceCode)) |
| | |
| | | { |
| | | if (content.Code == 404)//淇敼缁堢偣鍦板潃 |
| | | { |
| | | task.TargetAddress = "101"; |
| | | task.NextAddress = "101"; |
| | | task.TargetAddress = AppSettings.Configuration["NGAddress"]; |
| | | task.NextAddress = task.TargetAddress; |
| | | task.ExceptionMessage = content.Message; |
| | | task.TaskState = (int)TaskInStatusEnum.InException; |
| | | ConveyorLineTaskCommandW taskCommand = _mapper.Map<ConveyorLineTaskCommandW>(task); |