Merge remote-tracking branch 'origin/station' into station

This commit is contained in:
nieziyan 2023-10-28 15:20:13 +08:00
commit 1579e41504
19 changed files with 50 additions and 47 deletions

View File

@ -2494,7 +2494,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
EnergySpectrumStruct struct = EnergySpectrumHandler.getSourceData(file.getAbsolutePath()); EnergySpectrumStruct struct = EnergySpectrumHandler.getSourceData(file.getAbsolutePath());
String stationName = struct.site_code; String stationName = struct.site_code;
//根据台站id查询台站名称 //根据台站id查询台站名称
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap"); Map<String, String> stationMap = (Map<String, String>)redisUtil.get("stationMap");
if (CollectionUtils.isEmpty(stationMap)){ if (CollectionUtils.isEmpty(stationMap)){
result.error500("The station cache information is empty!"); result.error500("The station cache information is empty!");
return result; return result;
@ -2505,7 +2505,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
result.error500("The station information does not exist!"); result.error500("The station information does not exist!");
return result; return result;
} }
List<Integer> stationIds = stationMap.keySet().stream().collect(Collectors.toList()); List<String> stationIds = stationMap.keySet().stream().collect(Collectors.toList());
String stationId = String.valueOf(stationIds.get(index)); String stationId = String.valueOf(stationIds.get(index));
map.put("stationId", stationId); map.put("stationId", stationId);
map.put("stationName", stationName); map.put("stationName", stationName);
@ -2546,7 +2546,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
Result result = new Result(); Result result = new Result();
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
//根据台站id查询台站名称 //根据台站id查询台站名称
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap"); Map<String, String> stationMap = (Map<String, String>)redisUtil.get("stationMap");
if (CollectionUtils.isEmpty(stationMap)){ if (CollectionUtils.isEmpty(stationMap)){
result.error500("The station cache information is empty!"); result.error500("The station cache information is empty!");
return result; return result;
@ -2557,7 +2557,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
result.error500("The station information does not exist!"); result.error500("The station information does not exist!");
return result; return result;
} }
List<Integer> stationIds = stationMap.keySet().stream().collect(Collectors.toList()); List<String> stationIds = stationMap.keySet().stream().collect(Collectors.toList());
String stationId = String.valueOf(stationIds.get(index)); String stationId = String.valueOf(stationIds.get(index));
map.put("stationId", stationId); map.put("stationId", stationId);
map.put("stationName", stationName); map.put("stationName", stationName);

View File

