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
6da481b5
Commit
6da481b5
authored
Aug 04, 2022
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改组态系统信息查询脚本
parent
ecfcf673
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
35 deletions
+66
-35
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+66
-35
No files found.
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
6da481b5
...
...
@@ -2347,46 +2347,77 @@
<select
id=
"getSystemAlarmInfo"
resultType=
"java.util.Map"
>
SELECT
`fs`.`id` AS `id`,
`fs`.`name` AS `name`,
count( `wes`.`id` ) AS `totalEquipNum`,(
SELECT
count( DISTINCT `eqlog`.`equipment_specific_id` )
FROM
`wl_equipment_specific_alarm_log` `eqlog`
WHERE
((
0 != find_in_set( `fs`.`id`, `eqlog`.`system_ids` ))
AND (
`eqlog`.`create_date` LIKE concat( date_format( curdate(), '%Y-%m-%d' ), '%' )))) AS `todayAlarmNum`,
IF
(((
SELECT
count( `eqlog`.`equipment_specific_id` )
FROM
`wl_equipment_specific_alarm_log` `eqlog`
WHERE
((
0 != find_in_set( `fs`.`id`, `eqlog`.`system_ids` ))
AND ( `eqlog`.`status` = 1 ))) > 0
),
'异常',
'正常'
) AS `stateDesc`,
IFNULL(ec.image, "") AS image
FROM
`f_fire_fighting_system` `fs`
LEFT JOIN `wl_equipment_specific` `wes` ON (
0 != find_in_set( `fs`.`id`, `wes`.`system_id` ))
LEFT JOIN wl_equipment_category ec ON ec.id = fs.system_type
`fs`.`id` AS `id`,
`fs`.`name` AS `name`,
(
SELECT
count(1)
FROM
`wl_equipment_specific` `wes`
WHERE
0 != find_in_set(
`fs`.`id`,
`wes`.`system_id`
)
) AS `totalEquipNum`,
(
SELECT
count(
DISTINCT `eqlog`.`equipment_specific_id`
)
FROM
`wl_equipment_specific_alarm_log` `eqlog`
WHERE
(
(
0 != find_in_set(
`fs`.`id`,
`eqlog`.`system_ids`
)
)
AND (
`eqlog`.`create_date` LIKE concat(
date_format(curdate(), '%Y-%m-%d'),
'%'
)
)
)
) AS `todayAlarmNum`,
IF (
(
(
SELECT
count(
`esa`.`equipment_specific_id`
)
FROM
`wl_equipment_specific_alarm` `esa`
WHERE
(
(
0 != find_in_set(
`fs`.`id`,
`esa`.`system_ids`
)
)
AND (`esa`.`status` = 1)
)
) > 0
),
'异常',
'正常'
) AS `stateDesc`,
IFNULL(ec.image, "") AS image
FROM
`f_fire_fighting_system` `fs`
LEFT JOIN wl_equipment_category ec ON ec.id = fs.system_type
<where>
1=1
<if
test=
"bizOrgCode!=null and bizOrgCode!=''"
>
and fs.biz_org_code = #{bizOrgCode,jdbcType=VARCHAR}
</if>
</where>
GROUP BY
`fs`.`id`
ORDER BY fs.sort
</select>
<select
id=
"getEquipAlarmInfoNum"
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