|
|
|
|
@ -7,6 +7,8 @@ import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.core.tool.utils.DateUtil; |
|
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
|
import org.springframework.data.redis.core.RedisTemplate; |
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
@ -27,6 +29,13 @@ public class TestController {
|
|
|
|
|
|
|
|
|
|
private final ISideHustleService sideHustleService; |
|
|
|
|
|
|
|
|
|
private final RedisTemplate redisTemplate; |
|
|
|
|
|
|
|
|
|
@Value("${hzims.operation.realIdKey}") |
|
|
|
|
private String realIdKey; |
|
|
|
|
|
|
|
|
|
private final static String LOAD_HYDROPOWER_UNIT_REAL_KEY = "hzims:operation:loadhydropowerunit:real:key"; |
|
|
|
|
|
|
|
|
|
@GetMapping("/loadHydropowerTarget") |
|
|
|
|
@ApiOperation(value = "加载统计数据") |
|
|
|
|
R<Boolean> loadHydropowerTarget() { |
|
|
|
|
@ -41,6 +50,18 @@ public class TestController {
|
|
|
|
|
return R.success("运行成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@GetMapping("/getHydropowerReal") |
|
|
|
|
@ApiOperation(value = "获取水电站机组实时缓存数据(hydropower/app/area的devices数据来源)") |
|
|
|
|
R<Object> getHydropowerReal() { |
|
|
|
|
return R.data(redisTemplate.opsForValue().get(LOAD_HYDROPOWER_UNIT_REAL_KEY)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@GetMapping("/getRealIdData") |
|
|
|
|
@ApiOperation(value = "获取实时测点值缓存数据(机组实时缓存的上游数据来源)") |
|
|
|
|
R<Object> getRealIdData() { |
|
|
|
|
return R.data(redisTemplate.opsForValue().get(realIdKey)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@GetMapping("/loadDutyInfo") |
|
|
|
|
@ApiOperation(value = "加载区域日常运行数据") |
|
|
|
|
R<Boolean> loadDutyInfo() { |
|
|
|
|
|