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
ffa2b430
Commit
ffa2b430
authored
Dec 07, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.智能分析光伏、风电 按时刻、按小时、按天生成预警规则由原来的写死调整为动态获取。
parent
d126b575
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
4 deletions
+23
-4
IdxBizFanWarningRuleSetMapper.java
...dule/jxiop/biz/mapper2/IdxBizFanWarningRuleSetMapper.java
+8
-0
IdxBizPvWarningRuleSetMapper.java
...odule/jxiop/biz/mapper2/IdxBizPvWarningRuleSetMapper.java
+9
-0
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+6
-4
HealthStatusIndicatorServiceImpl.java
...op/biz/service/impl/HealthStatusIndicatorServiceImpl.java
+0
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizFanWarningRuleSetMapper.java
View file @
ffa2b430
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.mapper2;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRuleSet
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -17,4 +18,11 @@ public interface IdxBizFanWarningRuleSetMapper extends BaseMapper<IdxBizFanWarni
List
<
Map
<
String
,
Object
>>
queryList
(
int
current
,
int
size
);
int
queryListCount
();
@Select
(
"SELECT MAX(WARNING_CYCLE) FROM idx_biz_fan_warning_rule_set WHERE ANALYSIS_TYPE = '按时刻'"
)
Integer
getMaxWaringCycleOfMinutes
();
@Select
(
"SELECT MAX(WARNING_CYCLE) FROM idx_biz_fan_warning_rule_set WHERE ANALYSIS_TYPE = '按小时'"
)
Integer
getMaxWaringCycleOfHour
();
@Select
(
"SELECT MAX(WARNING_CYCLE) FROM idx_biz_fan_warning_rule_set WHERE ANALYSIS_TYPE = '按天'"
)
Integer
getMaxWaringCycleOfDay
();
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizPvWarningRuleSetMapper.java
View file @
ffa2b430
...
...
@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.jxiop.biz.mapper2;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRuleSet
;
import
io.swagger.models.auth.In
;
import
javafx.beans.binding.DoubleExpression
;
import
org.apache.ibatis.annotations.Select
;
/**
* Mapper 接口
...
...
@@ -11,4 +14,10 @@ import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRuleSet;
*/
public
interface
IdxBizPvWarningRuleSetMapper
extends
BaseMapper
<
IdxBizPvWarningRuleSet
>
{
@Select
(
"SELECT MAX(WARNING_CYCLE) FROM idx_biz_pv_warning_rule_set WHERE ANALYSIS_TYPE = '按时刻'"
)
Integer
getMaxWaringCycleOfMinutes
();
@Select
(
"SELECT MAX(WARNING_CYCLE) FROM idx_biz_pv_warning_rule_set WHERE ANALYSIS_TYPE = '按小时'"
)
Integer
getMaxWaringCycleOfHour
();
@Select
(
"SELECT MAX(WARNING_CYCLE) FROM idx_biz_pv_warning_rule_set WHERE ANALYSIS_TYPE = '按天'"
)
Integer
getMaxWaringCycleOfDay
();
}
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 @
ffa2b430
...
...
@@ -1475,7 +1475,7 @@ public class CommonServiceImpl {
String
format
=
DateUtil
.
format
(
time
,
"yyyy-MM-dd HH:mm:00"
);
time
=
DateUtil
.
parse
(
format
,
"yyyy-MM-dd HH:mm:00"
);
logger
.
info
(
"风机---------------------健康指数时间----"
+
time
);
Calendar
calendar
=
Calendar
.
getInstance
();
//
Calendar calendar = Calendar.getInstance();
List
<
IdxBizFanPointProcessVariableClassificationDto
>
data
=
idxBizFanPointProcessVariableClassificationMapper
.
getInfluxDBData
();
Map
<
String
,
List
<
IdxBizFanPointProcessVariableClassificationDto
>>
maps
=
data
.
stream
().
collect
(
Collectors
.
groupingBy
(
IdxBizFanPointProcessVariableClassificationDto:
:
getGatewayId
));
// BoolQueryBuilder boolMustAll = QueryBuilders.boolQuery();
...
...
@@ -1730,7 +1730,8 @@ public class CommonServiceImpl {
logger
.
info
(
"------------------------------------------调用健康指数计算算法结束----------------------------------------"
);
logger
.
info
(
"------------------------------------------开始计算预警----------------------------------------"
);
healthStatusIndicatorService
.
healthWarningMinute
(
calendar
,
time
);
// healthStatusIndicatorService.healthWarningMinute(calendar, time);
healthStatusIndicatorService
.
healthWarningMinute
(
time
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
...
...
@@ -1774,7 +1775,7 @@ public class CommonServiceImpl {
if
(!
openHealth
)
{
return
;
}
Calendar
calendar
=
Calendar
.
getInstance
();
//
Calendar calendar = Calendar.getInstance();
Date
time
=
new
Date
();
time
=
DateUtil
.
offsetMinute
(
time
,-
DateUtil
.
minute
(
time
)%
10
);
String
format
=
DateUtil
.
format
(
time
,
"yyyy-MM-dd HH:mm:00"
);
...
...
@@ -2005,7 +2006,8 @@ public class CommonServiceImpl {
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
healthStatusIndicatorService
.
healthWarningMinuteGF
(
calendar
,
time
);
// healthStatusIndicatorService.healthWarningMinuteGF(calendar, time);
healthStatusIndicatorService
.
healthWarningMinuteGF
(
time
);
}
...
...
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 @
ffa2b430
This diff is collapsed.
Click to expand it.
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