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
40229882
Commit
40229882
authored
Jul 20, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除无用代码并更新
parent
64408d06
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
287 additions
and
63 deletions
+287
-63
FireFightingSystemMapper.java
.../yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
+0
-34
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+0
-7
view_all.sql
...stem-equip/src/main/resources/changelog/init/view_all.sql
+287
-2
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+0
-20
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
View file @
40229882
...
@@ -209,38 +209,4 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
...
@@ -209,38 +209,4 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
Map
<
String
,
Object
>
fireFoamSysEquipmentNumber
();
Map
<
String
,
Object
>
fireFoamSysEquipmentNumber
();
/**
* 换流变水喷雾系统Top5
* @return Map<String,Object>
*
*/
Map
<
String
,
Object
>
fireSpraySysTop
();
/**
* 换流变水喷雾系统设备状态
* @return Map<String,Object>
*
*/
Map
<
String
,
Object
>
fireSpraySys3Status
();
/**
* 换流变水喷雾系统今日设备状态
* @return Map<String,Object>
*
*/
Map
<
String
,
Object
>
fireSpraySys4Status
();
/**
* 换流变水喷雾系统风险趋势
* @return Map<String,Object>
*
*/
Map
<
String
,
Object
>
fireSpraySysRisk
();
/**
* 换流变水喷雾系统告警信息
* @return Map<String,Object>
*
*/
Map
<
String
,
Object
>
fireSpraySys4Alarm
();
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
40229882
...
@@ -828,13 +828,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -828,13 +828,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
this
.
putAll
(
data
,
fireFightingSystemMapper
.
fireWaterSysWaterPump
());
this
.
putAll
(
data
,
fireFightingSystemMapper
.
fireWaterSysWaterPump
());
this
.
putAll
(
data
,
fireFightingSystemMapper
.
fireWaterSysHydrant
());
this
.
putAll
(
data
,
fireFightingSystemMapper
.
fireWaterSysHydrant
());
this
.
putAll
(
data
,
fireFightingSystemMapper
.
fireWaterSysPipeNetwork
());
this
.
putAll
(
data
,
fireFightingSystemMapper
.
fireWaterSysPipeNetwork
());
}
else
if
(
SystemTypeEnum
.
fireSpraySys
.
getCode
().
equals
(
systemCode
)){
data
=
new
HashMap
<>();
this
.
putAll
(
data
,
fireFightingSystemMapper
.
fireSpraySysTop
());
this
.
putAll
(
data
,
fireFightingSystemMapper
.
fireSpraySys3Status
());
this
.
putAll
(
data
,
fireFightingSystemMapper
.
fireSpraySys4Status
());
this
.
putAll
(
data
,
fireFightingSystemMapper
.
fireSpraySysRisk
());
this
.
putAll
(
data
,
fireFightingSystemMapper
.
fireSpraySys4Alarm
());
}
else
{
}
else
{
data
=
fireFightingSystemMapper
.
otherSysIndexNumAndTotal
();
data
=
fireFightingSystemMapper
.
otherSysIndexNumAndTotal
();
}
}
...
...
amos-boot-system-equip/src/main/resources/changelog/init/view_all.sql
View file @
40229882
...
@@ -7430,4 +7430,289 @@ CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_fire_
...
@@ -7430,4 +7430,289 @@ CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_fire_
`wl_equipment_specific_index`
`s`
`wl_equipment_specific_index`
`s`
WHERE
WHERE
`s`
.
`equipment_index_key`
IN
(
'FAS_VESDA_SignalMShield'
,
'FAS_VESDA_Shield'
,
'FAS_VESDAActionOutputMShield'
,
'FAS_VESDAAlarmOutputMShield'
)
`s`
.
`equipment_index_key`
IN
(
'FAS_VESDA_SignalMShield'
,
'FAS_VESDA_Shield'
,
'FAS_VESDAActionOutputMShield'
,
'FAS_VESDAAlarmOutputMShield'
)
AND
upper
(
`s`
.
`value`
)
=
'TRUE'
)
AS
`vesdapb`
;
AND
upper
(
`s`
.
`value`
)
=
'TRUE'
)
AS
`vesdapb`
;
\ No newline at end of file
-- 换流变水喷雾系统3小物联监测告警(因为绍兴现场目前是已确认待确认不能共用,所以此处新增视图)
DROP
VIEW
IF
EXISTS
`v_fire_fss_stattistics`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_fss_stattistics`
AS
SELECT
(
count
(
1
)
-
count
(
`wl_equipment_specific_alarm_log`
.
`clean_time`
))
AS
`unCleaned`
,(
count
(
1
)
-
count
(
`wl_equipment_specific_alarm_log`
.
`confirm_type`
))
AS
`pending`
FROM
`wl_equipment_specific_alarm_log`
WHERE
FIND_IN_SET
(
'011023306003010000000129'
,
system_codes
)
>
0
;
-- 换流变水喷雾系统3小近一月设备告警top5
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_fss_top5_3small`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_fss_top5_3small`
AS
SELECT
ifnull
(
`a`
.
`fightSysName`
,
NULL
)
AS
`fightSysName`
,
ifnull
(
`a`
.
`fightSysCode`
,
NULL
)
AS
`fightSysCode`
,
ifnull
(
`a`
.
`fightSysId`
,
NULL
)
AS
`fightSysId`
,
ifnull
(
`a`
.
`report_date`
,
NULL
)
AS
`reportDate`
,
a
.
equipName
,
sum
(
`a`
.
`total`
)
AS
`total`
FROM
(
SELECT
`rd`
.
`index_type`
AS
`indxKey`
,
`rd`
.
`index_name`
AS
`index_name`
,
`rd`
.
`equipment_specific_name`
AS
`equipName`
,
count
(
DISTINCT
`rd`
.
`equipment_specific_id`
)
AS
`total`
,
`rd`
.
`report_date`
AS
`report_date`
,
`fs`
.
`name`
AS
`fightSysName`
,
`fs`
.
`code`
AS
`fightSysCode`
,
`fs`
.
`id`
AS
`fightSysId`
,
rd
.
equipment_specific_id
AS
equipId
FROM
(
`wl_equipment_alarm_report_day`
`rd`
LEFT
JOIN
`f_fire_fighting_system`
`fs`
ON
(
(
0
<>
find_in_set
(
`fs`
.
`id`
,
`rd`
.
`system_ids`
)
)
)
)
WHERE
(
(
(
curdate
()
-
INTERVAL
30
DAY
)
<=
cast
(
`rd`
.
`report_date`
AS
date
)
)
AND
(
-- 此处需要更改为换流变的系统code
`fs`
.
`code`
=
'011023306003010000000129'
)
AND
(
(
`rd`
.
`index_type`
LIKE
'%Fault'
)
OR
(
`rd`
.
`index_type`
LIKE
'%FireAlarm'
)
OR
(
`rd`
.
`index_type`
LIKE
'%Shield'
)
)
AND
(
`rd`
.
`value`
=
'true'
)
)
GROUP
BY
`rd`
.
`equipment_specific_id`
,
`rd`
.
`report_date`
)
`a`
GROUP
BY
a
.
equipId
ORDER
BY
total
DESC
LIMIT
5
;
-- 换流变水喷雾系统3小设备状态统计视图
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_fss_3small`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_fss_3small`
AS
SELECT
b
.
id
AS
`id`
,
b
.
equipName
,
(
CASE
WHEN
b
.
totalNum
>
0
THEN
'异常'
ELSE
'正常'
END
)
`status`
,
b
.
totalNum
AS
totalNum
FROM
(
SELECT
wesl
.
id
AS
`id`
,
a
.
equipName
,
count
(
wesl
.
id
)
AS
totalNum
FROM
(
SELECT
wes
.
`name`
AS
equipName
,
wed
.
equipment_id
AS
equipmentId
FROM
wl_equipment_specific
wes
LEFT
JOIN
wl_equipment_detail
wed
ON
wed
.
id
=
wes
.
equipment_detail_id
WHERE
--此处需要更改为水喷雾系统id
FIND_IN_SET
(
'1619086103649'
,
wes
.
system_id
)
>
0
GROUP
BY
wed
.
equipment_id
)
a
LEFT
JOIN
wl_equipment_specific_alarm_log
wesl
ON
wesl
.
equipment_id
=
a
.
equipmentId
GROUP
BY
a
.
equipmentId
)
b
;
-- 换流变水喷雾系统4小设备状态统计视图
DROP
VIEW
IF
EXISTS
`v_fire_equip_status_fss`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_status_fss`
AS
SELECT
sum
((
CASE
WHEN
(
`temp`
.
`value`
=
'true'
)
THEN
1
ELSE
0
END
))
AS
`total`
,
`temp`
.
`fieldlabel`
AS
`fieldlabel`
,
`temp`
.
`fieldname`
AS
`fieldname`
FROM
(
SELECT
(
CASE
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%FireAlarm'
)
THEN
'FireAlarm'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Fault'
)
THEN
'Fault'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Shield'
)
THEN
'Shield'
ELSE
NULL
END
)
AS
`fieldname`
,(
CASE
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%FireAlarm'
)
THEN
'火灾报警'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Fault'
)
THEN
'故障'
WHEN
(
`esi`
.
`equipment_index_key`
LIKE
'%Shield'
)
THEN
'屏蔽'
ELSE
NULL
END
)
AS
`fieldlabel`
,
`esi`
.
`value`
AS
`value`
FROM
((
`wl_equipment_specific_index`
`esi`
LEFT
JOIN
`wl_equipment_specific`
`es`
ON
((
`es`
.
`id`
=
`esi`
.
`equipment_specific_id`
)))
LEFT
JOIN
`f_fire_fighting_system`
`fs`
ON
((
0
<>
find_in_set
(
`fs`
.
`id`
,
`es`
.
`system_id`
))))
WHERE
((
--此处需要更改为水喷雾系统code
`fs`
.
`code`
=
'011023306003010000000129'
)
AND
((
`esi`
.
`equipment_index_key`
LIKE
'%FireAlarm'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%Fault'
)
OR
(
`esi`
.
`equipment_index_key`
LIKE
'%Shield'
))))
`temp`
GROUP
BY
`temp`
.
`fieldlabel`
,
`temp`
.
`fieldname`
;
-- 换流变水喷雾系统4小7天风险趋势统计视图
DROP
VIEW
IF
EXISTS
`v_fire_fsssys_alarm_equip_total_7d`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_fsssys_alarm_equip_total_7d`
AS
SELECT
ifnull
(
`b`
.
`fightSysId`
,
NULL
)
AS
`fightSysId`
,
ifnull
(
`b`
.
`fightSysCode`
,
NULL
)
AS
`fightSysCode`
,
ifnull
(
`b`
.
`fightSysName`
,
NULL
)
AS
`fightSysName`
,
ifnull
(
`b`
.
`reportDate`
,
`c`
.
`click_date`
)
AS
`reportDate`
,
ifnull
(
`b`
.
`FireAlarm`
,
0
)
AS
`FireAlarm`
,
ifnull
(
`b`
.
`Fault`
,
0
)
AS
`Fault`
,
ifnull
(
`b`
.
`Shield`
,
0
)
AS
`Shield`
FROM
((
SELECT
curdate
()
AS
`click_date`
UNION
ALL
SELECT
(
curdate
()
-
INTERVAL
1
DAY
)
AS
`click_date`
UNION
ALL
SELECT
(
curdate
()
-
INTERVAL
2
DAY
)
AS
`click_date`
UNION
ALL
SELECT
(
curdate
()
-
INTERVAL
3
DAY
)
AS
`click_date`
UNION
ALL
SELECT
(
curdate
()
-
INTERVAL
4
DAY
)
AS
`click_date`
UNION
ALL
SELECT
(
curdate
()
-
INTERVAL
5
DAY
)
AS
`click_date`
UNION
ALL
SELECT
(
curdate
()
-
INTERVAL
6
DAY
)
AS
`click_date`
)
`c`
LEFT
JOIN
(
SELECT
ifnull
(
`a`
.
`fightSysName`
,
NULL
)
AS
`fightSysName`
,
ifnull
(
`a`
.
`fightSysCode`
,
NULL
)
AS
`fightSysCode`
,
ifnull
(
`a`
.
`fightSysId`
,
NULL
)
AS
`fightSysId`
,
ifnull
(
`a`
.
`report_date`
,
NULL
)
AS
`reportDate`
,
sum
(
IF
(
locate
(
'Fault'
,
`a`
.
`indxKey`
),
`a`
.
`total`
,
0
))
AS
`Fault`
,
sum
(
IF
(
locate
(
'FireAlarm'
,
`a`
.
`indxKey`
),
`a`
.
`total`
,
0
))
AS
`FireAlarm`
,
sum
(
IF
(
locate
(
'Shield'
,
`a`
.
`indxKey`
),
`a`
.
`total`
,
0
))
AS
`Shield`
FROM
(
SELECT
`rd`
.
`index_type`
AS
`indxKey`
,
`rd`
.
`index_name`
AS
`index_name`
,
count
(
DISTINCT
`rd`
.
`equipment_specific_id`
)
AS
`total`
,
`rd`
.
`report_date`
AS
`report_date`
,
`fs`
.
`name`
AS
`fightSysName`
,
`fs`
.
`code`
AS
`fightSysCode`
,
`fs`
.
`id`
AS
`fightSysId`
FROM
(
`wl_equipment_alarm_report_day`
`rd`
LEFT
JOIN
`f_fire_fighting_system`
`fs`
ON
((
0
<>
find_in_set
(
`fs`
.
`id`
,
`rd`
.
`system_ids`
))))
WHERE
(((
curdate
()
-
INTERVAL
7
DAY
)
<=
cast
(
`rd`
.
`report_date`
AS
date
))
--此处需要更改为水喷雾系统code
AND
(
`fs`
.
`code`
=
'011023306003010000000129'
)
AND
((
`rd`
.
`index_type`
LIKE
'%Fault'
)
OR
(
`rd`
.
`index_type`
LIKE
'%FireAlarm'
)
OR
(
`rd`
.
`index_type`
LIKE
'%Shield'
))
AND
(
`rd`
.
`value`
=
'true'
))
GROUP
BY
`rd`
.
`equipment_specific_id`
,
`rd`
.
`report_date`
,
`rd`
.
`alarm_type_name`
)
`a`
GROUP
BY
`a`
.
`report_date`
,
`a`
.
`fightSysCode`
)
`b`
ON
((
to_days
(
`c`
.
`click_date`
)
=
to_days
(
`b`
.
`reportDate`
))))
ORDER
BY
`c`
.
`click_date`
;
-- 换流变水喷雾系统4小60List统计视图
DROP
VIEW
IF
EXISTS
`v_fire_equip_alarm_60list_fss`
;
CREATE
ALGORITHM
=
UNDEFINED
DEFINER
=
`root`
@
`%`
SQL
SECURITY
DEFINER
VIEW
`v_fire_equip_alarm_60list_fss`
AS
SELECT
`sa`
.
`id`
AS
`id`
,
`ec`
.
`code`
AS
`mRid`
,
`sa`
.
`equipment_specific_name`
AS
`specificName`
,
`sa`
.
`equipment_specific_index_key`
AS
`indexKey`
,
`sa`
.
`equipment_specific_index_name`
AS
`indexName`
,
`sa`
.
`equipment_specific_id`
AS
`specificId`
,
IF
((
`sa`
.
`clean_time`
IS
NOT
NULL
),
'已消除'
,
'未消除'
)
AS
`cleanStatus`
,
`sa`
.
`iot_code`
AS
`iotCode`
,
`sa`
.
`create_date`
AS
`createDate`
FROM
(
`wl_equipment_specific_alarm_log`
`sa`
LEFT
JOIN
`wl_equipment_specific`
`ec`
ON
((
`sa`
.
`equipment_specific_id`
=
`ec`
.
`id`
)))
WHERE
(
--此处需要更改为水喷雾系统code
0
<>
find_in_set
(
'011023306003010000000013'
,
`sa`
.
`system_codes`
))
ORDER
BY
`sa`
.
`create_date`
DESC
LIMIT
60
;
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
40229882
...
@@ -854,26 +854,6 @@
...
@@ -854,26 +854,6 @@
select * from v_fire_onl_num
select * from v_fire_onl_num
</select>
</select>
<select
id=
"fireSpraySysTop"
resultType=
"Map"
>
select * from v_fire_equip_alarm_fss_top5_3small
</select>
<select
id=
"fireSpraySys3Status"
resultType=
"Map"
>
select * from v_fire_equip_alarm_fss_3small
</select>
<select
id=
"fireSpraySys4Status"
resultType=
"Map"
>
select * from v_fire_equip_status_fss
</select>
<select
id=
"fireSpraySysRisk"
resultType=
"Map"
>
select * from v_fire_fsssys_alarm_equip_total_7d
</select>
<select
id=
"fireSpraySys4Alarm"
resultType=
"Map"
>
select * from v_fire_equip_alarm_60list_fss
</select>
<select
id=
"getFireCafsSystem"
resultType=
"Map"
>
<select
id=
"getFireCafsSystem"
resultType=
"Map"
>
select * from v_fire_cafs_num
select * from v_fire_cafs_num
</select>
</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