Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
f7efafb4
Commit
f7efafb4
authored
Sep 06, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
4bb6e495
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
23 deletions
+28
-23
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+28
-23
No files found.
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
f7efafb4
...
@@ -2521,29 +2521,35 @@
...
@@ -2521,29 +2521,35 @@
<!-- LIMIT 5-->
<!-- LIMIT 5-->
SELECT
SELECT
a.equipName,
d.*
count( DISTINCT wesa.equipment_specific_id ) AS total
FROM
FROM
(
(
SELECT
SELECT
eq.`name` AS equipName,
a.equipName,
eq.id AS equipmentId,
count( DISTINCT wesa.equipment_specific_id ) AS total
eq.`code` AS `code`
FROM
FROM
(
wl_equipment eq
SELECT
LEFT JOIN wl_equipment_detail wed ON eq.id = wed.equipment_id
eq.`name` AS equipName,
LEFT JOIN wl_equipment_specific wes ON wed.id = wes.equipment_detail_id
eq.id AS equipmentId,
WHERE
eq.`code` AS `code`
FIND_IN_SET( #{systemId}, wes.system_id ) > 0
FROM
) a
wl_equipment eq
LEFT JOIN wl_equipment_specific_alarm wesa ON wesa.equipment_id = a.equipmentId
LEFT JOIN wl_equipment_detail wed ON eq.id = wed.equipment_id
AND FIND_IN_SET( #{systemId}, wesa.system_ids ) > 0
LEFT JOIN wl_equipment_specific wes ON wed.id = wes.equipment_detail_id
AND `wesa`.`create_date` >= ( curdate() - INTERVAL 30 DAY )
WHERE
GROUP BY
FIND_IN_SET( #{systemId}, wes.system_id ) > 0
a.equipmentId
) a
ORDER BY
LEFT JOIN wl_equipment_specific_alarm wesa ON wesa.equipment_id = a.equipmentId
total DESC
AND FIND_IN_SET( #{systemId}, wesa.system_ids ) > 0
LIMIT 5
AND `wesa`.`create_date` >= ( curdate() - INTERVAL 30 DAY )
GROUP BY
a.equipmentId
ORDER BY
total DESC
LIMIT 5
) d
ORDER BY d.total ASC
</select>
</select>
<select
id=
"equipmentId"
resultType=
"String"
>
<select
id=
"equipmentId"
resultType=
"String"
>
...
@@ -2552,8 +2558,7 @@
...
@@ -2552,8 +2558,7 @@
from
from
f_fire_fighting_system
f_fire_fighting_system
where
where
code = #{systemCode} and
code = #{systemCode}
biz_org_code like concat(#{bizOrgCode}, '%')
</select>
</select>
<select
id=
"equipmentState"
resultType=
"java.util.Map"
>
<select
id=
"equipmentState"
resultType=
"java.util.Map"
>
...
...
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