Commit 5bb7fa12 authored by caotao's avatar caotao

处理无法没有负载率问题

parent 7b958595
......@@ -695,7 +695,7 @@ public class MonitorFanIdxController extends BaseController {
// if (null != stationType){
// gatewayId = stationBasic.getBoosterGatewayId();
// }
return ResponseHelper.buildResponse(monitorFanIndicator.getStatisticsInfo(stationId,equipmentIndexName));
return ResponseHelper.buildResponse(monitorFanIndicator.getStatisticsInfo(equipmentIndexName,stationId));
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
......
......@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl;
import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
......@@ -26,14 +27,19 @@ import java.util.List;
import java.util.stream.Collectors;
@Component
@RequiredArgsConstructor
public class StationCacheDataInit implements CommandLineRunner {
private final StationBasicMapper stationBasicMapper;
private final RegionMapper regionMapper;
private final MapRegionMapper mapRegionMapper;
private final SjglZsjZsbtzMapper sjglZsjZsbtzMapper;
private final CommonServiceImpl commonServiceImpl;
private final RedisTemplate redisTemplate;
@Autowired
private StationBasicMapper stationBasicMapper;
@Autowired
private RegionMapper regionMapper;
@Autowired
private MapRegionMapper mapRegionMapper;
@Autowired
private SjglZsjZsbtzMapper sjglZsjZsbtzMapper;
@Autowired
private CommonServiceImpl commonServiceImpl;
@Autowired
private RedisTemplate redisTemplate;
Logger logger = LoggerFactory.getLogger(StationCacheDataInit.class);
public void run(String... args) throws Exception {
......
......@@ -341,7 +341,8 @@ public class CommonServiceImpl {
}
public StationCacheInfoDto getStationCacheInfoDtoByStationId(String stationId) {
return getListStationCacheInfoDto().stream().filter(stationCacheInfoDto -> stationCacheInfoDto.getStationId().equals(stationId)).collect(Collectors.toList()).get(0);
StationCacheInfoDto stationCacheInfoDto = this.getListStationCacheInfoDto().stream().filter(stationCacheInfoDto1 -> stationCacheInfoDto1.getStationId().equals(stationId)).collect(Collectors.toList()).get(0);
return stationCacheInfoDto;
}
public String getFanDevicePrefix(String stationid) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment