奥体项目接口开发
正在显示
3 个修改的文件
包含
40 行增加
和
11 行删除
... | @@ -31,19 +31,40 @@ public class OlympicCenterController { | ... | @@ -31,19 +31,40 @@ public class OlympicCenterController { |
31 | 31 | ||
32 | @ApiOperation(value="获取整体实时数据", notes="获取整体实时数据") | 32 | @ApiOperation(value="获取整体实时数据", notes="获取整体实时数据") |
33 | @GetMapping(value = "/getRealTimeData") | 33 | @GetMapping(value = "/getRealTimeData") |
34 | public Result<Map<String,Object>> getRealTimeData(){ | 34 | public Result<Map<String,Object>> getRealTimeData(String sourceType){ |
35 | Result<Map<String,Object>> result = new Result<Map<String,Object>>(); | 35 | Result<Map<String,Object>> result = new Result<Map<String,Object>>(); |
36 | Map<String,Object> map = olympicCenterService.getRealTimeData(); | 36 | Map<String,Object> map = olympicCenterService.getRealTimeData(sourceType); |
37 | result.setResult(map); | 37 | result.setResult(map); |
38 | result.setSuccess(true); | 38 | result.setSuccess(true); |
39 | return result; | 39 | return result; |
40 | } | 40 | } |
41 | 41 | ||
42 | @ApiOperation(value="获取指标历史趋势曲线", notes="获取指标历史趋势曲线") | 42 | /** |
43 | * 获取泵站指标历史趋势曲线 | ||
44 | * @param field ssll:瞬时流量 ljll:累计流量 rll:日流量 | ||
45 | * @param sourceType feed:给水泵房 hot:热水锅炉站 fire:消防泵站 | ||
46 | * @return | ||
47 | */ | ||
48 | @ApiOperation(value="获取泵站指标历史趋势曲线", notes="获取泵站指标历史趋势曲线") | ||
43 | @GetMapping(value = "/getHistoryData") | 49 | @GetMapping(value = "/getHistoryData") |
44 | public Result<Map<String,Object>> getHistoryData(String field){ | 50 | public Result<List<EchartResult>> getHistoryData(String field,String sourceType){ |
51 | Result<List<EchartResult>> result = new Result<List<EchartResult>>(); | ||
52 | List<EchartResult> list = olympicCenterService.getHistoryData(field,sourceType); | ||
53 | result.setResult(list); | ||
54 | result.setSuccess(true); | ||
55 | return result; | ||
56 | } | ||
57 | |||
58 | /** | ||
59 | * 获取泵站指标实时数据 | ||
60 | * @param sourceType feed:给水泵房 hot:热水锅炉站 fire:消防泵站 | ||
61 | * @return | ||
62 | */ | ||
63 | @ApiOperation(value="获取泵站指标实时数据", notes="获取泵站指标实时数据") | ||
64 | @GetMapping(value = "/getBzRealTimeData") | ||
65 | public Result<Map<String,Object>> getBzRealTimeData(String sourceType){ | ||
45 | Result<Map<String,Object>> result = new Result<Map<String,Object>>(); | 66 | Result<Map<String,Object>> result = new Result<Map<String,Object>>(); |
46 | Map<String,Object> map = olympicCenterService.getHistoryData(field); | 67 | Map<String,Object> map = olympicCenterService.getBzRealTimeData(sourceType); |
47 | result.setResult(map); | 68 | result.setResult(map); |
48 | result.setSuccess(true); | 69 | result.setSuccess(true); |
49 | return result; | 70 | return result; |
... | @@ -60,12 +81,18 @@ public class OlympicCenterController { | ... | @@ -60,12 +81,18 @@ public class OlympicCenterController { |
60 | return result; | 81 | return result; |
61 | } | 82 | } |
62 | 83 | ||
63 | @ApiOperation(value="获取压力趋势图", notes="获取压力趋势图") | 84 | /** |
85 | * 获取趋势图 | ||
86 | * @param equipId | ||
87 | * @param type p:压力 f:流量计 t:温度计 | ||
88 | * @return | ||
89 | */ | ||
90 | @ApiOperation(value="获取趋势图", notes="获取趋势图") | ||
64 | @GetMapping(value = "/getPressureChart") | 91 | @GetMapping(value = "/getPressureChart") |
65 | public Result<List<EchartResult>> getPressureChart(String equipId){ | 92 | public Result<List<EchartResult>> getPressureChart(String equipId,String type){ |
66 | Result<List<EchartResult>> result = new Result<List<EchartResult>>(); | 93 | Result<List<EchartResult>> result = new Result<List<EchartResult>>(); |
67 | List<EchartResult> list = new ArrayList<EchartResult>(); | 94 | List<EchartResult> list = new ArrayList<EchartResult>(); |
68 | list = olympicCenterService.getPressureChart(equipId); | 95 | list = olympicCenterService.getPressureChart(equipId,type); |
69 | result.setResult(list); | 96 | result.setResult(list); |
70 | result.setSuccess(true); | 97 | result.setSuccess(true); |
71 | return result; | 98 | return result; | ... | ... |
... | @@ -10,11 +10,13 @@ import java.util.Map; | ... | @@ -10,11 +10,13 @@ import java.util.Map; |
10 | */ | 10 | */ |
11 | public interface IOlympicCenterService { | 11 | public interface IOlympicCenterService { |
12 | 12 | ||
13 | Map<String,Object> getRealTimeData(); | 13 | Map<String,Object> getRealTimeData(String sourceType); |
14 | 14 | ||
15 | Map<String, Object> getHistoryData(String field); | 15 | List<EchartResult> getHistoryData(String field,String sourceType); |
16 | 16 | ||
17 | List<EchartResult> getWaterChart(String sourceType, String dateType, String start, String end); | 17 | List<EchartResult> getWaterChart(String sourceType, String dateType, String start, String end); |
18 | 18 | ||
19 | List<EchartResult> getPressureChart(String equipId); | 19 | List<EchartResult> getPressureChart(String equipId,String type); |
20 | |||
21 | Map<String, Object> getBzRealTimeData(String sourceType); | ||
20 | } | 22 | } | ... | ... |
-
请 注册 或 登录 后发表评论