@ -46,7 +46,7 @@ public class DataProvisionEfficiencyManager {
//获取机器可用核心数 //获取机器可用核心数
int systemCores = Runtime.getRuntime().availableProcessors(); int systemCores = Runtime.getRuntime().availableProcessors();
//初始化线程池 //初始化线程池
ThreadFactory threadFactory = new CustomizableThreadFactory("undeal-file-parsing-"); ThreadFactory threadFactory = new CustomizableThreadFactory("provision-efficiency-");
poolExecutor = new ThreadPoolExecutor(systemCores-1,systemCores,5, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),threadFactory); poolExecutor = new ThreadPoolExecutor(systemCores-1,systemCores,5, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),threadFactory);
} }
@ -58,7 +58,7 @@ public class DataProvisionEfficiencyManager {
HashMap<String, GardsStations> stationInfoMap = (HashMap<String, GardsStations>) redisUtil.get("stationInfoMap"); HashMap<String, GardsStations> stationInfoMap = (HashMap<String, GardsStations>) redisUtil.get("stationInfoMap");
List<Integer> detectorsUsedList = (List<Integer>) redisUtil.get("detectorsUsedList"); List<Integer> detectorsUsedList = (List<Integer>) redisUtil.get("detectorsUsedList");
// 获取所有的台站信息 // 获取所有的台站信息
List<GardsStations> stations = stationInfoMap.values().stream().sorted(Comparator.comparing(GardsStations::getStationId)).collect(Collectors.toList()); List<GardsStations> stations = stationInfoMap.values().stream().filter(item-> item.getLon()!=null && item.getLat()!=null).sorted(Comparator.comparing(GardsStations::getStationId)).collect(Collectors.toList());
List<StationInfo> stationInfos = new ArrayList<>(); List<StationInfo> stationInfos = new ArrayList<>();
for (GardsStations gardsStations : stations) { for (GardsStations gardsStations : stations) {
StationInfo stationInfo = new StationInfo(); StationInfo stationInfo = new StationInfo();

View File

@ -1,19 +1,16 @@
package org.jeecg; package org.jeecg;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.CacheName; import org.jeecg.common.CacheName;
import org.jeecg.common.config.mqtoken.UserTokenContext;
import org.jeecg.common.util.RedisUtil; import org.jeecg.common.util.RedisUtil;
import org.jeecg.modules.base.entity.configuration.GardsStations;
import org.jeecg.modules.base.entity.original.GardsMetData; import org.jeecg.modules.base.entity.original.GardsMetData;
import org.jeecg.modules.base.entity.original.GardsSampleData; import org.jeecg.modules.base.entity.original.GardsSampleData;
import org.jeecg.modules.base.entity.original.GardsSohData; import org.jeecg.modules.base.entity.original.GardsSohData;
import org.jeecg.modules.base.entity.postgre.SysUserFocusStation;
import org.jeecg.modules.entity.SysUserFocusStationStation;
import org.jeecg.modules.entity.data.*; import org.jeecg.modules.entity.data.*;
import org.jeecg.modules.mapper.StationMetDataMapper; import org.jeecg.modules.mapper.StationMetDataMapper;
import org.jeecg.modules.mapper.StationSampleDataMapper; import org.jeecg.modules.mapper.StationSampleDataMapper;
@ -32,6 +29,8 @@ import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static org.jeecg.common.util.TokenUtils.getTempToken;
@Slf4j @Slf4j
@Component @Component
@RequiredArgsConstructor @RequiredArgsConstructor
@ -72,7 +71,8 @@ public class DataReceivingStatusManager {
public void run() { public void run() {
for(;;){ for(;;){
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
// start:生成临时Token到线程中
UserTokenContext.setToken(getTempToken());
//获取四项缓存数据的对应内容 //获取四项缓存数据的对应内容
List<Map<String, String>> cacheList = cacheTimeService.findCacheTime(); List<Map<String, String>> cacheList = cacheTimeService.findCacheTime();
//缓存时间 //缓存时间
@ -84,12 +84,12 @@ public class DataReceivingStatusManager {
} }
} }
//从redis中获取台站信息 //从redis中获取台站信息
Map<Integer, String> stationInfoMap = (Map<Integer, String>)redisUtil.get("stationMap"); Map<String, String> stationInfoMap = (Map<String, String>)redisUtil.get("stationMap");
List<Integer> stationIds = stationInfoMap.keySet().stream().collect(Collectors.toList()); List<String> stationIds = stationInfoMap.keySet().stream().collect(Collectors.toList());
//从redis中获取探测器信息 //从redis中获取探测器信息
Map<Integer, String> detectorInfoMap = (Map<Integer, String>)redisUtil.get("detectorsMap"); Map<Integer, String> detectorInfoMap = (Map<Integer, String>)redisUtil.get("detectorsMap");
//声明存储所有台站id对应的数据信息的集合 //声明存储所有台站id对应的数据信息的集合
List<StationData> stationDataList = Objects.nonNull(redisUtil.get("stationDataList"))? (List<StationData>) redisUtil.get("stationDataList") : new LinkedList<>(); Map<String, StationData> stationDataMap = Objects.nonNull(redisUtil.get("stationDataMap"))?(Map<String, StationData>) redisUtil.get("stationDataMap"):new HashMap<>();
//遍历台站id //遍历台站id
if (CollectionUtils.isNotEmpty(stationIds)) { if (CollectionUtils.isNotEmpty(stationIds)) {
//获取当前日期时间 作为结束查询时间 //获取当前日期时间 作为结束查询时间
@ -103,10 +103,10 @@ public class DataReceivingStatusManager {
Map<String, List<GardsDetectorsSystem>> stationDetectors = cacheTimeService.findStationDetectors(stationIds); Map<String, List<GardsDetectorsSystem>> stationDetectors = cacheTimeService.findStationDetectors(stationIds);
//遍历台站id 获取台站下的探测器数据 //遍历台站id 获取台站下的探测器数据
if (CollectionUtils.isNotEmpty(stationDetectors)) { if (CollectionUtils.isNotEmpty(stationDetectors)) {
for (Integer stationId : stationIds) { for (String stationId : stationIds) {
Map<String, List<Map<String, DetectorData>>> stationMap = new HashMap<>(); Map<String, List<Map<String, DetectorData>>> stationMap = new HashMap<>();
//获取台站下对应的探测器数据 //获取台站下对应的探测器数据
List<GardsDetectorsSystem> detectors = stationDetectors.get(String.valueOf(stationId)); List<GardsDetectorsSystem> detectors = stationDetectors.get(stationId);
if (CollectionUtils.isNotEmpty(detectors)) { if (CollectionUtils.isNotEmpty(detectors)) {
StationData stationData = new StationData(); StationData stationData = new StationData();
//stream流获取探测器id //stream流获取探测器id
@ -207,17 +207,17 @@ public class DataReceivingStatusManager {
detectorDataList.add(detectorMap); detectorDataList.add(detectorMap);
} }
stationMap.put(String.valueOf(stationId), detectorDataList); stationMap.put(stationId, detectorDataList);
stationData.setStationId(String.valueOf(stationId)); stationData.setStationId(stationId);
if (CollectionUtils.isNotEmpty(stationInfoMap)) { if (CollectionUtils.isNotEmpty(stationInfoMap)) {
if (StringUtils.isNotBlank(stationInfoMap.get(stationId))) { if (StringUtils.isNotBlank(stationInfoMap.get(stationId))) {
stationData.setStationCode(stationInfoMap.get(stationId)); stationData.setStationCode(stationInfoMap.get(stationId));
} }
} }
stationData.setDetectors(stationMap); stationData.setDetectors(stationMap);
stationDataList.add(stationData); stationDataMap.put(stationData.getStationId(), stationData);
redisUtil.set("stationDataList", stationDataList);
} }
redisUtil.set("stationDataMap", stationDataMap);
} }
} }
} }

View File

@ -36,14 +36,11 @@ public class CalculateDataRateThread implements Runnable{
@Override @Override
public void run() { public void run() {
long start = System.currentTimeMillis();
try { try {
this.calCulStationInfo(); this.calCulStationInfo();
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
long end = System.currentTimeMillis();
System.out.println("单线程时长:"+(end-start));
// CountDownLatch 计数器减 1 // CountDownLatch 计数器减 1
countDownLatch.countDown(); countDownLatch.countDown();
} }

View File

@ -13,6 +13,6 @@ import java.util.List;
@Mapper @Mapper
public interface StationMetDataMapper extends BaseMapper<GardsMetData> { public interface StationMetDataMapper extends BaseMapper<GardsMetData> {
List<GardsMetData> findMetDataList(@Param("stationIds") List<Integer> stationIds, @Param("startDate") String startDate); List<GardsMetData> findMetDataList(@Param("stationIds") List<String> stationIds, @Param("startDate") String startDate);
} }

View File

@ -13,5 +13,5 @@ import java.util.List;
@Mapper @Mapper
public interface StationSohDataMapper extends BaseMapper<GardsSohData> { public interface StationSohDataMapper extends BaseMapper<GardsSohData> {
List<GardsSohData> findSohDataList(@Param("stationId") Integer stationId, @Param("detectorIds") List<Integer> detectorIds, @Param("startDate") String startDate); List<GardsSohData> findSohDataList(@Param("stationId") String stationId, @Param("detectorIds") List<Integer> detectorIds, @Param("startDate") String startDate);
} }

View File

@ -20,7 +20,7 @@ public interface ICacheTimeService {
List<Map<String, String>> findCacheTime(); List<Map<String, String>> findCacheTime();
@RequestMapping("/gardsDetectors/findStationDetectors") @RequestMapping("/gardsDetectors/findStationDetectors")
Map<String, List<GardsDetectorsSystem>> findStationDetectors(@RequestBody List<Integer> stationIds); Map<String, List<GardsDetectorsSystem>> findStationDetectors(@RequestBody List<String> stationIds);
@RequestMapping("/sys/user/findUserByName") @RequestMapping("/sys/user/findUserByName")
SysUser findUserByName(@RequestParam String userName); SysUser findUserByName(@RequestParam String userName);

View File

@ -386,7 +386,7 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
@Override @Override
public Result getDataReceivingStatus(String userId) { public Result getDataReceivingStatus(String userId) {
Result result = new Result(); Result result = new Result();
List<StationData> stationDataList = (List<StationData>) redisUtil.get("stationDataList"); Map<String, StationData> stationDataMap = (Map<String, StationData>) redisUtil.get("stationDataMap");
// //获取四项缓存数据的对应内容 // //获取四项缓存数据的对应内容
// List<Map<String, String>> cacheList = cacheTimeService.findCacheTime(); // List<Map<String, String>> cacheList = cacheTimeService.findCacheTime();
// //缓存时间 // //缓存时间
@ -407,7 +407,12 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
List<SysUserFocusStationStation> userFocusStations = sysUserFocusStationMapper.selectList(userFocusStationQueryWrapper); List<SysUserFocusStationStation> userFocusStations = sysUserFocusStationMapper.selectList(userFocusStationQueryWrapper);
List<String> stationIds = userFocusStations.stream().map(SysUserFocusStation::getStationId).collect(Collectors.toList()); List<String> stationIds = userFocusStations.stream().map(SysUserFocusStation::getStationId).collect(Collectors.toList());
//过滤出当前用户关注的台站信息 //过滤出当前用户关注的台站信息
stationDataList = stationDataList.stream().filter(item-> stationIds.equals(item.getStationId())).collect(Collectors.toList()); List<StationData> stationDataList = new LinkedList<>();
for (String stationId:stationIds) {
if (Objects.nonNull(stationDataMap.get(stationId))) {
stationDataList.add(stationDataMap.get(stationId));
}
}
// //从redis中获取台站信息 // //从redis中获取台站信息
// Map<Integer, String> stationInfoMap = (Map<Integer, String>)redisUtil.get("stationMap"); // Map<Integer, String> stationInfoMap = (Map<Integer, String>)redisUtil.get("stationMap");
// //从redis中获取探测器信息 // //从redis中获取探测器信息
@ -553,7 +558,7 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
@Override @Override
public Result getDataProvisionEfficiency() { public Result getDataProvisionEfficiency() {
Map<String, StationInfo> stationInfoMap = (Map<String, StationInfo>) redisUtil.get("dataStationInfoList"); Map<String, StationInfo> stationInfoMap = (Map<String, StationInfo>) redisUtil.get("dataStationInfoList");
List<StationInfo> stationInfoList = stationInfoMap.values().stream().collect(Collectors.toList()); List<StationInfo> stationInfoList = stationInfoMap.values().stream().filter(Objects::nonNull).collect(Collectors.toList());
// // 获取所有的台站信息 // // 获取所有的台站信息
// HashMap<String, GardsStations> stationInfoMap = (HashMap<String, GardsStations>) redisUtil.get("stationInfoMap"); // HashMap<String, GardsStations> stationInfoMap = (HashMap<String, GardsStations>) redisUtil.get("stationInfoMap");
// List<Integer> detectorsUsedList = (List<Integer>) redisUtil.get("detectorsUsedList"); // List<Integer> detectorsUsedList = (List<Integer>) redisUtil.get("detectorsUsedList");

View File

@ -67,7 +67,7 @@ public class GardsDetectorsController {
} }
@RequestMapping("findStationDetectors") @RequestMapping("findStationDetectors")
public Map<String, List<GardsDetectorsSystem>> findStationDetectors(@RequestBody List<Integer> stationIds){ public Map<String, List<GardsDetectorsSystem>> findStationDetectors(@RequestBody List<String> stationIds){
return gardsDetectorsService.findStationDetectors(stationIds); return gardsDetectorsService.findStationDetectors(stationIds);
} }

View File

@ -35,8 +35,8 @@ public class GardsSampleDataController {
@GetMapping("findStations") @GetMapping("findStations")
@ApiOperation(value = "查询台站相关信息", notes = "查询台站相关信息") @ApiOperation(value = "查询台站相关信息", notes = "查询台站相关信息")
public Map<Integer, String> findStations(){ public Map<String, String> findStations(){
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap"); Map<String, String> stationMap = (Map<String, String>)redisUtil.get("stationMap");
return stationMap; return stationMap;
} }

View File

@ -63,6 +63,6 @@ public interface IGardsDetectorsService extends IService<GardsDetectorsSystem> {
* @param stationIds * @param stationIds
* @return * @return
*/ */
Map<String, List<GardsDetectorsSystem>> findStationDetectors(List<Integer> stationIds); Map<String, List<GardsDetectorsSystem>> findStationDetectors(List<String> stationIds);
} }

View File

@ -143,15 +143,15 @@ public class GardsDetectorsServiceImpl extends ServiceImpl<GardsDetectorsMapper,
} }
@Override @Override
public Map<String, List<GardsDetectorsSystem>> findStationDetectors(List<Integer> stationIds) { public Map<String, List<GardsDetectorsSystem>> findStationDetectors(List<String> stationIds) {
Map<String, List<GardsDetectorsSystem>> map = new HashMap<>(); Map<String, List<GardsDetectorsSystem>> map = new HashMap<>();
if (CollectionUtils.isNotEmpty(stationIds)){ if (CollectionUtils.isNotEmpty(stationIds)){
LambdaQueryWrapper<GardsDetectorsSystem> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<GardsDetectorsSystem> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(GardsDetectorsSystem::getStationId, stationIds); queryWrapper.in(GardsDetectorsSystem::getStationId, stationIds);
List<GardsDetectorsSystem> detectorsList = this.baseMapper.selectList(queryWrapper); List<GardsDetectorsSystem> detectorsList = this.baseMapper.selectList(queryWrapper);
for (Integer stationId:stationIds) { for (String stationId:stationIds) {
List<GardsDetectorsSystem> detectors = detectorsList.stream().filter(item -> item.getStationId()!=null && item.getStationId().equals(stationId) && item.getStatus()!=null && item.getStatus().trim().equals("Operating")).collect(Collectors.toList()); List<GardsDetectorsSystem> detectors = detectorsList.stream().filter(item -> item.getStationId()!=null && item.getStationId().equals(Integer.valueOf(stationId)) && item.getStatus()!=null && item.getStatus().trim().equals("Operating")).collect(Collectors.toList());
map.put(String.valueOf(stationId), detectors); map.put(stationId, detectors);
} }
} }
return map; return map;

View File

@ -29,7 +29,7 @@ public class GardsSampleDataServiceImpl extends ServiceImpl<GardsSampleDataMappe
@Override @Override
public Result<IPage<GardsSampleDataSystem>> findPage(QueryRequest queryRequest, GardsSampleDataSystem gardsSampleData) { public Result<IPage<GardsSampleDataSystem>> findPage(QueryRequest queryRequest, GardsSampleDataSystem gardsSampleData) {
//查询全部台站信息 //查询全部台站信息
HashMap<Integer, String> stationMap = (HashMap<Integer, String>) redisUtil.get("stationMap"); HashMap<String, String> stationMap = (HashMap<String, String>) redisUtil.get("stationMap");
//查询全部监测器信息 //查询全部监测器信息
HashMap<Integer, String> detectorsMap = (HashMap<Integer, String>) redisUtil.get("detectorsMap"); HashMap<Integer, String> detectorsMap = (HashMap<Integer, String>) redisUtil.get("detectorsMap");
Result<IPage<GardsSampleDataSystem>> result = new Result<>(); Result<IPage<GardsSampleDataSystem>> result = new Result<>();

View File

@ -175,7 +175,8 @@ public class GardsStationsServiceImpl extends ServiceImpl<GardsStationsMapper, G
redisUtil.del("stationInfoMap"); redisUtil.del("stationInfoMap");
} }
List<GardsStations> gardsStations = this.baseMapper.selectList(new LambdaQueryWrapper<>()); List<GardsStations> gardsStations = this.baseMapper.selectList(new LambdaQueryWrapper<>());
Map<Integer, String> stationMap = gardsStations.stream().collect(Collectors.toMap(GardsStations::getStationId, GardsStations::getStationCode)); Map<String, String> stationMap = gardsStations.stream().collect(Collectors.toMap(GardsStations::getStationId, GardsStations::getStationCode)).entrySet().stream()
.collect(Collectors.toMap(entry -> entry.getKey().toString(), Map.Entry::getValue));;
HashMap<Integer, Object> stationInfoMap = new HashMap<>(); HashMap<Integer, Object> stationInfoMap = new HashMap<>();
if (CollectionUtils.isNotEmpty(gardsStations)){ if (CollectionUtils.isNotEmpty(gardsStations)){
for (GardsStations station:gardsStations) { for (GardsStations station:gardsStations) {

View File

@ -62,7 +62,7 @@ public class SysTaskServiceImpl extends ServiceImpl<SysTaskMapper, SysTaskSystem
Result<Map<String, List<SysTaskVo>>> result = new Result(); Result<Map<String, List<SysTaskVo>>> result = new Result();
Map<String, List<SysTaskVo>> map = new LinkedHashMap<>(); Map<String, List<SysTaskVo>> map = new LinkedHashMap<>();
//获取全部台站信息 //获取全部台站信息
HashMap<Integer, String> stationMap = (HashMap<Integer, String>)redisUtil.get("stationMap"); HashMap<String, String> stationMap = (HashMap<String, String>)redisUtil.get("stationMap");
try { try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String yearMonthStr = DateUtils.formatDate(yearMonth, "yyyy-MM"); String yearMonthStr = DateUtils.formatDate(yearMonth, "yyyy-MM");
@ -138,7 +138,7 @@ public class SysTaskServiceImpl extends ServiceImpl<SysTaskMapper, SysTaskSystem
public Result<List<SysTaskSystem>> findInfo(Date day) { public Result<List<SysTaskSystem>> findInfo(Date day) {
Result<List<SysTaskSystem>> result = new Result(); Result<List<SysTaskSystem>> result = new Result();
//获取全部台站信息 //获取全部台站信息
HashMap<Integer, String> stationMap = (HashMap<Integer, String>)redisUtil.get("stationMap"); HashMap<String, String> stationMap = (HashMap<String, String>)redisUtil.get("stationMap");
try { try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar cal = Calendar.getInstance(); Calendar cal = Calendar.getInstance();

View File

@ -47,7 +47,7 @@ public class AutoServiceImpl extends ServiceImpl<GardsAnalysesAutoMapper, GardsA
public Result findAutoPage(QueryRequest queryRequest, Integer[] stationIds, Date startTime, Date endTime) { public Result findAutoPage(QueryRequest queryRequest, Integer[] stationIds, Date startTime, Date endTime) {
Result result = new Result(); Result result = new Result();
//获取redis中缓存的台站信息 //获取redis中缓存的台站信息
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap"); Map<String, String> stationMap = (Map<String, String>)redisUtil.get("stationMap");
if (Objects.isNull(startTime)){ if (Objects.isNull(startTime)){
result.error500("The start time cannot be empty"); result.error500("The start time cannot be empty");
return result; return result;

View File

@ -72,7 +72,7 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
try { try {
Result result = new Result(); Result result = new Result();
//获取redis中缓存的台站信息 //获取redis中缓存的台站信息
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap"); Map<String, String> stationMap = (Map<String, String>)redisUtil.get("stationMap");
if (StringUtils.isBlank(dataType)) { if (StringUtils.isBlank(dataType)) {
result.error500("The data type cannot be empty"); result.error500("The data type cannot be empty");
return result; return result;
@ -174,7 +174,7 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
Acquisition acquisition = null; Acquisition acquisition = null;
Calibration calibration = null; Calibration calibration = null;
//获取redis中缓存的台站信息 //获取redis中缓存的台站信息
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap"); Map<String, String> stationMap = (Map<String, String>)redisUtil.get("stationMap");
//根据sample_id查询sample_data内容 //根据sample_id查询sample_data内容
LambdaQueryWrapper<GardsSampleDataWeb> sampleDataQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<GardsSampleDataWeb> sampleDataQueryWrapper = new LambdaQueryWrapper<>();
sampleDataQueryWrapper.eq(GardsSampleDataWeb::getSampleId, sampleId); sampleDataQueryWrapper.eq(GardsSampleDataWeb::getSampleId, sampleId);
@ -695,7 +695,7 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
List<GardsSampleDataWeb> sampleData = this.list(wrapper); List<GardsSampleDataWeb> sampleData = this.list(wrapper);
// 获取redis中缓存的台站信息 // 获取redis中缓存的台站信息
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap"); Map<String, String> stationMap = (Map<String, String>)redisUtil.get("stationMap");
int no = 1; int no = 1;
boolean emptyMap = MapUtil.isEmpty(stationMap); boolean emptyMap = MapUtil.isEmpty(stationMap);
for (GardsSampleDataWeb sampleDatum : sampleData) { for (GardsSampleDataWeb sampleDatum : sampleData) {

View File

@ -47,7 +47,7 @@ public class ReviewedServiceImpl extends ServiceImpl<GardsAnalysesManMapper, Gar
public Result findReviewedPage(QueryRequest queryRequest, Integer[] stationIds, Date startTime, Date endTime) { public Result findReviewedPage(QueryRequest queryRequest, Integer[] stationIds, Date startTime, Date endTime) {
Result result = new Result(); Result result = new Result();
//获取redis中缓存的台站信息 //获取redis中缓存的台站信息
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap"); Map<String, String> stationMap = (Map<String, String>)redisUtil.get("stationMap");
if (Objects.isNull(startTime)){ if (Objects.isNull(startTime)){
result.error500("The start time cannot be empty"); result.error500("The start time cannot be empty");
return result; return result;

View File

@ -49,6 +49,6 @@ public class JeecgStationOperationApplication extends SpringBootServletInitializ
@Override @Override
public void run(String... args) throws Exception { public void run(String... args) throws Exception {
dataProvisionEfficiencyManager.start(); dataProvisionEfficiencyManager.start();
// dataReceivingStatusManager.start(); dataReceivingStatusManager.start();
} }
} }