| | |
| | | { |
| | | OtherDevice device = (OtherDevice)value; |
| | | List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).ToList(); |
| | | //è·åæåè®®çè¾é线-z |
| | | //è·åæåè®®çè¾é线 |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode); |
| | | //让æ¯ä¸ªè¾é线å¯å¨-z |
| | | foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode))) |
| | | { |
| | | DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineCPDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode); |
| | | if (task != null) |
| | | { |
| | | string local = ""; |
| | | //åé
è´§ä½ |
| | | if (task.HeightType==1) |
| | | string? local = _taskService.RequestAssignLocation(task.TaskNum, task.Roadway); |
| | | if (!string.IsNullOrEmpty(local)) |
| | | { |
| | | local = "SC02_CP-001-064-001-01"; |
| | | } |
| | | else if (task.HeightType == 2) |
| | | { |
| | | local = "SC02_CP-001-063-001-01"; |
| | | } |
| | | task.CurrentAddress = item.StackerCraneStationCode; |
| | | task.TargetAddress= local; |
| | | task.NextAddress = local; |
| | |
| | | WriteInfo(item.StationName, $"ä»»å¡å·:{task.TaskNum}è¿è¡å åæºå
¥åº"); |
| | | } |
| | | } |
| | | } |
| | | else if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 4 && conveyorLineInfoRead.TaskNo <= 0 && item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt()) //äºæ¥¼çº¿ä½åºåºç«å° |
| | | { |
| | | //è·ååºåºç«å°æ¯å¦åå¨åºåºå¾
æ§è¡ä»»å¡ |