public KpiImportService(ICdmaRegionStatRepository regionStatRepository, ITopDrop2GCellRepository top2GRepository, ITopConnection3GRepository top3GRepository, ITopConnection2GRepository topConnection2GRepository, IVipDemandRepository vipDemandRepository, IComplainItemRepository complainItemRepository, IBranchDemandRepository branchDemandRepository, IOnlineSustainRepository onlineSustainRepository, IPlanningSiteRepository planningSiteRepository, IComplainProcessRepository processRepository, ITownRepository townRepository, IFileRecordRepository fileRecordRepository, IDtFileInfoRepository dtFileInfoRepository, IRasterTestInfoRepository rasterTestInfoRepository, ILteProblemRepository lteProblemRepository) { _regionStatRepository = regionStatRepository; _top2GRepository = top2GRepository; _top3GRepository = top3GRepository; _topConnection2GRepository = topConnection2GRepository; _vipDemandRepository = vipDemandRepository; _complainItemRepository = complainItemRepository; _branchDemandRepository = branchDemandRepository; _onlineSustainRepository = onlineSustainRepository; _planningSiteRepository = planningSiteRepository; _processRepository = processRepository; _fileRecordRepository = fileRecordRepository; _dtFileInfoRepository = dtFileInfoRepository; _rasterTestInfoRepository = rasterTestInfoRepository; _lteProblemRepository = lteProblemRepository; _towns = townRepository.GetAllList(); }
public static void UpdateRasterInfo <TStat>(this IRasterTestInfoRepository rasterTestInfoRepository, IEnumerable <TStat> stats, string tableName, string networkType) where TStat : IRasterNum { var rasterNumbers = stats.Select(x => x.RasterNum).Distinct(); foreach (var rasterNumber in rasterNumbers) { var raster = rasterTestInfoRepository.FirstOrDefault(x => x.RasterNum == rasterNumber && x.NetworkType == networkType); if (raster == null) { rasterTestInfoRepository.Insert(new RasterTestInfo { RasterNum = rasterNumber, NetworkType = networkType, CsvFilesName = tableName }); rasterTestInfoRepository.SaveChanges(); } else if (!raster.CsvFilesName.Contains(tableName)) { raster.CsvFilesName += ";" + tableName; rasterTestInfoRepository.SaveChanges(); } } }
public RasterInfoService(IRasterInfoRepository repository, IRasterTestInfoRepository testInfoRepository, IDtFileInfoRepository dtFileInfoRepository) { _repository = repository; _testInfoRepository = testInfoRepository; _dtFileInfoRepository = dtFileInfoRepository; }
public RasterInfoService(IRasterInfoRepository repository, IRasterTestInfoRepository testInfoRepository, IDtFileInfoRepository dtFileInfoRepository, ITownRepository townRepository, IAreaTestInfoRepository areaTestInfoRepository) { _repository = repository; _testInfoRepository = testInfoRepository; _dtFileInfoRepository = dtFileInfoRepository; _townRepository = townRepository; _areaTestInfoRepository = areaTestInfoRepository; }