Пример #1
0
        /// <summary>
        /// Возвращает информацию о финансировании по всем версиям.
        /// </summary>
        /// <returns></returns>
        public async Task <List <FinanceWorkPlace> > GetAllAsync()
        {
            var versionIds = await _versionRepository.GetAllMainIdsAsync();

            var financeWorkPlaces = await Context.VWorkFinanceWorkPlaces
                                    .Where(f => versionIds.Contains((Guid)f.VersionId) &&
                                           f.ПоказательФинансированияПоГодам > 2015 &&
                                           f.ПоказательФинансированияПоГодам < 2026)
                                    .Select(f => new FinanceWorkPlace()
            {
                Id            = f.Rid,
                VersionId     = (Guid)f.VersionId,
                VersionCode   = f.Версия,
                Name          = f.НаименованиеМероприятия,
                ShortName     = f.СокрНаименование,
                CodeProject   = f.ШифрПроекта,
                Executor      = f.Исполнитель,
                TypeFinancing = f.ВидФинансирования,
                Year          = f.ПоказательФинансированияПоГодам,
                Finance       = f.ЗначениеФинансовогоПоказателя,
                FinanceLimit  = f.LimitSum,
                Chapter       = f.аздел,
                Subchapter    = f.Подраздел,
                Section       = f.Статья,
                Subsection    = f.Пункт
            })
                                    .OrderBy(f => f.VersionCode)
                                    .ToListAsync();

            return(financeWorkPlaces);
        }
        public async Task <List <VTargetIndicatorTargetIndicator> > GetAllAsync()
        {
            var versionIds = await _versionRepository.GetAllMainIdsAsync();

            var targetIndicators = await Context.VTargetIndicatorTargetIndicators
                                   .Where(t => versionIds.Contains(t.VersionId))
                                   .OrderBy(t => t.IndicatorName)
                                   .ToListAsync();

            return(targetIndicators);
        }
Пример #3
0
        public async Task <List <WorkEventsGeneralInfo> > GetWorkEventsGeneralInfoAsync()
        {
            var versionIds = await _versionRepository.GetAllMainIdsAsync();

            var workEvents = await Context.VDictionaryWorks
                             .Where(w => versionIds.Contains(w.VersionId) &&
                                    w.SectionIdCode != null &&
                                    w.Level1 != null &&
                                    w.Level2 != null &&
                                    w.UseInDoc == true)
                             .ToListAsync();

            var workEventsGeneralInfo = workEvents
                                        .GroupBy(w => w.VersionIdCode)
                                        .Select(w => new WorkEventsGeneralInfo()
            {
                VersionCode          = w.Key,
                TotalWorks           = w.Count(),
                TotalCompletedWorks  = w.Count(a => a.IsDoneValue == 100),
                TotalNotStartedWorks = w.Count(a => a.IsDoneValue == 0)
            })
                                        .ToList();

            return(workEventsGeneralInfo);
        }
Пример #4
0
        public async Task <List <VEconomicEffect> > GetAllAsync()
        {
            var versionIds = await _versionRepository.GetAllMainIdsAsync();

            var economicEffects = await Context.VEconomicEffects
                                  .Where(e => versionIds.Contains(e.VersionId))
                                  .ToListAsync();

            return(economicEffects);
        }