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
55f5457b
Commit
55f5457b
authored
Aug 23, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
7f237a92
e4861c4a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+5
-1
HealthStatusIndicatorServiceImpl.java
...op/biz/service/impl/HealthStatusIndicatorServiceImpl.java
+6
-6
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
View file @
55f5457b
...
...
@@ -946,6 +946,7 @@ public class CommonServiceImpl {
@Scheduled
(
cron
=
"0 0/10 * * * ?"
)
private
void
healthWarningMinuteByFJ
()
{
Date
time
=
new
Date
();
List
<
IdxBizFanPointProcessVariableClassificationDto
>
data
=
idxBizFanPointProcessVariableClassificationMapper
.
getInfluxDBData
();
Map
<
String
,
List
<
IdxBizFanPointProcessVariableClassificationDto
>>
maps
=
data
.
stream
().
collect
(
Collectors
.
groupingBy
(
IdxBizFanPointProcessVariableClassificationDto:
:
getGatewayId
));
BoolQueryBuilder
boolMustAll
=
QueryBuilders
.
boolQuery
();
...
...
@@ -1041,6 +1042,8 @@ public class CommonServiceImpl {
BeanUtils
.
copyProperties
(
idxBizFanHealthIndex
,
obj
);
idxBizFanHealthIndex
.
setHealthIndex
(
object
.
getDouble
(
"indexValue"
));
idxBizFanHealthIndex
.
setAnalysisObjSeq
(
obj
.
getSequenceNbr
());
idxBizFanHealthIndex
.
setRecDate
(
time
);
idxBizFanHealthIndex
.
setSequenceNbr
(
null
);
idxBizFanHealthIndex
.
setRecDate
(
new
Date
());
//获取健康指数对应等级
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
...
...
@@ -1070,6 +1073,7 @@ public class CommonServiceImpl {
@Scheduled
(
cron
=
"0 0/10 * * * ?"
)
private
void
healthWarningMinuteByGF
()
{
Date
time
=
new
Date
();
List
<
IdxBizPvPointProcessVariableClassificationDto
>
data
=
idxBizPvPointProcessVariableClassificationMapper
.
getInfluxDBData
();
Map
<
String
,
List
<
IdxBizPvPointProcessVariableClassificationDto
>>
maps
=
data
.
stream
().
collect
(
Collectors
.
groupingBy
(
IdxBizPvPointProcessVariableClassificationDto:
:
getGatewayId
));
BoolQueryBuilder
boolMustAll
=
QueryBuilders
.
boolQuery
();
...
...
@@ -1165,7 +1169,7 @@ public class CommonServiceImpl {
BeanUtils
.
copyProperties
(
idxBizFanHealthIndex
,
obj
);
idxBizFanHealthIndex
.
setHealthIndex
(
object
.
getDouble
(
"indexValue"
));
idxBizFanHealthIndex
.
setAnalysisObjSeq
(
obj
.
getSequenceNbr
());
idxBizFanHealthIndex
.
setRecDate
(
new
Date
()
);
idxBizFanHealthIndex
.
setRecDate
(
time
);
//获取健康指数对应等级
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"设备"
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/HealthStatusIndicatorServiceImpl.java
View file @
55f5457b
...
...
@@ -62,7 +62,7 @@ public class HealthStatusIndicatorServiceImpl {
private
void
healthWarningMinuteGF
()
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
calendar
.
get
(
Calendar
.
HOUR_OF_DAY
)-
1
);
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm
:ss
"
);
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
LambdaQueryWrapper
<
IdxBizPvHealthIndex
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
IdxBizPvHealthIndex:
:
getAnalysisType
,
"按时刻"
);
...
...
@@ -129,7 +129,7 @@ public class HealthStatusIndicatorServiceImpl {
private
void
healthWarningHourGF
()
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
calendar
.
get
(
Calendar
.
HOUR_OF_DAY
)-
5
);
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm
:ss
"
);
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
LambdaQueryWrapper
<
IdxBizPvHealthIndex
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
IdxBizPvHealthIndex:
:
getAnalysisType
,
"按小时"
);
...
...
@@ -197,7 +197,7 @@ public class HealthStatusIndicatorServiceImpl {
private
void
healthWarningDayGF
()
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
get
(
Calendar
.
DAY_OF_MONTH
)-
3
);
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd
HH:mm:ss
"
);
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
LambdaQueryWrapper
<
IdxBizPvHealthIndex
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
IdxBizPvHealthIndex:
:
getAnalysisType
,
"按天"
);
...
...
@@ -259,7 +259,7 @@ public class HealthStatusIndicatorServiceImpl {
private
void
healthWarningMinute
()
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
calendar
.
get
(
Calendar
.
HOUR_OF_DAY
)-
1
);
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm
:ss
"
);
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
LambdaQueryWrapper
<
IdxBizFanHealthIndex
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
IdxBizFanHealthIndex:
:
getAnalysisType
,
"按时刻"
);
...
...
@@ -326,7 +326,7 @@ public class HealthStatusIndicatorServiceImpl {
private
void
healthWarningHour
()
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
calendar
.
get
(
Calendar
.
HOUR_OF_DAY
)-
5
);
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm
:ss
"
);
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
LambdaQueryWrapper
<
IdxBizFanHealthIndex
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
IdxBizFanHealthIndex:
:
getAnalysisType
,
"按小时"
);
...
...
@@ -394,7 +394,7 @@ public class HealthStatusIndicatorServiceImpl {
private
void
healthWarningDay
()
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
get
(
Calendar
.
DAY_OF_MONTH
)-
3
);
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd
HH:mm:ss
"
);
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
LambdaQueryWrapper
<
IdxBizFanHealthIndex
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
IdxBizFanHealthIndex:
:
getAnalysisType
,
"按天"
);
...
...
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