| | |
| | | var TargetLocations1 = stationinfoRepository.Find(x => x.location_state == LocationStateEnum.Empty.ToString() && x.enable && x.area == area1).OrderBy(x => x.line).ThenBy(x => x.column).ToList(); |
| | | foreach (var Location in TargetLocations1) |
| | | { |
| | | if (stationinfoRepository.Find(x => x.line == Location.line && x.area == Location.area && x.stationType == stationinfo.stationType && x.location_state != LocationStateEnum.OutBusy.ToString()).Any()) return Location; |
| | | if (!stationinfoRepository.Find(x => x.line == Location.line && x.area == Location.area && x.stationType == stationinfo.stationType && x.location_state == LocationStateEnum.OutBusy.ToString()).Any()) return Location; |
| | | } |
| | | #endregion |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | if (stationinfoRepository.Find(x => x.line == Location.line && x.area == Location.area && x.stationType == stationinfo.stationType && x.location_state != LocationStateEnum.OutBusy.ToString()).Any()) return Location; |
| | | if (!stationinfoRepository.Find(x => x.line == Location.line && x.area == Location.area && x.stationType == stationinfo.stationType && x.location_state == LocationStateEnum.OutBusy.ToString()).Any()) return Location; |
| | | } |
| | | } |
| | | #endregion |