Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zh-baseversion-project
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
王浩
zh-baseversion-project
Commits
7cfa8945
Commit
7cfa8945
authored
Jul 18, 2024
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 大屏端全局搜索调整
parent
60d5b515
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
18 deletions
+54
-18
TDeviceInfoMapper.xml
...em/src/main/resources/mapper/system/TDeviceInfoMapper.xml
+54
-18
No files found.
zh-baseversion-system/src/main/resources/mapper/system/TDeviceInfoMapper.xml
View file @
7cfa8945
...
...
@@ -82,25 +82,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"name != null and name != ''"
>
site_station_name like concat('%', #{name}, '%') AND
</if>
longitude IS NOT NULL
AND latitude IS NOT NULL UNION
SELECT
user_id AS id,
nick_name AS NAME,
CONCAT( '[[', longitude, ', ', latitude, ']]' ) AS coordinates,
select t1.userId as id,
t1.nickName as NAME,
CONCAT( '[[', t1.longitude, ', ', t1.latitude, ']]' ) AS coordinates,
CASE
user_type
WHEN '1' THEN
'4'
WHEN '2' THEN
'5'
WHEN '3' THEN
'6'
END AS type
FROM
t_detector_user
WHERE
<if
test=
"name != null and name != ''"
>
nick_name like concat('%', #{name}, '%') AND
</if>
longitude IS NOT NULL
AND latitude IS NOT NULL UNION
t1.userType
WHEN '1' THEN
'4'
WHEN '2' THEN
'5'
WHEN '3' THEN
'6'
END AS type
from(
select a.user_id AS userId,
a.detector_id AS detectorId,
a.detector_status AS detectorStatus,
a.nick_name AS nickName,
a.user_type AS userType,
a.address AS address,
a.longitude AS longitude,
a.latitude AS latitude,
a.linkman AS linkman,
a.phone AS phone,
a.email AS email,
CASE a.detector_type
WHEN '1' THEN '家用探测器'
WHEN '2' THEN '工业探测器' END AS detectorType,
COUNT(a.detector_id) AS detectorCount,
SUM(CASE a.detector_status WHEN '0' THEN 1 ELSE 0 END) AS onLineNum,
SUM(CASE a.detector_status WHEN '1' THEN 1 ELSE 0 END) AS offLineNum
from(select
a1.* ,
a2.detector_id,
a2.detector_type,
a2.detector_status FROM t_detector_user a1
LEFT JOIN t_detector_info a2 ON a1.user_id = a2.user_id AND a2.is_del = '0'
where a1.is_del = '0' and a1.longitude is not null and a1.latitude is not null) a
group by a.user_id,a.detector_type
) t1 left join (
select b.user_id AS userId,
COUNT(b.id) AS historyAlarmNum,
SUM(CASE b.is_cancel_alarm WHEN '0' THEN 1 ELSE 0 END) AS processingAlarmNum,
COUNT(b.id) - SUM(CASE b.is_cancel_alarm WHEN '0' THEN 1 ELSE 0 END) AS cancelAlarmNum
from(select b1.id,b1.is_cancel_alarm,b2.*
from t_detector_report_data b1
left join t_detector_info b2 on b1.detector_code = b2.detector_code
right join t_detector_user b3 on b2.user_id = b3.user_id
where b2.is_del = '0' and b3.is_del = '0' ) b
group by b.user_id,b.detector_type
) t2 on t2.userId = t1.userId where
<if
test=
"name != null and name != ''"
>
t1.nickName like concat('%', #{name}, '%')
</if>
UNION
SELECT
video_manager_id AS id,
video_name AS NAME,
...
...
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