奥体项目数据报表时间修改
正在显示
6 个修改的文件
包含
70 行增加
和
8 行删除
... | @@ -4,6 +4,7 @@ import com.skua.core.api.vo.Result; | ... | @@ -4,6 +4,7 @@ import com.skua.core.api.vo.Result; |
4 | import com.skua.modules.business.service.IOlympicCenterService; | 4 | import com.skua.modules.business.service.IOlympicCenterService; |
5 | import com.skua.modules.business.service.ISynthesizeService; | 5 | import com.skua.modules.business.service.ISynthesizeService; |
6 | import com.skua.modules.business.vo.EchartResult; | 6 | import com.skua.modules.business.vo.EchartResult; |
7 | import com.skua.modules.business.vo.InputQueryParams; | ||
7 | import io.swagger.annotations.Api; | 8 | import io.swagger.annotations.Api; |
8 | import io.swagger.annotations.ApiOperation; | 9 | import io.swagger.annotations.ApiOperation; |
9 | import lombok.extern.slf4j.Slf4j; | 10 | import lombok.extern.slf4j.Slf4j; |
... | @@ -204,4 +205,25 @@ public class OlympicCenterController { | ... | @@ -204,4 +205,25 @@ public class OlympicCenterController { |
204 | return result; | 205 | return result; |
205 | } | 206 | } |
206 | 207 | ||
208 | @ApiOperation(value="获取系统的压力和流量趋势图", notes="获取系统的压力和流量趋势图") | ||
209 | @GetMapping(value = "/getPumpOrFlowChart") | ||
210 | public Result<Map<String,Object>> getPumpOrFlowChart(InputQueryParams inputQueryParams){ | ||
211 | Result<Map<String,Object>> result = new Result<Map<String,Object>>(); | ||
212 | Map<String,Object> map = olympicCenterService.getPumpOrFlowChart(inputQueryParams); | ||
213 | result.setResult(map); | ||
214 | result.setSuccess(true); | ||
215 | return result; | ||
216 | } | ||
217 | |||
218 | @ApiOperation(value="获取趋势图", notes="获取趋势图") | ||
219 | @GetMapping(value = "/getHistoryTrendsByDate") | ||
220 | public Result<List<EchartResult>> getHistoryTrendsByDate(InputQueryParams inputQueryParams){ | ||
221 | Result<List<EchartResult>> result = new Result<List<EchartResult>>(); | ||
222 | List<EchartResult> list = new ArrayList<EchartResult>(); | ||
223 | list = olympicCenterService.getHistoryTrendsByDate(inputQueryParams); | ||
224 | result.setResult(list); | ||
225 | result.setSuccess(true); | ||
226 | return result; | ||
227 | } | ||
228 | |||
207 | } | 229 | } | ... | ... |
... | @@ -31,4 +31,6 @@ public interface WhatStructDataMapper { | ... | @@ -31,4 +31,6 @@ public interface WhatStructDataMapper { |
31 | List<WhatStructData> getEquipDataList(@Param("sourceType") String sourceType, @Param("pumpId") String pumpId); | 31 | List<WhatStructData> getEquipDataList(@Param("sourceType") String sourceType, @Param("pumpId") String pumpId); |
32 | 32 | ||
33 | List<WhatStructData> getEquipDataListBySource(@Param("sourceType") String sourceType); | 33 | List<WhatStructData> getEquipDataListBySource(@Param("sourceType") String sourceType); |
34 | |||
35 | List<WhatStructData> getSumEquipListBySource(@Param("sourceType") String sourceType); | ||
34 | } | 36 | } | ... | ... |
... | @@ -15,7 +15,7 @@ | ... | @@ -15,7 +15,7 @@ |
15 | </select> | 15 | </select> |
16 | 16 | ||
17 | <select id="getListByType" resultType="com.skua.modules.business.entity.WhatStructData"> | 17 | <select id="getListByType" resultType="com.skua.modules.business.entity.WhatStructData"> |
18 | select * from what_struct_data_bak | 18 | select * from what_struct_data |
19 | where 1=1 | 19 | where 1=1 |
20 | <if test="sourceType!=null and sourceType!=''"> | 20 | <if test="sourceType!=null and sourceType!=''"> |
21 | and system_code = #{sourceType} | 21 | and system_code = #{sourceType} |
... | @@ -24,44 +24,54 @@ | ... | @@ -24,44 +24,54 @@ |
24 | </select> | 24 | </select> |
25 | 25 | ||
26 | <select id="getDataList" resultType="com.skua.modules.business.entity.WhatStructData"> | 26 | <select id="getDataList" resultType="com.skua.modules.business.entity.WhatStructData"> |
27 | select * from what_struct_data_bak | 27 | select * from what_struct_data |
28 | where id LIKE CONCAT( #{equipId},'%') | 28 | where id LIKE CONCAT( #{equipId},'%') |
29 | order by monitor_sort | 29 | order by monitor_sort |
30 | </select> | 30 | </select> |
31 | 31 | ||
32 | <select id="getListForUENew" resultType="com.skua.modules.business.entity.WhatStructData"> | 32 | <select id="getListForUENew" resultType="com.skua.modules.business.entity.WhatStructData"> |
33 | select * from what_struct_data_bak order by monitor_sort | 33 | select * from what_struct_data order by monitor_sort |
34 | </select> | 34 | </select> |
35 | 35 | ||
36 | <select id="getFlowList" resultType="com.skua.modules.business.entity.WhatStructData"> | 36 | <select id="getFlowList" resultType="com.skua.modules.business.entity.WhatStructData"> |
37 | select * from what_struct_data_bak where equip_type like CONCAT('flow','%') | 37 | select * from what_struct_data where equip_type like CONCAT('flow','%') |
38 | <if test="loction!=null and loction!=''"> | 38 | <if test="loction!=null and loction!=''"> |
39 | and pump_code = #{loction} | 39 | and pump_code = #{loction} |
40 | </if> | 40 | </if> |
41 | </select> | 41 | </select> |
42 | 42 | ||
43 | <select id="getPressureList" resultType="com.skua.modules.business.entity.WhatStructData"> | 43 | <select id="getPressureList" resultType="com.skua.modules.business.entity.WhatStructData"> |
44 | select * from what_struct_data_bak where equip_type like CONCAT('pressure','%') | 44 | select * from what_struct_data where equip_type like CONCAT('pressure','%') |
45 | <if test="loction!=null and loction!=''"> | 45 | <if test="loction!=null and loction!=''"> |
46 | and pump_code = #{loction} | 46 | and pump_code = #{loction} |
47 | </if> | 47 | </if> |
48 | </select> | 48 | </select> |
49 | 49 | ||
50 | <select id="getTemperatureList" resultType="com.skua.modules.business.entity.WhatStructData"> | 50 | <select id="getTemperatureList" resultType="com.skua.modules.business.entity.WhatStructData"> |
51 | select * from what_struct_data_bak where equip_type like CONCAT('temperature','%') | 51 | select * from what_struct_data where equip_type like CONCAT('temperature','%') |
52 | <if test="loction!=null and loction!=''"> | 52 | <if test="loction!=null and loction!=''"> |
53 | and pump_code = #{loction} | 53 | and pump_code = #{loction} |
54 | </if> | 54 | </if> |
55 | </select> | 55 | </select> |
56 | 56 | ||
57 | <select id="getEquipDataList" resultType="com.skua.modules.business.entity.WhatStructData"> | 57 | <select id="getEquipDataList" resultType="com.skua.modules.business.entity.WhatStructData"> |
58 | select * from what_struct_data_bak | 58 | select * from what_struct_data |
59 | where pump_code = #{sourceType} and equip_code = #{pumpId} | 59 | where pump_code = #{sourceType} and equip_code = #{pumpId} |
60 | </select> | 60 | </select> |
61 | 61 | ||
62 | <select id="getEquipDataListBySource" resultType="com.skua.modules.business.entity.WhatStructData"> | 62 | <select id="getEquipDataListBySource" resultType="com.skua.modules.business.entity.WhatStructData"> |
63 | select * from what_struct_data_bak | 63 | select * from what_struct_data |
64 | where pump_code = #{sourceType} | 64 | where pump_code = #{sourceType} |
65 | </select> | 65 | </select> |
66 | 66 | ||
67 | <select id="getSumEquipListBySource" resultType="com.skua.modules.business.entity.WhatStructData"> | ||
68 | SELECT | ||
69 | * | ||
70 | FROM | ||
71 | what_struct_data | ||
72 | WHERE | ||
73 | system_code = #{sourceType} | ||
74 | AND is_sum = 1 | ||
75 | </select> | ||
76 | |||
67 | </mapper> | 77 | </mapper> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | package com.skua.modules.business.service; | 1 | package com.skua.modules.business.service; |
2 | 2 | ||
3 | import com.skua.modules.business.vo.EchartResult; | 3 | import com.skua.modules.business.vo.EchartResult; |
4 | import com.skua.modules.business.vo.InputQueryParams; | ||
4 | 5 | ||
5 | import java.util.List; | 6 | import java.util.List; |
6 | import java.util.Map; | 7 | import java.util.Map; |
... | @@ -39,4 +40,8 @@ public interface IOlympicCenterService { | ... | @@ -39,4 +40,8 @@ public interface IOlympicCenterService { |
39 | List<Map<String, Object>> getHistoryReportClos(String dataType, String loction); | 40 | List<Map<String, Object>> getHistoryReportClos(String dataType, String loction); |
40 | 41 | ||
41 | List<Map<String, Object>> getHistoryReportData(String dataType, String loction); | 42 | List<Map<String, Object>> getHistoryReportData(String dataType, String loction); |
43 | |||
44 | Map<String, Object> getPumpOrFlowChart(InputQueryParams inputQueryParams); | ||
45 | |||
46 | List<EchartResult> getHistoryTrendsByDate(InputQueryParams inputQueryParams); | ||
42 | } | 47 | } | ... | ... |
此文件的差异被折叠,
点击展开。
1 | package com.skua.modules.business.vo; | ||
2 | |||
3 | import lombok.Data; | ||
4 | |||
5 | /** | ||
6 | * 返回数据实体 | ||
7 | */ | ||
8 | @Data | ||
9 | public class InputQueryParams { | ||
10 | |||
11 | /**设备编码*/ | ||
12 | private String equipId; | ||
13 | /**设备类型 压力:p,流量:f,温度:t*/ | ||
14 | private String equipType; | ||
15 | /**系统类型*/ | ||
16 | private String sourceType; | ||
17 | /**时间粒度 今日:today,本周:week,本月:month,近6月:6month,自定义:custom*/ | ||
18 | private String timeType; | ||
19 | /**开始时间 yyyy-MM-DD*/ | ||
20 | private String start; | ||
21 | /**结束时间 yyyy-MM-DD*/ | ||
22 | private String end; | ||
23 | } |
-
请 注册 或 登录 后发表评论