42db58e6 张雷

奥体项目接口开发

1 个父辈 5b848fa0
......@@ -31,19 +31,40 @@ public class OlympicCenterController {
@ApiOperation(value="获取整体实时数据", notes="获取整体实时数据")
@GetMapping(value = "/getRealTimeData")
public Result<Map<String,Object>> getRealTimeData(){
public Result<Map<String,Object>> getRealTimeData(String sourceType){
Result<Map<String,Object>> result = new Result<Map<String,Object>>();
Map<String,Object> map = olympicCenterService.getRealTimeData();
Map<String,Object> map = olympicCenterService.getRealTimeData(sourceType);
result.setResult(map);
result.setSuccess(true);
return result;
}
@ApiOperation(value="获取指标历史趋势曲线", notes="获取指标历史趋势曲线")
/**
* 获取泵站指标历史趋势曲线
* @param field ssll:瞬时流量 ljll:累计流量 rll:日流量
* @param sourceType feed:给水泵房 hot:热水锅炉站 fire:消防泵站
* @return
*/
@ApiOperation(value="获取泵站指标历史趋势曲线", notes="获取泵站指标历史趋势曲线")
@GetMapping(value = "/getHistoryData")
public Result<Map<String,Object>> getHistoryData(String field){
public Result<List<EchartResult>> getHistoryData(String field,String sourceType){
Result<List<EchartResult>> result = new Result<List<EchartResult>>();
List<EchartResult> list = olympicCenterService.getHistoryData(field,sourceType);
result.setResult(list);
result.setSuccess(true);
return result;
}
/**
* 获取泵站指标实时数据
* @param sourceType feed:给水泵房 hot:热水锅炉站 fire:消防泵站
* @return
*/
@ApiOperation(value="获取泵站指标实时数据", notes="获取泵站指标实时数据")
@GetMapping(value = "/getBzRealTimeData")
public Result<Map<String,Object>> getBzRealTimeData(String sourceType){
Result<Map<String,Object>> result = new Result<Map<String,Object>>();
Map<String,Object> map = olympicCenterService.getHistoryData(field);
Map<String,Object> map = olympicCenterService.getBzRealTimeData(sourceType);
result.setResult(map);
result.setSuccess(true);
return result;
......@@ -60,12 +81,18 @@ public class OlympicCenterController {
return result;
}
@ApiOperation(value="获取压力趋势图", notes="获取压力趋势图")
/**
* 获取趋势图
* @param equipId
* @param type p:压力 f:流量计 t:温度计
* @return
*/
@ApiOperation(value="获取趋势图", notes="获取趋势图")
@GetMapping(value = "/getPressureChart")
public Result<List<EchartResult>> getPressureChart(String equipId){
public Result<List<EchartResult>> getPressureChart(String equipId,String type){
Result<List<EchartResult>> result = new Result<List<EchartResult>>();
List<EchartResult> list = new ArrayList<EchartResult>();
list = olympicCenterService.getPressureChart(equipId);
list = olympicCenterService.getPressureChart(equipId,type);
result.setResult(list);
result.setSuccess(true);
return result;
......
......@@ -10,11 +10,13 @@ import java.util.Map;
*/
public interface IOlympicCenterService {
Map<String,Object> getRealTimeData();
Map<String,Object> getRealTimeData(String sourceType);
Map<String, Object> getHistoryData(String field);
List<EchartResult> getHistoryData(String field,String sourceType);
List<EchartResult> getWaterChart(String sourceType, String dateType, String start, String end);
List<EchartResult> getPressureChart(String equipId);
List<EchartResult> getPressureChart(String equipId,String type);
Map<String, Object> getBzRealTimeData(String sourceType);
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!