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
dc72176e
Commit
dc72176e
authored
Oct 13, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
cf5aeeae
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
117 additions
and
65 deletions
+117
-65
AsyncScheduledTaskConfig.java
...oot/module/jxiop/biz/config/AsyncScheduledTaskConfig.java
+29
-0
IdxBizFanWarningRuleSet.java
...boot/module/jxiop/biz/entity/IdxBizFanWarningRuleSet.java
+3
-2
IdxBizPvWarningRuleSet.java
.../boot/module/jxiop/biz/entity/IdxBizPvWarningRuleSet.java
+3
-2
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+69
-55
HealthStatusIndicatorServiceImpl.java
...op/biz/service/impl/HealthStatusIndicatorServiceImpl.java
+13
-6
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/config/AsyncScheduledTaskConfig.java
0 → 100644
View file @
dc72176e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
config
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
;
import
org.springframework.stereotype.Component
;
import
java.util.concurrent.Executor
;
import
java.util.concurrent.ThreadPoolExecutor
;
@Component
public
class
AsyncScheduledTaskConfig
{
@Bean
(
"async"
)
public
Executor
asyncScheduledTask
(){
ThreadPoolTaskExecutor
executor
=
new
ThreadPoolTaskExecutor
();
executor
.
setMaxPoolSize
(
50
);
executor
.
setCorePoolSize
(
20
);
executor
.
setQueueCapacity
(
50
);
executor
.
setThreadNamePrefix
(
"async-thread-"
);
executor
.
setKeepAliveSeconds
(
60
);
executor
.
setRejectedExecutionHandler
(
new
ThreadPoolExecutor
.
AbortPolicy
(){});
executor
.
initialize
();
return
executor
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizFanWarningRuleSet.java
View file @
dc72176e
...
...
@@ -8,6 +8,7 @@ import lombok.EqualsAndHashCode;
import
lombok.experimental.Accessors
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
/**
*
...
...
@@ -39,7 +40,7 @@ public class IdxBizFanWarningRuleSet{
*
*/
@TableField
(
"REC_DATE"
)
private
LocalDateTim
e
recDate
;
private
Dat
e
recDate
;
/**
*
...
...
@@ -81,7 +82,7 @@ public class IdxBizFanWarningRuleSet{
*
*/
@TableField
(
"ANALYSIS_POINT_ID"
)
private
Integer
analysisPointId
;
private
String
analysisPointId
;
/**
* 分析周期((按天、10min、小时)
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizPvWarningRuleSet.java
View file @
dc72176e
...
...
@@ -8,6 +8,7 @@ import lombok.EqualsAndHashCode;
import
lombok.experimental.Accessors
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
/**
*
...
...
@@ -39,7 +40,7 @@ public class IdxBizPvWarningRuleSet{
*
*/
@TableField
(
"REC_DATE"
)
private
LocalDateTim
e
recDate
;
private
Dat
e
recDate
;
/**
*
...
...
@@ -81,7 +82,7 @@ public class IdxBizPvWarningRuleSet{
* 分析变量测点ID
*/
@TableField
(
"ANALYSIS_POINT_ID"
)
private
Integer
analysisPointId
;
private
String
analysisPointId
;
/**
* 分析周期((按天、10min、小时)
...
...
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 @
dc72176e
...
...
@@ -31,6 +31,7 @@ import org.springframework.data.elasticsearch.core.SearchHit;
import
org.springframework.data.elasticsearch.core.SearchHits
;
import
org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder
;
import
org.springframework.data.elasticsearch.core.query.Query
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -1458,6 +1459,7 @@ public class CommonServiceImpl {
@Scheduled
(
cron
=
"0 0/10 * * * ?"
)
@Async
(
"async"
)
public
void
healthWarningMinuteByFan
()
{
Date
time
=
new
Date
();
List
<
IdxBizFanPointProcessVariableClassificationDto
>
data
=
idxBizFanPointProcessVariableClassificationMapper
.
getInfluxDBData
();
...
...
@@ -1526,10 +1528,12 @@ public class CommonServiceImpl {
}
}
if
(
idxBizUhef
.
getProcess1Min
()
<=
value1
&&
value1
<=
idxBizUhef
.
getProcess1Max
()
&&
idxBizUhef
.
getProcess2Min
()
<=
value2
&&
value2
<=
idxBizUhef
.
getPorcess2Max
()
&&
idxBizUhef
.
getProcess3Min
()
<=
value3
&&
value3
<=
idxBizUhef
.
getProcess3Max
())
{
analysisVariableList
.
add
(
value4
);
stdDevList
.
add
(
idxBizUhef
.
getAnalysisStdDev
());
centerValueList
.
add
(
idxBizUhef
.
getAnalysisCenterValue
());
analysisVariableIdList
.
add
(
idxBizUhef
.
getAnalysisPointId
());
if
(!
analysisVariableIdList
.
contains
(
idxBizUhef
.
getAnalysisPointId
())){
analysisVariableList
.
add
(
value4
);
stdDevList
.
add
(
idxBizUhef
.
getAnalysisStdDev
());
centerValueList
.
add
(
idxBizUhef
.
getAnalysisCenterValue
());
analysisVariableIdList
.
add
(
idxBizUhef
.
getAnalysisPointId
());
}
}
}
...
...
@@ -1547,40 +1551,43 @@ public class CommonServiceImpl {
JSONArray
indexValueArray
=
jsonObject
.
getJSONArray
(
"indexValue"
);
JSONArray
scoreValueArray
=
jsonObject
.
getJSONArray
(
"scoreValue"
);
JSONArray
analysisVariableIdArray
=
jsonObject
.
getJSONArray
(
"analysisVariableId"
);
List
<
String
>
jsonArrayToStringList
=
JSONObject
.
parseArray
(
analysisVariableIdArray
.
toJSONString
(),
String
.
class
);
LambdaQueryWrapper
<
IdxBizFanPointProcessVariableClassification
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
in
(
IdxBizFanPointProcessVariableClassification:
:
getSequenceNbr
,
analysisVariableIdArray
);
queryWrapper
.
in
(
IdxBizFanPointProcessVariableClassification:
:
getSequenceNbr
,
jsonArrayToStringList
);
List
<
IdxBizFanPointProcessVariableClassification
>
list
=
idxBizFanPointProcessVariableClassificationMapper
.
selectList
(
queryWrapper
);
List
<
IdxBizFanHealthIndex
>
idxBizFanHealthIndexs
=
new
ArrayList
<>();
for
(
IdxBizFanPointProcessVariableClassification
obj
:
list
)
{
for
(
int
i
=
0
;
i
<
analysisVariableIdArray
.
size
();
i
++)
{
IdxBizFanHealthIndex
idxBizFanHealthIndex
=
new
IdxBizFanHealthIndex
();
BeanUtils
.
copyProperties
(
obj
,
idxBizFanHealthIndex
);
idxBizFanHealthIndex
.
setHealthIndex
(
indexValueArray
.
getDoubleValue
(
i
)<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
));
idxBizFanHealthIndex
.
setAnalysisObjSeq
(
obj
.
getSequenceNbr
());
idxBizFanHealthIndex
.
setRecDate
(
time
);
idxBizFanHealthIndex
.
setSequenceNbr
(
null
);
idxBizFanHealthIndex
.
setRecDate
(
new
Date
());
idxBizFanHealthIndex
.
setWeigth
(
1.0
);
//获取健康指数对应等级
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"测点"
);
query
.
eq
(
IdxBizFanHealthLevel:
:
getStatus
,
obj
.
getStation
());
query
.
le
(
IdxBizFanHealthLevel:
:
getGroupLowerLimit
,
indexValueArray
.
getDoubleValue
(
i
)<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
));
query
.
ge
(
IdxBizFanHealthLevel:
:
getGroupUpperLimit
,
indexValueArray
.
getDoubleValue
(
i
)<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
));
IdxBizFanHealthLevel
idxBizFanHealthLevel
=
idxBizFanHealthLevelMapper
.
selectOne
(
query
);
idxBizFanHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
idxBizFanHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizFanHealthIndex
.
setAnalysisObjType
(
"测点"
);
if
(
ObjectUtils
.
isEmpty
(
scoreValueArray
.
getDoubleValue
(
i
))){
System
.
out
.
println
(
JSON
.
toJSONString
(
requestMap
));
idxBizFanHealthIndex
.
setANOMALY
(
0.0
);
}
else
{
idxBizFanHealthIndex
.
setANOMALY
(
scoreValueArray
.
getDoubleValue
(
i
));
if
(
analysisVariableIdArray
.
get
(
i
).
toString
().
equals
(
obj
.
getSequenceNbr
())){
IdxBizFanHealthIndex
idxBizFanHealthIndex
=
new
IdxBizFanHealthIndex
();
BeanUtils
.
copyProperties
(
obj
,
idxBizFanHealthIndex
);
idxBizFanHealthIndex
.
setHealthIndex
(
indexValueArray
.
getDoubleValue
(
i
)<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
));
idxBizFanHealthIndex
.
setAnalysisObjSeq
(
obj
.
getSequenceNbr
());
idxBizFanHealthIndex
.
setRecDate
(
time
);
idxBizFanHealthIndex
.
setSequenceNbr
(
null
);
idxBizFanHealthIndex
.
setRecDate
(
new
Date
());
idxBizFanHealthIndex
.
setWeigth
(
1.0
);
//获取健康指数对应等级
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"测点"
);
query
.
eq
(
IdxBizFanHealthLevel:
:
getStatus
,
obj
.
getStation
());
query
.
le
(
IdxBizFanHealthLevel:
:
getGroupLowerLimit
,
indexValueArray
.
getDoubleValue
(
i
)<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
));
query
.
ge
(
IdxBizFanHealthLevel:
:
getGroupUpperLimit
,
indexValueArray
.
getDoubleValue
(
i
)<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
));
IdxBizFanHealthLevel
idxBizFanHealthLevel
=
idxBizFanHealthLevelMapper
.
selectOne
(
query
);
idxBizFanHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
idxBizFanHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizFanHealthIndex
.
setAnalysisObjType
(
"测点"
);
if
(
ObjectUtils
.
isEmpty
(
scoreValueArray
.
getDoubleValue
(
i
))){
System
.
out
.
println
(
JSON
.
toJSONString
(
requestMap
));
idxBizFanHealthIndex
.
setANOMALY
(
0.0
);
}
else
{
idxBizFanHealthIndex
.
setANOMALY
(
scoreValueArray
.
getDoubleValue
(
i
));
}
idxBizFanHealthIndex
.
setANALYSISTIME
(
DateUtils
.
getDateNowString
());
idxBizFanHealthIndexs
.
add
(
idxBizFanHealthIndex
);
}
idxBizFanHealthIndex
.
setANALYSISTIME
(
DateUtils
.
getDateNowString
());
idxBizFanHealthIndexs
.
add
(
idxBizFanHealthIndex
);
}
}
idxBizFanHealthIndexService
.
saveBatch
(
idxBizFanHealthIndexs
);
...
...
@@ -1597,6 +1604,7 @@ public class CommonServiceImpl {
@Scheduled
(
cron
=
"0 0/10 * * * ?"
)
@Async
(
"async"
)
public
void
healthWarningMinuteByPv
()
{
Date
time
=
new
Date
();
List
<
IdxBizPvPointProcessVariableClassificationDto
>
data
=
idxBizPvPointProcessVariableClassificationMapper
.
getInfluxDBData
();
...
...
@@ -1661,10 +1669,12 @@ public class CommonServiceImpl {
}
}
if
(
idxBizUhef
.
getProcess1Min
()
<=
value1
&&
value1
<=
idxBizUhef
.
getProcess1Max
()
&&
idxBizUhef
.
getProcess2Min
()
<=
value2
&&
value2
<=
idxBizUhef
.
getProcess2Max
()
&&
idxBizUhef
.
getProcess3Min
()
<=
value3
&&
value3
<=
idxBizUhef
.
getProcess3Max
())
{
analysisVariableList
.
add
(
value4
);
stdDevList
.
add
(
idxBizUhef
.
getAnalysisStdDev
());
centerValueList
.
add
(
idxBizUhef
.
getAnalysisCenterValue
());
analysisVariableIdList
.
add
(
idxBizUhef
.
getAnalysisPointId
());
if
(!
analysisVariableIdList
.
contains
(
idxBizUhef
.
getAnalysisPointId
())){
analysisVariableList
.
add
(
value4
);
stdDevList
.
add
(
idxBizUhef
.
getAnalysisStdDev
());
centerValueList
.
add
(
idxBizUhef
.
getAnalysisCenterValue
());
analysisVariableIdList
.
add
(
idxBizUhef
.
getAnalysisPointId
());
}
}
}
requestMap
.
put
(
"analysisVariable"
,
analysisVariableList
);
...
...
@@ -1678,31 +1688,35 @@ public class CommonServiceImpl {
JSONArray
indexValueArray
=
jsonObject
.
getJSONArray
(
"indexValue"
);
JSONArray
scoreValueArray
=
jsonObject
.
getJSONArray
(
"scoreValue"
);
JSONArray
analysisVariableIdArray
=
jsonObject
.
getJSONArray
(
"analysisVariableId"
);
List
<
String
>
jsonArrayToStringList
=
JSONObject
.
parseArray
(
analysisVariableIdArray
.
toJSONString
(),
String
.
class
);
LambdaQueryWrapper
<
IdxBizPvPointProcessVariableClassification
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
in
(
IdxBizPvPointProcessVariableClassification:
:
getSequenceNbr
,
analysisVariableIdArray
);
queryWrapper
.
in
(
IdxBizPvPointProcessVariableClassification:
:
getSequenceNbr
,
jsonArrayToStringList
);
List
<
IdxBizPvPointProcessVariableClassification
>
list
=
idxBizPvPointProcessVariableClassificationMapper
.
selectList
(
queryWrapper
);
List
<
IdxBizPvHealthIndex
>
idxBizPvHealthIndexs
=
new
ArrayList
<>();
for
(
IdxBizPvPointProcessVariableClassification
obj
:
list
)
{
for
(
int
i
=
0
;
i
<
analysisVariableIdArray
.
size
();
i
++)
{
IdxBizPvHealthIndex
idxBizPvHealthIndex
=
new
IdxBizPvHealthIndex
();
BeanUtils
.
copyProperties
(
obj
,
idxBizPvHealthIndex
);
idxBizPvHealthIndex
.
setHealthIndex
(
indexValueArray
.
getDoubleValue
(
i
)<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
));
idxBizPvHealthIndex
.
setAnalysisObjSeq
(
obj
.
getSequenceNbr
());
idxBizPvHealthIndex
.
setRecDate
(
time
);
idxBizPvHealthIndex
.
setWeigth
(
1.0
);
//获取健康指数对应等级
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"测点"
);
query
.
eq
(
IdxBizPvHealthLevel:
:
getStatus
,
obj
.
getStation
());
query
.
le
(
IdxBizPvHealthLevel:
:
getGroupLowerLimit
,
indexValueArray
.
getDoubleValue
(
i
)
<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
));
query
.
ge
(
IdxBizPvHealthLevel:
:
getGroupUpperLimit
,
indexValueArray
.
getDoubleValue
(
i
)
<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
)
);
IdxBizPvHealthLevel
idxBizFanHealthLevel
=
idxBizPvHealthLevelMapper
.
selectOne
(
query
);
idxBizPvHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
idxBizPvHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizPvHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizPvHealthIndex
.
setANOMALY
(
scoreValueArray
.
getDoubleValue
(
i
));
idxBizPvHealthIndex
.
setANALYSISTIME
(
DateUtils
.
getDateNowString
());
idxBizPvHealthIndexs
.
add
(
idxBizPvHealthIndex
);
if
(
analysisVariableIdArray
.
get
(
i
).
toString
().
equals
(
obj
.
getSequenceNbr
())){
IdxBizPvHealthIndex
idxBizPvHealthIndex
=
new
IdxBizPvHealthIndex
();
BeanUtils
.
copyProperties
(
obj
,
idxBizPvHealthIndex
);
idxBizPvHealthIndex
.
setSequenceNbr
(
null
);
idxBizPvHealthIndex
.
setHealthIndex
(
indexValueArray
.
getDoubleValue
(
i
)<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
));
idxBizPvHealthIndex
.
setAnalysisObjSeq
(
obj
.
getSequenceNbr
());
idxBizPvHealthIndex
.
setRecDate
(
time
);
idxBizPvHealthIndex
.
setWeigth
(
1.0
);
//获取健康指数对应等级
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"测点"
);
query
.
eq
(
IdxBizPvHealthLevel:
:
getStatus
,
obj
.
getStation
());
query
.
le
(
IdxBizPvHealthLevel:
:
getGroupLowerLimit
,
indexValueArray
.
getDoubleValue
(
i
)
<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
));
query
.
ge
(
IdxBizPvHealthLevel:
:
getGroupUpperLimit
,
indexValueArray
.
getDoubleValue
(
i
)
<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
)
);
IdxBizPvHealthLevel
idxBizFanHealthLevel
=
idxBizPvHealthLevelMapper
.
selectOne
(
query
);
idxBizPvHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
idxBizPvHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizPvHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizPvHealthIndex
.
setANOMALY
(
scoreValueArray
.
getDoubleValue
(
i
));
idxBizPvHealthIndex
.
setANALYSISTIME
(
DateUtils
.
getDateNowString
());
idxBizPvHealthIndexs
.
add
(
idxBizPvHealthIndex
);
}
}
}
idxBizPvHealthIndexService
.
saveBatch
(
idxBizPvHealthIndexs
);
...
...
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 @
dc72176e
...
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.entity.*;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
...
...
@@ -66,7 +67,8 @@ public class HealthStatusIndicatorServiceImpl {
*/
@Scheduled
(
cron
=
"0 0 */1 * * ?"
)
private
void
healthWarningMinuteGF
()
{
@Async
(
"async"
)
public
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"
);
...
...
@@ -169,7 +171,8 @@ public class HealthStatusIndicatorServiceImpl {
*/
@Scheduled
(
cron
=
"0 0 */5 * * ?"
)
private
void
healthWarningHourGF
()
{
@Async
(
"async"
)
public
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"
);
...
...
@@ -276,7 +279,8 @@ public class HealthStatusIndicatorServiceImpl {
*/
@Scheduled
(
cron
=
"0 0 0 */3 * ? "
)
private
void
healthWarningDayGF
()
{
@Async
(
"async"
)
public
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"
);
...
...
@@ -375,7 +379,8 @@ public class HealthStatusIndicatorServiceImpl {
@Scheduled
(
cron
=
"0 0/5 * * * ?"
)
private
void
healthWarningMinute
()
{
@Async
(
"async"
)
public
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"
);
...
...
@@ -482,7 +487,8 @@ public class HealthStatusIndicatorServiceImpl {
*/
@Scheduled
(
cron
=
"0 0 */5 * * ?"
)
private
void
healthWarningHour
()
{
@Async
(
"async"
)
public
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"
);
...
...
@@ -589,7 +595,8 @@ public class HealthStatusIndicatorServiceImpl {
*/
@Scheduled
(
cron
=
"0 0 0 */3 * ? "
)
private
void
healthWarningDay
()
{
@Async
(
"async"
)
public
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"
);
...
...
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