| | |
| | | OtherDevice device = (OtherDevice)value; |
| | | List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).ToList(); |
| | | //è·åæåè®®çè¾é线 |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode); |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(); |
| | | 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) |
| | | { |
| | | Dt_StationManger stationManger = stationMangers.FirstOrDefault(x => x.StationCode == task.SourceAddress); |
| | | if (stationManger != null) |
| | | { |
| | | string? local = ""; |
| | | switch (stationManger.AGVStationCode.ObjToInt() % 2) |
| | | { |
| | | case 1: |
| | | local = task.Roadway + "-001-062-001-01"; |
| | | break; |
| | | case 0: |
| | | local = task.Roadway + "-002-062-001-01"; |
| | | break; |
| | | default: |
| | | WriteError(item.StationName, $"æªæ¾å°å¯åé
å··é{task.TaskNum}"); |
| | | break; |
| | | } |
| | | //åé
è´§ä½ |
| | | string? local = "SC01_CP-002-064-008-01"; |
| | | if (!string.IsNullOrEmpty(local)) |
| | | { |
| | | task.CurrentAddress = item.StackerCraneStationCode; |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 4 && conveyorLineInfoRead.TaskNo <= 0 && item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt()) //äºæ¥¼çº¿ä½åºåºç«å° |
| | | { |
| | | //è·ååºåºç«å°æ¯å¦åå¨åºåºå¾
æ§è¡ä»»å¡ |