水质监控功能开发
正在显示
7 个修改的文件
包含
105 行增加
和
115 行删除
... | @@ -308,7 +308,7 @@ public class MaterialINController { | ... | @@ -308,7 +308,7 @@ public class MaterialINController { |
308 | } | 308 | } |
309 | result.setResult(materialIN); | 309 | result.setResult(materialIN); |
310 | result.setSuccess(true); | 310 | result.setSuccess(true); |
311 | }*/ | 311 | } |
312 | return result; | 312 | return result; |
313 | } | 313 | } |
314 | 314 | ... | ... |
... | @@ -35,6 +35,10 @@ | ... | @@ -35,6 +35,10 @@ |
35 | <groupId>org.jeecgframework.boot</groupId> | 35 | <groupId>org.jeecgframework.boot</groupId> |
36 | <artifactId>sk-base-common</artifactId> | 36 | <artifactId>sk-base-common</artifactId> |
37 | </dependency> | 37 | </dependency> |
38 | <dependency> | ||
39 | <groupId>org.jeecgframework.boot</groupId> | ||
40 | <artifactId>sk-module-system</artifactId> | ||
41 | </dependency> | ||
38 | </dependencies> | 42 | </dependencies> |
39 | 43 | ||
40 | </project> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
44 | </project> | ... | ... |
... | @@ -31,6 +31,7 @@ | ... | @@ -31,6 +31,7 @@ |
31 | <orderEntry type="module" module-name="sk-base-common" /> | 31 | <orderEntry type="module" module-name="sk-base-common" /> |
32 | <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" /> | 32 | <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" /> |
33 | <orderEntry type="library" name="Maven: com.belerweb:pinyin4j:2.5.1" level="project" /> | 33 | <orderEntry type="library" name="Maven: com.belerweb:pinyin4j:2.5.1" level="project" /> |
34 | <orderEntry type="module" module-name="sk-module-system" /> | ||
34 | <orderEntry type="library" name="Maven: com.kingtroldata:core:2.0.3" level="project" /> | 35 | <orderEntry type="library" name="Maven: com.kingtroldata:core:2.0.3" level="project" /> |
35 | <orderEntry type="library" name="Maven: org.apache.kafka:kafka-clients:2.0.1" level="project" /> | 36 | <orderEntry type="library" name="Maven: org.apache.kafka:kafka-clients:2.0.1" level="project" /> |
36 | <orderEntry type="library" name="Maven: org.lz4:lz4-java:1.4.1" level="project" /> | 37 | <orderEntry type="library" name="Maven: org.lz4:lz4-java:1.4.1" level="project" /> | ... | ... |
... | @@ -9,6 +9,7 @@ import com.skua.modules.dataAnalysis.vo.WaterQualityMonitoringDetailVO; | ... | @@ -9,6 +9,7 @@ import com.skua.modules.dataAnalysis.vo.WaterQualityMonitoringDetailVO; |
9 | import com.skua.modules.dataAnalysis.vo.WaterQualityMonitoringVO; | 9 | import com.skua.modules.dataAnalysis.vo.WaterQualityMonitoringVO; |
10 | import com.skua.modules.dataAnalysis.vo.WaterQualityParams; | 10 | import com.skua.modules.dataAnalysis.vo.WaterQualityParams; |
11 | import io.swagger.annotations.Api; | 11 | import io.swagger.annotations.Api; |
12 | import io.swagger.annotations.ApiModelProperty; | ||
12 | import io.swagger.annotations.ApiOperation; | 13 | import io.swagger.annotations.ApiOperation; |
13 | import lombok.extern.slf4j.Slf4j; | 14 | import lombok.extern.slf4j.Slf4j; |
14 | import org.springframework.beans.factory.annotation.Autowired; | 15 | import org.springframework.beans.factory.annotation.Autowired; |
... | @@ -186,18 +187,32 @@ public class FactoryCenterController { | ... | @@ -186,18 +187,32 @@ public class FactoryCenterController { |
186 | 187 | ||
187 | @ApiOperation(value="水质监控实时数据查询", notes="水质监控实时数据查询") | 188 | @ApiOperation(value="水质监控实时数据查询", notes="水质监控实时数据查询") |
188 | @GetMapping(value = "/queryMonitoringData") | 189 | @GetMapping(value = "/queryMonitoringData") |
189 | public Result<List<WaterQualityMonitoringDetailVO>> queryMonitoringData(WaterQualityParams waterQualityParams) { | 190 | public Result<WaterQualityMonitoringVO> queryMonitoringData(WaterQualityParams waterQualityParams) { |
190 | Result<List<WaterQualityMonitoringDetailVO>> result = new Result<List<WaterQualityMonitoringDetailVO>>(); | 191 | Result<WaterQualityMonitoringVO> result = new Result<WaterQualityMonitoringVO>(); |
192 | int all = 0;//全部 | ||
193 | int abnormal = 0;//异常 | ||
191 | List<WaterQualityMonitoringDetailVO> list = new ArrayList<>(); | 194 | List<WaterQualityMonitoringDetailVO> list = new ArrayList<>(); |
192 | String departIds = waterQualityParams.getDepartId(); | 195 | WaterQualityMonitoringVO res = new WaterQualityMonitoringVO(); |
196 | String departIds = ""; | ||
193 | if(waterQualityParams.getDepartId()!=null){ | 197 | if(waterQualityParams.getDepartId()!=null){ |
194 | departIds = commonSqlService.getChildFactorys(waterQualityParams.getDepartId()); | 198 | departIds = commonSqlService.getChildFactorys(waterQualityParams.getDepartId()); |
195 | }else{ | 199 | }else{ |
196 | departIds = commonSqlService.getChildFactorys(BaseContextHandler.getRealDepartId()); | 200 | departIds = commonSqlService.getChildFactorys(BaseContextHandler.getRealDepartId()); |
197 | } | 201 | } |
198 | list = factoryCenterService.queryMonitoringData(departIds,waterQualityParams.getParmType()); | 202 | list = factoryCenterService.queryMonitoringData(departIds,waterQualityParams.getParmType()); |
203 | res.setList(list); | ||
204 | all = list.size(); | ||
205 | res.setAll(String.valueOf(all)); | ||
206 | for (WaterQualityMonitoringDetailVO vo:list) { | ||
207 | if("1".equals(vo.getCodAbnormal())||"1".equals(vo.getNh3Abnormal())|| | ||
208 | "1".equals(vo.getTnAbnormal())||"1".equals(vo.getTpAbnormal())||"1".equals(vo.getPhAbnormal())){ | ||
209 | abnormal++; | ||
210 | } | ||
211 | } | ||
212 | res.setNormal(String.valueOf(all-abnormal)); | ||
213 | res.setAbnormal(String.valueOf(abnormal)); | ||
199 | result.setSuccess(true); | 214 | result.setSuccess(true); |
200 | result.setResult(list); | 215 | result.setResult(res); |
201 | return result; | 216 | return result; |
202 | } | 217 | } |
203 | } | 218 | } | ... | ... |
此文件的差异被折叠,
点击展开。
... | @@ -15,92 +15,77 @@ public class WaterQualityMonitoringDetailVO { | ... | @@ -15,92 +15,77 @@ public class WaterQualityMonitoringDetailVO { |
15 | 15 | ||
16 | @ApiModelProperty(value = "进出水类型") | 16 | @ApiModelProperty(value = "进出水类型") |
17 | private Integer num; | 17 | private Integer num; |
18 | /** | 18 | |
19 | * 进出水类型 | ||
20 | */ | ||
21 | @ApiModelProperty(value = "进出水类型") | 19 | @ApiModelProperty(value = "进出水类型") |
22 | private String parmType; | 20 | private String parmType; |
23 | /** | 21 | |
24 | * 厂id | 22 | @ApiModelProperty(value = "上级ID") |
25 | */ | 23 | private String parentId; |
24 | |||
25 | @ApiModelProperty(value = "上级名称") | ||
26 | private String parentName; | ||
27 | |||
26 | @ApiModelProperty(value = "厂id") | 28 | @ApiModelProperty(value = "厂id") |
27 | private String departId; | 29 | private String departId; |
28 | /** | 30 | |
29 | * 厂站名称 | ||
30 | */ | ||
31 | @ApiModelProperty(value = "厂站名称") | 31 | @ApiModelProperty(value = "厂站名称") |
32 | private String departName; | 32 | private String departName; |
33 | @ApiModelProperty(value = "厂区排序") | 33 | // @ApiModelProperty(value = "厂区排序") |
34 | private int departOrder; | 34 | // private int departOrder; |
35 | 35 | // | |
36 | @ApiModelProperty(value = "厂区负责人") | 36 | // @ApiModelProperty(value = "厂区负责人") |
37 | private String proPerson; | 37 | // private String proPerson; |
38 | // | ||
39 | // @ApiModelProperty(value = "厂区负责人电话") | ||
40 | // private String proPhone; | ||
38 | 41 | ||
39 | @ApiModelProperty(value = "厂区负责人电话") | ||
40 | private String proPhone; | ||
41 | /** | ||
42 | * 监测时间 | ||
43 | */ | ||
44 | @ApiModelProperty(value = "监测时间") | 42 | @ApiModelProperty(value = "监测时间") |
45 | private String monitorTime; | 43 | private String monitorTime; |
46 | /** | 44 | |
47 | * 流量 | 45 | // @ApiModelProperty(value = "流量") |
48 | */ | 46 | // private String flowVal; |
49 | @ApiModelProperty(value = "流量") | 47 | // private String flowUpper; |
50 | private String flowVal; | 48 | // private String flowLower; |
51 | private String flowUpper; | 49 | // private String flowAbnormal; |
52 | private String flowLower; | 50 | |
53 | private String flowAbnormal; | ||
54 | /** | ||
55 | * cod | ||
56 | */ | ||
57 | @ApiModelProperty(value = "cod") | 51 | @ApiModelProperty(value = "cod") |
58 | private String codVal; | 52 | private String codVal; |
59 | private String codUpper; | 53 | private String codUpper; |
60 | private String codLower; | 54 | private String codLower; |
61 | private String codAbnormal; | 55 | private String codAbnormal; |
62 | private String codWarnMessage;//预警 | 56 | // private String codWarnMessage;//预警 |
63 | /** | 57 | |
64 | * 氨氮 | ||
65 | */ | ||
66 | @ApiModelProperty(value = "氨氮") | 58 | @ApiModelProperty(value = "氨氮") |
67 | private String nh3Val; | 59 | private String nh3Val; |
68 | private String nh3Upper; | 60 | private String nh3Upper; |
69 | private String nh3Lower; | 61 | private String nh3Lower; |
70 | private String nh3Abnormal; | 62 | private String nh3Abnormal; |
71 | private String nh3WarnMessage; | 63 | // private String nh3WarnMessage; |
72 | /** | 64 | |
73 | * 总磷 | ||
74 | */ | ||
75 | @ApiModelProperty(value = "总磷") | 65 | @ApiModelProperty(value = "总磷") |
76 | private String tpVal; | 66 | private String tpVal; |
77 | private String tpUpper; | 67 | private String tpUpper; |
78 | private String tpLower; | 68 | private String tpLower; |
79 | private String tpAbnormal; | 69 | private String tpAbnormal; |
80 | private String tpWarnMessage; | 70 | // private String tpWarnMessage; |
81 | /** | 71 | |
82 | * 总氮 | ||
83 | */ | ||
84 | @ApiModelProperty(value = "总氮") | 72 | @ApiModelProperty(value = "总氮") |
85 | private String tnVal; | 73 | private String tnVal; |
86 | private String tnUpper; | 74 | private String tnUpper; |
87 | private String tnLower; | 75 | private String tnLower; |
88 | private String tnAbnormal; | 76 | private String tnAbnormal; |
89 | private String tnWarnMessage; | 77 | // private String tnWarnMessage; |
90 | /** | 78 | |
91 | * 温度 | 79 | // @ApiModelProperty(value = "温度") |
92 | */ | 80 | // private String temperatureVal; |
93 | @ApiModelProperty(value = "温度") | 81 | // private String temperatureWarnMessage; |
94 | private String temperatureVal; | 82 | |
95 | private String temperatureWarnMessage; | ||
96 | /** | ||
97 | * ph | ||
98 | */ | ||
99 | @ApiModelProperty(value = "ph") | 83 | @ApiModelProperty(value = "ph") |
100 | private String phVal; | 84 | private String phVal; |
101 | private String phUpper; | 85 | private String phUpper; |
102 | private String phLower; | 86 | private String phLower; |
103 | private String phAbnormal; | 87 | private String phAbnormal; |
88 | // private String phWarnMessage; | ||
104 | 89 | ||
105 | @ApiModelProperty(value = "浊度") | 90 | @ApiModelProperty(value = "浊度") |
106 | private String zdVal; | 91 | private String zdVal; |
... | @@ -110,55 +95,40 @@ public class WaterQualityMonitoringDetailVO { | ... | @@ -110,55 +95,40 @@ public class WaterQualityMonitoringDetailVO { |
110 | @ApiModelProperty(value = "累计流量") | 95 | @ApiModelProperty(value = "累计流量") |
111 | private String ljllVal; | 96 | private String ljllVal; |
112 | 97 | ||
98 | // @ApiModelProperty(value = "摄像头") | ||
99 | // private String cameraVal; | ||
100 | // | ||
101 | // @ApiModelProperty(value = "出水标准") | ||
102 | // private String outLevel; | ||
103 | // | ||
104 | // //是否水质正常 | ||
105 | // private String isHaveNormal; | ||
106 | // | ||
107 | // //是否水质超标 | ||
108 | // private String isHaveAbnormal; | ||
109 | // | ||
110 | // //超标指标个数 | ||
111 | // private int abnormalCount; | ||
112 | // | ||
113 | // //指标未配置 | ||
114 | // private int notConfiguredCount; | ||
115 | // | ||
116 | // //厂站指标没有配置标记 | ||
117 | // private String isNotHaveConfigured; | ||
118 | // | ||
119 | // //是否含有0值 | ||
120 | // private String isHaveZero; | ||
121 | // | ||
122 | // //是否脱机 | ||
123 | // private String isHaveOffline; | ||
124 | // | ||
125 | // //是否预警 | ||
126 | // private String isHaveWarn; | ||
127 | // | ||
128 | // //预警个数 | ||
129 | // private int abWarnCount; | ||
130 | // | ||
131 | // //离线数量 | ||
132 | // private int offLineCount; | ||
113 | 133 | ||
114 | |||
115 | /** | ||
116 | * 摄像头 | ||
117 | */ | ||
118 | @ApiModelProperty(value = "摄像头") | ||
119 | private String cameraVal; | ||
120 | /** | ||
121 | * 出水标准 | ||
122 | */ | ||
123 | @ApiModelProperty(value = "出水标准") | ||
124 | private String outLevel; | ||
125 | |||
126 | /** | ||
127 | * 是否水质正常 | ||
128 | */ | ||
129 | private String isHaveNormal; | ||
130 | /** | ||
131 | * 是否水质超标 | ||
132 | */ | ||
133 | private String isHaveAbnormal; | ||
134 | /** | ||
135 | * 超标指标个数 | ||
136 | */ | ||
137 | private int abnormalCount; | ||
138 | /** | ||
139 | * 指标未配置 | ||
140 | */ | ||
141 | private int notConfiguredCount; | ||
142 | /** | ||
143 | * 厂站指标没有配置标记 | ||
144 | */ | ||
145 | private String isNotHaveConfigured; | ||
146 | /** | ||
147 | * 是否含有0值 | ||
148 | */ | ||
149 | private String isHaveZero; | ||
150 | /** | ||
151 | * 是否脱机 | ||
152 | */ | ||
153 | private String isHaveOffline; | ||
154 | /** | ||
155 | * 是否预警 | ||
156 | */ | ||
157 | private String isHaveWarn; | ||
158 | /** | ||
159 | * 预警个数 | ||
160 | */ | ||
161 | private int abWarnCount; | ||
162 | |||
163 | private int offLineCount; | ||
164 | } | 134 | } | ... | ... |
... | @@ -11,16 +11,16 @@ import java.util.List; | ... | @@ -11,16 +11,16 @@ import java.util.List; |
11 | public class WaterQualityMonitoringVO { | 11 | public class WaterQualityMonitoringVO { |
12 | @ApiModelProperty(value = "总数") | 12 | @ApiModelProperty(value = "总数") |
13 | private String all;//全部 | 13 | private String all;//全部 |
14 | @ApiModelProperty(value = "在线") | 14 | @ApiModelProperty(value = "正常") |
15 | private String normal;//正常 | 15 | private String normal;//正常 |
16 | @ApiModelProperty(value = "异常") | 16 | @ApiModelProperty(value = "异常") |
17 | private String abnormal;//异常 | 17 | private String abnormal;//异常 |
18 | @ApiModelProperty(value = "脱机") | 18 | // @ApiModelProperty(value = "脱机") |
19 | private String offline;//脱机 | 19 | // private String offline;//脱机 |
20 | @ApiModelProperty(value = "零值") | 20 | // @ApiModelProperty(value = "零值") |
21 | private String zeroVal;//零值 | 21 | // private String zeroVal;//零值 |
22 | @ApiModelProperty(value = "预警") | 22 | // @ApiModelProperty(value = "预警") |
23 | private String warnVal;//零值 | 23 | // private String warnVal;//零值 |
24 | @ApiModelProperty(value = "水质监控明细") | 24 | @ApiModelProperty(value = "水质监控明细") |
25 | private List<WaterQualityMonitoringDetailVO> list;//明细 | 25 | private List<WaterQualityMonitoringDetailVO> list;//明细 |
26 | } | 26 | } | ... | ... |
-
请 注册 或 登录 后发表评论