| | |
| | | { |
| | | TargetLocation = stationinfoRepository.Find(x => x.line == TargetLocation.line && x.location_state == LocationStateEnum.Empty.ToString() && x.enable && x.area == TargetLocation.area).OrderBy(x => x.column).FirstOrDefault(); |
| | | if (TargetLocation != null) |
| | | { |
| | | if (!stationinfoRepository.Find(x => x.line == TargetLocation.line && x.area == TargetLocation.area && x.location_state == LocationStateEnum.OutBusy.ToString()).Any()) |
| | | return TargetLocation; |
| | | } |
| | | if (!GetStation.OutBusyStation(TargetLocation.stationCode) && !GetStation.QueueStation(TargetLocation.stationCode)) return TargetLocation; |
| | | } |
| | | #endregion |
| | | |
| | |
| | | TargetLocation = stationinfoRepository.Find(x => x.line == station.line && x.location_state == LocationStateEnum.Empty.ToString() && x.enable && x.area == station.area).OrderBy(x => x.column).FirstOrDefault(); |
| | | if (TargetLocation != null) |
| | | { |
| | | if (!stationinfoRepository.Find(x => x.line == TargetLocation.line && x.area == TargetLocation.area && x.location_state == LocationStateEnum.OutBusy.ToString()).Any()) |
| | | if (!GetStation.OutBusyStation(TargetLocation.stationCode) && !GetStation.QueueStation(TargetLocation.stationCode)) |
| | | return TargetLocation; |
| | | } |
| | | #endregion |
| | |
| | | |
| | | #region 鏌ョ湅褰撳墠绌鸿揣浣嶅悗鏄惁瀛樺湪鏈夋枡 |
| | | if (TargetLocation != null) |
| | | if (stationinfoRepository.Find(x => x.line == TargetLocation.line && x.area == TargetLocation.area && x.location_state != LocationStateEnum.Empty.ToString()).Any()) TargetLocation = null; |
| | | if (GetStation.QueueStation(TargetLocation.stationCode)) TargetLocation = null; |
| | | #endregion |
| | | |
| | | #endregion |