| | |
| | | { |
| | | if (router != null) |
| | | { |
| | | |
| | | IDevice? device = null; |
| | | if (task.Roadway.Contains("CW")) |
| | | { |
| | | device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == router.ChildPosiDeviceCode); |
| | | if (device != null) |
| | | { |
| | | CommonConveyorLine_GW conveyorLine = (CommonConveyorLine_GW)device; |
| | | if (conveyorLine.IsOccupied(task.NextAddress))//出库站台未被占用 |
| | | { |
| | | return task; |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "1015"); |
| | | _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到出库站台【{task.TargetAddress}】对应的通讯对象,无法判断出库站台是否被占用"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | else |
| | | { |
| | | IDevice? device = null; |
| | | if (task.Roadway.Contains("GW")) |
| | | { |
| | | device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "1015"); |
| | | if (device != null) |
| | | { |
| | | CommonConveyorLine_GW conveyorLine = (CommonConveyorLine_GW)device; |
| | |
| | | _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到出库站台【{task.TargetAddress}】对应的通讯对象,无法判断出库站台是否被占用"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到站台【{task.NextAddress}】信息,无法校验站台"); |
| | | } |
| | | } |
| | |
| | | using LogLibrary.Log; |
| | | using Masuit.Tools; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | // TaskState = (int)TaskOutStatusEnum.OutNew, |
| | | //}; |
| | | LogFactory.GetLog("分容测试完成通知").Info(true, $"\r\r--------------------------------------"); |
| | | LogFactory.GetLog("分容测试完成通知").Info(true, result); |
| | | LogFactory.GetLog("分容测试完成通知").Info(true, result.ToJsonString()); |
| | | return content.OK(); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | using Newtonsoft.Json; |
| | | using Masuit.Tools; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | if (info != null) |
| | | { |
| | | LogFactory.GetLog("分容获取库位托盘").Info(true, $"\r\r--------------------------------------"); |
| | | LogFactory.GetLog("分容获取库位托盘").Info(true, result); |
| | | LogFactory.GetLog("分容获取库位托盘").Info(true, result.ToJsonString()); |
| | | return new { code = 1, palletBarcode = info.PalletCode }; |
| | | } |
| | | else |