diff --git a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/controller/StationOperationController.java b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/controller/StationOperationController.java index b678d849..3c46f9b0 100644 --- a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/controller/StationOperationController.java +++ b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/controller/StationOperationController.java @@ -54,8 +54,8 @@ public class StationOperationController { @GetMapping("getDataReceivingStatus") @ApiOperation(value = "查询台站监测数据信息", notes = "查询台站监测数据信息") - public void getDataReceivingStatus(List stationIds){ - stationOperationService.getDataReceivingStatus(stationIds); + public void getDataReceivingStatus(String userId){ + stationOperationService.getDataReceivingStatus(userId); } } diff --git a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/service/IStationOperationService.java b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/service/IStationOperationService.java index d978c305..c6043d52 100644 --- a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/service/IStationOperationService.java +++ b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/service/IStationOperationService.java @@ -41,9 +41,9 @@ public interface IStationOperationService extends IService { /** * 查询台站监测数据 - * @param stationIds + * @param userId * @return */ - Result getDataReceivingStatus(List stationIds); + Result getDataReceivingStatus(String userId); } diff --git a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/service/impl/StationOperationServiceImpl.java b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/service/impl/StationOperationServiceImpl.java index 246266f3..333e39a7 100644 --- a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/service/impl/StationOperationServiceImpl.java +++ b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/service/impl/StationOperationServiceImpl.java @@ -1,5 +1,6 @@ package org.jeecg.modules.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -15,14 +16,11 @@ import org.jeecg.modules.base.entity.GardsMetData; import org.jeecg.modules.base.entity.GardsSampleData; import org.jeecg.modules.base.entity.GardsSohData; import org.jeecg.modules.entity.*; -import org.jeecg.modules.mapper.StationMetDataMapper; -import org.jeecg.modules.mapper.StationSampleDataMapper; -import org.jeecg.modules.mapper.StationSohDataMapper; +import org.jeecg.modules.mapper.*; import org.jeecg.modules.service.ICacheTimeService; import org.jeecg.modules.system.entity.GardsDetectors; import org.jeecg.modules.system.entity.GardsNuclearfacility; import org.jeecg.modules.system.entity.GardsStations; -import org.jeecg.modules.mapper.StationOperationMapper; import org.jeecg.modules.service.IStationOperationService; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -47,6 +45,8 @@ public class StationOperationServiceImpl extends ServiceImpl stationIds) { + public Result getDataReceivingStatus(String userId) { Result result = new Result(); //获取四项缓存数据的对应内容 List> cacheList = cacheTimeService.findCacheTime(); @@ -331,6 +331,11 @@ public class StationOperationServiceImpl extends ServiceImpl userFocusStationQueryWrapper = new LambdaQueryWrapper<>(); + userFocusStationQueryWrapper.eq(SysUserFocusStation::getUserId, userId); + List userFocusStations = sysUserFocusStationMapper.selectList(userFocusStationQueryWrapper); + List stationIds = userFocusStations.stream().map(SysUserFocusStation::getStationId).collect(Collectors.toList()); //从redis中获取台站信息 Map stationInfoMap = (Map)redisUtil.get("stationMap"); //从redis中获取探测器信息