From e9dbcfc5724a86550f065dd014e16a106be26f08 Mon Sep 17 00:00:00 2001 From: iFish Date: Tue, 9 Sep 2014 00:12:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=81=E8=AE=B8=E5=AF=B9=E6=9C=AA=E8=B5=B7?= =?UTF-8?q?=E5=94=AE=E8=BD=A6=E6=AC=A1=E8=BF=9B=E8=A1=8C=E5=BB=BA=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web12306/TrainSuggestion.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Web12306/TrainSuggestion.cs b/Web12306/TrainSuggestion.cs index 198bba7..a10d3cd 100644 --- a/Web12306/TrainSuggestion.cs +++ b/Web12306/TrainSuggestion.cs @@ -131,7 +131,7 @@ namespace Web12306 PreProcessRequestData(ri); //获得所有的可替换站点 - var alllines = ri.Stops.Values.SelectMany(s => GetAlternativeLines(s, ri.Date)).ToArray(); + var alllines = ri.Stops.Values.SelectMany(s => GetAlternativeLines(s, ri.Date)).Where(s => s != null).ToArray(); //对线路进行分组排序 var lineGrouped = alllines.GroupBy(s => s.LineName).Select(s => @@ -668,7 +668,7 @@ namespace Web12306 { if (Key != "stupid360") return true; - if (Stops.Values.Any(s => (s.TrainInfo.code == s.TrainInfo.from.code && s.TrainInfo.to.code == s.TrainInfo.end.code) || s.TrainInfo.available < 0)) + if (Stops.Values.Any(s => (s.TrainInfo.code == s.TrainInfo.from.code && s.TrainInfo.to.code == s.TrainInfo.end.code))) return true; //add 2014年9月4日 - 检测非法席别 @@ -676,7 +676,7 @@ namespace Web12306 return true; if (SelectedSeats.Length > 0) { - if (Stops.Values.Any(s => !SelectedSeats.Any(x => s.TrainInfo.ticketMap.ContainsKey(x[0])))) + if (Stops.Values.Any(s => !SelectedSeats.Any(x => s.TrainInfo.ticketMap.ContainsKey(x[0])))) return true; }