Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety-progress
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
gassafety-progress
Commits
1f7a0a80
Commit
1f7a0a80
authored
Mar 08, 2022
by
zhangjianqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户安全监控用户数量查询修改
parent
8e63a301
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
2 deletions
+29
-2
TDeviceInfoController.java
...ehong/web/controller/supervise/TDeviceInfoController.java
+4
-0
TDetectorUserMapper.java
...in/java/com/zehong/system/mapper/TDetectorUserMapper.java
+6
-0
ITDetectorUserService.java
...java/com/zehong/system/service/ITDetectorUserService.java
+6
-0
TDetectorUserServiceImpl.java
.../zehong/system/service/impl/TDetectorUserServiceImpl.java
+8
-0
TDetectorInfoMapper.xml
.../src/main/resources/mapper/system/TDetectorInfoMapper.xml
+1
-2
TDetectorUserMapper.xml
.../src/main/resources/mapper/system/TDetectorUserMapper.xml
+4
-0
No files found.
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/supervise/TDeviceInfoController.java
View file @
1f7a0a80
...
...
@@ -40,6 +40,8 @@ public class TDeviceInfoController extends BaseController
@Autowired
private
ITDetectorInfoService
itDetectorInfoService
;
@Autowired
private
ITDetectorUserService
itDetectorUserService
;
/**
* 查询设备信息列表
...
...
@@ -217,6 +219,8 @@ public class TDeviceInfoController extends BaseController
{
Map
<
String
,
Object
>
map
=
itDetectorInfoService
.
selectDetectorNum
(
enterpriseId
);
Map
<
String
,
Object
>
map1
=
tDeviceInfoService
.
selectDeviceNum
(
enterpriseId
);
Map
<
String
,
Object
>
map2
=
itDetectorUserService
.
selectUserNum
();
map
.
putAll
(
map2
);
map
.
putAll
(
map1
);
return
AjaxResult
.
success
(
map
);
}
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/mapper/TDetectorUserMapper.java
View file @
1f7a0a80
...
...
@@ -84,4 +84,10 @@ public interface TDetectorUserMapper
* @return 结果
*/
public
int
deleteTDetectorUserByIds
(
Long
[]
userIds
);
/**
* 查询用户数量
* @return
*/
public
Map
<
String
,
Object
>
selectUserNum
();
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/ITDetectorUserService.java
View file @
1f7a0a80
...
...
@@ -92,4 +92,10 @@ public interface ITDetectorUserService
* @return 结果
*/
public
int
deleteTDetectorUserById
(
Long
userId
);
/**
* 查询用户数量
* @return
*/
public
Map
<
String
,
Object
>
selectUserNum
();
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/impl/TDetectorUserServiceImpl.java
View file @
1f7a0a80
...
...
@@ -211,4 +211,12 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
{
return
tDetectorUserMapper
.
deleteTDetectorUserById
(
userId
);
}
/**
* 用户数量
* @return
*/
public
Map
<
String
,
Object
>
selectUserNum
(){
return
tDetectorUserMapper
.
selectUserNum
();
}
}
gassafetyprogress-system/src/main/resources/mapper/system/TDetectorInfoMapper.xml
View file @
1f7a0a80
...
...
@@ -258,8 +258,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<select
id=
"selectDetectorNum"
resultType=
"java.util.HashMap"
>
SELECT IFNULL(SUM(IF(detector_status=0,1,0)),0) AS changNum,IFNULL(SUM(detector_status=1),0) AS liNum,
IFNULL(SUM(IF(detector_status=2,1,0)),0) AS baoNum ,
(SELECT COUNT(user_id) FROM t_detector_user WHERE is_del = 0) AS userNum
IFNULL(SUM(IF(detector_status=2,1,0)),0) AS baoNum
FROM t_detector_info WHERE is_del = 0
</select>
</mapper>
\ No newline at end of file
gassafetyprogress-system/src/main/resources/mapper/system/TDetectorUserMapper.xml
View file @
1f7a0a80
...
...
@@ -164,4 +164,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{userId}
</foreach>
</delete>
<select
id=
"selectUserNum"
resultType=
"java.util.HashMap"
>
SELECT SUM(IF(user_type=1,1,0)) AS juminNum,SUM(IF(user_type=2,1,0)) AS shangNum,
SUM(IF(user_type=3,1,0)) AS gongNum FROM t_detector_user WHERE is_del = 0
</select>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment