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
e82157ab
Commit
e82157ab
authored
Aug 19, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
排油系统API sql修改
parent
7a528508
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
18 deletions
+43
-18
EmergencyMapper.xml
...ystem-equip/src/main/resources/mapper/EmergencyMapper.xml
+43
-18
No files found.
amos-boot-system-equip/src/main/resources/mapper/EmergencyMapper.xml
View file @
e82157ab
...
...
@@ -445,14 +445,27 @@
<select
id=
"selectOilDrainageNew"
resultType=
"java.util.Map"
>
SELECT
wes.id,
'3' as type,
(SELECT wei.emergency_level FROM wl_equipment_index wei LEFT JOIN wl_equipment_specific_index wesi on wei.id = wesi.equipment_index_id
WHERE wesi.equipment_specific_id = wes.id AND wesi.equipment_index_key = wes.realtime_iot_index_key) as level,
wes.code as code ,
'3' AS type,
(
SELECT
IF
(
wesi.`value` = 'true'
AND wesi.equipment_index_key = 'ONL_DrainOilValve_Open',
( SELECT emergency_level FROM wl_equipment_index WHERE name_key = 'ONL_DrainOilValve_Open' ),
( SELECT emergency_level FROM wl_equipment_index WHERE name_key = 'ONL_DrainOilValve_Close' ))
FROM
wl_equipment_specific_index wesi
WHERE
wesi.equipment_specific_id = wes.id
AND wesi.equipment_index_key IN ( 'ONL_DrainOilValve_Open', 'ONL_DrainOilValve_Close' )
AND wesi.`value` = 'true'
ORDER BY
wesi.update_date DESC
LIMIT 1
) AS level,
wes.CODE AS code,
wes.name,
<!-- IFNULL(wes.realtime_iot_index_name,-->
<!-- '暂无信号'-->
<!-- ) AS status,-->
(
SELECT
IF
...
...
@@ -462,6 +475,7 @@
WHERE
wesi.equipment_specific_id = wes.id
AND wesi.equipment_index_key IN ( 'ONL_DrainOilValve_Open', 'ONL_DrainOilValve_Close' )
AND wesi.`value` = 'true'
ORDER BY
wesi.update_date DESC
LIMIT 1
...
...
@@ -474,20 +488,32 @@
<if
test=
"code != null and code!='' "
>
AND fire.equipment_id = (SELECT id FROM f_equipment WHERE `code` = #{code})
</if>
AND wes.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%' )
<if
test=
"code != null and code!='' "
>
union all
UNION ALL
(
SELECT
wes.id,
'3' as type,
(SELECT wei.emergency_level FROM wl_equipment_index wei LEFT JOIN wl_equipment_specific_index wesi on wei.id = wesi.equipment_index_id
WHERE wesi.equipment_specific_id = wes.id AND wesi.equipment_index_key = wes.realtime_iot_index_key) as level,
wes.code as code ,
'3' AS type,
(
SELECT
IF
(
wesi.`value` = 'true'
AND wesi.equipment_index_key = 'ONL_DrainOilValve_Open',
( SELECT emergency_level FROM wl_equipment_index WHERE name_key = 'ONL_DrainOilValve_Open' ),
( SELECT emergency_level FROM wl_equipment_index WHERE name_key = 'ONL_DrainOilValve_Close' ))
FROM
wl_equipment_specific_index wesi
WHERE
wesi.equipment_specific_id = wes.id
AND wesi.equipment_index_key IN ( 'ONL_DrainOilValve_Open', 'ONL_DrainOilValve_Close' )
AND wesi.`value` = 'true'
ORDER BY
wesi.update_date DESC
LIMIT 1
) AS level,
wes.CODE AS code,
wes.name,
<!-- IFNULL(wes.realtime_iot_index_name,-->
<!-- '暂无信号'-->
<!-- ) AS status,-->
(
SELECT
IF
...
...
@@ -497,6 +523,7 @@
WHERE
wesi.equipment_specific_id = wes.id
AND wesi.equipment_index_key IN ( 'ONL_DrainOilValve_Open', 'ONL_DrainOilValve_Close' )
AND wesi.`value` = 'true'
ORDER BY
wesi.update_date DESC
LIMIT 1
...
...
@@ -507,10 +534,8 @@
WHERE
wes.equipment_code LIKE concat( '921004', '%' )
AND fire.equipment_id != (SELECT id FROM f_equipment WHERE `code` = #{code})
AND wes.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%' )
)
</if>
</select>
<select
id=
"selectGasExtinguishing"
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