public IEnumerable <AggregateFlowView> Get(DateTime startDate, DateTime lastDate) { var colleges = _collegeService.QueryInfos(); return(colleges.Select(college => { var stats = _townFlowService.QueryTownFlowViews(startDate, lastDate, college.Id, FrequencyBandType.College); var result = stats.Any() ? stats.ArraySum().MapTo <AggregateFlowView>() : new AggregateFlowView(); result.Name = college.Name; return result; })); }
public IEnumerable <AggregateFlowView> Get(DateTime startDate, DateTime lastDate) { var colleges = _transportationService.QueryHotSpotViews("交通枢纽"); return(colleges.Select(college => { var stats = _townFlowService.QueryTownFlowViews(startDate, lastDate, college.Id, FrequencyBandType.Transportation); var result = stats.Any() ? stats.ArraySum().MapTo <AggregateFlowView>() : new AggregateFlowView(); result.Name = college.HotspotName; return result; })); }
public AggregateFlowView Get(string collegeName, DateTime begin, DateTime end) { var college = _collegeService.QueryInfo(collegeName); var cells = _collegeCellViewService.QueryCollegeSectors(collegeName); if (college == null) { return(null); } var stats = _townFlowService.QueryTownFlowViews(begin, end, college.Id, FrequencyBandType.College); var result = stats.Any() ? stats.ArraySum().MapTo <AggregateFlowView>() : new AggregateFlowView(); result.CellCount = cells.Count(); return(result); }