Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
9697581d
Commit
9697581d
authored
Mar 19, 2024
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
智能分析修改按时刻、按小时、按天
parent
976676c8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
103 additions
and
93 deletions
+103
-93
WarningPeriodEnum.java
...in/amos/boot/module/jxiop/biz/Enum/WarningPeriodEnum.java
+31
-0
CommonConstans.java
.../amos/boot/module/jxiop/biz/constants/CommonConstans.java
+6
-31
IdxBizFanHealthIndexController.java
.../jxiop/biz/controller/IdxBizFanHealthIndexController.java
+7
-6
IdxBizPvHealthIndexController.java
...e/jxiop/biz/controller/IdxBizPvHealthIndexController.java
+7
-6
TDBigScreenAnalyseController.java
...le/jxiop/biz/controller/TDBigScreenAnalyseController.java
+0
-0
IdxBizFanWarningRuleSetMapper.java
...dule/jxiop/biz/mapper2/IdxBizFanWarningRuleSetMapper.java
+1
-1
IdxBizPvWarningRuleSetMapper.java
...odule/jxiop/biz/mapper2/IdxBizPvWarningRuleSetMapper.java
+1
-1
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+7
-6
HealthStatusIndicatorServiceImpl.java
...op/biz/service/impl/HealthStatusIndicatorServiceImpl.java
+13
-12
TdengineTimeServiceImpl.java
...odule/jxiop/biz/service/impl/TdengineTimeServiceImpl.java
+0
-0
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+25
-25
IdxBizPvHealthIndexMapper.xml
...in/resources/mapper/cluster/IdxBizPvHealthIndexMapper.xml
+4
-4
FanHealthIndex.xml
...iz/src/main/resources/mapper/tdengine2/FanHealthIndex.xml
+1
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/Enum/WarningPeriodEnum.java
0 → 100644
View file @
9697581d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
Enum
;
public
enum
WarningPeriodEnum
{
DAY
(
1
,
"按天"
),
HOUR
(
2
,
"按小时"
),
MINUTES
(
3
,
"按10分钟"
);
private
int
code
;
private
String
name
;
WarningPeriodEnum
(
int
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
public
int
getCode
()
{
return
code
;
}
public
void
setCode
(
int
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/constants/CommonConstans.java
View file @
9697581d
...
...
@@ -79,35 +79,15 @@ public class CommonConstans {
};
//es EquipIndexName 查绚关键字
public
static
final
String
QueryStringEquipmentIndexName
=
"equipmentIndexName.keyword"
;
//es EquipIndexName 查绚关键字
public
static
final
String
QueryStringEquipmentIndexNameNotKeyword
=
"equipmentIndexName"
;
//es gatewayId 查绚关键字
public
static
final
String
QueryStringGateWayId
=
"gatewayId.keyword"
;
public
static
final
String
QueryStringFrontMoudle
=
"frontModule.keyword"
;
public
static
final
String
QueryStringSystemType
=
"systemType"
;
public
static
final
String
QueryStringSystemTypeKeyword
=
"systemType.keyword"
;
public
static
final
String
QueryStringEquipmentNumber
=
"equipmentNumber"
;
public
static
final
String
QueryStringEquipmentNumberKeyword
=
"equipmentNumber.keyword"
;
public
static
final
String
QueryStringValue
=
"value"
;
public
static
final
String
QueryStringValueKeyword
=
"value.keyword"
;
public
static
final
String
QueryStringValueLabel
=
"valueLabel"
;
public
static
final
String
QueryStringValueLabelKeyword
=
"valueLabel.keyword"
;
public
static
final
String
QueryStringDataType
=
"dataType"
;
public
static
final
String
QueryStringDisplayName
=
"displayName"
;
public
static
final
String
QueryStringDisplayNameKeyword
=
"displayName.keyword"
;
public
static
final
String
QueryStringIsAlarm
=
"isAlarm"
;
public
static
final
String
QueryStringIsAlarmKeyword
=
"isAlarm.keyword"
;
public
static
final
String
Twodecimalplaces
=
"%.2f"
;
public
static
final
String
Onedecimalplaces
=
"%.1f"
;
public
static
final
String
Fourdecimalplaces
=
"%.4f"
;
public
static
final
String
QueryStringFrontMoudleNotKeyWord
=
"frontModule"
;
public
static
final
HashMap
<
String
,
String
>
waringPeriodStatus
=
new
HashMap
<
String
,
String
>()
{
{
put
(
"按
时刻
"
,
"按10分钟周期"
);
put
(
"按
10分钟
"
,
"按10分钟周期"
);
put
(
"按小时"
,
"按1小时周期"
);
put
(
"按天"
,
"按1天周期"
);
}
...
...
@@ -115,7 +95,7 @@ public class CommonConstans {
public
static
final
HashMap
<
String
,
String
>
waringPeriodTowaringCycle
=
new
HashMap
<
String
,
String
>()
{
{
put
(
"按
时刻
"
,
"分钟"
);
put
(
"按
10分钟
"
,
"分钟"
);
put
(
"按小时"
,
"小时"
);
put
(
"按天"
,
"天"
);
}
...
...
@@ -124,15 +104,10 @@ public class CommonConstans {
public
static
final
HashMap
<
String
,
String
>
waringPeriodDateFormate
=
new
HashMap
<
String
,
String
>()
{
{
put
(
"按
时刻
"
,
DatePattern
.
NORM_DATETIME_PATTERN
);
put
(
"按
10分钟
"
,
DatePattern
.
NORM_DATETIME_PATTERN
);
put
(
"按小时"
,
DatePattern
.
NORM_DATETIME_PATTERN
);
put
(
"按天"
,
DatePattern
.
NORM_DATE_PATTERN
);
}
};
public
static
final
String
ANALYSE_TYPE_MOMENT
=
"按时刻"
;
public
static
final
String
ANALYSE_TYPE_HOUR
=
"按小时"
;
public
static
final
String
ANALYSE_TYPE_DAY
=
"按天"
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizFanHealthIndexController.java
View file @
9697581d
...
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.jxiop.biz.Enum.HealthLevelSortEnum
;
import
com.yeejoin.amos.boot.module.jxiop.biz.Enum.WarningPeriodEnum
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointTag
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord
;
...
...
@@ -581,7 +582,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
if
(
gatewayIds
.
size
()>
0
){
orgCode
=
gatewayIds
.
get
(
0
)+
"%"
;
}
if
(
requiredType
.
equals
(
"按天"
)){
if
(
requiredType
.
equals
(
WarningPeriodEnum
.
DAY
.
getName
()
)){
// if (null != type && type.equals("0")){
Date
startDayTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
date
=
DateUtils
.
dateAddHours
(
startDayTime
,
-
9
);
...
...
@@ -605,7 +606,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
page
.
setTotal
(
total
);
page
.
setRecords
(
fanHealthIndexDays
);
return
ResponseHelper
.
buildResponse
(
page
);
}
else
if
(
requiredType
.
equals
(
"按小时"
)){
}
else
if
(
requiredType
.
equals
(
WarningPeriodEnum
.
HOUR
.
getName
()
)){
// if (null != type && type.equals("0")){
Date
date
=
new
Date
();
...
...
@@ -679,7 +680,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
if
(
requiredType
.
equals
(
"按天"
)){
if
(
requiredType
.
equals
(
WarningPeriodEnum
.
DAY
.
getName
()
)){
// if (null != type && type.equals("0")){
Date
startDayTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
date
=
DateUtils
.
dateAddHours
(
startDayTime
,
-
9
);
...
...
@@ -696,7 +697,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"value"
,
Double
.
parseDouble
(
df
.
format
(
fanHealthIndexDays
.
get
(
0
).
getHealthIndex
())));
return
ResponseHelper
.
buildResponse
(
map
);
}
else
if
(
requiredType
.
equals
(
"按小时"
)){
}
else
if
(
requiredType
.
equals
(
WarningPeriodEnum
.
HOUR
.
getName
()
)){
// if (null != type && type.equals("0")){
Date
date
=
new
Date
();
...
...
@@ -760,7 +761,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
if
(
gatewayIds
.
size
()>
0
){
orgCode
=
gatewayIds
.
get
(
0
)+
"%"
;
}
if
(
"按天"
.
equals
(
requiredType
)){
if
(
WarningPeriodEnum
.
DAY
.
getName
()
.
equals
(
requiredType
)){
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
endTimeTop
),
-
8
);
...
...
@@ -783,7 +784,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
result
.
put
(
"seriesData"
,
seriesData
);
result
.
put
(
"axisData"
,
axisData
);
return
ResponseHelper
.
buildResponse
(
result
);
}
else
if
(
"按小时"
.
equals
(
requiredType
)){
}
else
if
(
WarningPeriodEnum
.
HOUR
.
getName
()
.
equals
(
requiredType
)){
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
endTimeTop
),
-
8
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizPvHealthIndexController.java
View file @
9697581d
...
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.jxiop.biz.Enum.HealthLevelSortEnum
;
import
com.yeejoin.amos.boot.module.jxiop.biz.Enum.WarningPeriodEnum
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointProcessVariableClassification
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointProcessVariableClassification
;
...
...
@@ -269,7 +270,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
if
(
gatewayIds
.
size
()>
0
){
orgCode
=
gatewayIds
.
get
(
0
)+
"%"
;
}
if
(
requiredType
.
equals
(
"按天"
)){
if
(
requiredType
.
equals
(
WarningPeriodEnum
.
DAY
.
getName
()
)){
Date
startDayTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
date
=
DateUtils
.
dateAddHours
(
startDayTime
,
-
9
);
startTimeTop
=
DateUtil
.
format
(
date
,
DatePattern
.
NORM_DATETIME_PATTERN
);
...
...
@@ -286,7 +287,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
page
.
setRecords
(
fanHealthIndexDays
);
page
.
setTotal
(
total
);
return
ResponseHelper
.
buildResponse
(
page
);
}
else
if
(
requiredType
.
equals
(
"按小时"
)){
}
else
if
(
requiredType
.
equals
(
WarningPeriodEnum
.
HOUR
.
getName
()
)){
Date
date
=
new
Date
();
date
=
DateUtil
.
offsetHour
(
date
,-
8
);
date
=
DateUtil
.
offsetMinute
(
date
,-
59
);
...
...
@@ -348,7 +349,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
if
(
gatewayIds
.
size
()>
0
){
orgCode
=
gatewayIds
.
get
(
0
)+
"%"
;
}
if
(
requiredType
.
equals
(
"按天"
)){
if
(
requiredType
.
equals
(
WarningPeriodEnum
.
DAY
.
getName
()
)){
Date
startDayTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
date
=
DateUtils
.
dateAddHours
(
startDayTime
,
-
9
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
...
...
@@ -365,7 +366,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
}
else
if
(
requiredType
.
equals
(
"按小时"
)){
}
else
if
(
requiredType
.
equals
(
WarningPeriodEnum
.
HOUR
.
getName
()
)){
Date
date
=
new
Date
();
date
=
DateUtil
.
offsetHour
(
date
,-
8
);
...
...
@@ -420,7 +421,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
if
(
gatewayIds
.
size
()>
0
){
orgCode
=
gatewayIds
.
get
(
0
)+
"%"
;
}
if
(
"按天"
.
equals
(
requiredType
)){
if
(
WarningPeriodEnum
.
DAY
.
getName
()
.
equals
(
requiredType
)){
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
endTimeTop
),
-
8
);
...
...
@@ -444,7 +445,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
result
.
put
(
"seriesData"
,
seriesData
);
result
.
put
(
"axisData"
,
axisData
);
return
ResponseHelper
.
buildResponse
(
result
);
}
else
if
(
"按小时"
.
equals
(
requiredType
)){
}
else
if
(
WarningPeriodEnum
.
HOUR
.
getName
()
.
equals
(
requiredType
)){
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
endTimeTop
),
-
8
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TDBigScreenAnalyseController.java
View file @
9697581d
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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 @
9697581d
...
...
@@ -19,7 +19,7 @@ public interface IdxBizFanWarningRuleSetMapper extends BaseMapper<IdxBizFanWarni
int
queryListCount
();
@Select
(
"SELECT MAX(WARNING_CYCLE) FROM idx_biz_fan_warning_rule_set WHERE ANALYSIS_TYPE = '按
时刻
'"
)
@Select
(
"SELECT MAX(WARNING_CYCLE) FROM idx_biz_fan_warning_rule_set WHERE ANALYSIS_TYPE = '按
10分钟
'"
)
Integer
getMaxWaringCycleOfMinutes
();
@Select
(
"SELECT MAX(WARNING_CYCLE) FROM idx_biz_fan_warning_rule_set WHERE ANALYSIS_TYPE = '按小时'"
)
Integer
getMaxWaringCycleOfHour
();
...
...
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 @
9697581d
...
...
@@ -14,7 +14,7 @@ import org.apache.ibatis.annotations.Select;
*/
public
interface
IdxBizPvWarningRuleSetMapper
extends
BaseMapper
<
IdxBizPvWarningRuleSet
>
{
@Select
(
"SELECT MAX(WARNING_CYCLE) FROM idx_biz_pv_warning_rule_set WHERE ANALYSIS_TYPE = '按
时刻
'"
)
@Select
(
"SELECT MAX(WARNING_CYCLE) FROM idx_biz_pv_warning_rule_set WHERE ANALYSIS_TYPE = '按
10分钟
'"
)
Integer
getMaxWaringCycleOfMinutes
();
@Select
(
"SELECT MAX(WARNING_CYCLE) FROM idx_biz_pv_warning_rule_set WHERE ANALYSIS_TYPE = '按小时'"
)
Integer
getMaxWaringCycleOfHour
();
...
...
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 @
9697581d
...
...
@@ -18,6 +18,7 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments
;
import
com.yeejoin.amos.boot.module.jxiop.biz.Enum.SmartAnalyseEnum
;
import
com.yeejoin.amos.boot.module.jxiop.biz.Enum.WarningPeriodEnum
;
import
com.yeejoin.amos.boot.module.jxiop.biz.Thread.MyServiceThread
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanPointProcessVariableClassificationDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvPointProcessVariableClassificationDto
;
...
...
@@ -1151,7 +1152,7 @@ public class CommonServiceImpl {
query
.
ge
(
IdxBizFanHealthLevel:
:
getGroupUpperLimit
,
object
.
getDouble
(
"indexValue"
));
IdxBizFanHealthLevel
idxBizFanHealthLevel
=
idxBizFanHealthLevelMapper
.
selectOne
(
query
);
idxBizFanHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
idxBizFanHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizFanHealthIndex
.
setAnalysisType
(
WarningPeriodEnum
.
MINUTES
.
getName
()
);
idxBizFanHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizFanHealthIndex
.
setANOMALY
(
object
.
getDouble
(
"scoreValue"
));
idxBizFanHealthIndexs
.
add
(
idxBizFanHealthIndex
);
...
...
@@ -1278,7 +1279,7 @@ public class CommonServiceImpl {
query
.
ge
(
IdxBizPvHealthLevel:
:
getGroupUpperLimit
,
object
.
getDouble
(
"indexValue"
));
IdxBizPvHealthLevel
idxBizFanHealthLevel
=
idxBizPvHealthLevelMapper
.
selectOne
(
query
);
idxBizFanHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
idxBizFanHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizFanHealthIndex
.
setAnalysisType
(
WarningPeriodEnum
.
MINUTES
.
getName
()
);
idxBizFanHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizFanHealthIndex
.
setANOMALY
(
object
.
getDouble
(
"scoreValue"
));
idxBizPvHealthIndexs
.
add
(
idxBizFanHealthIndex
);
...
...
@@ -1718,7 +1719,7 @@ public class CommonServiceImpl {
}
}
idxBizFanHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizFanHealthIndex
.
setAnalysisType
(
WarningPeriodEnum
.
MINUTES
.
getName
()
);
idxBizFanHealthIndex
.
setAnalysisObjType
(
"测点"
);
if
(
ObjectUtils
.
isEmpty
(
scoreValueArray
.
getDoubleValue
(
i
)))
{
System
.
out
.
println
(
JSON
.
toJSONString
(
requestMap
));
...
...
@@ -1747,7 +1748,7 @@ public class CommonServiceImpl {
}
// idxBizFanHealthIndexService.saveBatch(idxBizFanHealthIndexs);
// 按时刻相关数据插入TDEngine 【异步】
insertFanDataTDEngine
(
fanHealthIndices1
,
format
,
"按时刻"
);
insertFanDataTDEngine
(
fanHealthIndices1
,
format
,
WarningPeriodEnum
.
MINUTES
.
getName
()
);
}
...
...
@@ -2006,7 +2007,7 @@ public class CommonServiceImpl {
}
}
idxBizPvHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizPvHealthIndex
.
setAnalysisType
(
WarningPeriodEnum
.
MINUTES
.
getName
()
);
idxBizPvHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizPvHealthIndex
.
setANOMALY
(
scoreValueArray
.
getDoubleValue
(
i
));
idxBizPvHealthIndex
.
setANALYSISTIME
(
DateUtils
.
getDateNowString
());
...
...
@@ -2028,7 +2029,7 @@ public class CommonServiceImpl {
}
// idxBizPvHealthIndexService.saveBatch(idxBizPvHealthIndexs);
//按时刻 - 相关数据插入
insertPvDataTDEngine
(
fanHealthIndices1
,
format
,
"按时刻"
);
insertPvDataTDEngine
(
fanHealthIndices1
,
format
,
WarningPeriodEnum
.
MINUTES
.
getName
()
);
}
try
{
// logger.info("--------------------response: " + response);
...
...
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 @
9697581d
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/TdengineTimeServiceImpl.java
View file @
9697581d
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
9697581d
...
...
@@ -67,8 +67,8 @@
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
<if
test=
"analysisType == '按
时刻
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
<if
test=
"areaCode != null and areaCode != ''"
>
...
...
@@ -98,8 +98,8 @@
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
<if
test=
"analysisType == '按
时刻
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
<if
test=
"areaCode != null and areaCode != ''"
>
...
...
@@ -1036,7 +1036,7 @@
ANALYSIS_OBJ_TYPE = '测点'
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
OR ( REC_DATE >= CURRENT_DATE ( ) AND ANALYSIS_TYPE = '按天' )
OR ( ANALYSIS_TYPE = '按
时刻
' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 10 MINUTE ) )
OR ( ANALYSIS_TYPE = '按
10分钟
' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 10 MINUTE ) )
) b
INNER JOIN idx_biz_fan_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
AND rule.WARNING_NAME = '注意'
...
...
@@ -1082,7 +1082,7 @@
ANALYSIS_OBJ_TYPE = '测点'
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
OR ( REC_DATE >= CURRENT_DATE ( ) AND ANALYSIS_TYPE = '按天' )
OR ( ANALYSIS_TYPE = '按
时刻
' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 10 MINUTE ) )
OR ( ANALYSIS_TYPE = '按
10分钟
' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 10 MINUTE ) )
) b
INNER JOIN idx_biz_fan_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
AND rule.WARNING_NAME = '注意'
...
...
@@ -1126,7 +1126,7 @@
ANALYSIS_OBJ_TYPE = '测点'
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
OR ( REC_DATE >= CURRENT_DATE ( ) AND ANALYSIS_TYPE = '按天' )
OR ( ANALYSIS_TYPE = '按
时刻
' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 10 MINUTE ) )
OR ( ANALYSIS_TYPE = '按
10分钟
' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 10 MINUTE ) )
) b
INNER JOIN idx_biz_fan_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
AND rule.WARNING_NAME = '注意'
...
...
@@ -1205,7 +1205,7 @@
<if
test=
"(startTime == null or startTime == '' ) and (endTime == null or endTime =='') "
>
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 15 HOUR ) )
OR ( REC_DATE >=DATE_SUB( NOW(), INTERVAL 15 DAY ) AND ANALYSIS_TYPE = '按天' )
OR ( ANALYSIS_TYPE = '按
时刻
' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 150 MINUTE ) )
OR ( ANALYSIS_TYPE = '按
10分钟
' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 150 MINUTE ) )
</if>
<if
test=
"startTime != null and startTime != '' or endTime != null and endTime != '' "
>
AND REC_DATE >= #{startTime}
...
...
@@ -1322,7 +1322,7 @@
WHERE
#{recDate} >= REC_DATE
AND REC_DATE >= DATE_ADD( #{recDate}, INTERVAL - 12 hour )
AND ANALYSIS_TYPE = '按
时刻
'
AND ANALYSIS_TYPE = '按
10分钟
'
AND INDEX_ADDRESS = #{indexAddress}
AND GATEWAY_ID = #{fanGatewayId}
</select>
...
...
@@ -1349,8 +1349,8 @@
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
<if
test=
"analysisType == '按
时刻
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
...
...
@@ -1375,8 +1375,8 @@
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
<if
test=
"analysisType == '按
时刻
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
...
...
@@ -1407,8 +1407,8 @@
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
<if
test=
"analysisType == '按
时刻
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
...
...
@@ -1433,8 +1433,8 @@
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
<if
test=
"analysisType == '按
时刻
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
...
...
@@ -1468,8 +1468,8 @@
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
<if
test=
"analysisType == '按
时刻
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
...
...
@@ -1494,8 +1494,8 @@
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
<if
test=
"analysisType == '按
时刻
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
...
...
@@ -1527,8 +1527,8 @@
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
<if
test=
"analysisType == '按
时刻
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
...
...
@@ -1553,8 +1553,8 @@
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
<if
test=
"analysisType == '按
时刻
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizPvHealthIndexMapper.xml
View file @
9697581d
...
...
@@ -112,7 +112,7 @@
ANALYSIS_OBJ_TYPE = '测点'
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
OR ( REC_DATE >= CURRENT_DATE ( ) AND ANALYSIS_TYPE = '按天' )
OR ( ANALYSIS_TYPE = '按
时刻
' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 10 MINUTE ) )
OR ( ANALYSIS_TYPE = '按
10分钟
' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 10 MINUTE ) )
) b
INNER JOIN idx_biz_pv_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
AND rule.WARNING_NAME = '注意'
...
...
@@ -164,7 +164,7 @@
ANALYSIS_OBJ_TYPE = '测点'
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
OR ( REC_DATE >= CURRENT_DATE ( ) AND ANALYSIS_TYPE = '按天' )
OR ( ANALYSIS_TYPE = '按
时刻
' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 10 MINUTE ) )
OR ( ANALYSIS_TYPE = '按
10分钟
' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 10 MINUTE ) )
) b
INNER JOIN idx_biz_pv_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
AND rule.WARNING_NAME = '注意'
...
...
@@ -214,7 +214,7 @@
ANALYSIS_OBJ_TYPE = '测点'
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
OR ( REC_DATE >= CURRENT_DATE ( ) AND ANALYSIS_TYPE = '按天' )
OR ( ANALYSIS_TYPE = '按
时刻
' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 10 MINUTE ) )
OR ( ANALYSIS_TYPE = '按
10分钟
' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 10 MINUTE ) )
) b
INNER JOIN idx_biz_pv_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
AND rule.WARNING_NAME = '注意'
...
...
@@ -303,7 +303,7 @@
<if
test=
"(startTime == null or startTime == '' ) and (endTime == null or endTime =='') "
>
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 15 HOUR ) )
OR ( REC_DATE >=DATE_SUB( NOW(), INTERVAL 15 DAY ) AND ANALYSIS_TYPE = '按天' )
OR ( ANALYSIS_TYPE = '按
时刻
' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 150 MINUTE ) )
OR ( ANALYSIS_TYPE = '按
10分钟
' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 150 MINUTE ) )
</if>
<if
test=
"startTime != null and startTime != '' or endTime != null and endTime != '' "
>
AND REC_DATE >= #{startTime}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanHealthIndex.xml
View file @
9697581d
...
...
@@ -336,7 +336,7 @@
WHERE
#{recDate} >= ts
AND ts >= #{date12}
AND analysis_type = '按
时刻
'
AND analysis_type = '按
10分钟
'
AND index_address = #{indexAddress}
AND gateway_id = #{fanGatewayId}
</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