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
386d197e
Commit
386d197e
authored
Oct 12, 2023
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改告警
parent
b05d0084
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
AlarmEventServiceImpl.java
.../module/jxiop/biz/service/impl/AlarmEventServiceImpl.java
+7
-2
EquipAlarmEventServiceImpl.java
...le/jxiop/biz/service/impl/EquipAlarmEventServiceImpl.java
+10
-3
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-warn-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/AlarmEventServiceImpl.java
View file @
386d197e
...
...
@@ -6,6 +6,7 @@ import java.util.Arrays;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.concurrent.TimeUnit
;
import
org.apache.kafka.clients.consumer.ConsumerRecord
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -109,7 +110,8 @@ public class AlarmEventServiceImpl extends BaseService<AlarmEventDto, AlarmEvent
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
-
2
);
List
<
AlarmEvent
>
alarmEventList
=
this
.
baseMapper
.
getEventList
(
gatewayId
,
calendar
.
getTime
());
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd hh:mm:ss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
Calendar
car
=
Calendar
.
getInstance
();
alarmEventList
.
forEach
(
i
->
{
if
(
"true"
.
equals
(
i
.
getValue
()))
{
i
.
setValue
(
"合"
);
...
...
@@ -117,7 +119,10 @@ public class AlarmEventServiceImpl extends BaseService<AlarmEventDto, AlarmEvent
i
.
setValue
(
"分"
);
}
i
.
setStationName
(
"升压站"
);
i
.
setTime
(
sdf
.
format
(
new
Date
(
i
.
getCreatedTime
())));
long
mills
=
i
.
getCreatedTime
()/
1000000
;
car
.
setTimeInMillis
(
mills
);
//System.out.println(sdf.format(car.getTime()));
i
.
setTime
(
sdf
.
format
(
car
.
getTime
()));
});
PageInfo
<
EquipAlarmEvent
>
page
=
new
PageInfo
(
alarmEventList
);
// 构建平台数据
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-warn-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/EquipAlarmEventServiceImpl.java
View file @
386d197e
...
...
@@ -5,6 +5,7 @@ import java.util.Arrays;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.concurrent.TimeUnit
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -42,7 +43,7 @@ public class EquipAlarmEventServiceImpl
equipName
=
s
[
0
]
+
"子阵/逆变器"
+
s
[
1
];
}
else
if
(
"汇流箱"
.
equals
(
frontModule
))
{
String
[]
s
=
equipIndex
.
split
(
"-"
);
if
(
"0"
.
equals
(
s
[
2
].
indexOf
(
0
))
)
{
if
(
s
[
2
].
indexOf
(
"0"
)==
0
)
{
s
[
2
]
=
s
[
2
].
substring
(
1
);
}
equipName
=
s
[
0
]
+
"子阵/逆变器"
+
s
[
1
]
+
"/#"
+
s
[
2
]
+
"汇流箱"
;
...
...
@@ -55,14 +56,20 @@ public class EquipAlarmEventServiceImpl
List
<
EquipAlarmEvent
>
alarmEventList
=
this
.
baseMapper
.
getEventList
(
gatewayId
,
equipName
,
null
,
calendar
.
getTime
());
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd hh:mm:ss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
Calendar
car
=
Calendar
.
getInstance
();
alarmEventList
.
forEach
(
i
->
{
if
(
"true"
.
equals
(
i
.
getValue
()))
{
i
.
setValue
(
"合"
);
}
else
if
(
"false"
.
equals
(
i
.
getValue
()))
{
i
.
setValue
(
"分"
);
}
i
.
setTime
(
sdf
.
format
(
new
Date
(
i
.
getCreatedTime
())));
long
mills
=
i
.
getCreatedTime
()/
1000000
;
car
.
setTimeInMillis
(
mills
);
//System.out.println(sdf.format(car.getTime()));
i
.
setTime
(
sdf
.
format
(
car
.
getTime
()));
//car.add(Calendar.HOUR, 12);
//System.out.println(sdf.format(car.getTime()));
});
PageInfo
<
EquipAlarmEvent
>
page
=
new
PageInfo
(
alarmEventList
);
...
...
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