Commit fa6882c4 authored by caotao's avatar caotao

1.运行监盘获取全国数据service方法编写及实现。

parent e373867b
...@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.entity.Test; ...@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.entity.Test;
import com.yeejoin.amos.boot.module.jxiop.biz.feign.CoreFeignClient; import com.yeejoin.amos.boot.module.jxiop.biz.feign.CoreFeignClient;
import com.yeejoin.amos.boot.module.jxiop.biz.repository.ESEquipmentsRepository; import com.yeejoin.amos.boot.module.jxiop.biz.repository.ESEquipmentsRepository;
import com.yeejoin.amos.boot.module.jxiop.biz.service.CoreCommonService; import com.yeejoin.amos.boot.module.jxiop.biz.service.CoreCommonService;
import com.yeejoin.amos.boot.module.jxiop.biz.service.MonitorService;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.*; import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.*;
//import com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils; //import com.yeejoin.amos.boot.module.jxiop.biz.utils.InfluxDButils;
//import com.yeejoin.amos.component.influxdb.InfluxDbConnection; //import com.yeejoin.amos.component.influxdb.InfluxDbConnection;
...@@ -110,7 +111,8 @@ public class DemoController extends BaseController { ...@@ -110,7 +111,8 @@ public class DemoController extends BaseController {
@Autowired @Autowired
private EquipmentsJxiopDocMysqlMapper equipmentsJxiopDocMysqlMapper; private EquipmentsJxiopDocMysqlMapper equipmentsJxiopDocMysqlMapper;
@Autowired
private MonitorService monitorService;
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "手动更新场站缓存信息接口") @ApiOperation(value = "手动更新场站缓存信息接口")
...@@ -445,7 +447,6 @@ public class DemoController extends BaseController { ...@@ -445,7 +447,6 @@ public class DemoController extends BaseController {
query.setTrackTotalHits(true); query.setTrackTotalHits(true);
SearchHits<ESEquipments> search = elasticsearchTemplate.search(query, ESEquipments.class); SearchHits<ESEquipments> search = elasticsearchTemplate.search(query, ESEquipments.class);
return ResponseHelper.buildResponse(search); return ResponseHelper.buildResponse(search);
} }
...@@ -515,8 +516,9 @@ public class DemoController extends BaseController { ...@@ -515,8 +516,9 @@ public class DemoController extends BaseController {
@GetMapping("/testFeignCall") @GetMapping("/testFeignCall")
public List<CoreValuesDto> testFeignCall() { public List<CoreValuesDto> testFeignCall() {
List<CoreValuesDto> coreValuesDtos =coreCommonService.getValuesByStationNamesAndPointsNames(null,null); List<CoreValuesDto> coreValuesDtos =coreCommonService.getValuesByStationNamesAndPointsNames(null,null);
Double sum = coreCommonService.getSumOfByPointName(coreValuesDtos, CommonConstans.DAY_POWER_GENERATION); monitorService.getTotalData();
Double avg = coreCommonService.getAverageOfByPointName(coreValuesDtos, CommonConstans.DAY_POWER_GENERATION); // Double sum = coreCommonService.getSumOfByPointName(coreValuesDtos, CommonConstans.DAY_POWER_GENERATION);
// Double avg = coreCommonService.getAverageOfByPointName(coreValuesDtos, CommonConstans.DAY_POWER_GENERATION);
return coreValuesDtos; return coreValuesDtos;
} }
} }
package com.yeejoin.amos.boot.module.jxiop.biz.service;
public interface MonitorService {
public void getTotalData();
}
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