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
dac9e50d
Commit
dac9e50d
authored
Oct 10, 2023
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加升压站查询告警
parent
c44d440a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
24 deletions
+33
-24
AlarmEventMapper.java
.../amos/boot/module/jxiop/biz/mapper2/AlarmEventMapper.java
+4
-5
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+24
-14
AlarmEventMapper.xml
...iz/src/main/resources/mapper/cluster/AlarmEventMapper.xml
+5
-5
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/AlarmEventMapper.java
View file @
dac9e50d
...
@@ -4,16 +4,15 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -4,16 +4,15 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.AlarmEventDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.AlarmEventDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.AlarmEvent
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.AlarmEvent
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
public
interface
AlarmEventMapper
extends
BaseMapper
<
AlarmEvent
>
{
public
interface
AlarmEventMapper
extends
BaseMapper
<
AlarmEvent
>
{
String
getLastDataBySort
(
String
gatewayId
);
String
getLastDataBySort
(
String
gatewayId
);
List
<
AlarmEventDto
>
getAlarmEventList
(
String
gatewayId
,
String
stationId
,
long
current
,
long
size
,
Date
time
);
List
<
AlarmEventDto
>
getAlarmEventList
(
String
gatewayId
,
String
stationId
);
List
<
String
>
getOldAlarmsBySort
(
String
gatewayId
,
String
sort
);
List
<
String
>
getOldAlarmsBySort
(
String
gatewayId
,
String
sort
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
dac9e50d
...
@@ -1023,23 +1023,33 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1023,23 +1023,33 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
}
public
ResultsData
getAlarmEventList
(
int
current
,
int
size
,
String
stationId
)
{
public
ResultsData
getAlarmEventList
(
int
current
,
int
size
,
String
stationId
)
{
List
<
AlarmEventDto
>
alarmEventList
=
alarmEventMapper
.
getAlarmEventList
(
null
,
stationId
);
LambdaQueryWrapper
<
AlarmEvent
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
if
(
stationId
!=
null
)
{
queryWrapper
.
eq
(
AlarmEvent:
:
getStationId
,
stationId
);
}
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
-
7
);
queryWrapper
.
gt
(
AlarmEvent:
:
getCreatedTime
,
calendar
.
getTime
());
int
count
=
alarmEventMapper
.
selectCount
(
queryWrapper
);
List
<
AlarmEventDto
>
alarmEventList
=
alarmEventMapper
.
getAlarmEventList
(
null
,
stationId
,(
current
-
1
)*
size
,
size
,
calendar
.
getTime
());
// List<AlarmEventDto> sorrtedAlarmEventList = alarmEventList.stream().sorted(Comparator.comparing(AlarmEventDto::getCreatedTime).reversed()).collect(Collectors.toList());
// List<AlarmEventDto> sorrtedAlarmEventList = alarmEventList.stream().sorted(Comparator.comparing(AlarmEventDto::getCreatedTime).reversed()).collect(Collectors.toList());
ArrayList
<
Map
<
String
,
String
>>
resultList
=
new
ArrayList
<>();
//
ArrayList<Map<String, String>> resultList = new ArrayList<>();
alarmEventList
.
forEach
(
item
->
{
//
alarmEventList.forEach(item -> {
HashMap
<
String
,
String
>
stringStringHashMap
=
new
HashMap
<>();
//
HashMap<String, String> stringStringHashMap = new HashMap<>();
stringStringHashMap
.
put
(
"stationName"
,
item
.
getStationName
());
//
stringStringHashMap.put("stationName", item.getStationName());
stringStringHashMap
.
put
(
"eventDesc"
,
item
.
getEventDesc
());
//
stringStringHashMap.put("eventDesc", item.getEventDesc());
stringStringHashMap
.
put
(
"alarmGroupName"
,
item
.
getAlarmGroupName
());
//
stringStringHashMap.put("alarmGroupName", item.getAlarmGroupName());
stringStringHashMap
.
put
(
"eventTime"
,
item
.
getEventTime
());
//
stringStringHashMap.put("eventTime", item.getEventTime());
stringStringHashMap
.
put
(
"eventMovement"
,
item
.
getEventMovement
());
//
stringStringHashMap.put("eventMovement", item.getEventMovement());
resultList
.
add
(
stringStringHashMap
);
//
resultList.add(stringStringHashMap);
});
//
});
//构建平台数据
//构建平台数据
DataGridMock
DataGridMock
=
new
DataGridMock
(
current
,
resultList
.
size
(),
false
,
current
,
resul
tList
);
DataGridMock
DataGridMock
=
new
DataGridMock
(
current
,
count
,
false
,
current
,
alarmEven
tList
);
ColModel
colModelStationName
=
new
ColModel
(
"stationName"
,
"stationName"
,
"名称"
,
"名称"
,
"dataGrid"
,
"stationName"
);
ColModel
colModelStationName
=
new
ColModel
(
"stationName"
,
"stationName"
,
"名称"
,
"名称"
,
"dataGrid"
,
"stationName"
);
ColModel
colModelEventDesc
=
new
ColModel
(
"eventDesc"
,
"eventDesc"
,
"事件描述"
,
"事件描述"
,
"dataGrid"
,
"eventDesc"
);
ColModel
colModelEventDesc
=
new
ColModel
(
"eventDesc"
,
"eventDesc"
,
"事件描述"
,
"事件描述"
,
"dataGrid"
,
"eventDesc"
);
ColModel
colModelAlarmGroupName
=
new
ColModel
(
"alarmGroupName"
,
"alarmGroupName"
,
"事件告警组"
,
"事件告警组"
,
"dataGrid"
,
"alarmGroupName"
);
ColModel
colModelAlarmGroupName
=
new
ColModel
(
"alarmGroupName"
,
"alarmGroupName"
,
"事件告警组"
,
"事件告警组"
,
"dataGrid"
,
"alarmGroupName"
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/mapper/cluster/AlarmEventMapper.xml
View file @
dac9e50d
...
@@ -15,15 +15,15 @@
...
@@ -15,15 +15,15 @@
from
from
fault_alarm_event
fault_alarm_event
<where>
<where>
<if
test=
"gatewayId != null and gatewayId != ''"
>
<if
test=
"gatewayId != null and gatewayId != ''"
>
gateway_id = #{gatewayId}
gateway_id = #{gatewayId}
</if>
</if>
<if
test=
"stationId != null and stationId != ''"
>
<if
test=
"stationId != null and stationId != ''"
>
station_id = #{stationId}
station_id = #{stationId}
</if>
</if>
AND
DATE_SUB(CURDATE(), INTERVAL 6 DAY)
<
= event_time
AND
#{time}
<
= event_time
</where>
</where>
order by event_time desc
ORDER BY event_time DESC LIMIT #{current}, #{size}
</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