节能环保报表开发
正在显示
17 个修改的文件
包含
616 行增加
和
24 行删除
... | @@ -22,8 +22,15 @@ public class DangerDatabaseResult { | ... | @@ -22,8 +22,15 @@ public class DangerDatabaseResult { |
22 | /**最近风险点*/ | 22 | /**最近风险点*/ |
23 | @ApiModelProperty(value = "最近风险点") | 23 | @ApiModelProperty(value = "最近风险点") |
24 | private String dangerLocation; | 24 | private String dangerLocation; |
25 | /**隐患排查事件数量*/ | 25 | /**是否异常*/ |
26 | @ApiModelProperty(value = "隐患排查事件数量") | 26 | @ApiModelProperty(value = "是否异常") |
27 | private String isFault; | 27 | private String isFault; |
28 | 28 | ||
29 | /**巡查人员*/ | ||
30 | @ApiModelProperty(value = "巡查人员") | ||
31 | private String dangerUser; | ||
32 | /**巡查照片*/ | ||
33 | @ApiModelProperty(value = "巡查照片") | ||
34 | private String dangerImg; | ||
35 | |||
29 | } | 36 | } | ... | ... |
... | @@ -116,10 +116,8 @@ public class ThreeDController { | ... | @@ -116,10 +116,8 @@ public class ThreeDController { |
116 | List<Object> list = new ArrayList<>(); | 116 | List<Object> list = new ArrayList<>(); |
117 | for (Map<String, Object> deviceMap : deviceList) { | 117 | for (Map<String, Object> deviceMap : deviceList) { |
118 | String status = "offline"; | 118 | String status = "offline"; |
119 | String id = String.valueOf(deviceMap.get("departId")); | ||
120 | String departName = String.valueOf(deviceMap.get("departName")); | 119 | String departName = String.valueOf(deviceMap.get("departName")); |
121 | String deviceId = String.valueOf(deviceMap.get("deviceId")); | 120 | String deviceId = String.valueOf(deviceMap.get("deviceId")); |
122 | String deviceStatus = String.valueOf(deviceMap.get("deviceStatus")); | ||
123 | String sql = "SELECT count(1) FROM realtimedata WHERE factoryname ='" + deviceId + "' AND nm like'" + "%IoStatus%'" + " AND v = '" + "1'"; | 121 | String sql = "SELECT count(1) FROM realtimedata WHERE factoryname ='" + deviceId + "' AND nm like'" + "%IoStatus%'" + " AND v = '" + "1'"; |
124 | Map<String, Object> countMap = pgDb.queryForMap(sql); | 122 | Map<String, Object> countMap = pgDb.queryForMap(sql); |
125 | Integer count = Integer.parseInt(String.valueOf(countMap.get("count"))); | 123 | Integer count = Integer.parseInt(String.valueOf(countMap.get("count"))); | ... | ... |
... | @@ -89,7 +89,8 @@ spring: | ... | @@ -89,7 +89,8 @@ spring: |
89 | connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 | 89 | connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 |
90 | datasource: | 90 | datasource: |
91 | master: | 91 | master: |
92 | url: jdbc:mysql://20.0.99.3:3306/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false&connectTimeout=60000&socketTimeout=1800 | 92 | # url: jdbc:mysql://20.0.99.3:3306/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false&connectTimeout=60000&socketTimeout=1800 |
93 | url: jdbc:mysql://47.104.179.187:6003/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false&connectTimeout=60000&socketTimeout=1800 | ||
93 | username: root | 94 | username: root |
94 | password: jkauto@123 | 95 | password: jkauto@123 |
95 | driver-class-name: com.mysql.jdbc.Driver | 96 | driver-class-name: com.mysql.jdbc.Driver | ... | ... |
... | @@ -46,10 +46,7 @@ public class FCustomReportDatasetController { | ... | @@ -46,10 +46,7 @@ public class FCustomReportDatasetController { |
46 | private ISequenceService sequenceService; | 46 | private ISequenceService sequenceService; |
47 | /** | 47 | /** |
48 | * 获取数据填报配置报表 | 48 | * 获取数据填报配置报表 |
49 | * @param fCustomReportDataset | 49 | * @param reportId |
50 | * @param pageNo | ||
51 | * @param pageSize | ||
52 | * @param req | ||
53 | * @return | 50 | * @return |
54 | */ | 51 | */ |
55 | @AutoLog(value = "数据集管理-填报报表数据集获取") | 52 | @AutoLog(value = "数据集管理-填报报表数据集获取") |
... | @@ -64,21 +61,17 @@ public class FCustomReportDatasetController { | ... | @@ -64,21 +61,17 @@ public class FCustomReportDatasetController { |
64 | } | 61 | } |
65 | /** | 62 | /** |
66 | * 分页列表查询 | 63 | * 分页列表查询 |
67 | * @param fCustomReportDataset | 64 | * @param reportId |
68 | * @param pageNo | ||
69 | * @param pageSize | ||
70 | * @param req | ||
71 | * @return | 65 | * @return |
72 | */ | 66 | */ |
73 | @AutoLog(value = "数据集管理-数据集信息树获取") | 67 | @AutoLog(value = "数据集管理-数据集信息树获取") |
74 | @ApiOperation(value="数据集管理-数据集信息树获取", notes="数据集管理-数据集信息树获取") | 68 | @ApiOperation(value="数据集管理-数据集信息树获取", notes="数据集管理-数据集信息树获取") |
75 | @GetMapping(value = "/datasetTree") | 69 | @GetMapping(value = "/datasetTree") |
76 | public Result<List<TreeData>> getDatasetTree(String reportId, | 70 | public Result<List<TreeData>> getDatasetTree(String reportId) { |
77 | HttpServletRequest req) { | ||
78 | Result<List<TreeData>> result = new Result<>(); | 71 | Result<List<TreeData>> result = new Result<>(); |
79 | //获取数据列表 | 72 | //获取数据列表 |
80 | List<FCustomReportDatasetVO> fieldList=fCustomReportDatasetService.getDatasetTree(reportId); | 73 | List<FCustomReportDatasetVO> fieldList=fCustomReportDatasetService.getDatasetTree(reportId); |
81 | 74 | ||
82 | List<FCustomReportDatasetVO> list=new ArrayList<FCustomReportDatasetVO>(); | 75 | List<FCustomReportDatasetVO> list=new ArrayList<FCustomReportDatasetVO>(); |
83 | //数据集默认添加时间、厂站字段 | 76 | //数据集默认添加时间、厂站字段 |
84 | for(FCustomReportDatasetVO vo : fieldList) { | 77 | for(FCustomReportDatasetVO vo : fieldList) { |
... | @@ -104,7 +97,7 @@ public class FCustomReportDatasetController { | ... | @@ -104,7 +97,7 @@ public class FCustomReportDatasetController { |
104 | } | 97 | } |
105 | /** | 98 | /** |
106 | * 将SysDeptUserVO对象数据填充到TransTreeModel中 | 99 | * 将SysDeptUserVO对象数据填充到TransTreeModel中 |
107 | * @param sysDeptUserVO | 100 | * @param fCustomReportDatasetVO |
108 | * @return | 101 | * @return |
109 | */ | 102 | */ |
110 | private TransTreeModel convertToTreeModel(FCustomReportDatasetVO fCustomReportDatasetVO) { | 103 | private TransTreeModel convertToTreeModel(FCustomReportDatasetVO fCustomReportDatasetVO) { |
... | @@ -137,7 +130,7 @@ public class FCustomReportDatasetController { | ... | @@ -137,7 +130,7 @@ public class FCustomReportDatasetController { |
137 | } | 130 | } |
138 | return result; | 131 | return result; |
139 | } | 132 | } |
140 | 133 | ||
141 | /** | 134 | /** |
142 | * 通过id删除 | 135 | * 通过id删除 |
143 | * @param id | 136 | * @param id |
... | @@ -155,10 +148,10 @@ public class FCustomReportDatasetController { | ... | @@ -155,10 +148,10 @@ public class FCustomReportDatasetController { |
155 | } | 148 | } |
156 | return Result.ok("删除成功!"); | 149 | return Result.ok("删除成功!"); |
157 | } | 150 | } |
158 | 151 | ||
159 | /** | 152 | /** |
160 | * 通过填报报表id删除 | 153 | * 通过填报报表id删除 |
161 | * @param id | 154 | * @param reportId |
162 | * @return | 155 | * @return |
163 | */ | 156 | */ |
164 | @AutoLog(value = "数据集管理-通过填报报表id删除") | 157 | @AutoLog(value = "数据集管理-通过填报报表id删除") |
... | @@ -173,7 +166,7 @@ public class FCustomReportDatasetController { | ... | @@ -173,7 +166,7 @@ public class FCustomReportDatasetController { |
173 | } | 166 | } |
174 | return Result.ok("删除成功!"); | 167 | return Result.ok("删除成功!"); |
175 | } | 168 | } |
176 | 169 | ||
177 | /** | 170 | /** |
178 | * 批量删除 | 171 | * 批量删除 |
179 | * @param ids | 172 | * @param ids | ... | ... |
... | @@ -4,6 +4,10 @@ import java.util.List; | ... | @@ -4,6 +4,10 @@ import java.util.List; |
4 | import java.util.Map; | 4 | import java.util.Map; |
5 | 5 | ||
6 | import com.skua.modules.custom.vo.DepartWeekReportVO; | 6 | import com.skua.modules.custom.vo.DepartWeekReportVO; |
7 | import com.skua.modules.report.vo.JnhbReportData; | ||
8 | import com.skua.modules.report.vo.JnhbReportDetailsDy; | ||
9 | import com.skua.modules.report.vo.JnhbReportDetailsHj; | ||
10 | import com.skua.modules.report.vo.JnhbReportDetailsJs; | ||
7 | import org.apache.ibatis.annotations.Param; | 11 | import org.apache.ibatis.annotations.Param; |
8 | 12 | ||
9 | import com.skua.modules.custom.entity.FCustomReportDataset; | 13 | import com.skua.modules.custom.entity.FCustomReportDataset; |
... | @@ -89,4 +93,18 @@ public interface FCustomReportDatasetMapper extends BaseMapper<FCustomReportData | ... | @@ -89,4 +93,18 @@ public interface FCustomReportDatasetMapper extends BaseMapper<FCustomReportData |
89 | @Param(value="week") String week,@Param(value="startDate") String startDate,@Param(value="endDate") String endDate); | 93 | @Param(value="week") String week,@Param(value="startDate") String startDate,@Param(value="endDate") String endDate); |
90 | 94 | ||
91 | List<DepartWeekReportVO> getWeekReportData(@Param(value="startDate") String startDate, @Param(value="endDate") String endDate); | 95 | List<DepartWeekReportVO> getWeekReportData(@Param(value="startDate") String startDate, @Param(value="endDate") String endDate); |
96 | |||
97 | List<JnhbReportData> getJnhbReport(@Param(value="dataViewName2") String dataViewName2, @Param(value="dataViewName3") String dataViewName3, | ||
98 | @Param(value="start") String start, @Param(value="end") String end); | ||
99 | |||
100 | String getChildDepartId(@Param(value="departId") String departId); | ||
101 | |||
102 | List<JnhbReportDetailsDy> getDyList(@Param(value="dataViewName2") String dataViewName2, @Param(value="dataViewName3") String dataViewName3, | ||
103 | @Param(value="departId") String departId, @Param(value="year") String year); | ||
104 | |||
105 | List<JnhbReportDetailsJs> getJsList(@Param(value="dataViewName2") String dataViewName2, @Param(value="dataViewName3") String dataViewName3, | ||
106 | @Param(value="departId") String departId, @Param(value="year") String year); | ||
107 | |||
108 | List<JnhbReportDetailsHj> getHjList(@Param(value="dataViewName2") String dataViewName2, @Param(value="dataViewName3") String dataViewName3, | ||
109 | @Param(value="departId") String departId, @Param(value="year") String year); | ||
92 | } | 110 | } | ... | ... |
... | @@ -254,4 +254,214 @@ | ... | @@ -254,4 +254,214 @@ |
254 | d.depart_order | 254 | d.depart_order |
255 | </select> | 255 | </select> |
256 | 256 | ||
257 | <select id="getJnhbReport" resultType="com.skua.modules.report.vo.JnhbReportData"> | ||
258 | SELECT | ||
259 | d.id AS depart_id, | ||
260 | d.depart_name AS depart_name, | ||
261 | f.pro_scale * v2.day_num AS wsclgm, | ||
262 | v2.clsl AS wssjcll, | ||
263 | round( 100 * ( v2.clsl / ( f.pro_scale * v2.day_num ) ), 2 ) AS wsfhl, | ||
264 | v3.dh, | ||
265 | v3.qy, | ||
266 | ROUND(0.123*v3.dh+1.4286*v3.qy,4) AS zhnyxhl, | ||
267 | ROUND(3*v3.qy+0.703*10*v3.dh,4) AS eyhtpfl, | ||
268 | ROUND( v3.dh / v2.clsl, 2 ) AS dsdh, | ||
269 | v3.wnl AS ybgfcsl, | ||
270 | v3.ybgfczl AS ybgfczl, | ||
271 | ROUND(v3.wnl*(1-v3.wnhsl/100),2) AS jgwnl, | ||
272 | v3.wfcsl AS wfcsl, | ||
273 | v3.wfczl AS wfczl | ||
274 | FROM | ||
275 | sys_depart d | ||
276 | LEFT JOIN sys_factory_info f ON f.depart_id = d.id | ||
277 | LEFT JOIN ( | ||
278 | SELECT | ||
279 | v.depart_id, | ||
280 | ROUND( SUM( v.CSL ) / 10000, 2 ) AS clsl, | ||
281 | count( v.id ) AS day_num | ||
282 | FROM | ||
283 | ${dataViewName2} v | ||
284 | WHERE | ||
285 | v.time >= #{start} AND v.time <= #{end} | ||
286 | GROUP BY | ||
287 | v.depart_id | ||
288 | ) v2 ON v2.depart_id = d.id | ||
289 | LEFT JOIN ( | ||
290 | SELECT | ||
291 | v.depart_id, | ||
292 | ROUND( SUM( v.DLHJ ) / 10000, 2 ) AS dh, | ||
293 | ROUND( SUM( v.GFFDL ) / 10000, 2 ) AS gffdl, | ||
294 | ROUND( SUM( v.QY ) / 10000, 2 ) AS qy, | ||
295 | ROUND( SUM( v.WNL ), 2 ) AS wnl, | ||
296 | ROUND( AVG( v.WNHSL ), 2 ) AS wnhsl, | ||
297 | ROUND( SUM( v.GFCZL ), 2 ) AS ybgfczl, | ||
298 | ROUND( SUM( v.WFCSL ), 2 ) AS wfcsl, | ||
299 | ROUND( SUM( v.WFCZL ), 2 ) AS wfczl | ||
300 | FROM | ||
301 | ${dataViewName3} v | ||
302 | WHERE | ||
303 | v.time >= #{start} AND v.time <= #{end} | ||
304 | GROUP BY | ||
305 | v.depart_id | ||
306 | ) v3 ON v3.depart_id = d.id | ||
307 | WHERE | ||
308 | d.depart_type = 1 | ||
309 | ORDER BY | ||
310 | d.depart_order | ||
311 | </select> | ||
312 | <select id="getChildDepartId" resultType="java.lang.String"> | ||
313 | SELECT | ||
314 | GROUP_CONCAT( id SEPARATOR ',' ) AS depart_ids | ||
315 | FROM | ||
316 | sys_depart | ||
317 | WHERE | ||
318 | parent_id IN | ||
319 | <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")"> | ||
320 | '${item}' | ||
321 | </foreach> | ||
322 | OR id IN | ||
323 | <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")"> | ||
324 | '${item}' | ||
325 | </foreach> | ||
326 | OR parent_id IN ( SELECT id FROM sys_depart WHERE parent_id IN | ||
327 | <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")"> | ||
328 | '${item}' | ||
329 | </foreach> | ||
330 | ) | ||
331 | </select> | ||
332 | <select id="getDyList" resultType="com.skua.modules.report.vo.JnhbReportDetailsDy"> | ||
333 | SELECT | ||
334 | RIGHT(LEFT( v.time, 7 ),2) AS time, | ||
335 | v2.sjwscll, | ||
336 | v2.rwscll, | ||
337 | v2.scsj, | ||
338 | ROUND(v2.scsj*f.pro_scale,2) AS wsclnl, | ||
339 | ROUND( SUM( v.DLHJ ) / 10000, 2 ) AS dl, | ||
340 | ROUND( SUM( v.GFFDL ), 2 ) AS gffdl, | ||
341 | ROUND( SUM( v.QY ), 2 ) AS qy, | ||
342 | ROUND( SUM( v.HXT ), 2 ) AS hxtsyl, | ||
343 | ROUND( SUM( v.SH ), 2 ) AS shsyl, | ||
344 | ROUND( SUM( v.PAMRJ ), 2 ) AS xnjpam, | ||
345 | ROUND( SUM( v.PACGT ), 2 ) AS xnjpac, | ||
346 | ROUND( SUM( v.SCLPAMF+v.SCLPAMZ+v.PAMF+v.PAMZ ), 2 ) AS xnjqt, | ||
347 | ROUND( SUM( v.YSL ), 2 ) AS xssyl, | ||
348 | ROUND( SUM( v.WNL ), 2 ) AS ybgfcsl, | ||
349 | ROUND( AVG( v.WNHSL ), 2 ) AS wnhsl, | ||
350 | ROUND( SUM( v.GFCZL ), 2 ) AS ybagfczl, | ||
351 | ROUND( SUM( v.WNL )*(1-AVG( v.WNHSL ))) AS jgnl, | ||
352 | ROUND( SUM( v.WFCSL ), 2 ) AS wxfwcsl, | ||
353 | ROUND( SUM( v.WFCZL ), 2 ) AS wxfwczl | ||
354 | FROM | ||
355 | ${dataViewName3} v | ||
356 | LEFT JOIN ( | ||
357 | SELECT | ||
358 | LEFT ( v.time, 7 ) AS time, | ||
359 | ROUND( SUM( v.CSL )/10000, 2 ) AS sjwscll, | ||
360 | ROUND( AVG( v.CSL )/10000, 2 ) AS rwscll, | ||
361 | count( v.id ) AS scsj | ||
362 | FROM | ||
363 | ${dataViewName2} v | ||
364 | WHERE | ||
365 | v.time LIKE CONCAT(#{year}, '%') | ||
366 | AND v.depart_id = #{departId} | ||
367 | GROUP BY | ||
368 | LEFT ( v.time, 7 ) | ||
369 | ) v2 ON v2.time = LEFT( v.time, 7 ) | ||
370 | LEFT JOIN sys_factory_info f ON f.depart_id = v.depart_id | ||
371 | WHERE | ||
372 | v.time LIKE CONCAT(#{year}, '%') | ||
373 | AND v.depart_id = #{departId} | ||
374 | GROUP BY | ||
375 | LEFT ( v.time, 7 ) | ||
376 | </select> | ||
377 | <select id="getJsList" resultType="com.skua.modules.report.vo.JnhbReportDetailsJs"> | ||
378 | SELECT | ||
379 | RIGHT(LEFT( v.time, 7 ),2) AS time, | ||
380 | v2.sjwscll, | ||
381 | v2.rwscll, | ||
382 | v2.scsj, | ||
383 | ROUND(v2.scsj*f.pro_scale,2) AS wsclnl, | ||
384 | ROUND( SUM( v.DLHJ ) / 10000, 2 ) AS dl, | ||
385 | ROUND( SUM( v.GFFDL ), 2 ) AS gffdl, | ||
386 | ROUND( SUM( v.QY ), 2 ) AS qy, | ||
387 | ROUND( SUM( v.HXT ), 2 ) AS hxtsyl, | ||
388 | ROUND( SUM( v.SH ), 2 ) AS shsyl, | ||
389 | ROUND( SUM( v.PAMRJ ), 2 ) AS xnjpam, | ||
390 | ROUND( SUM( v.PACGT ), 2 ) AS xnjpac, | ||
391 | ROUND( SUM( v.SCLPAMF+v.SCLPAMZ+v.PAMF+v.PAMZ ), 2 ) AS xnjqt, | ||
392 | ROUND( SUM( v.YSL ), 2 ) AS xssyl, | ||
393 | ROUND( SUM( v.WNL ), 2 ) AS ybgfcsl, | ||
394 | ROUND( AVG( v.WNHSL ), 2 ) AS wnhsl, | ||
395 | ROUND( SUM( v.GFCZL ), 2 ) AS ybagfczl, | ||
396 | ROUND( SUM( v.WNL )*(1-AVG( v.WNHSL ))) AS jgnl, | ||
397 | ROUND( SUM( v.WFCSL ), 2 ) AS wxfwcsl, | ||
398 | ROUND( SUM( v.WFCZL ), 2 ) AS wxfwczl | ||
399 | FROM | ||
400 | ${dataViewName3} v | ||
401 | LEFT JOIN ( | ||
402 | SELECT | ||
403 | LEFT ( v.time, 7 ) AS time, | ||
404 | ROUND( SUM( v.CSL )/10000, 2 ) AS sjwscll, | ||
405 | ROUND( AVG( v.CSL )/10000, 2 ) AS rwscll, | ||
406 | count( v.id ) AS scsj | ||
407 | FROM | ||
408 | ${dataViewName2} v | ||
409 | WHERE | ||
410 | v.time LIKE CONCAT(#{year}, '%') | ||
411 | AND v.depart_id = #{departId} | ||
412 | GROUP BY | ||
413 | LEFT ( v.time, 7 ) | ||
414 | ) v2 ON v2.time = LEFT( v.time, 7 ) | ||
415 | LEFT JOIN sys_factory_info f ON f.depart_id = v.depart_id | ||
416 | WHERE | ||
417 | v.time LIKE CONCAT(#{year}, '%') | ||
418 | AND v.depart_id = #{departId} | ||
419 | GROUP BY | ||
420 | LEFT ( v.time, 7 ) | ||
421 | </select> | ||
422 | <select id="getHjList" resultType="com.skua.modules.report.vo.JnhbReportDetailsHj"> | ||
423 | SELECT | ||
424 | RIGHT(LEFT( v.time, 7 ),2) AS time, | ||
425 | v2.sjwscll, | ||
426 | v2.rwscll, | ||
427 | v2.scsj, | ||
428 | ROUND(v2.scsj*f.pro_scale,2) AS wsclnl, | ||
429 | ROUND( SUM( v.DLHJ ) / 10000, 2 ) AS dl, | ||
430 | ROUND( SUM( v.GFFDL ), 2 ) AS gffdl, | ||
431 | ROUND( SUM( v.QY ), 2 ) AS qy, | ||
432 | ROUND( SUM( v.HXT ), 2 ) AS hxtsyl, | ||
433 | ROUND( SUM( v.SH ), 2 ) AS shsyl, | ||
434 | ROUND( SUM( v.PAMRJ ), 2 ) AS xnjpam, | ||
435 | ROUND( SUM( v.PACGT ), 2 ) AS xnjpac, | ||
436 | ROUND( SUM( v.SCLPAMF+v.SCLPAMZ+v.PAMF+v.PAMZ ), 2 ) AS xnjqt, | ||
437 | ROUND( SUM( v.YSL ), 2 ) AS xssyl, | ||
438 | ROUND( SUM( v.WNL ), 2 ) AS ybgfcsl, | ||
439 | ROUND( AVG( v.WNHSL ), 2 ) AS wnhsl, | ||
440 | ROUND( SUM( v.GFCZL ), 2 ) AS ybagfczl, | ||
441 | ROUND( SUM( v.WNL )*(1-AVG( v.WNHSL ))) AS jgnl, | ||
442 | ROUND( SUM( v.WFCSL ), 2 ) AS wxfwcsl, | ||
443 | ROUND( SUM( v.WFCZL ), 2 ) AS wxfwczl | ||
444 | FROM | ||
445 | ${dataViewName3} v | ||
446 | LEFT JOIN ( | ||
447 | SELECT | ||
448 | LEFT ( v.time, 7 ) AS time, | ||
449 | ROUND( SUM( v.CSL )/10000, 2 ) AS sjwscll, | ||
450 | ROUND( AVG( v.CSL )/10000, 2 ) AS rwscll, | ||
451 | count( v.id ) AS scsj | ||
452 | FROM | ||
453 | ${dataViewName2} v | ||
454 | WHERE | ||
455 | v.time LIKE CONCAT(#{year}, '%') | ||
456 | AND v.depart_id = #{departId} | ||
457 | GROUP BY | ||
458 | LEFT ( v.time, 7 ) | ||
459 | ) v2 ON v2.time = LEFT( v.time, 7 ) | ||
460 | LEFT JOIN sys_factory_info f ON f.depart_id = v.depart_id | ||
461 | WHERE | ||
462 | v.time LIKE CONCAT(#{year}, '%') | ||
463 | AND v.depart_id = #{departId} | ||
464 | GROUP BY | ||
465 | LEFT ( v.time, 7 ) | ||
466 | </select> | ||
257 | </mapper> | 467 | </mapper> | ... | ... |
... | @@ -6,6 +6,7 @@ import java.util.Map; | ... | @@ -6,6 +6,7 @@ import java.util.Map; |
6 | import com.baomidou.mybatisplus.extension.service.IService; | 6 | import com.baomidou.mybatisplus.extension.service.IService; |
7 | import com.skua.modules.custom.entity.FCustomReportDataset; | 7 | import com.skua.modules.custom.entity.FCustomReportDataset; |
8 | import com.skua.modules.custom.vo.FCustomReportDatasetVO; | 8 | import com.skua.modules.custom.vo.FCustomReportDatasetVO; |
9 | import com.skua.modules.report.vo.JnhbReportData; | ||
9 | 10 | ||
10 | /** | 11 | /** |
11 | * 数据集管理 | 12 | * 数据集管理 |
... | @@ -91,4 +92,10 @@ public interface IFCustomReportDatasetService extends IService<FCustomReportData | ... | @@ -91,4 +92,10 @@ public interface IFCustomReportDatasetService extends IService<FCustomReportData |
91 | Map<String, Object> getWeekReport(String dataTime, String departId, String week); | 92 | Map<String, Object> getWeekReport(String dataTime, String departId, String week); |
92 | 93 | ||
93 | Map<String, Object> reportWeekShow(String dataTime, String week); | 94 | Map<String, Object> reportWeekShow(String dataTime, String week); |
95 | |||
96 | //节能环保统计报表 | ||
97 | List<JnhbReportData> jnhbReportShow(String departId, String month); | ||
98 | |||
99 | //节能环保统计报表明细 | ||
100 | Map<String, Object> jnhbReportDetails(String departId, String month); | ||
94 | } | 101 | } | ... | ... |
... | @@ -13,13 +13,20 @@ import java.time.format.DateTimeFormatter; | ... | @@ -13,13 +13,20 @@ import java.time.format.DateTimeFormatter; |
13 | import java.time.temporal.TemporalAdjusters; | 13 | import java.time.temporal.TemporalAdjusters; |
14 | import java.time.temporal.WeekFields; | 14 | import java.time.temporal.WeekFields; |
15 | import java.util.*; | 15 | import java.util.*; |
16 | import java.util.stream.Collectors; | ||
16 | 17 | ||
18 | import com.skua.modules.report.vo.JnhbReportData; | ||
19 | import com.skua.modules.report.vo.JnhbReportDetailsDy; | ||
20 | import com.skua.modules.report.vo.JnhbReportDetailsHj; | ||
21 | import com.skua.modules.report.vo.JnhbReportDetailsJs; | ||
17 | import org.springframework.beans.factory.annotation.Autowired; | 22 | import org.springframework.beans.factory.annotation.Autowired; |
18 | import org.springframework.jdbc.core.JdbcTemplate; | 23 | import org.springframework.jdbc.core.JdbcTemplate; |
19 | import org.springframework.stereotype.Service; | 24 | import org.springframework.stereotype.Service; |
20 | 25 | ||
21 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 26 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
22 | 27 | ||
28 | import javax.annotation.Resource; | ||
29 | |||
23 | /** | 30 | /** |
24 | * 数据集管理 | 31 | * 数据集管理 |
25 | */ | 32 | */ |
... | @@ -208,6 +215,35 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa | ... | @@ -208,6 +215,35 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa |
208 | } | 215 | } |
209 | 216 | ||
210 | @Override | 217 | @Override |
218 | public List<JnhbReportData> jnhbReportShow(String departId, String month) { | ||
219 | String start = month.substring(0,4)+"-01-31"; | ||
220 | String end = month + "-31"; | ||
221 | String departIds = mapper.getChildDepartId(departId); | ||
222 | String dataViewName2 = ReportViewUtil.buildView("2119ecbf53a1d2d0708258ff67cfd9e1","CSL", departIds, start, end); | ||
223 | String dataViewName3 = ReportViewUtil.buildView("3a243d5715b9e1a3753c180872ca0df9","DLHJ,GFFDL,QY,WNL,WNHSL,GFCZL,WFCSL,WFCZL", departIds, start, end); | ||
224 | List<JnhbReportData> list = mapper.getJnhbReport(dataViewName2, dataViewName3, start, end); | ||
225 | return list; | ||
226 | } | ||
227 | |||
228 | @Override | ||
229 | public Map<String, Object> jnhbReportDetails(String departId, String month) { | ||
230 | Map<String, Object> map = new HashMap<>(); | ||
231 | List<JnhbReportDetailsDy> dyList = new ArrayList<>(); | ||
232 | List<JnhbReportDetailsJs> jsList = new ArrayList<>(); | ||
233 | List<JnhbReportDetailsHj> hjList = new ArrayList<>(); | ||
234 | String year = month.substring(0,4); | ||
235 | String dataViewName2 = ReportViewUtil.buildViewLike("2119ecbf53a1d2d0708258ff67cfd9e1","CSL", departId, year); | ||
236 | String dataViewName3 = ReportViewUtil.buildViewLike("3a243d5715b9e1a3753c180872ca0df9","", departId, year); | ||
237 | dyList = mapper.getDyList(dataViewName2, dataViewName3, departId, year); | ||
238 | jsList = mapper.getJsList(dataViewName2, dataViewName3, departId, year); | ||
239 | hjList = mapper.getHjList(dataViewName2, dataViewName3, departId, year); | ||
240 | map.put("zbtj",dyList); | ||
241 | map.put("zbfx",jsList); | ||
242 | map.put("zblj",hjList); | ||
243 | return map; | ||
244 | } | ||
245 | |||
246 | @Override | ||
211 | public Map<String, Object> reportWeekShow(String dataTime, String week) { | 247 | public Map<String, Object> reportWeekShow(String dataTime, String week) { |
212 | Map<String, Object> map = new HashMap<>(); | 248 | Map<String, Object> map = new HashMap<>(); |
213 | List<DepartWeekReportVO> list = new ArrayList<>(); | 249 | List<DepartWeekReportVO> list = new ArrayList<>(); |
... | @@ -231,4 +267,5 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa | ... | @@ -231,4 +267,5 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa |
231 | return map; | 267 | return map; |
232 | } | 268 | } |
233 | 269 | ||
270 | |||
234 | } | 271 | } | ... | ... |
... | @@ -9,6 +9,7 @@ import com.skua.core.util.ConvertUtils; | ... | @@ -9,6 +9,7 @@ import com.skua.core.util.ConvertUtils; |
9 | import com.skua.core.util.DateUtils; | 9 | import com.skua.core.util.DateUtils; |
10 | import com.skua.modules.custom.service.IFCustomReportDatasetService; | 10 | import com.skua.modules.custom.service.IFCustomReportDatasetService; |
11 | import com.skua.modules.report.service.IReportDataService; | 11 | import com.skua.modules.report.service.IReportDataService; |
12 | import com.skua.modules.report.vo.JnhbReportData; | ||
12 | import io.swagger.annotations.Api; | 13 | import io.swagger.annotations.Api; |
13 | import io.swagger.annotations.ApiOperation; | 14 | import io.swagger.annotations.ApiOperation; |
14 | import lombok.extern.slf4j.Slf4j; | 15 | import lombok.extern.slf4j.Slf4j; |
... | @@ -166,4 +167,24 @@ public class ReportDataController { | ... | @@ -166,4 +167,24 @@ public class ReportDataController { |
166 | return result; | 167 | return result; |
167 | } | 168 | } |
168 | 169 | ||
170 | @AutoLog(value = "能源节约与生态环境保护统计表展示") | ||
171 | @ApiOperation(value = "能源节约与生态环境保护统计表展示", notes = "能源节约与生态环境保护统计表展示") | ||
172 | @GetMapping(value = "/jnhbReportShow") | ||
173 | public Result<List<JnhbReportData>> jnhbReportShow(String departId, String month) { | ||
174 | Result<List<JnhbReportData>> result = new Result<>(); | ||
175 | List<JnhbReportData> list = fCustomReportDatasetService.jnhbReportShow(departId,month); | ||
176 | result.setResult(list); | ||
177 | return result; | ||
178 | } | ||
179 | |||
180 | @AutoLog(value = "能源节约与生态环境保护统计表明细展示") | ||
181 | @ApiOperation(value = "能源节约与生态环境保护统计表明细展示", notes = "能源节约与生态环境保护统计表明细展示") | ||
182 | @GetMapping(value = "/jnhbReportDetails") | ||
183 | public Result<Map<String,Object>> jnhbReportDetails(String departId, String month) { | ||
184 | Result<Map<String,Object>> result = new Result<>(); | ||
185 | Map<String,Object> map = fCustomReportDatasetService.jnhbReportDetails(departId,month); | ||
186 | result.setResult(map); | ||
187 | return result; | ||
188 | } | ||
189 | |||
169 | } | 190 | } | ... | ... |
1 | package com.skua.modules.report.vo; | ||
2 | |||
3 | import io.swagger.annotations.ApiModelProperty; | ||
4 | import lombok.Data; | ||
5 | |||
6 | /** | ||
7 | * 报表展示 | ||
8 | */ | ||
9 | @Data | ||
10 | public class JnhbReportData { | ||
11 | |||
12 | /**所属厂区*/ | ||
13 | @ApiModelProperty(value = "所属厂区") | ||
14 | private String departId; | ||
15 | /**厂区名称*/ | ||
16 | @ApiModelProperty(value = "厂区名称") | ||
17 | private String departName; | ||
18 | /**污水处理量规模*/ | ||
19 | @ApiModelProperty(value = "污水处理量规模(万吨)") | ||
20 | private String wsclgm; | ||
21 | /**实际污水处理量*/ | ||
22 | @ApiModelProperty(value = "实际污水处理量(万吨)") | ||
23 | private String wssjcll; | ||
24 | /**系统负荷率*/ | ||
25 | @ApiModelProperty(value = "系统负荷率(%)") | ||
26 | private String wsfhl; | ||
27 | /**电耗*/ | ||
28 | @ApiModelProperty(value = "电耗(万千瓦时)") | ||
29 | private String dh; | ||
30 | /**光伏发电量(万千瓦时)*/ | ||
31 | @ApiModelProperty(value = "光伏发电量(万千瓦时)") | ||
32 | private String gffdl; | ||
33 | /**汽油*/ | ||
34 | @ApiModelProperty(value = "汽油(吨)") | ||
35 | private String qy; | ||
36 | /**综合能源消费量*/ | ||
37 | @ApiModelProperty(value = "综合能源消费量(吨标准煤)") | ||
38 | private String zhnyxhl; | ||
39 | /**二氧化碳排放量*/ | ||
40 | @ApiModelProperty(value = "二氧化碳排放量(吨CO2当量)") | ||
41 | private String eyhtpfl; | ||
42 | /**吨水电耗*/ | ||
43 | @ApiModelProperty(value = "吨水电耗(千瓦时/吨)") | ||
44 | private String dsdh; | ||
45 | /**COD消减量*/ | ||
46 | @ApiModelProperty(value = "COD消减量(吨)") | ||
47 | private String codxjl; | ||
48 | /**NH3-N消减量*/ | ||
49 | @ApiModelProperty(value = "NH3-N消减量(吨)") | ||
50 | private String adxjl; | ||
51 | /**TP消减量*/ | ||
52 | @ApiModelProperty(value = "TP消减量(吨)") | ||
53 | private String tpxjl; | ||
54 | /**TN消减量*/ | ||
55 | @ApiModelProperty(value = "TN消减量(吨)") | ||
56 | private String tnxjl; | ||
57 | /**一般固废产生量*/ | ||
58 | @ApiModelProperty(value = "一般固废产生量(吨)") | ||
59 | private String ybgfcsl; | ||
60 | /**一般固废处置量*/ | ||
61 | @ApiModelProperty(value = "一般固废处置量(吨)") | ||
62 | private String ybgfczl; | ||
63 | /**绝干泥量*/ | ||
64 | @ApiModelProperty(value = "绝干泥量(吨)") | ||
65 | private String jgwnl; | ||
66 | /**危险废物产生量*/ | ||
67 | @ApiModelProperty(value = "危险废物产生量(吨)") | ||
68 | private String wfcsl; | ||
69 | /**危险废物处置量*/ | ||
70 | @ApiModelProperty(value = "危险废物处置量(吨)") | ||
71 | private String wfczl; | ||
72 | |||
73 | } |
1 | package com.skua.modules.report.vo; | ||
2 | |||
3 | import io.swagger.annotations.ApiModelProperty; | ||
4 | import lombok.Data; | ||
5 | |||
6 | /** | ||
7 | * 报表展示 | ||
8 | */ | ||
9 | @Data | ||
10 | public class JnhbReportDetailsDy { | ||
11 | |||
12 | @ApiModelProperty(value = "生产时间(天)") | ||
13 | private String scsj; | ||
14 | @ApiModelProperty(value = "日污水处理能力(万吨/天)") | ||
15 | private String rwscll; | ||
16 | @ApiModelProperty(value = "污水处理能力(万吨/月)") | ||
17 | private String wsclnl; | ||
18 | @ApiModelProperty(value = "实际污水处理量(万吨)") | ||
19 | private String sjwscll; | ||
20 | @ApiModelProperty(value = "电力(万千瓦时)") | ||
21 | private String dl; | ||
22 | @ApiModelProperty(value = "光伏发电量(万千瓦时)") | ||
23 | private String gffdl; | ||
24 | @ApiModelProperty(value = "汽油(吨)") | ||
25 | private String qy; | ||
26 | @ApiModelProperty(value = "活性炭使用量(吨)") | ||
27 | private String hxtsyl; | ||
28 | @ApiModelProperty(value = "石灰使用量(吨)") | ||
29 | private String shsyl; | ||
30 | @ApiModelProperty(value = "絮凝剂PAM(按浓度折减后,吨)") | ||
31 | private String xnjpam; | ||
32 | @ApiModelProperty(value = "絮凝剂PAC(按浓度折减后,吨)") | ||
33 | private String xnjpac; | ||
34 | @ApiModelProperty(value = "絮凝剂其他(按浓度折减后,吨)") | ||
35 | private String xnjqt; | ||
36 | @ApiModelProperty(value = "新水使用量(吨)") | ||
37 | private String xssyl; | ||
38 | @ApiModelProperty(value = "一般固废产生量(含水份,吨)") | ||
39 | private String ybgfcsl; | ||
40 | @ApiModelProperty(value = "一般固废处置量(含水份,吨)") | ||
41 | private String ybgfczl; | ||
42 | @ApiModelProperty(value = "污泥含水率(%)") | ||
43 | private String wnhsl; | ||
44 | @ApiModelProperty(value = "绝干泥量(吨)") | ||
45 | private String jgnl; | ||
46 | @ApiModelProperty(value = "危险废物产生量(吨)") | ||
47 | private String wxfwcsl; | ||
48 | @ApiModelProperty(value = "危险废物处置量(吨)") | ||
49 | private String wxfwczl; | ||
50 | @ApiModelProperty(value = "进水COD量(吨)") | ||
51 | private String jscodl; | ||
52 | @ApiModelProperty(value = "出水COD量(吨)") | ||
53 | private String cscodl; | ||
54 | @ApiModelProperty(value = "进水NH3-N量(吨)") | ||
55 | private String jsadl; | ||
56 | @ApiModelProperty(value = "出水NH3-N量(吨)") | ||
57 | private String csadl; | ||
58 | @ApiModelProperty(value = "进水TP量(吨)") | ||
59 | private String jstpl; | ||
60 | @ApiModelProperty(value = "出水TP量(吨)") | ||
61 | private String cstpl; | ||
62 | @ApiModelProperty(value = "进水TN量(吨)") | ||
63 | private String jstnl; | ||
64 | @ApiModelProperty(value = "出水TN量(吨)") | ||
65 | private String cstnl; | ||
66 | |||
67 | |||
68 | } |
1 | package com.skua.modules.report.vo; | ||
2 | |||
3 | import io.swagger.annotations.ApiModelProperty; | ||
4 | import lombok.Data; | ||
5 | |||
6 | /** | ||
7 | * 报表展示 | ||
8 | */ | ||
9 | @Data | ||
10 | public class JnhbReportDetailsHj { | ||
11 | |||
12 | @ApiModelProperty(value = "污水处理设计能力(万吨/月)") | ||
13 | private String wsclsjnl; | ||
14 | @ApiModelProperty(value = "实际污水处理量(万吨)") | ||
15 | private String scsj; | ||
16 | @ApiModelProperty(value = "电力(万千瓦时)") | ||
17 | private String dl; | ||
18 | @ApiModelProperty(value = "光伏发电量(万千瓦时)") | ||
19 | private String gffdl; | ||
20 | @ApiModelProperty(value = "汽油(吨)") | ||
21 | private String qy; | ||
22 | @ApiModelProperty(value = "活性炭使用量(吨)") | ||
23 | private String hxtsyl; | ||
24 | @ApiModelProperty(value = "石灰使用量(吨)") | ||
25 | private String shsyl; | ||
26 | @ApiModelProperty(value = "絮凝剂PAM(按浓度折减后,吨)") | ||
27 | private String xnjpam; | ||
28 | @ApiModelProperty(value = "絮凝剂PAC(按浓度折减后,吨)") | ||
29 | private String xnjpac; | ||
30 | @ApiModelProperty(value = "絮凝剂其他(按浓度折减后,吨)") | ||
31 | private String xnjqt; | ||
32 | @ApiModelProperty(value = "絮凝剂合计(吨)") | ||
33 | private String xnjhj; | ||
34 | @ApiModelProperty(value = "新水使用量(吨)") | ||
35 | private String xssyl; | ||
36 | @ApiModelProperty(value = "绝干泥量(吨)") | ||
37 | private String jgnl; | ||
38 | @ApiModelProperty(value = "危险废物产生量(吨)") | ||
39 | private String wxfwcsl; | ||
40 | @ApiModelProperty(value = "危险废物处置量(吨)") | ||
41 | private String wxfwczl; | ||
42 | @ApiModelProperty(value = "综合能源消费量(吨标准煤)") | ||
43 | private String zhnyxfl; | ||
44 | @ApiModelProperty(value = "二氧化碳排放量(吨二氧化碳当量)") | ||
45 | private String eyhtpfl; | ||
46 | |||
47 | @ApiModelProperty(value = "一般固废产生量(含水份,吨)") | ||
48 | private String ybgfcsl; | ||
49 | @ApiModelProperty(value = "一般固废处置量(含水份,吨)") | ||
50 | private String ybgfczl; | ||
51 | |||
52 | @ApiModelProperty(value = "COD消减量(吨)") | ||
53 | private String codxjl; | ||
54 | @ApiModelProperty(value = "NH3-N消减量(吨)") | ||
55 | private String adxjl; | ||
56 | @ApiModelProperty(value = "TP消减量(吨)") | ||
57 | private String tpxjl; | ||
58 | @ApiModelProperty(value = "TN消减量(吨)") | ||
59 | private String tnxjl; | ||
60 | |||
61 | } |
1 | package com.skua.modules.report.vo; | ||
2 | |||
3 | import io.swagger.annotations.ApiModelProperty; | ||
4 | import lombok.Data; | ||
5 | |||
6 | /** | ||
7 | * 报表展示 | ||
8 | */ | ||
9 | @Data | ||
10 | public class JnhbReportDetailsJs { | ||
11 | |||
12 | @ApiModelProperty(value = "月污水处理量环比") | ||
13 | private String ywscllhb; | ||
14 | @ApiModelProperty(value = "日均污水处理量环比") | ||
15 | private String rjwscllhb; | ||
16 | @ApiModelProperty(value = "日均电耗环比") | ||
17 | private String rjdhhb; | ||
18 | @ApiModelProperty(value = "吨水电耗环比") | ||
19 | private String dsdhhb; | ||
20 | @ApiModelProperty(value = "综合能源消费量(吨标准煤)") | ||
21 | private String zhnyxfl; | ||
22 | @ApiModelProperty(value = "二氧化碳排放量(吨二氧化碳当量)") | ||
23 | private String eyhtpfl; | ||
24 | @ApiModelProperty(value = "系统负荷率(%)") | ||
25 | private String wsfhl; | ||
26 | @ApiModelProperty(value = "吨COD消减能耗(吨标准煤/COD吨)") | ||
27 | private String dcodxjnh; | ||
28 | @ApiModelProperty(value = "吨NH3-N消减能耗(吨标准煤/NH3-N吨)") | ||
29 | private String dadxjnh; | ||
30 | @ApiModelProperty(value = "吨TP消减能耗(吨标准煤/TP吨)") | ||
31 | private String dtpxjnh; | ||
32 | @ApiModelProperty(value = "吨TN消减能耗(吨标准煤/TP吨)") | ||
33 | private String dtnxjnh; | ||
34 | @ApiModelProperty(value = "吨水电耗(千瓦时/吨)") | ||
35 | private String dsdh; | ||
36 | @ApiModelProperty(value = "万吨水综合能耗(吨标准煤/万吨)") | ||
37 | private String wdszhnh; | ||
38 | @ApiModelProperty(value = "万吨水CO2排放(吨二氧化碳当量/万吨)") | ||
39 | private String wdseyhtpf; | ||
40 | @ApiModelProperty(value = "一般固废处置率(%)") | ||
41 | private String ybgfcsl; | ||
42 | @ApiModelProperty(value = "危废处置率(%)") | ||
43 | private String wfczl; | ||
44 | @ApiModelProperty(value = "万吨水固废产生量(吨/万吨水)") | ||
45 | private String wdsgfcsl; | ||
46 | @ApiModelProperty(value = "万吨水污泥产生量(吨/万吨水)") | ||
47 | private String wdswncsl; | ||
48 | @ApiModelProperty(value = "COD消减量(吨)") | ||
49 | private String codxjl; | ||
50 | @ApiModelProperty(value = "NH3-N消减量(吨)") | ||
51 | private String adxjl; | ||
52 | @ApiModelProperty(value = "TP消减量(吨)") | ||
53 | private String tpxjl; | ||
54 | @ApiModelProperty(value = "TN消减量(吨)") | ||
55 | private String tnxjl; | ||
56 | |||
57 | } |
... | @@ -787,4 +787,22 @@ public class SysFactoryInfoController { | ... | @@ -787,4 +787,22 @@ public class SysFactoryInfoController { |
787 | return result; | 787 | return result; |
788 | } | 788 | } |
789 | 789 | ||
790 | @AutoLog(value = "获取厂区进出水标准") | ||
791 | @ApiOperation(value = "获取厂区进出水标准", notes = "获取厂区进出水标准") | ||
792 | @GetMapping(value = "/queryLevel") | ||
793 | public Result<Map<String,Object>> queryLevel(String departId) { | ||
794 | Result<Map<String,Object>> result = new Result<>(); | ||
795 | Map<String,Object> map = new HashMap<>(); | ||
796 | SysFactoryInfo sysFactoryInfo = sysFactoryInfoService.queryInfoByDeaprtId(departId); | ||
797 | if (sysFactoryInfo == null) { | ||
798 | result.error500("未找到对应实体"); | ||
799 | } else { | ||
800 | map = sysFactoryInfoService.queryLevel(sysFactoryInfo.getInLevel(),sysFactoryInfo.getOutLevel()); | ||
801 | result.setResult(map); | ||
802 | result.setSuccess(true); | ||
803 | } | ||
804 | |||
805 | return result; | ||
806 | } | ||
807 | |||
790 | } | 808 | } | ... | ... |
... | @@ -112,7 +112,7 @@ public class SysFactoryUserInfoController { | ... | @@ -112,7 +112,7 @@ public class SysFactoryUserInfoController { |
112 | if(list.size()>0){ | 112 | if(list.size()>0){ |
113 | map.put("total", list.size()); | 113 | map.put("total", list.size()); |
114 | for (SysFactoryUserInfo factoryUserInfo : list) { | 114 | for (SysFactoryUserInfo factoryUserInfo : list) { |
115 | if("1".equals(factoryUserInfo.getSex())){ | 115 | if("2".equals(factoryUserInfo.getSex())){ |
116 | female++; | 116 | female++; |
117 | }else{ | 117 | }else{ |
118 | male++; | 118 | male++; | ... | ... |
... | @@ -70,7 +70,7 @@ public interface ISysFactoryInfoService extends IService<SysFactoryInfo> { | ... | @@ -70,7 +70,7 @@ public interface ISysFactoryInfoService extends IService<SysFactoryInfo> { |
70 | * @return | 70 | * @return |
71 | */ | 71 | */ |
72 | List<SysFactoryTreeVO> queryFactoryTreeListForVideo(); | 72 | List<SysFactoryTreeVO> queryFactoryTreeListForVideo(); |
73 | 73 | ||
74 | List<SysFactoryTreeVO> queryFactoryTreeListForCustom(); | 74 | List<SysFactoryTreeVO> queryFactoryTreeListForCustom(); |
75 | /** | 75 | /** |
76 | * <pre> | 76 | * <pre> |
... | @@ -108,5 +108,11 @@ public interface ISysFactoryInfoService extends IService<SysFactoryInfo> { | ... | @@ -108,5 +108,11 @@ public interface ISysFactoryInfoService extends IService<SysFactoryInfo> { |
108 | */ | 108 | */ |
109 | public String querySumProScale(); | 109 | public String querySumProScale(); |
110 | 110 | ||
111 | 111 | /** | |
112 | * 获取进出水标准 | ||
113 | * @param inLevel | ||
114 | * @param outLevel | ||
115 | * @return | ||
116 | */ | ||
117 | Map<String, Object> queryLevel(String inLevel, String outLevel); | ||
112 | } | 118 | } | ... | ... |
... | @@ -14,6 +14,7 @@ import com.skua.core.excel.CustomExcelUtil.FieldType; | ... | @@ -14,6 +14,7 @@ import com.skua.core.excel.CustomExcelUtil.FieldType; |
14 | import com.skua.core.excel.entity.HeadEntity; | 14 | import com.skua.core.excel.entity.HeadEntity; |
15 | import com.skua.core.excel.entity.SheetEntity; | 15 | import com.skua.core.excel.entity.SheetEntity; |
16 | import com.skua.modules.alarmtmp.entity.*; | 16 | import com.skua.modules.alarmtmp.entity.*; |
17 | import com.skua.modules.alarmtmp.service.AlarmParamStandardConfigService; | ||
17 | import com.skua.modules.alarmtmp.service.AlarmRuleConfigService; | 18 | import com.skua.modules.alarmtmp.service.AlarmRuleConfigService; |
18 | import com.skua.modules.alarmtmp.service.AlarmRuleLevelConfigService; | 19 | import com.skua.modules.alarmtmp.service.AlarmRuleLevelConfigService; |
19 | import com.skua.modules.alarmtmp.service.IAlarmRuleLevelConfigTemplateService; | 20 | import com.skua.modules.alarmtmp.service.IAlarmRuleLevelConfigTemplateService; |
... | @@ -63,6 +64,8 @@ public class SysFactoryInfoServiceImpl extends ServiceImpl<SysFactoryInfoMapper, | ... | @@ -63,6 +64,8 @@ public class SysFactoryInfoServiceImpl extends ServiceImpl<SysFactoryInfoMapper, |
63 | private AlarmRuleLevelConfigService alarmRuleLevelConfigService; | 64 | private AlarmRuleLevelConfigService alarmRuleLevelConfigService; |
64 | @Autowired | 65 | @Autowired |
65 | private AlarmRuleConfigService alarmRuleConfigService; | 66 | private AlarmRuleConfigService alarmRuleConfigService; |
67 | @Autowired | ||
68 | private AlarmParamStandardConfigService alarmParamStandardConfigService; | ||
66 | @Override | 69 | @Override |
67 | public SysFactoryInfoVO getByDepartId(String departId) { | 70 | public SysFactoryInfoVO getByDepartId(String departId) { |
68 | SysFactoryInfoVO sysFactoryInfo = new SysFactoryInfoVO(); | 71 | SysFactoryInfoVO sysFactoryInfo = new SysFactoryInfoVO(); |
... | @@ -673,4 +676,18 @@ public class SysFactoryInfoServiceImpl extends ServiceImpl<SysFactoryInfoMapper, | ... | @@ -673,4 +676,18 @@ public class SysFactoryInfoServiceImpl extends ServiceImpl<SysFactoryInfoMapper, |
673 | public String querySumProScale(){ | 676 | public String querySumProScale(){ |
674 | return sysFactoryInfoMapper.querySumProScale(); | 677 | return sysFactoryInfoMapper.querySumProScale(); |
675 | } | 678 | } |
679 | |||
680 | @Override | ||
681 | public Map<String, Object> queryLevel(String inLevel, String outLevel) { | ||
682 | Map<String, Object> map = new HashMap<>(); | ||
683 | QueryWrapper<AlarmParamStandardConfig> inQueryWrapper = new QueryWrapper<>(); | ||
684 | inQueryWrapper.eq("del_flag", 1).eq("alarm_level_standard_id", inLevel); | ||
685 | List<AlarmParamStandardConfig> inList = alarmParamStandardConfigService.list(inQueryWrapper); | ||
686 | QueryWrapper<AlarmParamStandardConfig> outQueryWrapper = new QueryWrapper<>(); | ||
687 | outQueryWrapper.eq("del_flag", 1).eq("alarm_level_standard_id", outLevel); | ||
688 | List<AlarmParamStandardConfig> outList = alarmParamStandardConfigService.list(outQueryWrapper); | ||
689 | map.put("in",inList); | ||
690 | map.put("out",outList); | ||
691 | return map; | ||
692 | } | ||
676 | } | 693 | } | ... | ... |
-
请 注册 或 登录 后发表评论