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
ca27f25f
Commit
ca27f25f
authored
Nov 21, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改物联报表
parent
9e0491c4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
8 deletions
+48
-8
EquipmentSpecificAlarmMapper.java
...join/equipmanage/mapper/EquipmentSpecificAlarmMapper.java
+2
-0
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+21
-8
iotDayReport.ftl
...boot-system-equip/src/main/resources/ftl/iotDayReport.ftl
+0
-0
iotMonthReport.ftl
...ot-system-equip/src/main/resources/ftl/iotMonthReport.ftl
+0
-0
iotWeekReport.ftl
...oot-system-equip/src/main/resources/ftl/iotWeekReport.ftl
+0
-0
EquipmentSpecificAlarmMapper.xml
...rc/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
+25
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificAlarmMapper.java
View file @
ca27f25f
...
...
@@ -234,4 +234,6 @@ public interface EquipmentSpecificAlarmMapper extends BaseMapper<EquipmentSpecif
void
updateStatusByAlarm
();
void
clearAlarmData
(
@Param
(
"equipmentSpecificId"
)
Long
equipmentSpecificId
);
List
<
Map
<
String
,
Object
>>
getAlarmDetailByDate
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"sysId"
)
Long
sysId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
ca27f25f
...
...
@@ -34,7 +34,6 @@ import com.yeejoin.equipmanage.fegin.JcsFeign;
import
com.yeejoin.equipmanage.mapper.*
;
import
com.yeejoin.equipmanage.remote.RemoteSecurityService
;
import
com.yeejoin.equipmanage.service.*
;
import
liquibase.pro.packaged.O
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.apache.commons.io.IOUtils
;
...
...
@@ -90,6 +89,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Autowired
private
FormInstanceMapper
formInstanceMapper
;
@Autowired
EquipmentSpecificAlarmMapper
equipmentSpecificAlarmMapper
;
@Autowired
private
SourceSceneMapper
sourceSceneMapper
;
@Value
(
"${equipment.fire.systemid}"
)
private
String
fireSystemId
;
...
...
@@ -1601,6 +1602,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
// 系统循环数据填充
ArrayList
<
Map
<
String
,
Object
>>
systemList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
attachAlarmList
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
system
))
{
// 换流站信息
if
(!
ObjectUtils
.
isEmpty
(
system
.
get
(
0
).
get
(
"stationName"
))){
...
...
@@ -1617,6 +1619,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
List
<
Map
>
collect
=
indicatorConfiguration
.
stream
().
filter
(
item
->
item
.
get
(
"code"
).
equals
(
String
.
valueOf
(
sys
.
get
(
"typeCode"
)))).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
// 附件告警数据
List
<
Map
<
String
,
Object
>>
sysAlarmList
=
equipmentSpecificAlarmMapper
.
getAlarmDetailByDate
(
bizOrgCode
,
startDate
,
endDate
,
Long
.
valueOf
(
String
.
valueOf
(
sys
.
get
(
"id"
))));
attachAlarmList
.
addAll
(
sysAlarmList
);
// 系统名称
systemData
.
put
(
"systemName"
,
ObjectUtils
.
isEmpty
(
sys
.
get
(
"name"
))
?
""
:
String
.
valueOf
(
sys
.
get
(
"name"
)));
// 系统对应指标
...
...
@@ -1711,10 +1717,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
systemList
.
add
(
systemData
);
map
.
put
(
"datalist"
,
systemList
);
}
}
map
.
put
(
"attachAlarmList"
,
attachAlarmList
);
}
else
{
return
null
;
}
...
...
@@ -1808,12 +1812,17 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
map
.
put
(
"time"
,
startDate
+
"至"
+
endDate
);
// 系统循环数据填充
ArrayList
<
Map
<
String
,
Object
>>
dataList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
attachAlarmList
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
system
:
systemList
)
{
HashMap
<
String
,
Object
>
systemData
=
new
HashMap
<>();
List
<
Map
>
collect
=
indicatorConfiguration
.
stream
().
filter
(
item
->
item
.
get
(
"code"
).
equals
(
String
.
valueOf
(
system
.
get
(
"typeCode"
)))).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
// 附件告警数据
List
<
Map
<
String
,
Object
>>
sysAlarmList
=
equipmentSpecificAlarmMapper
.
getAlarmDetailByDate
(
bizOrgCode
,
startDate
,
endDate
,
Long
.
valueOf
(
String
.
valueOf
(
system
.
get
(
"id"
))));
attachAlarmList
.
addAll
(
sysAlarmList
);
// 系统名称
systemData
.
put
(
"systemName"
,
ObjectUtils
.
isEmpty
(
system
.
get
(
"name"
))
?
""
:
String
.
valueOf
(
system
.
get
(
"name"
)));
...
...
@@ -1924,9 +1933,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
dataList
.
add
(
systemData
);
map
.
put
(
"data"
,
dataList
);
}
}
map
.
put
(
"attachAlarmList"
,
attachAlarmList
);
}
else
{
return
null
;
}
...
...
@@ -2003,14 +2011,20 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
map
.
put
(
"station"
,
""
);
}
map
.
put
(
"time"
,
startDate
);
// 系统循环数据填充
ArrayList
<
Map
<
String
,
Object
>>
dataList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
attachAlarmList
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
system
:
systemList
)
{
HashMap
<
String
,
Object
>
systemData
=
new
HashMap
<>();
List
<
Map
>
collect
=
indicatorConfiguration
.
stream
().
filter
(
item
->
item
.
get
(
"code"
).
equals
(
String
.
valueOf
(
system
.
get
(
"typeCode"
)))).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
// 附件告警数据
List
<
Map
<
String
,
Object
>>
sysAlarmList
=
equipmentSpecificAlarmMapper
.
getAlarmDetailByDate
(
bizOrgCode
,
startDate
,
endDate
,
Long
.
valueOf
(
String
.
valueOf
(
system
.
get
(
"id"
))));
attachAlarmList
.
addAll
(
sysAlarmList
);
// 系统名称
systemData
.
put
(
"systemName"
,
ObjectUtils
.
isEmpty
(
system
.
get
(
"name"
))
?
""
:
String
.
valueOf
(
system
.
get
(
"name"
)));
...
...
@@ -2122,9 +2136,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
dataList
.
add
(
systemData
);
map
.
put
(
"data"
,
dataList
);
}
}
map
.
put
(
"attachAlarmList"
,
attachAlarmList
);
}
else
{
return
null
;
}
...
...
amos-boot-system-equip/src/main/resources/ftl/iotDayReport.ftl
View file @
ca27f25f
This diff is collapsed.
Click to expand it.
amos-boot-system-equip/src/main/resources/ftl/iotMonthReport.ftl
View file @
ca27f25f
This diff is collapsed.
Click to expand it.
amos-boot-system-equip/src/main/resources/ftl/iotWeekReport.ftl
View file @
ca27f25f
This diff is collapsed.
Click to expand it.
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificAlarmMapper.xml
View file @
ca27f25f
...
...
@@ -1595,4 +1595,28 @@
DELETE FROM wl_equipment_specific_alarm_log WHERE equipment_specific_id = #{equipmentSpecificId};
DELETE FROM wl_equipment_alarm_report_day WHERE equipment_specific_id = #{equipmentSpecificId};
</delete>
<select
id=
"getAlarmDetailByDate"
resultType=
"Map"
>
SELECT
wlesa.equipment_specific_id,
wlesa.equipment_specific_name AS specificName,
wlesa.location AS location,
wlesa.equipment_specific_index_name,
concat(wlesa.equipment_specific_name, wlesa.equipment_specific_index_name) AS alamContent,
wlesa.frequency AS alarmNum,
DATE_FORMAT(wlesa.create_date, '%Y-%m-%d %H:%i:%s') AS createDate
FROM
`wl_equipment_specific_alarm` `wlesa`
LEFT JOIN f_fire_fighting_system AS sys ON FIND_IN_SET(sys.id, wlesa.system_ids)
<where>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND
wlesa.biz_org_code like concat (#{bizOrgCode},'%')
</if>
<if
test=
"startDate!=null"
>
AND wlesa.create_date
<![CDATA[>=]]>
#{startDate}
</if>
<if
test=
"endDate!=null"
>
AND wlesa.create_date
<![CDATA[<=]]>
#{endDate}
</if>
<if
test=
"sysId != null"
>
AND find_in_set(#{sysId}, wlesa.system_ids)
</if>
</where>
</select>
</mapper>
\ No newline at end of file
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