public void getStationList() { StationContext context = new StationContext(); stationList = context.getStationList(Attachtype); lineStationList.ForEach(x => { var model = stationList.FirstOrDefault(s => s.stationName == x.stationName && s.derection == x.derection); if (model != null) { x.attach = 1; x.newStationId = model.stationId; } }); log.Info($"站点个数共{stationList.Count}"); if (Attachtype == 1) { log.Info($"需要修改的上下行共{lineStationList.Where(x => x.attach == 1).Count()}条"); lineStationList.Where(x => x.attach == 1).OrderBy(x => x.lineName).ToList().ForEach(x => log.Info($"{x.lineName},{x.stationName},{x.derection}")); } else { log.Info($"需要修改的线路共{lineStationList.Where(x => x.attach == 1).GroupBy(x => x.lineName).Count()}条"); lineStationList.Where(x => x.attach == 1).GroupBy(x => x.lineName).ToList().ForEach(x => log.Info(x.Key)); } }
public void deleteStations() { StationContext context = new StationContext(); context.deleteStations(); }
public int getDeleteStationCount() { StationContext context = new StationContext(); return(context.getDeleteStationCount()); }