大屏组件接口修改
正在显示
6 个修改的文件
包含
261 行增加
和
4 行删除
... | @@ -66,6 +66,16 @@ public class FactoryCenterController { | ... | @@ -66,6 +66,16 @@ public class FactoryCenterController { |
66 | return result; | 66 | return result; |
67 | } | 67 | } |
68 | 68 | ||
69 | @ApiOperation(value="厂区驾驶舱耗电量分析", notes="厂区驾驶舱耗电量分析") | ||
70 | @GetMapping(value = "/getDhData") | ||
71 | public Result<Map<String, Object>> getDhData(StatisticsParam statisticsParam) { | ||
72 | Result<Map<String, Object>> result = new Result<Map<String, Object>>(); | ||
73 | Map<String, Object> map = factoryCenterService.getDhData(statisticsParam); | ||
74 | result.setSuccess(true); | ||
75 | result.setResult(map); | ||
76 | return result; | ||
77 | } | ||
78 | |||
69 | //污水处理水量统计 | 79 | //污水处理水量统计 |
70 | @ApiOperation(value="厂区驾驶舱污水处理水量统计", notes="厂区驾驶舱污水处理水量统计") | 80 | @ApiOperation(value="厂区驾驶舱污水处理水量统计", notes="厂区驾驶舱污水处理水量统计") |
71 | @GetMapping(value = "/getWssltj") | 81 | @GetMapping(value = "/getWssltj") |
... | @@ -77,6 +87,26 @@ public class FactoryCenterController { | ... | @@ -77,6 +87,26 @@ public class FactoryCenterController { |
77 | return result; | 87 | return result; |
78 | } | 88 | } |
79 | 89 | ||
90 | @ApiOperation(value="厂区驾驶舱处理水量分析", notes="厂区驾驶舱处理水量分析") | ||
91 | @GetMapping(value = "/getSlData") | ||
92 | public Result<Map<String, Object>> getSlData(StatisticsParam statisticsParam) { | ||
93 | Result<Map<String, Object>> result = new Result<Map<String, Object>>(); | ||
94 | Map<String, Object> map = factoryCenterService.getSlData(statisticsParam); | ||
95 | result.setSuccess(true); | ||
96 | result.setResult(map); | ||
97 | return result; | ||
98 | } | ||
99 | |||
100 | @ApiOperation(value="厂区驾驶舱污水电耗统计", notes="厂区驾驶舱污水电耗统计") | ||
101 | @GetMapping(value = "/getWsDhTj") | ||
102 | public Result<Map<String, Object>> getWsDhTj(StatisticsParam statisticsParam) { | ||
103 | Result<Map<String, Object>> result = new Result<Map<String, Object>>(); | ||
104 | Map<String, Object> map = factoryCenterService.getWsDhTj(statisticsParam); | ||
105 | result.setSuccess(true); | ||
106 | result.setResult(map); | ||
107 | return result; | ||
108 | } | ||
109 | |||
80 | //厂区驾驶舱药耗统计 | 110 | //厂区驾驶舱药耗统计 |
81 | @ApiOperation(value="厂区驾驶舱药耗统计", notes="厂区驾驶舱药耗统计") | 111 | @ApiOperation(value="厂区驾驶舱药耗统计", notes="厂区驾驶舱药耗统计") |
82 | @GetMapping(value = "/getYhtj") | 112 | @GetMapping(value = "/getYhtj") |
... | @@ -88,6 +118,17 @@ public class FactoryCenterController { | ... | @@ -88,6 +118,17 @@ public class FactoryCenterController { |
88 | return result; | 118 | return result; |
89 | } | 119 | } |
90 | 120 | ||
121 | //厂区驾驶舱药耗分析 | ||
122 | @ApiOperation(value="厂区驾驶舱药耗分析", notes="厂区驾驶舱药耗分析") | ||
123 | @GetMapping(value = "/getYhData") | ||
124 | public Result<Map<String, Object>> getYhData(StatisticsParam statisticsParam) { | ||
125 | Result<Map<String, Object>> result = new Result<Map<String, Object>>(); | ||
126 | Map<String, Object> map = factoryCenterService.getYhData(statisticsParam); | ||
127 | result.setSuccess(true); | ||
128 | result.setResult(map); | ||
129 | return result; | ||
130 | } | ||
131 | |||
91 | //厂区削减量统计 | 132 | //厂区削减量统计 |
92 | @ApiOperation(value="厂区削减量统计", notes="厂区削减量统计") | 133 | @ApiOperation(value="厂区削减量统计", notes="厂区削减量统计") |
93 | @GetMapping(value = "/getXjltj") | 134 | @GetMapping(value = "/getXjltj") | ... | ... |
... | @@ -36,4 +36,19 @@ public interface FactoryCenterMapper { | ... | @@ -36,4 +36,19 @@ public interface FactoryCenterMapper { |
36 | @Param("departId") String departId, @Param("view2119") String view2119); | 36 | @Param("departId") String departId, @Param("view2119") String view2119); |
37 | 37 | ||
38 | List<Map<String, Object>> getEquiptj(@Param("departId") String departId); | 38 | List<Map<String, Object>> getEquiptj(@Param("departId") String departId); |
39 | |||
40 | Map<String, Object> getYhData(@Param("startDate") String startDate, @Param("endDate") String endDate, | ||
41 | @Param("departId") String departId, | ||
42 | @Param("dataView3a24") String dataView3a24, @Param("dataView2119") String dataView2119); | ||
43 | |||
44 | Map<String, Object> getDhData(@Param("startDate") String startDate, @Param("endDate") String endDate, | ||
45 | @Param("departId") String departId, | ||
46 | @Param("dataView3a24") String dataView3a24, @Param("dataView2119") String dataView2119); | ||
47 | |||
48 | Map<String, Object> getSlData(@Param("startDate") String startDate, @Param("endDate") String endDate, | ||
49 | @Param("departId") String departId, @Param("dataView2119") String dataView2119); | ||
50 | |||
51 | List<Map<String, Object>> getDsdhListGroupByDepart(@Param("startDate") String startDate, @Param("endDate") String endDate, | ||
52 | @Param("departId") String departId, | ||
53 | @Param("dataView3a24") String dataView3a24, @Param("dataView2119") String dataView2119); | ||
39 | } | 54 | } | ... | ... |
... | @@ -6,13 +6,16 @@ | ... | @@ -6,13 +6,16 @@ |
6 | SELECT | 6 | SELECT |
7 | LEFT ( v.time, 7 ) AS time, | 7 | LEFT ( v.time, 7 ) AS time, |
8 | round( sum( v.CSL ) / 10000, 2 ) AS clsl, | 8 | round( sum( v.CSL ) / 10000, 2 ) AS clsl, |
9 | ifnull(v2.clsl,0) as clsl_tb | 9 | ifnull(v2.clsl,0) as clsl_tb, |
10 | round( sum( v.JSL ) / 10000, 2 ) AS jsl, | ||
11 | ifnull(v2.jsl,0) as jsl_tb | ||
10 | FROM | 12 | FROM |
11 | ${view2119} v | 13 | ${view2119} v |
12 | left join ( | 14 | left join ( |
13 | SELECT | 15 | SELECT |
14 | RIGHT( LEFT ( v2119.time, 7 ), 2 ) AS time, | 16 | RIGHT( LEFT ( v2119.time, 7 ), 2 ) AS time, |
15 | round( sum( v2119.CSL ) / 10000, 2 ) AS clsl | 17 | round( sum( v2119.CSL ) / 10000, 2 ) AS clsl, |
18 | round( sum( v2119.JSL ) / 10000, 2 ) AS jsl | ||
16 | FROM | 19 | FROM |
17 | ${view2119tb} v2119 | 20 | ${view2119tb} v2119 |
18 | WHERE | 21 | WHERE |
... | @@ -293,4 +296,110 @@ | ... | @@ -293,4 +296,110 @@ |
293 | </foreach> | 296 | </foreach> |
294 | </if> | 297 | </if> |
295 | </select> | 298 | </select> |
299 | |||
300 | <select id="getYhData" resultType="java.util.HashMap"> | ||
301 | select | ||
302 | v3.zyh,v3.rjyh,ROUND(v3.zyh/v2.clsl,2) AS dsyh | ||
303 | from (select ROUND(SUM(v.CSL),2) as clsl,'yh' as type from ${dataView2119} v | ||
304 | where time >= #{startDate} and time <= #{endDate} | ||
305 | <if test="departId!=null and departId!=''"> | ||
306 | AND v.depart_id in | ||
307 | <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")"> | ||
308 | '${item}' | ||
309 | </foreach> | ||
310 | </if>) v2 | ||
311 | left join (select ROUND(SUM(IFNULL(v.PAMRJ,0)+IFNULL(v.SCLPAMZ,0)+IFNULL(v.SCLPAMF,0)+IFNULL(v.NACLO,0)+IFNULL(v.PACGT,0)+IFNULL(v.PACYT,0)+ | ||
312 | IFNULL(v.PFS,0)+IFNULL(v.FHTY,0)+IFNULL(v.RYXNJ,0)+IFNULL(v.YWL,0)+IFNULL(v.GXCLJ,0)+IFNULL(v.CH3COONA,0)+IFNULL(v.HXT,0)+IFNULL(v.FECL3,0)+ | ||
313 | IFNULL(v.SH,0)+IFNULL(v.CH3COOH,0)+IFNULL(v.FESO4G,0)+IFNULL(v.FESO4Y,0)+IFNULL(v.H2O2,0)),2) AS zyh,ROUND(AVG(IFNULL(v.PAMRJ,0)+ | ||
314 | IFNULL(v.SCLPAMZ,0)+IFNULL(v.SCLPAMF,0)+IFNULL(v.NACLO,0)+IFNULL(v.PACGT,0)+IFNULL(v.PACYT,0)+IFNULL(v.PFS,0)+IFNULL(v.FHTY,0)+ | ||
315 | IFNULL(v.RYXNJ,0)+IFNULL(v.YWL,0)+IFNULL(v.GXCLJ,0)+IFNULL(v.CH3COONA,0)+IFNULL(v.HXT,0)+IFNULL(v.FECL3,0)+IFNULL(v.SH,0)+IFNULL(v.CH3COOH,0)+ | ||
316 | IFNULL(v.FESO4G,0)+IFNULL(v.FESO4Y,0)+IFNULL(v.H2O2,0)),2) AS rjyh,'yh' as type from ${dataView3a24} v | ||
317 | where v.time >= #{startDate} and v.time <= #{endDate} | ||
318 | <if test="departId!=null and departId!=''"> | ||
319 | AND v.depart_id in | ||
320 | <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")"> | ||
321 | '${item}' | ||
322 | </foreach> | ||
323 | </if>) v3 ON v2.type = v3.type | ||
324 | </select> | ||
325 | |||
326 | <select id="getDhData" resultType="java.util.HashMap"> | ||
327 | select | ||
328 | v3.zdh,v3.rjdh,ROUND(v3.zdh/v2.clsl,2) AS dsdh | ||
329 | from (select ROUND(SUM(v.CSL),2) as clsl,'dh' as type from ${dataView2119} v | ||
330 | where time >= #{startDate} and time <= #{endDate} | ||
331 | <if test="departId!=null and departId!=''"> | ||
332 | AND v.depart_id in | ||
333 | <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")"> | ||
334 | '${item}' | ||
335 | </foreach> | ||
336 | </if>) v2 | ||
337 | left join (select ROUND(SUM(IFNULL(v.DLHJ,0)),2) AS zdh, | ||
338 | ROUND(AVG(IFNULL(v.DLHJ,0)),2) AS rjdh,'dh' as type from ${dataView3a24} v | ||
339 | where v.time >= #{startDate} and v.time <= #{endDate} | ||
340 | <if test="departId!=null and departId!=''"> | ||
341 | AND v.depart_id in | ||
342 | <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")"> | ||
343 | '${item}' | ||
344 | </foreach> | ||
345 | </if>) v3 ON v2.type = v3.type | ||
346 | </select> | ||
347 | |||
348 | <select id="getSlData" resultType="java.util.HashMap"> | ||
349 | select | ||
350 | f.sjgm, | ||
351 | v2.clsl, | ||
352 | v2.rjclsl | ||
353 | from (select ROUND(SUM(pro_scale),2) AS sjgm,'sl' AS type from sys_factory_info | ||
354 | <if test="departId!=null and departId!=''"> | ||
355 | WHERE depart_id in | ||
356 | <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")"> | ||
357 | '${item}' | ||
358 | </foreach> | ||
359 | </if> | ||
360 | ) f | ||
361 | left join ( | ||
362 | select | ||
363 | ROUND(SUM(v.CSL)/10000,2) as clsl, | ||
364 | ROUND(AVG(v.CSL)/10000,2) as rjclsl, | ||
365 | 'sl' AS type | ||
366 | from ${dataView2119} v | ||
367 | where v.time >= #{startDate} and v.time <= #{endDate} | ||
368 | <if test="departId!=null and departId!=''"> | ||
369 | AND v.depart_id in | ||
370 | <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")"> | ||
371 | '${item}' | ||
372 | </foreach> | ||
373 | </if> | ||
374 | ) v2 ON f.type = v2.type | ||
375 | </select> | ||
376 | <select id="getDsdhListGroupByDepart" resultType="java.util.HashMap"> | ||
377 | select | ||
378 | d.id AS depart_id, | ||
379 | IFNULL(ROUND(IFNULL(v3.dlhj,0)/IFNULL(v2.clsl,2),2),0) AS dsdh | ||
380 | from sys_depart d | ||
381 | left join ( | ||
382 | select SUM(v.DLHJ) AS dlhj,v.depart_id from ${dataView3a24} v | ||
383 | where v.time >= #{startDate} and v.time <= #{endDate} | ||
384 | <if test="departId!=null and departId!=''"> | ||
385 | AND v.depart_id in | ||
386 | <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")"> | ||
387 | '${item}' | ||
388 | </foreach> | ||
389 | </if> | ||
390 | GROUP BY v.depart_id | ||
391 | ) v3 on d.id = v3.depart_id | ||
392 | left join ( | ||
393 | select SUM(v.CSL) AS clsl,v.depart_id from ${dataView2119} v | ||
394 | where v.time >= #{startDate} and v.time <= #{endDate} | ||
395 | <if test="departId!=null and departId!=''"> | ||
396 | AND v.depart_id in | ||
397 | <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")"> | ||
398 | '${item}' | ||
399 | </foreach> | ||
400 | </if> | ||
401 | GROUP BY v.depart_id | ||
402 | ) v2 on d.id = v2.depart_id | ||
403 | where depart_type = '1' | ||
404 | </select> | ||
296 | </mapper> | 405 | </mapper> | ... | ... |
... | @@ -32,5 +32,13 @@ public interface IFactoryCenterService { | ... | @@ -32,5 +32,13 @@ public interface IFactoryCenterService { |
32 | List<Map<String, Object>> getSzXjltj(StatisticsParam statisticsParam); | 32 | List<Map<String, Object>> getSzXjltj(StatisticsParam statisticsParam); |
33 | 33 | ||
34 | List<Map<String, Object>> getEquiptj(StatisticsParam statisticsParam); | 34 | List<Map<String, Object>> getEquiptj(StatisticsParam statisticsParam); |
35 | |||
36 | Map<String, Object> getYhData(StatisticsParam statisticsParam); | ||
37 | |||
38 | Map<String, Object> getDhData(StatisticsParam statisticsParam); | ||
39 | |||
40 | Map<String, Object> getSlData(StatisticsParam statisticsParam); | ||
41 | |||
42 | Map<String, Object> getWsDhTj(StatisticsParam statisticsParam); | ||
35 | } | 43 | } |
36 | 44 | ... | ... |
此文件的差异被折叠,
点击展开。
1 | package com.skua.modules.report.entity; | 1 | package com.skua.modules.report.entity; |
2 | 2 | ||
3 | import java.io.Serializable; | ||
4 | import java.util.Date; | 3 | import java.util.Date; |
5 | import com.baomidou.mybatisplus.annotation.IdType; | 4 | import com.baomidou.mybatisplus.annotation.IdType; |
6 | import com.baomidou.mybatisplus.annotation.TableId; | 5 | import com.baomidou.mybatisplus.annotation.TableId; |
7 | import com.baomidou.mybatisplus.annotation.TableName; | 6 | import com.baomidou.mybatisplus.annotation.TableName; |
8 | import com.baomidou.mybatisplus.annotation.TableField; | ||
9 | import com.skua.core.aspect.annotation.Dict; | 7 | import com.skua.core.aspect.annotation.Dict; |
10 | import io.swagger.annotations.ApiModel; | 8 | import io.swagger.annotations.ApiModel; |
11 | import io.swagger.annotations.ApiModelProperty; | 9 | import io.swagger.annotations.ApiModelProperty; |
... | @@ -46,6 +44,92 @@ public class ReportTargetConfig { | ... | @@ -46,6 +44,92 @@ public class ReportTargetConfig { |
46 | @Excel(name = "药量目标", width = 15) | 44 | @Excel(name = "药量目标", width = 15) |
47 | @ApiModelProperty(value = "药量目标") | 45 | @ApiModelProperty(value = "药量目标") |
48 | private String targetDrug; | 46 | private String targetDrug; |
47 | |||
48 | /**PAC(液)目标*/ | ||
49 | @Excel(name = "PAC(液)目标", width = 15) | ||
50 | @ApiModelProperty(value = "PAC(液)目标") | ||
51 | private String targetPacyt; | ||
52 | /**PAC(固)目标*/ | ||
53 | @Excel(name = "PAC(固)目标", width = 15) | ||
54 | @ApiModelProperty(value = "PAC(固)目标") | ||
55 | private String targetPacgt; | ||
56 | /**NaClO目标*/ | ||
57 | @Excel(name = "NaClO目标", width = 15) | ||
58 | @ApiModelProperty(value = "NaClO目标") | ||
59 | private String targetNaclo; | ||
60 | /**水处理PAM(-)目标*/ | ||
61 | @Excel(name = "水处理PAM(-)目标", width = 15) | ||
62 | @ApiModelProperty(value = "水处理PAM(-)目标") | ||
63 | private String targetSclpamf; | ||
64 | /**水处理PAM(+)目标*/ | ||
65 | @Excel(name = "水处理PAM(+)目标", width = 15) | ||
66 | @ApiModelProperty(value = "水处理PAM(+)目标") | ||
67 | private String targetSclpamz; | ||
68 | /**污脱PAM乳剂目标*/ | ||
69 | @Excel(name = "污脱PAM乳剂目标", width = 15) | ||
70 | @ApiModelProperty(value = "污脱PAM乳剂目标") | ||
71 | private String targetPamrj; | ||
72 | /**污脱PAM(-)目标*/ | ||
73 | @Excel(name = "污脱PAM(-)目标", width = 15) | ||
74 | @ApiModelProperty(value = "污脱PAM(-)目标") | ||
75 | private String targetPamf; | ||
76 | /**污脱PAM(+)目标*/ | ||
77 | @Excel(name = "污脱PAM(+)目标", width = 15) | ||
78 | @ApiModelProperty(value = "污脱PAM(+)目标") | ||
79 | private String targetPamz; | ||
80 | /**PFS目标*/ | ||
81 | @Excel(name = "PFS目标", width = 15) | ||
82 | @ApiModelProperty(value = "PFS目标") | ||
83 | private String targetPfs; | ||
84 | /**复合铁盐目标*/ | ||
85 | @Excel(name = "复合铁盐目标", width = 15) | ||
86 | @ApiModelProperty(value = "复合铁盐目标") | ||
87 | private String targetFhty; | ||
88 | /**乳液絮凝剂目标*/ | ||
89 | @Excel(name = "乳液絮凝剂目标", width = 15) | ||
90 | @ApiModelProperty(value = "乳液絮凝剂目标") | ||
91 | private String targetRyxnj; | ||
92 | /**益维磷目标*/ | ||
93 | @Excel(name = "益维磷目标", width = 15) | ||
94 | @ApiModelProperty(value = "益维磷目标") | ||
95 | private String targetYwl; | ||
96 | /**高效除磷剂目标*/ | ||
97 | @Excel(name = "高效除磷剂目标", width = 15) | ||
98 | @ApiModelProperty(value = "高效除磷剂目标") | ||
99 | private String targetGxclj; | ||
100 | /**CH₃COONa目标*/ | ||
101 | @Excel(name = "CH₃COONa目标", width = 15) | ||
102 | @ApiModelProperty(value = "CH₃COONa目标") | ||
103 | private String targetCh3coona; | ||
104 | /**活性炭目标*/ | ||
105 | @Excel(name = "活性炭目标", width = 15) | ||
106 | @ApiModelProperty(value = "活性炭目标") | ||
107 | private String targetHxt; | ||
108 | /**FeCl3目标*/ | ||
109 | @Excel(name = "FeCl3目标", width = 15) | ||
110 | @ApiModelProperty(value = "FeCl3目标") | ||
111 | private String targetFecl3; | ||
112 | /**石灰目标*/ | ||
113 | @Excel(name = "石灰目标", width = 15) | ||
114 | @ApiModelProperty(value = "石灰目标") | ||
115 | private String targetSh; | ||
116 | /**CH3COOH目标*/ | ||
117 | @Excel(name = "CH3COOH目标", width = 15) | ||
118 | @ApiModelProperty(value = "CH3COOH目标") | ||
119 | private String targetCh3cooh; | ||
120 | /**FeSO4固目标*/ | ||
121 | @Excel(name = "FeSO4固目标", width = 15) | ||
122 | @ApiModelProperty(value = "FeSO4固目标") | ||
123 | private String targetFeso4g; | ||
124 | /**FeSO4液目标*/ | ||
125 | @Excel(name = "FeSO4液目标", width = 15) | ||
126 | @ApiModelProperty(value = "FeSO4液目标") | ||
127 | private String targetFeso4y; | ||
128 | /**H2O2目标*/ | ||
129 | @Excel(name = "H2O2目标", width = 15) | ||
130 | @ApiModelProperty(value = "H2O2目标") | ||
131 | private String targetH2o2; | ||
132 | |||
49 | /**所属厂区*/ | 133 | /**所属厂区*/ |
50 | @Excel(name = "所属厂区", width = 15) | 134 | @Excel(name = "所属厂区", width = 15) |
51 | @Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name") | 135 | @Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name") | ... | ... |
-
请 注册 或 登录 后发表评论