| | |
| | | #endregion 站台方式 |
| | | |
| | | #region 路由方式 |
| | | |
| | | List<string> childDeviceCodes = _routerService.QueryAllPositions(conveyorLine.DeviceCode); |
| | | //DateTime dateTime = DateTime.Now; |
| | | //Console.WriteLine($"循环开始时间{dateTime}"); |
| | | |
| | | foreach (string childDeviceCode in childDeviceCodes) |
| | | { |
| | | //Thread.Sleep(1000); |
| | | //if (childCodeList.Contains(childDeviceCode)) |
| | | //{ |
| | | // Console.WriteLine($"当前{childDeviceCode}执行中,已跳过"); |
| | | // continue; |
| | | //} |
| | | //childCodeList.Add(childDeviceCode); |
| | | //Console.WriteLine(childDeviceCode); |
| | | |
| | | ConveyorLineTaskCommand_After command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode); |
| | | |
| | | if (command == null) continue; |
| | |
| | | } |
| | | } |
| | | |
| | | //childCodeList.Remove(childDeviceCode); |
| | | |
| | | #region 调用事件总线通知前端 |
| | | |
| | |
| | | #endregion 调用事件总线通知前端 |
| | | |
| | | } |
| | | DateTime ENDdateTime = DateTime.Now; |
| | | //Console.WriteLine($"循环结束时间{ENDdateTime}"); |
| | | |
| | | #endregion 路由方式 |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Console.Out.WriteLine(nameof(CommonConveyorLine_CWJob) + ":" + DateTime.Now + ":" + ex.ToString()); |
| | | Console.Out.WriteLine(nameof(CommonConveyorLine_CWJob) + ":" + DateTime.Now + ":" + ex.ToString(),ex.StackTrace); |
| | | } |
| | | finally |
| | | { |
| | | //WriteDebug("CommonConveyorLineJob", "test"); |
| | | //Console.Out.WriteLine(DateTime.Now); |
| | | } |
| | | return Task.CompletedTask; |
| | | } |
| | |
| | | } |
| | | var wmsIpAddress = wmsBase + requestTrayOutTask; |
| | | |
| | | //var device = _deviceInfoRepository.QueryData(x => x.DeviceStatus == "1" && x.DeviceRemark == platform.Id.ToString()); |
| | | //var deviceCode = device.Select(x => x.DeviceCode).ToList(); |
| | | |
| | | List<string> strings = platform.Location.Split(',').ToList(); |
| | | |
| | | WriteInfo("调度执行时间记录", "【调取WMS出库接口开始时间:】" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")); |
| | | |
| | | var result = await HttpHelper.PostAsync(wmsIpAddress, new { Position = childDeviceCode, Tag = (int)taskType, AreaCdoe = platform.Stacker, AreaCdoes = strings, platform.ProductionLine }.Serialize()); |
| | | //var result = await HttpHelper.PostAsync("http://localhost:5000/api/Task/RequestTrayOutTaskAsync", dynamic.ToJsonString()); |
| | | |
| | | WriteInfo("调度执行时间记录", "【调取WMS出库接口结束时间:】" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")); |
| | | |
| | | WebResponseContent content = JsonConvert.DeserializeObject<WebResponseContent>(result); |
| | | |