f79698db 康伟

Merge remote-tracking branch 'origin/master'

2 个父辈 1cccf761 5e864231
...@@ -56,5 +56,7 @@ public interface CommonSqlMapper { ...@@ -56,5 +56,7 @@ public interface CommonSqlMapper {
56 56
57 String getChildFactorys(@Param(value="departId") String departId); 57 String getChildFactorys(@Param(value="departId") String departId);
58 58
59 String getChildDeparts(@Param(value="departId") String departId);
60
59 String getChildDepartByUserId(@Param(value="userId") String userId); 61 String getChildDepartByUserId(@Param(value="userId") String userId);
60 } 62 }
......
...@@ -94,6 +94,28 @@ ...@@ -94,6 +94,28 @@
94 </foreach> 94 </foreach>
95 )) 95 ))
96 </select> 96 </select>
97
98 <select id="getChildDeparts" resultType="java.lang.String">
99 SELECT
100 GROUP_CONCAT( id SEPARATOR ',' ) AS depart_ids
101 FROM
102 sys_depart
103 WHERE
104 parent_id IN
105 <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
106 '${item}'
107 </foreach>
108 OR id IN
109 <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
110 '${item}'
111 </foreach>
112 OR parent_id IN ( SELECT id FROM sys_depart WHERE parent_id IN
113 <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
114 '${item}'
115 </foreach>
116 )
117 </select>
118
97 <select id="getChildDepartByUserId" resultType="java.lang.String"> 119 <select id="getChildDepartByUserId" resultType="java.lang.String">
98 select CONCAT(dep_id,',',dep_ids) AS ids 120 select CONCAT(dep_id,',',dep_ids) AS ids
99 from sys_user_depart 121 from sys_user_depart
......
...@@ -100,17 +100,18 @@ public class ThreeDController { ...@@ -100,17 +100,18 @@ public class ThreeDController {
100 return result; 100 return result;
101 } 101 }
102 102
103 @CustomExceptionAnno(description = "三维-厂区在线状态") 103 @CustomExceptionAnno(description = "厂区在线状态")
104 @AutoLog(value = "三维-厂区在线状态") 104 @AutoLog(value = "厂区在线状态")
105 @ApiOperation(value = "三维-厂区在线状态", notes = "三维-厂区在线状态") 105 @ApiOperation(value = "厂区在线状态", notes = "厂区在线状态")
106 @GetMapping(value = "/factoryOnLine") 106 @GetMapping(value = "/factoryOnLine")
107 public Result<SysFactoryInfoVO> factoryOnLine(@RequestParam(name = "departId", defaultValue = "f2df9193c8bc4e7a9cef0e4b98dd9e95") String departId, @RequestParam(name = "departType", defaultValue = "1", required = false) String departType) { 107 public Result<SysFactoryInfoVO> factoryOnLine(@RequestParam(name = "departId", defaultValue = "f2df9193c8bc4e7a9cef0e4b98dd9e95") String departId, @RequestParam(name = "departType", defaultValue = "1", required = false) String departType) {
108 Result result = new Result<>(); 108 Result result = new Result<>();
109 result.setSuccess(true);
110 result.setResult(new HashMap<>());
109 QueryWrapper<SysDepart> sysDepartQueryWrapper = new QueryWrapper<>(); 111 QueryWrapper<SysDepart> sysDepartQueryWrapper = new QueryWrapper<>();
110 sysDepartQueryWrapper.eq("depart_type", departType).eq("del_flag", 1); 112 sysDepartQueryWrapper.eq("depart_type", departType).eq("del_flag", 1);
111 List<Map<String, Object>> deviceList = sysDepartService.queryFactoryDevice(sysDepartQueryWrapper); 113 List<Map<String, Object>> deviceList = sysDepartService.queryFactoryDevice(sysDepartQueryWrapper);
112 JdbcTemplate pgDb = (JdbcTemplate) SpringContextUtils.getBean("pg-db"); 114 JdbcTemplate pgDb = (JdbcTemplate) SpringContextUtils.getBean("pg-db");
113
114 int onlineCount = 0; 115 int onlineCount = 0;
115 if (!CollectionUtils.isEmpty(deviceList)) { 116 if (!CollectionUtils.isEmpty(deviceList)) {
116 List<Object> list = new ArrayList<>(); 117 List<Object> list = new ArrayList<>();
...@@ -138,8 +139,6 @@ public class ThreeDController { ...@@ -138,8 +139,6 @@ public class ThreeDController {
138 resultMaps.put("offlineCount", deviceList.size() - onlineCount > 0 ? deviceList.size() - onlineCount : 0); 139 resultMaps.put("offlineCount", deviceList.size() - onlineCount > 0 ? deviceList.size() - onlineCount : 0);
139 result.setSuccess(true); 140 result.setSuccess(true);
140 result.setResult(resultMaps); 141 result.setResult(resultMaps);
141 } else {
142 result.error500("500");
143 } 142 }
144 return result; 143 return result;
145 144
......
...@@ -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 }
......
...@@ -4,6 +4,7 @@ import com.skua.modules.dataAnalysis.vo.ArchivesWarnVO; ...@@ -4,6 +4,7 @@ import com.skua.modules.dataAnalysis.vo.ArchivesWarnVO;
4 import com.skua.modules.dataAnalysis.vo.EquipAlarmVO; 4 import com.skua.modules.dataAnalysis.vo.EquipAlarmVO;
5 import com.skua.modules.dataAnalysis.vo.EquipRunTimeVO; 5 import com.skua.modules.dataAnalysis.vo.EquipRunTimeVO;
6 import com.skua.modules.dataAnalysis.vo.EquipWarnVO; 6 import com.skua.modules.dataAnalysis.vo.EquipWarnVO;
7 import com.skua.tool.annotation.Anonymous;
7 import org.apache.ibatis.annotations.Param; 8 import org.apache.ibatis.annotations.Param;
8 9
9 import java.util.List; 10 import java.util.List;
...@@ -27,6 +28,7 @@ public interface FactoryOperateCenterMapper { ...@@ -27,6 +28,7 @@ public interface FactoryOperateCenterMapper {
27 List<Map<String, String>> getReportCount(@Param("departId") String departId, @Param("month") String month, 28 List<Map<String, String>> getReportCount(@Param("departId") String departId, @Param("month") String month,
28 @Param("reportName") String reportName); 29 @Param("reportName") String reportName);
29 30
31 @Anonymous
30 Map<String, Object> getSdyData(@Param("view2119") String view2119, @Param("view3a24") String view3a24, 32 Map<String, Object> getSdyData(@Param("view2119") String view2119, @Param("view3a24") String view3a24,
31 @Param("departId") String departId, @Param("dateTime") String dateTime); 33 @Param("departId") String departId, @Param("dateTime") String dateTime);
32 } 34 }
......
...@@ -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 &gt;= #{startDate} and time &lt;= #{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 &gt;= #{startDate} and v.time &lt;= #{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 &gt;= #{startDate} and time &lt;= #{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 &gt;= #{startDate} and v.time &lt;= #{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 &gt;= #{startDate} and v.time &lt;= #{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 &gt;= #{startDate} and v.time &lt;= #{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 &gt;= #{startDate} and v.time &lt;= #{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
......
...@@ -158,6 +158,11 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer ...@@ -158,6 +158,11 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer
158 nclslMap.put("nmbTb", df.format((yearClslMb-yearTbClslMb)/yearClslMb)); 158 nclslMap.put("nmbTb", df.format((yearClslMb-yearTbClslMb)/yearClslMb));
159 nclslMap.put("nwcd", df.format(100*yearClsl/yearClslMb)); 159 nclslMap.put("nwcd", df.format(100*yearClsl/yearClslMb));
160 nclslMap.put("nwcdTb", "1"); 160 nclslMap.put("nwcdTb", "1");
161 if(yearClslMb == 0.00){
162 nclslMap.put("wcbfb", "0");
163 nclslMap.put("nmbTb", "0");
164 nclslMap.put("nwcd", "0");
165 }
161 166
162 map.put("yclsl",new HashMap<>()); 167 map.put("yclsl",new HashMap<>());
163 Map<String, Object> yclslMap = new HashMap<>(); 168 Map<String, Object> yclslMap = new HashMap<>();
...@@ -167,6 +172,11 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer ...@@ -167,6 +172,11 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer
167 yclslMap.put("ymbTb", "0"); 172 yclslMap.put("ymbTb", "0");
168 yclslMap.put("ywcd", df.format(100*monthClsl/(yearClslMb/12))); 173 yclslMap.put("ywcd", df.format(100*monthClsl/(yearClslMb/12)));
169 yclslMap.put("ywcdTb", "0"); 174 yclslMap.put("ywcdTb", "0");
175 if(yearClslMb == 0.00){
176 yclslMap.put("wcbfb", "0");
177 yclslMap.put("ymb", "0");
178 yclslMap.put("ywcd", "0");
179 }
170 180
171 map.put("ndsdh",new HashMap<>()); 181 map.put("ndsdh",new HashMap<>());
172 Map<String, Object> ndsdhMap = new HashMap<>(); 182 Map<String, Object> ndsdhMap = new HashMap<>();
......
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")
......
...@@ -159,7 +159,9 @@ public interface SysDepartMapper extends BaseMapper<SysDepart> { ...@@ -159,7 +159,9 @@ public interface SysDepartMapper extends BaseMapper<SysDepart> {
159 @Anonymous 159 @Anonymous
160 SysDepart getById(@Param("pid") String pid); 160 SysDepart getById(@Param("pid") String pid);
161 161
162 @Anonymous
162 List<SysDepart> getChildDepartList(@Param("departIds") String departIds); 163 List<SysDepart> getChildDepartList(@Param("departIds") String departIds);
163 164
165 @Anonymous
164 List<SysDepart> queryDepartsByIds(@Param("ids") String ids); 166 List<SysDepart> queryDepartsByIds(@Param("ids") String ids);
165 } 167 }
......
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 import com.baomidou.mybatisplus.core.metadata.IPage; 4 import com.baomidou.mybatisplus.core.metadata.IPage;
5 import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 5 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 import com.skua.modules.system.entity.SysUser; 6 import com.skua.modules.system.entity.SysUser;
7 import com.skua.tool.annotation.Anonymous;
7 import org.apache.ibatis.annotations.Param; 8 import org.apache.ibatis.annotations.Param;
8 9
9 import java.util.List; 10 import java.util.List;
...@@ -76,5 +77,6 @@ public interface SysUserMapper extends BaseMapper<SysUser> { ...@@ -76,5 +77,6 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
76 77
77 List<SysUser> operationUserList(@Param("departId") String departId); 78 List<SysUser> operationUserList(@Param("departId") String departId);
78 79
80 @Anonymous
79 String queryDepartIdsByUserId(@Param("userId") String userId); 81 String queryDepartIdsByUserId(@Param("userId") String userId);
80 } 82 }
......
...@@ -520,7 +520,9 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart ...@@ -520,7 +520,9 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
520 if(ConvertUtils.isNotEmpty(departTree.getToken())){ 520 if(ConvertUtils.isNotEmpty(departTree.getToken())){
521 SysUser user = sysUserMapper.getUserByName(JwtUtil.getUsername(departTree.getToken())); 521 SysUser user = sysUserMapper.getUserByName(JwtUtil.getUsername(departTree.getToken()));
522 if(user!=null){ 522 if(user!=null){
523 departIds = sysUserMapper.queryDepartIdsByUserId(user.getId()); 523 String ids = commonSqlMapper.getChildDepartByUserId(user.getId());
524 //departIds = sysUserMapper.queryDepartIdsByUserId(user.getId());
525 departIds = commonSqlMapper.getChildDepartId(ids);
524 } 526 }
525 } 527 }
526 pid = departTree.getPid(); 528 pid = departTree.getPid();
......
...@@ -12,6 +12,7 @@ import com.skua.core.api.vo.SysUserCacheInfo; ...@@ -12,6 +12,7 @@ import com.skua.core.api.vo.SysUserCacheInfo;
12 import com.skua.core.constant.CommonConstant; 12 import com.skua.core.constant.CommonConstant;
13 import com.skua.core.context.BaseContextHandler; 13 import com.skua.core.context.BaseContextHandler;
14 import com.skua.core.util.ConvertUtils; 14 import com.skua.core.util.ConvertUtils;
15 import com.skua.modules.common.mapper.CommonSqlMapper;
15 import com.skua.modules.system.entity.*; 16 import com.skua.modules.system.entity.*;
16 import com.skua.modules.system.mapper.*; 17 import com.skua.modules.system.mapper.*;
17 import com.skua.modules.system.service.ISysUserDepartService; 18 import com.skua.modules.system.service.ISysUserDepartService;
...@@ -48,6 +49,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -48,6 +49,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
48 private ISysBaseAPI sysBaseAPI; 49 private ISysBaseAPI sysBaseAPI;
49 @Autowired 50 @Autowired
50 private SysDepartMapper sysDepartMapper; 51 private SysDepartMapper sysDepartMapper;
52 @Resource
53 private CommonSqlMapper commonSqlMapper;
51 @Autowired 54 @Autowired
52 WebSocket webSocket; 55 WebSocket webSocket;
53 56
...@@ -173,7 +176,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -173,7 +176,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
173 // 根据角色Id查询 176 // 根据角色Id查询
174 @Override 177 @Override
175 public IPage<SysUser> getUserByRoleId(Page<SysUser> page, String roleId, String username) { 178 public IPage<SysUser> getUserByRoleId(Page<SysUser> page, String roleId, String username) {
176 String departIds = userMapper.queryDepartIdsByUserId(BaseContextHandler.getUserId()); 179 // String departIds = userMapper.queryDepartIdsByUserId(BaseContextHandler.getUserId());
180 String ids = commonSqlMapper.getChildDepartByUserId(BaseContextHandler.getUserId());
181 String departIds = commonSqlMapper.getChildDeparts(ids);
177 return userMapper.getUserByRoleId(page, roleId, username, departIds); 182 return userMapper.getUserByRoleId(page, roleId, username, departIds);
178 } 183 }
179 184
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!