| | |
| | | _noticeService.Logs(userTokenIds, new { conveyorLine.DeviceName, log = log, time = DateTime.Now.ToString("G"), color = "red" }); |
| | | WriteInfo(conveyorLine.DeviceName, log); |
| | | |
| | | Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); |
| | | //Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); |
| | | Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode, command.Barcode); |
| | | if (task != null) |
| | | { |
| | | if (command.Barcode == task.PalletCode) |
| | |
| | | WriteInfo(conveyorLine.DeviceName, logs); |
| | | |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | _taskService.UpdateData(newTask); |
| | | } |
| | | } |
| | | } |
| | |
| | | _noticeService.Logs(userTokenIds, new { conveyorLine.DeviceName, log = log, time = DateTime.Now.ToString("G"), color = "red" }); |
| | | WriteInfo(conveyorLine.DeviceName, log); |
| | | |
| | | var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); |
| | | //var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); |
| | | var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode, command.Barcode); |
| | | if (task != null && task.TaskState != (int)TaskInStatusEnum.Line_InFinish) |
| | | { |
| | | if (command.Barcode == task.PalletCode && childDeviceCode == task.NextAddress) |
| | |
| | | WriteInfo(conveyorLine.DeviceName, log); |
| | | |
| | | // 查询正在执行的输送线任务,根据任务号和子设备代码获取任务信息 |
| | | Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); |
| | | //Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); |
| | | Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode, command.Barcode); |
| | | |
| | | // 如果任务存在 |
| | | if (task != null) |
| | |
| | | |
| | | // 标记输送线发送任务完成 |
| | | ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true); |
| | | |
| | | _taskService.UpdateData(newTask); |
| | | } |
| | | } |
| | | } |
| | |
| | | WriteInfo(conveyorLine.DeviceName, logs); |
| | | |
| | | // 查询正在执行的输送线任务 |
| | | var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); |
| | | //var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); |
| | | var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode, command.Barcode); |
| | | |
| | | // 如果任务存在 |
| | | if (task != null) |
| | |
| | | } |
| | | var wmsIpAddress = wmsBase + requestTrayOutTask; |
| | | |
| | | List<string> strings = platform.Roadway.Split(',').ToList(); |
| | | |
| | | List<Dt_DeviceInfo> device; |
| | | if (strings.Count > 0) |
| | | if (platform.Roadway != null) |
| | | { |
| | | List<string> strings = platform.Roadway.Split(',').ToList(); |
| | | device = _deviceInfoRepository.QueryData(x => x.DeviceStatus == "1" && strings.Contains(x.DeviceCode)); |
| | | } |
| | | else |
| | |
| | | // 解析返回的JSON数据 |
| | | WebResponseContent content = JsonConvert.DeserializeObject<WebResponseContent>(result); |
| | | |
| | | |
| | | Console.WriteLine($"{JsonConvert.SerializeObject(content)}呼叫成功"); |
| | | |
| | | // 检查返回状态,如果失败则返回 |
| | | if (!content.Status) |
| | | return; |
| | |
| | | |
| | | #endregion 调用WMS获取出库任务 |
| | | |
| | | |
| | | // 创建并发送任务 |
| | | CreateAndSendTask(taskDTO); |
| | | } |