| | |
| | | //} |
| | | #endregion |
| | | |
| | | #region 寻æ¾å¯¹åºåºåºç©ºè´§ä½ |
| | | |
| | | var TargetLocations = area1 == "4" ? stationinfoRepository.Find(x => x.location_state == LocationStateEnum.Empty.ToString() && x.enable && x.area == "4").OrderBy(x => x.line).ThenBy(x => x.column).ToList() |
| | | : stationinfoRepository.Find(x => x.location_state == LocationStateEnum.Empty.ToString() && x.enable && (x.area == "2" || x.area == "3")).OrderBy(x => x.line).ThenBy(x => x.column).ToList(); |
| | | foreach (var Location in TargetLocations) |
| | | { |
| | | //if (stationinfoRepository.Find(x => x.line == Location.line && x.area == Location.area && x.stationType == agvtask.agv_materielid).Any()) |
| | | if (stationinfoRepository.Find(x => x.line == Location.line && x.area == Location.area && x.Number == agvtask.jobID).Any()) |
| | | if (!stationinfoRepository.Find(x => x.line == Location.line && x.area == Location.area && x.location_state == LocationStateEnum.OutBusy.ToString()).Any()) return Location; |
| | | } |
| | | #endregion |
| | | |
| | | #region æªæ¾å°åºåæå½ååºåè¡å·²æ»¡,å¯»æ¾æ°çä¸è¡ |
| | | var area = GetArea(mesinfo.quantity, agvtask.agv_Traytype); |
| | | TargetLocation = stationinfoRepository.Find(x => x.column == (area == "2" ? 1 : 2) && x.area == area && x.location_state == LocationStateEnum.Empty.ToString() && x.enable).OrderBy(x => x.line).FirstOrDefault(); |
| | |
| | | |
| | | #region æ¥çå½å空货ä½åæ¯å¦å卿æ |
| | | if (TargetLocation != null) |
| | | if (GetStation.QueueStation(TargetLocation.stationCode)) TargetLocation = null; |
| | | //if (GetStation.QueueStation(TargetLocation.stationCode)) TargetLocation = null; |
| | | if (!GetStation.QueueStation(TargetLocation.stationCode)) return TargetLocation; |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | #region 寻æ¾å¯¹åºåºåºç©ºè´§ä½ |
| | | |
| | | var TargetLocations = area1 == "4" ? stationinfoRepository.Find(x => x.location_state == LocationStateEnum.Empty.ToString() && x.enable && x.area == "4").OrderBy(x => x.line).ThenBy(x => x.column).ToList() |
| | | : stationinfoRepository.Find(x => x.location_state == LocationStateEnum.Empty.ToString() && x.enable && (x.area == "2" || x.area == "3")).OrderBy(x => x.line).ThenBy(x => x.column).ToList(); |
| | | foreach (var Location in TargetLocations) |
| | | { |
| | | if (stationinfoRepository.Find(x => x.line == Location.line && x.area == Location.area && x.Number == agvtask.jobID).Any()) |
| | | if (!stationinfoRepository.Find(x => x.line == Location.line && x.area == Location.area && x.location_state == LocationStateEnum.OutBusy.ToString()).Any() && !GetStation.QueueStation(Location.stationCode)) return Location; |
| | | } |
| | | #endregion |
| | | |
| | | if (TargetLocation == null) throw new Exception("åºä½å·²æ»¡"); |
| | | return TargetLocation; |
| | | } |