예제 #1
0
        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;
            }));
        }
예제 #2
0
        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;
            }));
        }
예제 #3
0
        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);
        }