厂区驾驶舱接口开发
正在显示
11 个修改的文件
包含
466 行增加
和
3 行删除
... | @@ -83,7 +83,6 @@ | ... | @@ -83,7 +83,6 @@ |
83 | <select id="getYhylqs" resultType="java.util.HashMap"> | 83 | <select id="getYhylqs" resultType="java.util.HashMap"> |
84 | SELECT | 84 | SELECT |
85 | LEFT( v3.time, 7 ) time, | 85 | LEFT( v3.time, 7 ) time, |
86 | ( v3.time, 7 ) time, | ||
87 | (SUM( v3.NACLO ) + SUM( v3.PFS ) + SUM( v3.FHTY ) + SUM( v3.RYXNJ ) + SUM( v3.YWL ) + SUM( v3.GXCLJ ) + SUM( v3.CH3COONA ) | 86 | (SUM( v3.NACLO ) + SUM( v3.PFS ) + SUM( v3.FHTY ) + SUM( v3.RYXNJ ) + SUM( v3.YWL ) + SUM( v3.GXCLJ ) + SUM( v3.CH3COONA ) |
88 | + SUM( v3.HXT ) + SUM( v3.FECL3 ) + SUM( v3.SH ) + SUM( v3.CH3COOH ) + SUM( v3.FESO4G ) + SUM( v3.FESO4Y ) + SUM( v3.H2O2 ) ) AS zyl, | 87 | + SUM( v3.HXT ) + SUM( v3.FECL3 ) + SUM( v3.SH ) + SUM( v3.CH3COOH ) + SUM( v3.FESO4G ) + SUM( v3.FESO4Y ) + SUM( v3.H2O2 ) ) AS zyl, |
89 | v2.clsl, | 88 | v2.clsl, | ... | ... |
... | @@ -133,9 +133,9 @@ skua: | ... | @@ -133,9 +133,9 @@ skua: |
133 | web-url: http://103.85.171.27:8096 | 133 | web-url: http://103.85.171.27:8096 |
134 | path: | 134 | path: |
135 | #文件上传根目录 设置 | 135 | #文件上传根目录 设置 |
136 | upload: ../file | 136 | upload: /home/skboot/file |
137 | #webapp文件路径 | 137 | #webapp文件路径 |
138 | webapp: ../file | 138 | webapp: /home/skboot/file |
139 | # 断点续传路径 | 139 | # 断点续传路径 |
140 | chunk: /home/skboot/file/files | 140 | chunk: /home/skboot/file/files |
141 | #创蓝短信秘钥 | 141 | #创蓝短信秘钥 | ... | ... |
1 | package com.skua.modules.dataAnalysis.controller; | ||
2 | |||
3 | import com.skua.core.api.vo.Result; | ||
4 | import com.skua.modules.dataAnalysis.service.IFactoryCenterService; | ||
5 | import com.skua.modules.dataAnalysis.vo.StatisticsParam; | ||
6 | import com.skua.modules.dataAnalysis.vo.WaterQualityMonitoringDetailVO; | ||
7 | import com.skua.modules.dataAnalysis.vo.WaterQualityMonitoringVO; | ||
8 | import io.swagger.annotations.Api; | ||
9 | import io.swagger.annotations.ApiOperation; | ||
10 | import lombok.extern.slf4j.Slf4j; | ||
11 | import org.springframework.beans.factory.annotation.Autowired; | ||
12 | import org.springframework.web.bind.annotation.GetMapping; | ||
13 | import org.springframework.web.bind.annotation.RequestMapping; | ||
14 | import org.springframework.web.bind.annotation.RestController; | ||
15 | |||
16 | import java.util.HashMap; | ||
17 | import java.util.List; | ||
18 | import java.util.Map; | ||
19 | |||
20 | @Slf4j | ||
21 | @Api(tags = "厂区驾驶舱") | ||
22 | @RestController | ||
23 | @RequestMapping("/v1/factoryCenter") | ||
24 | public class FactoryCenterController { | ||
25 | |||
26 | @Autowired | ||
27 | private IFactoryCenterService factoryCenterService; | ||
28 | |||
29 | @ApiOperation(value="厂区驾驶舱实时数据查询", notes="厂区驾驶舱实时数据查询") | ||
30 | @GetMapping(value = "/getRealTimeData") | ||
31 | public Result<List<WaterQualityMonitoringDetailVO>> getRealTimeData(String departId) { | ||
32 | Result<List<WaterQualityMonitoringDetailVO>> result = new Result<List<WaterQualityMonitoringDetailVO>>(); | ||
33 | List<WaterQualityMonitoringDetailVO> list = factoryCenterService.queryMonitoringData(departId); | ||
34 | result.setSuccess(true); | ||
35 | result.setResult(list); | ||
36 | return result; | ||
37 | } | ||
38 | |||
39 | @ApiOperation(value="厂区驾驶舱统计数据", notes="厂区驾驶舱统计数据") | ||
40 | @GetMapping(value = "/getData") | ||
41 | public Result<Map<String,Object>> getData(String departId,String month) { | ||
42 | Result<Map<String,Object>> result = new Result<Map<String,Object>>(); | ||
43 | Map<String,Object> map = factoryCenterService.getData(departId,month); | ||
44 | result.setSuccess(true); | ||
45 | result.setResult(map); | ||
46 | return result; | ||
47 | } | ||
48 | |||
49 | @ApiOperation(value="厂区驾驶舱产泥量统计", notes="厂区驾驶舱产泥量统计") | ||
50 | @GetMapping(value = "/getCnltj") | ||
51 | public Result<List<Map<String, Object>>> getCnltj(StatisticsParam statisticsParam) { | ||
52 | Result<List<Map<String, Object>>> result = new Result<List<Map<String, Object>>>(); | ||
53 | List<Map<String, Object>> list = factoryCenterService.getCnltj(statisticsParam); | ||
54 | result.setSuccess(true); | ||
55 | result.setResult(list); | ||
56 | return result; | ||
57 | } | ||
58 | |||
59 | @ApiOperation(value="厂区驾驶舱耗电量统计", notes="厂区驾驶舱耗电量统计") | ||
60 | @GetMapping(value = "/getHdltj") | ||
61 | public Result<List<Map<String, Object>>> getHdltj(StatisticsParam statisticsParam) { | ||
62 | Result<List<Map<String, Object>>> result = new Result<List<Map<String, Object>>>(); | ||
63 | List<Map<String, Object>> list = factoryCenterService.getHdltj(statisticsParam); | ||
64 | result.setSuccess(true); | ||
65 | result.setResult(list); | ||
66 | return result; | ||
67 | } | ||
68 | |||
69 | //污水处理水量统计 | ||
70 | @ApiOperation(value="厂区驾驶舱污水处理水量统计", notes="厂区驾驶舱污水处理水量统计") | ||
71 | @GetMapping(value = "/getWssltj") | ||
72 | public Result<List<Map<String, Object>>> getWssltj(StatisticsParam statisticsParam) { | ||
73 | Result<List<Map<String, Object>>> result = new Result<List<Map<String, Object>>>(); | ||
74 | List<Map<String, Object>> list = factoryCenterService.getWssltj(statisticsParam); | ||
75 | result.setSuccess(true); | ||
76 | result.setResult(list); | ||
77 | return result; | ||
78 | } | ||
79 | |||
80 | //厂区驾驶舱药耗统计 | ||
81 | @ApiOperation(value="厂区驾驶舱药耗统计", notes="厂区驾驶舱药耗统计") | ||
82 | @GetMapping(value = "/getYhtj") | ||
83 | public Result<List<Map<String, Object>>> getYhtj(StatisticsParam statisticsParam) { | ||
84 | Result<List<Map<String, Object>>> result = new Result<List<Map<String, Object>>>(); | ||
85 | List<Map<String, Object>> list = factoryCenterService.getYhtj(statisticsParam); | ||
86 | result.setSuccess(true); | ||
87 | result.setResult(list); | ||
88 | return result; | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <pre> | ||
93 | * <获取指定厂站报警阈值 | ||
94 | * </pre> | ||
95 | * @return | ||
96 | */ | ||
97 | @ApiOperation(value="获取指定厂站报警阈值", notes="获取指定厂站报警阈值") | ||
98 | @GetMapping(value = "/getMonitorThreshold") | ||
99 | public Result<Map<String,Object>> getMonitorThreshold(String departId) { | ||
100 | Result<Map<String,Object>> result = new Result<Map<String,Object>>(); | ||
101 | Map<String, Object> map = factoryCenterService.getMonitorThreshold(departId); | ||
102 | result.setSuccess(true); | ||
103 | result.setResult(map); | ||
104 | return result; | ||
105 | } | ||
106 | |||
107 | @ApiOperation(value="获取水质变化趋势", notes="获取水质变化趋势") | ||
108 | @GetMapping(value = "/getHourWaterData") | ||
109 | public Result<Map<String,Object>> getHourWaterData(StatisticsParam statisticsParam) { | ||
110 | Result<Map<String,Object>> result = new Result<Map<String,Object>>(); | ||
111 | Map<String,Object> map = new HashMap<>(); | ||
112 | map = factoryCenterService.getHourWaterData(statisticsParam); | ||
113 | result.setSuccess(true); | ||
114 | result.setResult(map); | ||
115 | return result; | ||
116 | } | ||
117 | } |
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/FactoryCenterMapper.java
0 → 100644
1 | package com.skua.modules.dataAnalysis.mapper; | ||
2 | |||
3 | import com.skua.modules.system.datestandard.entity.SysMonitorMetricInfo; | ||
4 | import org.apache.ibatis.annotations.Param; | ||
5 | |||
6 | import java.util.List; | ||
7 | import java.util.Map; | ||
8 | |||
9 | public interface FactoryCenterMapper { | ||
10 | |||
11 | List<SysMonitorMetricInfo> getMonitorListByDepart(@Param("departId") String departId); | ||
12 | |||
13 | List<Map<String, Object>> getHourWaterData(@Param("departId") String departId, @Param("startDate") String startDate, @Param("endDate") String endDate); | ||
14 | } |
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/xml/FactoryCenterMapper.xml
0 → 100644
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
3 | <mapper namespace="com.skua.modules.dataAnalysis.mapper.FactoryCenterMapper"> | ||
4 | |||
5 | <select id="getMonitorListByDepart" resultType="com.skua.modules.system.datestandard.entity.SysMonitorMetricInfo"> | ||
6 | SELECT | ||
7 | * | ||
8 | FROM | ||
9 | sys_monitor_metric_info | ||
10 | WHERE | ||
11 | depart_id = #{departId} | ||
12 | AND metric_uid_tag IN ( 'JSTP', 'JSTN', 'JSPH', 'JSNH3N', 'JSCOD', 'CSTP', 'CSTN', 'CSPH', 'CSNH3N', 'CSCOD' ) | ||
13 | </select> | ||
14 | <select id="getHourWaterData" resultType="java.util.HashMap"> | ||
15 | select * from sys_monitor_metric_info | ||
16 | </select> | ||
17 | |||
18 | </mapper> |
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/service/IFactoryCenterService.java
0 → 100644
1 | package com.skua.modules.dataAnalysis.service; | ||
2 | |||
3 | import com.skua.modules.dataAnalysis.vo.StatisticsParam; | ||
4 | import com.skua.modules.dataAnalysis.vo.WaterQualityMonitoringDetailVO; | ||
5 | |||
6 | import java.util.List; | ||
7 | import java.util.Map; | ||
8 | |||
9 | public interface IFactoryCenterService { | ||
10 | |||
11 | /** | ||
12 | * 获取水质监测数据 | ||
13 | * @param departId | ||
14 | * @return | ||
15 | */ | ||
16 | List<WaterQualityMonitoringDetailVO> queryMonitoringData(String departId); | ||
17 | |||
18 | Map<String, Object> getData(String departId,String month); | ||
19 | |||
20 | List<Map<String, Object>> getCnltj(StatisticsParam statisticsParam); | ||
21 | |||
22 | List<Map<String, Object>> getHdltj(StatisticsParam statisticsParam); | ||
23 | |||
24 | List<Map<String, Object>> getWssltj(StatisticsParam statisticsParam); | ||
25 | |||
26 | List<Map<String, Object>> getYhtj(StatisticsParam statisticsParam); | ||
27 | |||
28 | Map<String, Object> getMonitorThreshold(String departId); | ||
29 | |||
30 | Map<String, Object> getHourWaterData(StatisticsParam statisticsParam); | ||
31 | } | ||
32 |
此文件的差异被折叠,
点击展开。
1 | package com.skua.modules.dataAnalysis.vo; | ||
2 | |||
3 | import io.swagger.annotations.ApiModel; | ||
4 | import io.swagger.annotations.ApiModelProperty; | ||
5 | import lombok.Data; | ||
6 | |||
7 | /** | ||
8 | * 统计功能配置表 | ||
9 | */ | ||
10 | @Data | ||
11 | @ApiModel(value="大屏接口参数", description="大屏接口参数") | ||
12 | public class StatisticsParam { | ||
13 | |||
14 | /**厂区*/ | ||
15 | @ApiModelProperty(value = "厂区") | ||
16 | private String departId; | ||
17 | /**开始时间*/ | ||
18 | @ApiModelProperty(value = "开始时间") | ||
19 | private String startDate; | ||
20 | /**结束时间*/ | ||
21 | @ApiModelProperty(value = "结束时间") | ||
22 | private String endDate; | ||
23 | } |
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/vo/WaterQualityMonitorVO.java
0 → 100644
1 | package com.skua.modules.dataAnalysis.vo; | ||
2 | |||
3 | import io.swagger.annotations.ApiModel; | ||
4 | import io.swagger.annotations.ApiModelProperty; | ||
5 | import lombok.Data; | ||
6 | |||
7 | import java.util.List; | ||
8 | import java.util.Map; | ||
9 | |||
10 | /** | ||
11 | * 调度中心vo对象 | ||
12 | * | ||
13 | */ | ||
14 | @Data | ||
15 | @ApiModel(value="调度中心vo对象", description="调度中心vo对象") | ||
16 | public class WaterQualityMonitorVO { | ||
17 | |||
18 | /** | ||
19 | * 片区id | ||
20 | */ | ||
21 | @ApiModelProperty(value = "所属片区") | ||
22 | private String areaId; | ||
23 | /** | ||
24 | * 厂id | ||
25 | */ | ||
26 | @ApiModelProperty(value = "所属厂区") | ||
27 | private String factoryId; | ||
28 | private String factoryName; | ||
29 | /** | ||
30 | * 流量 | ||
31 | */ | ||
32 | @ApiModelProperty(value = "流量") | ||
33 | private String inFlow; | ||
34 | private String outFlow; | ||
35 | private String inFlowState; | ||
36 | private String outFlowState; | ||
37 | /** | ||
38 | * cod | ||
39 | */ | ||
40 | @ApiModelProperty(value = "cod") | ||
41 | private String inCod; | ||
42 | private String outCod; | ||
43 | private String inCodState; | ||
44 | private String outCodState; | ||
45 | /** | ||
46 | * 氨氮 | ||
47 | */ | ||
48 | @ApiModelProperty(value = "氨氮") | ||
49 | private String inNh3; | ||
50 | private String outNh3; | ||
51 | private String inNh3State; | ||
52 | private String outNh3State; | ||
53 | |||
54 | /** | ||
55 | * 总磷 | ||
56 | */ | ||
57 | @ApiModelProperty(value = "总磷") | ||
58 | private String inTp; | ||
59 | private String outTp; | ||
60 | private String inTpState; | ||
61 | private String outTpState; | ||
62 | /** | ||
63 | * 总氮 | ||
64 | */ | ||
65 | @ApiModelProperty(value = "总氮") | ||
66 | private String inTn; | ||
67 | private String outTn; | ||
68 | private String inTnState; | ||
69 | private String outTnState; | ||
70 | /** | ||
71 | * ph | ||
72 | */ | ||
73 | @ApiModelProperty(value = "ph") | ||
74 | private String inPh; | ||
75 | private String outPh; | ||
76 | private String inPhState; | ||
77 | private String outPhState; | ||
78 | |||
79 | private List<Map<String,Object>> equipList; | ||
80 | |||
81 | } |
1 | package com.skua.modules.dataAnalysis.vo; | ||
2 | |||
3 | import io.swagger.annotations.ApiModel; | ||
4 | import io.swagger.annotations.ApiModelProperty; | ||
5 | import lombok.Data; | ||
6 | |||
7 | /** | ||
8 | * 水质监测明细vo对象 | ||
9 | * @author liyy | ||
10 | * | ||
11 | */ | ||
12 | @Data | ||
13 | @ApiModel(value="水质监控明细对象", description="封装水质监控明细数据") | ||
14 | public class WaterQualityMonitoringDetailVO { | ||
15 | |||
16 | @ApiModelProperty(value = "进出水类型") | ||
17 | private Integer num; | ||
18 | /** | ||
19 | * 进出水类型 | ||
20 | */ | ||
21 | @ApiModelProperty(value = "进出水类型") | ||
22 | private String parmType; | ||
23 | /** | ||
24 | * 厂id | ||
25 | */ | ||
26 | @ApiModelProperty(value = "厂id") | ||
27 | private String departId; | ||
28 | /** | ||
29 | * 厂站名称 | ||
30 | */ | ||
31 | @ApiModelProperty(value = "厂站名称") | ||
32 | private String departName; | ||
33 | @ApiModelProperty(value = "厂区排序") | ||
34 | private int departOrder; | ||
35 | |||
36 | @ApiModelProperty(value = "厂区负责人") | ||
37 | private String proPerson; | ||
38 | |||
39 | @ApiModelProperty(value = "厂区负责人电话") | ||
40 | private String proPhone; | ||
41 | /** | ||
42 | * 监测时间 | ||
43 | */ | ||
44 | @ApiModelProperty(value = "监测时间") | ||
45 | private String monitorTime; | ||
46 | /** | ||
47 | * 流量 | ||
48 | */ | ||
49 | @ApiModelProperty(value = "流量") | ||
50 | private String flowVal; | ||
51 | private String flowUpper; | ||
52 | private String flowLower; | ||
53 | private String flowAbnormal; | ||
54 | /** | ||
55 | * cod | ||
56 | */ | ||
57 | @ApiModelProperty(value = "cod") | ||
58 | private String codVal; | ||
59 | private String codUpper; | ||
60 | private String codLower; | ||
61 | private String codAbnormal; | ||
62 | private String codWarnMessage;//预警 | ||
63 | /** | ||
64 | * 氨氮 | ||
65 | */ | ||
66 | @ApiModelProperty(value = "氨氮") | ||
67 | private String nh3Val; | ||
68 | private String nh3Upper; | ||
69 | private String nh3Lower; | ||
70 | private String nh3Abnormal; | ||
71 | private String nh3WarnMessage; | ||
72 | /** | ||
73 | * 总磷 | ||
74 | */ | ||
75 | @ApiModelProperty(value = "总磷") | ||
76 | private String tpVal; | ||
77 | private String tpUpper; | ||
78 | private String tpLower; | ||
79 | private String tpAbnormal; | ||
80 | private String tpWarnMessage; | ||
81 | /** | ||
82 | * 总氮 | ||
83 | */ | ||
84 | @ApiModelProperty(value = "总氮") | ||
85 | private String tnVal; | ||
86 | private String tnUpper; | ||
87 | private String tnLower; | ||
88 | private String tnAbnormal; | ||
89 | private String tnWarnMessage; | ||
90 | /** | ||
91 | * 温度 | ||
92 | */ | ||
93 | @ApiModelProperty(value = "温度") | ||
94 | private String temperatureVal; | ||
95 | private String temperatureWarnMessage; | ||
96 | /** | ||
97 | * ph | ||
98 | */ | ||
99 | @ApiModelProperty(value = "ph") | ||
100 | private String phVal; | ||
101 | private String phUpper; | ||
102 | private String phLower; | ||
103 | private String phAbnormal; | ||
104 | /** | ||
105 | * 摄像头 | ||
106 | */ | ||
107 | @ApiModelProperty(value = "摄像头") | ||
108 | private String cameraVal; | ||
109 | /** | ||
110 | * 出水标准 | ||
111 | */ | ||
112 | @ApiModelProperty(value = "出水标准") | ||
113 | private String outLevel; | ||
114 | |||
115 | /** | ||
116 | * 是否水质正常 | ||
117 | */ | ||
118 | private String isHaveNormal; | ||
119 | /** | ||
120 | * 是否水质超标 | ||
121 | */ | ||
122 | private String isHaveAbnormal; | ||
123 | /** | ||
124 | * 超标指标个数 | ||
125 | */ | ||
126 | private int abnormalCount; | ||
127 | /** | ||
128 | * 指标未配置 | ||
129 | */ | ||
130 | private int notConfiguredCount; | ||
131 | /** | ||
132 | * 厂站指标没有配置标记 | ||
133 | */ | ||
134 | private String isNotHaveConfigured; | ||
135 | /** | ||
136 | * 是否含有0值 | ||
137 | */ | ||
138 | private String isHaveZero; | ||
139 | /** | ||
140 | * 是否脱机 | ||
141 | */ | ||
142 | private String isHaveOffline; | ||
143 | /** | ||
144 | * 是否预警 | ||
145 | */ | ||
146 | private String isHaveWarn; | ||
147 | /** | ||
148 | * 预警个数 | ||
149 | */ | ||
150 | private int abWarnCount; | ||
151 | |||
152 | private int offLineCount; | ||
153 | } |
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/vo/WaterQualityMonitoringVO.java
0 → 100644
1 | package com.skua.modules.dataAnalysis.vo; | ||
2 | |||
3 | import io.swagger.annotations.ApiModel; | ||
4 | import io.swagger.annotations.ApiModelProperty; | ||
5 | import lombok.Data; | ||
6 | |||
7 | import java.util.List; | ||
8 | |||
9 | @Data | ||
10 | @ApiModel(value="水质监控对象", description="封装水质监控数据") | ||
11 | public class WaterQualityMonitoringVO { | ||
12 | @ApiModelProperty(value = "总数") | ||
13 | private String all;//全部 | ||
14 | @ApiModelProperty(value = "在线") | ||
15 | private String normal;//正常 | ||
16 | @ApiModelProperty(value = "异常") | ||
17 | private String abnormal;//异常 | ||
18 | @ApiModelProperty(value = "脱机") | ||
19 | private String offline;//脱机 | ||
20 | @ApiModelProperty(value = "零值") | ||
21 | private String zeroVal;//零值 | ||
22 | @ApiModelProperty(value = "预警") | ||
23 | private String warnVal;//零值 | ||
24 | @ApiModelProperty(value = "水质监控明细") | ||
25 | private List<WaterQualityMonitoringDetailVO> list;//明细 | ||
26 | } |
-
请 注册 或 登录 后发表评论