| | |
| | | |
| | | if (childDeviceCode == "1670" || childDeviceCode == "1666" || childDeviceCode == "1548" || childDeviceCode == "1448") |
| | | { |
| | | if (lastUpdateTime > DateTime.Now.AddMinutes(1)) |
| | | { |
| | | lastUpdateTime = DateTime.Now; |
| | | //if (lastUpdateTime > DateTime.Now.AddMinutes(1)) |
| | | //{ |
| | | // lastUpdateTime = DateTime.Now; |
| | | Platform platform = _platFormRepository.QueryFirst(x => x.DeviceCode == conveyorLine.DeviceCode && x.PlatCode == childDeviceCode && x.Status == "Active"); |
| | | if (platform != null) |
| | | { |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //} |
| | | } |
| | | |
| | | #region 调用事件总线通知前端 |
| | |
| | | } |
| | | else |
| | | { |
| | | //if (childDeviceCode == "1039") |
| | | //{ |
| | | // var GWTask = _taskRepository.QueryData(x => x.Roadway.Contains("GWSC2") && x.SourceAddress == "1039" && (x.TaskState == (int)TaskInStatusEnum.Line_InExecuting || x.TaskState == (int)TaskInStatusEnum.Line_InFinish)).ToList(); |
| | | // if (GWTask.Count >= 2 && childDeviceCode == "1039" && task.Roadway.Contains("GWSC2")) |
| | | // { |
| | | // ConsoleHelper.WriteErrorLine($"时间:【{DateTime.Now}】托盘号:【{command.ConveyorLineBarcode}】高温二已存在【{GWTask.Count}】个任务大于2个任务不可下发"); |
| | | // return; |
| | | // } |
| | | //} |
| | | |
| | | ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); |
| | | |
| | | bool sendFlag = SendCommand(taskCommand, conveyorLine, childDeviceCode); |
| | |
| | | List<string> strings = platform.Location.Split(',').ToList(); |
| | | |
| | | var result = await HttpHelper.PostAsync(wmsIpAddress, new { Position = childDeviceCode, Tag = (int)taskType, AreaCdoe = platform.Stacker, AreaCdoes = strings, platform.ProductionLine }.Serialize()); |
| | | WriteInfo("OCV请求返回参数", $"时间:【{DateTime.Now}】请求点位【{childDeviceCode}】返回参数【{JsonConvert.SerializeObject(result)}】"); |
| | | |
| | | WebResponseContent content = JsonConvert.DeserializeObject<WebResponseContent>(result); |
| | | |