Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
868da7b6
Commit
868da7b6
authored
Dec 11, 2020
by
zhengjiawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sql修改,实时监控
parent
83940d09
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
50 deletions
+23
-50
dbTemplate_fire_equip.xml
...rt/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
+23
-50
No files found.
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
View file @
868da7b6
...
...
@@ -120,22 +120,8 @@
FROM
(
SELECT
(
SELECT
fe.`name`
FROM
f_fire_equipment fe
WHERE
fe.id = ed.fire_equipment_id
) fireEquipmentName,
(
SELECT
fe.`code`
FROM
f_fire_equipment fe
WHERE
fe.id = ed.fire_equipment_id
) fireEquipmentCode,
det.`name` as fireEquipmentName,
spe.`code` as fireEquipmentCode,
(
SELECT
group_concat(DISTINCT f.`name`)
...
...
@@ -143,11 +129,13 @@
f_equipment_fire_equipment efe
JOIN f_equipment f ON efe.equipment_id = f.id
WHERE
efe.fire_equipment_id =
ed.fire_equipment
_id
efe.fire_equipment_id =
ind.equipment_specific
_id
) equipmentName,
ed.cre
ate_date
ind.upd
ate_date
FROM
f_fire_equipment_data ed
wl_equipment_specific_index ind
left join wl_equipment_specific as spe on spe.id = ind.equipment_specific_id
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
) d
WHERE
1 = 1
...
...
@@ -158,7 +146,7 @@
AND d.equipmentName LIKE '%${equipmentName}%'
</if>
<if
test=
"startTime!=null"
>
AND d.
cre
ate_date BETWEEN '${startTime}' AND '${endTime}'
AND d.
upd
ate_date BETWEEN '${startTime}' AND '${endTime}'
</if>
</select>
...
...
@@ -169,31 +157,13 @@
FROM
(
SELECT
(
SELECT
fe.`name`
FROM
f_fire_equipment fe
WHERE
fe.id = ed.fire_equipment_id
) fireEquipmentName,
(
SELECT
fe.`code`
FROM
f_fire_equipment fe
WHERE
fe.id = ed.fire_equipment_id
) fireEquipmentCode,
ed.eq_point_name,
CASE ed.e_value WHEN 'true' THEN '合'
WHEN 'false' THEN '分'
ELSE ed.e_value END 'e_value',
ed.eq_point_unit,
case
when ed.soe = '1' then '报警'
when ed.soe = '0' then '监测'
end soe,
det.`name` as fireEquipmentName,
spe.`code` as fireEquipmentCode,
ein.name,
CASE ind.value WHEN 'true' THEN '是'
WHEN 'false' THEN '否'
ELSE ind.value END 'e_value',
ein.unit,
(
SELECT
group_concat(DISTINCT f.`name`)
...
...
@@ -201,11 +171,14 @@
f_equipment_fire_equipment efe
JOIN f_equipment f ON efe.equipment_id = f.id
WHERE
efe.fire_equipment_id =
ed.fire_equipment
_id
efe.fire_equipment_id =
ind.equipment_specific
_id
) equipmentName,
ed.cre
ate_date
ind.upd
ate_date
FROM
f_fire_equipment_data ed
wl_equipment_specific_index as ind
left join wl_equipment_specific as spe on spe.id = ind.equipment_specific_id
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
left join wl_equipment_index as ein on ind.equipment_index_id = ein.id
) d
WHERE
1 = 1
...
...
@@ -216,9 +189,9 @@
AND d.equipmentName LIKE '%${equipmentName}%'
</if>
<if
test=
"startTime!=null"
>
AND d.
cre
ate_date BETWEEN '${startTime}' AND '${endTime}'
AND d.
upd
ate_date BETWEEN '${startTime}' AND '${endTime}'
</if>
ORDER BY d.
cre
ate_date desc
ORDER BY d.
upd
ate_date desc
LIMIT ${start},${length}
</select>
...
...
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