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
9697581d
Commit
9697581d
authored
Mar 19, 2024
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
智能分析修改按时刻、按小时、按天
parent
976676c8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
113 additions
and
115 deletions
+113
-115
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
+10
-22
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 {
...
@@ -79,35 +79,15 @@ public class CommonConstans {
};
};
//es EquipIndexName 查绚关键字
//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
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
>()
{
public
static
final
HashMap
<
String
,
String
>
waringPeriodStatus
=
new
HashMap
<
String
,
String
>()
{
{
{
put
(
"按
时刻
"
,
"按10分钟周期"
);
put
(
"按
10分钟
"
,
"按10分钟周期"
);
put
(
"按小时"
,
"按1小时周期"
);
put
(
"按小时"
,
"按1小时周期"
);
put
(
"按天"
,
"按1天周期"
);
put
(
"按天"
,
"按1天周期"
);
}
}
...
@@ -115,7 +95,7 @@ public class CommonConstans {
...
@@ -115,7 +95,7 @@ public class CommonConstans {
public
static
final
HashMap
<
String
,
String
>
waringPeriodTowaringCycle
=
new
HashMap
<
String
,
String
>()
{
public
static
final
HashMap
<
String
,
String
>
waringPeriodTowaringCycle
=
new
HashMap
<
String
,
String
>()
{
{
{
put
(
"按
时刻
"
,
"分钟"
);
put
(
"按
10分钟
"
,
"分钟"
);
put
(
"按小时"
,
"小时"
);
put
(
"按小时"
,
"小时"
);
put
(
"按天"
,
"天"
);
put
(
"按天"
,
"天"
);
}
}
...
@@ -124,15 +104,10 @@ public class CommonConstans {
...
@@ -124,15 +104,10 @@ public class CommonConstans {
public
static
final
HashMap
<
String
,
String
>
waringPeriodDateFormate
=
new
HashMap
<
String
,
String
>()
{
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_DATETIME_PATTERN
);
put
(
"按天"
,
DatePattern
.
NORM_DATE_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;
...
@@ -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.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
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.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.dto.IdxBizFanHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointTag
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointTag
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord
;
...
@@ -581,7 +582,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -581,7 +582,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
if
(
gatewayIds
.
size
()>
0
){
if
(
gatewayIds
.
size
()>
0
){
orgCode
=
gatewayIds
.
get
(
0
)+
"%"
;
orgCode
=
gatewayIds
.
get
(
0
)+
"%"
;
}
}
if
(
requiredType
.
equals
(
"按天"
)){
if
(
requiredType
.
equals
(
WarningPeriodEnum
.
DAY
.
getName
()
)){
// if (null != type && type.equals("0")){
// if (null != type && type.equals("0")){
Date
startDayTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
startDayTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
date
=
DateUtils
.
dateAddHours
(
startDayTime
,
-
9
);
Date
date
=
DateUtils
.
dateAddHours
(
startDayTime
,
-
9
);
...
@@ -605,7 +606,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -605,7 +606,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
page
.
setTotal
(
total
);
page
.
setTotal
(
total
);
page
.
setRecords
(
fanHealthIndexDays
);
page
.
setRecords
(
fanHealthIndexDays
);
return
ResponseHelper
.
buildResponse
(
page
);
return
ResponseHelper
.
buildResponse
(
page
);
}
else
if
(
requiredType
.
equals
(
"按小时"
)){
}
else
if
(
requiredType
.
equals
(
WarningPeriodEnum
.
HOUR
.
getName
()
)){
// if (null != type && type.equals("0")){
// if (null != type && type.equals("0")){
Date
date
=
new
Date
();
Date
date
=
new
Date
();
...
@@ -679,7 +680,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -679,7 +680,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
if
(
requiredType
.
equals
(
"按天"
)){
if
(
requiredType
.
equals
(
WarningPeriodEnum
.
DAY
.
getName
()
)){
// if (null != type && type.equals("0")){
// if (null != type && type.equals("0")){
Date
startDayTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
startDayTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
date
=
DateUtils
.
dateAddHours
(
startDayTime
,
-
9
);
Date
date
=
DateUtils
.
dateAddHours
(
startDayTime
,
-
9
);
...
@@ -696,7 +697,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -696,7 +697,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"value"
,
Double
.
parseDouble
(
df
.
format
(
fanHealthIndexDays
.
get
(
0
).
getHealthIndex
())));
map
.
put
(
"value"
,
Double
.
parseDouble
(
df
.
format
(
fanHealthIndexDays
.
get
(
0
).
getHealthIndex
())));
return
ResponseHelper
.
buildResponse
(
map
);
return
ResponseHelper
.
buildResponse
(
map
);
}
else
if
(
requiredType
.
equals
(
"按小时"
)){
}
else
if
(
requiredType
.
equals
(
WarningPeriodEnum
.
HOUR
.
getName
()
)){
// if (null != type && type.equals("0")){
// if (null != type && type.equals("0")){
Date
date
=
new
Date
();
Date
date
=
new
Date
();
...
@@ -760,7 +761,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -760,7 +761,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
if
(
gatewayIds
.
size
()>
0
){
if
(
gatewayIds
.
size
()>
0
){
orgCode
=
gatewayIds
.
get
(
0
)+
"%"
;
orgCode
=
gatewayIds
.
get
(
0
)+
"%"
;
}
}
if
(
"按天"
.
equals
(
requiredType
)){
if
(
WarningPeriodEnum
.
DAY
.
getName
()
.
equals
(
requiredType
)){
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
endTimeTop
),
-
8
);
...
@@ -783,7 +784,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -783,7 +784,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
result
.
put
(
"seriesData"
,
seriesData
);
result
.
put
(
"seriesData"
,
seriesData
);
result
.
put
(
"axisData"
,
axisData
);
result
.
put
(
"axisData"
,
axisData
);
return
ResponseHelper
.
buildResponse
(
result
);
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"
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
endTimeTop
),
-
8
);
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;
...
@@ -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.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
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.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.dto.IdxBizPvHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointProcessVariableClassification
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointProcessVariableClassification
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointProcessVariableClassification
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointProcessVariableClassification
;
...
@@ -269,7 +270,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
...
@@ -269,7 +270,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
if
(
gatewayIds
.
size
()>
0
){
if
(
gatewayIds
.
size
()>
0
){
orgCode
=
gatewayIds
.
get
(
0
)+
"%"
;
orgCode
=
gatewayIds
.
get
(
0
)+
"%"
;
}
}
if
(
requiredType
.
equals
(
"按天"
)){
if
(
requiredType
.
equals
(
WarningPeriodEnum
.
DAY
.
getName
()
)){
Date
startDayTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
startDayTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
date
=
DateUtils
.
dateAddHours
(
startDayTime
,
-
9
);
Date
date
=
DateUtils
.
dateAddHours
(
startDayTime
,
-
9
);
startTimeTop
=
DateUtil
.
format
(
date
,
DatePattern
.
NORM_DATETIME_PATTERN
);
startTimeTop
=
DateUtil
.
format
(
date
,
DatePattern
.
NORM_DATETIME_PATTERN
);
...
@@ -286,7 +287,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
...
@@ -286,7 +287,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
page
.
setRecords
(
fanHealthIndexDays
);
page
.
setRecords
(
fanHealthIndexDays
);
page
.
setTotal
(
total
);
page
.
setTotal
(
total
);
return
ResponseHelper
.
buildResponse
(
page
);
return
ResponseHelper
.
buildResponse
(
page
);
}
else
if
(
requiredType
.
equals
(
"按小时"
)){
}
else
if
(
requiredType
.
equals
(
WarningPeriodEnum
.
HOUR
.
getName
()
)){
Date
date
=
new
Date
();
Date
date
=
new
Date
();
date
=
DateUtil
.
offsetHour
(
date
,-
8
);
date
=
DateUtil
.
offsetHour
(
date
,-
8
);
date
=
DateUtil
.
offsetMinute
(
date
,-
59
);
date
=
DateUtil
.
offsetMinute
(
date
,-
59
);
...
@@ -348,7 +349,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
...
@@ -348,7 +349,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
if
(
gatewayIds
.
size
()>
0
){
if
(
gatewayIds
.
size
()>
0
){
orgCode
=
gatewayIds
.
get
(
0
)+
"%"
;
orgCode
=
gatewayIds
.
get
(
0
)+
"%"
;
}
}
if
(
requiredType
.
equals
(
"按天"
)){
if
(
requiredType
.
equals
(
WarningPeriodEnum
.
DAY
.
getName
()
)){
Date
startDayTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
startDayTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
date
=
DateUtils
.
dateAddHours
(
startDayTime
,
-
9
);
Date
date
=
DateUtils
.
dateAddHours
(
startDayTime
,
-
9
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
...
@@ -365,7 +366,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
...
@@ -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
date
=
new
Date
();
date
=
DateUtil
.
offsetHour
(
date
,-
8
);
date
=
DateUtil
.
offsetHour
(
date
,-
8
);
...
@@ -420,7 +421,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
...
@@ -420,7 +421,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
if
(
gatewayIds
.
size
()>
0
){
if
(
gatewayIds
.
size
()>
0
){
orgCode
=
gatewayIds
.
get
(
0
)+
"%"
;
orgCode
=
gatewayIds
.
get
(
0
)+
"%"
;
}
}
if
(
"按天"
.
equals
(
requiredType
)){
if
(
WarningPeriodEnum
.
DAY
.
getName
()
.
equals
(
requiredType
)){
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
endTimeTop
),
-
8
);
...
@@ -444,7 +445,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
...
@@ -444,7 +445,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
result
.
put
(
"seriesData"
,
seriesData
);
result
.
put
(
"seriesData"
,
seriesData
);
result
.
put
(
"axisData"
,
axisData
);
result
.
put
(
"axisData"
,
axisData
);
return
ResponseHelper
.
buildResponse
(
result
);
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"
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
endTimeTop
),
-
8
);
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
...
@@ -9,6 +9,7 @@ import java.text.SimpleDateFormat;
...
@@ -9,6 +9,7 @@ import java.text.SimpleDateFormat;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.module.jxiop.biz.Enum.WarningPeriodEnum
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IPermissionService
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IPermissionService
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.*
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.*
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
...
@@ -72,50 +73,41 @@ import io.swagger.annotations.ApiOperation;
...
@@ -72,50 +73,41 @@ import io.swagger.annotations.ApiOperation;
@RequestMapping
(
value
=
"/bigScreenAnalyse"
)
@RequestMapping
(
value
=
"/bigScreenAnalyse"
)
public
class
TDBigScreenAnalyseController
extends
BaseController
{
public
class
TDBigScreenAnalyseController
extends
BaseController
{
public
final
DecimalFormat
df
=
new
DecimalFormat
(
"0.0"
);
@Autowired
@Autowired
IdxBizFanHealthIndexMapper
idxBizFanHealthIndexMapper
;
IdxBizFanHealthIndexMapper
idxBizFanHealthIndexMapper
;
@Autowired
@Autowired
IdxBizFanWarningRecordMapper
idxBizFanWarningRecordMapper
;
IdxBizFanWarningRecordMapper
idxBizFanWarningRecordMapper
;
@Autowired
@Autowired
IdxBizPvHealthLevelMapper
idxBizPvHealthLevelMapper
;
IdxBizPvHealthLevelMapper
idxBizPvHealthLevelMapper
;
@Autowired
@Autowired
FanHealthIndexMapper
fanHealthIndexMapper
;
FanHealthIndexMapper
fanHealthIndexMapper
;
@Autowired
@Autowired
PvHealthIndexMapper
pvHealthIndexMapper
;
PvHealthIndexMapper
pvHealthIndexMapper
;
@Autowired
@Autowired
StationBasicMapper
stationBasicMapper
;
StationBasicMapper
stationBasicMapper
;
@Autowired
@Autowired
CommonServiceImpl
commonServiceImpl
;
CommonServiceImpl
commonServiceImpl
;
@Autowired
@Autowired
IdxBizFanHealthLevelMapper
idxBizFanHealthLevelMapper
;
IdxBizFanHealthLevelMapper
idxBizFanHealthLevelMapper
;
@Autowired
@Autowired
IndicatorDataMapper
indicatorDataMapper
;
IndicatorDataMapper
indicatorDataMapper
;
@Autowired
@Autowired
RiskWarningFeign
riskWarningFeign
;
RiskWarningFeign
riskWarningFeign
;
@Autowired
@Autowired
FanWaringRecordMapper
fanWaringRecordMapper
;
FanWaringRecordMapper
fanWaringRecordMapper
;
@Autowired
@Autowired
PvWaringRecordMapper
pvWaringRecordMapper
;
PvWaringRecordMapper
pvWaringRecordMapper
;
@Autowired
@Autowired
FanHealthIndexDayMapper
fanHealthIndexDayMapper
;
FanHealthIndexDayMapper
fanHealthIndexDayMapper
;
@Autowired
@Autowired
IPermissionService
permissionService
;
IPermissionService
permissionService
;
@Autowired
@Autowired
private
IdxBizFanWarningRuleSetServiceImpl
idxBizFanWarningRuleSetService
;
private
IdxBizFanWarningRuleSetServiceImpl
idxBizFanWarningRuleSetService
;
@Autowired
@Autowired
private
IdxBizPvWarningRuleSetServiceImpl
idxBizPvWarningRuleSetService
;
private
IdxBizPvWarningRuleSetServiceImpl
idxBizPvWarningRuleSetService
;
public
final
DecimalFormat
df
=
new
DecimalFormat
(
"0.0"
);
@Autowired
private
PvHealthIndexDayMapper
pvHealthIndexDayMapper
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站设备健康状态指数与趋势 - 仪表盘"
,
notes
=
"场站设备健康状态指数与趋势 - 仪表盘"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站设备健康状态指数与趋势 - 仪表盘"
,
notes
=
"场站设备健康状态指数与趋势 - 仪表盘"
)
...
@@ -161,11 +153,11 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -161,11 +153,11 @@ public class TDBigScreenAnalyseController extends BaseController {
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
Map
<
String
,
String
>>
dateInfoBy15
=
new
ArrayList
<>();
List
<
Map
<
String
,
String
>>
dateInfoBy15
=
new
ArrayList
<>();
if
(
startTime
!=
null
&&
endTime
!=
null
)
{
if
(
startTime
!=
null
&&
endTime
!=
null
)
{
if
(
CommonConstans
.
ANALYSE_TYPE_DAY
.
equals
(
analysisType
))
{
if
(
WarningPeriodEnum
.
DAY
.
getName
()
.
equals
(
analysisType
))
{
dateInfoBy15
=
idxBizFanHealthIndexMapper
.
getDateInfo
(
startTime
,
endTime
);
dateInfoBy15
=
idxBizFanHealthIndexMapper
.
getDateInfo
(
startTime
,
endTime
);
}
else
if
(
CommonConstans
.
ANALYSE_TYPE_HOUR
.
equals
(
analysisType
))
{
}
else
if
(
WarningPeriodEnum
.
HOUR
.
getName
()
.
equals
(
analysisType
))
{
dateInfoBy15
=
idxBizFanHealthIndexMapper
.
getHourInfo
(
startTime
,
endTime
);
dateInfoBy15
=
idxBizFanHealthIndexMapper
.
getHourInfo
(
startTime
,
endTime
);
}
else
if
(
CommonConstans
.
ANALYSE_TYPE_MOMENT
.
equals
(
analysisType
))
{
}
else
if
(
WarningPeriodEnum
.
MINUTES
.
getName
()
.
equals
(
analysisType
))
{
dateInfoBy15
=
idxBizFanHealthIndexMapper
.
getMomentInfo
(
startTime
,
endTime
);
dateInfoBy15
=
idxBizFanHealthIndexMapper
.
getMomentInfo
(
startTime
,
endTime
);
}
}
}
else
{
}
else
{
...
@@ -175,7 +167,7 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -175,7 +167,7 @@ public class TDBigScreenAnalyseController extends BaseController {
String
finalStationCode
=
stationCode
;
String
finalStationCode
=
stationCode
;
List
<
String
>
dateList
=
dateInfoBy15
.
stream
().
map
(
i
->
i
.
get
(
"date"
)).
collect
(
Collectors
.
toList
());
List
<
String
>
dateList
=
dateInfoBy15
.
stream
().
map
(
i
->
i
.
get
(
"date"
)).
collect
(
Collectors
.
toList
());
String
finalAreaCode
=
areaCode
;
String
finalAreaCode
=
areaCode
;
if
(
CommonConstans
.
ANALYSE_TYPE_DAY
.
equals
(
analysisType
)
||
analysisType
==
null
)
{
if
((
WarningPeriodEnum
.
DAY
.
getName
().
equals
(
analysisType
)
||
analysisType
==
null
)
)
{
List
<
String
>
fullDateList
=
dateList
.
stream
().
map
(
s
->
{
List
<
String
>
fullDateList
=
dateList
.
stream
().
map
(
s
->
{
return
s
+
" 00:00:00"
;
return
s
+
" 00:00:00"
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
...
@@ -188,7 +180,7 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -188,7 +180,7 @@ public class TDBigScreenAnalyseController extends BaseController {
:
"100"
;
:
"100"
;
valueList
.
add
(
String
.
valueOf
(
Math
.
round
(
Double
.
valueOf
(
value
)
*
10.0
)
/
10.0
));
valueList
.
add
(
String
.
valueOf
(
Math
.
round
(
Double
.
valueOf
(
value
)
*
10.0
)
/
10.0
));
}
}
}
else
if
(
CommonConstans
.
ANALYSE_TYPE_HOUR
.
equals
(
analysisType
))
{
}
else
if
(
WarningPeriodEnum
.
HOUR
.
getName
()
.
equals
(
analysisType
))
{
List
<
Map
<
String
,
Object
>>
healthListInfo
=
fanHealthIndexMapper
.
getInfoByHour
(
finalAreaCode
,
List
<
Map
<
String
,
Object
>>
healthListInfo
=
fanHealthIndexMapper
.
getInfoByHour
(
finalAreaCode
,
finalStationCode
,
dateList
);
finalStationCode
,
dateList
);
Map
<
String
,
Object
>
map
=
healthListInfo
.
stream
().
collect
(
Collectors
Map
<
String
,
Object
>
map
=
healthListInfo
.
stream
().
collect
(
Collectors
...
@@ -197,7 +189,7 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -197,7 +189,7 @@ public class TDBigScreenAnalyseController extends BaseController {
String
value
=
map
.
get
(
date
)
!=
null
?
String
.
valueOf
(
map
.
get
(
date
))
:
"100"
;
String
value
=
map
.
get
(
date
)
!=
null
?
String
.
valueOf
(
map
.
get
(
date
))
:
"100"
;
valueList
.
add
(
String
.
valueOf
(
Math
.
round
(
Double
.
valueOf
(
value
)
*
10.0
)
/
10.0
));
valueList
.
add
(
String
.
valueOf
(
Math
.
round
(
Double
.
valueOf
(
value
)
*
10.0
)
/
10.0
));
}
}
}
else
if
(
CommonConstans
.
ANALYSE_TYPE_MOMENT
.
equals
(
analysisType
))
{
}
else
if
(
WarningPeriodEnum
.
MINUTES
.
getName
()
.
equals
(
analysisType
))
{
List
<
Map
<
String
,
Object
>>
healthListInfo
=
fanHealthIndexMapper
.
getInfoByMoment
(
finalAreaCode
,
List
<
Map
<
String
,
Object
>>
healthListInfo
=
fanHealthIndexMapper
.
getInfoByMoment
(
finalAreaCode
,
finalStationCode
,
dateList
);
finalStationCode
,
dateList
);
Map
<
String
,
Object
>
map
=
healthListInfo
.
stream
().
collect
(
Collectors
Map
<
String
,
Object
>
map
=
healthListInfo
.
stream
().
collect
(
Collectors
...
@@ -1388,9 +1380,6 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -1388,9 +1380,6 @@ public class TDBigScreenAnalyseController extends BaseController {
return
ResponseHelper
.
buildResponse
(
resultMap
);
return
ResponseHelper
.
buildResponse
(
resultMap
);
}
}
@Autowired
private
PvHealthIndexDayMapper
pvHealthIndexDayMapper
;
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"风站/光伏 右下实时趋势"
)
@ApiOperation
(
value
=
"风站/光伏 右下实时趋势"
)
@GetMapping
(
"/getTrendInfoByAddressBy1118Pv"
)
@GetMapping
(
"/getTrendInfoByAddressBy1118Pv"
)
...
@@ -1559,7 +1548,6 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -1559,7 +1548,6 @@ public class TDBigScreenAnalyseController extends BaseController {
}
}
List
<
PvWarningRecord
>
list2
=
pvWaringRecordMapper
.
selectList
(
null
);
List
<
PvWarningRecord
>
list2
=
pvWaringRecordMapper
.
selectList
(
null
);
list2
.
forEach
(
item
->
{
list2
.
forEach
(
item
->
{
if
(
"未处置"
.
equals
(
item
.
getDisposotionState
()))
{
if
(
"未处置"
.
equals
(
item
.
getDisposotionState
()))
{
...
...
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
...
@@ -19,7 +19,7 @@ public interface IdxBizFanWarningRuleSetMapper extends BaseMapper<IdxBizFanWarni
int
queryListCount
();
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
();
Integer
getMaxWaringCycleOfMinutes
();
@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 = '按小时'"
)
Integer
getMaxWaringCycleOfHour
();
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;
...
@@ -14,7 +14,7 @@ import org.apache.ibatis.annotations.Select;
*/
*/
public
interface
IdxBizPvWarningRuleSetMapper
extends
BaseMapper
<
IdxBizPvWarningRuleSet
>
{
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
();
Integer
getMaxWaringCycleOfMinutes
();
@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 = '按小时'"
)
Integer
getMaxWaringCycleOfHour
();
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;
...
@@ -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.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments
;
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.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.Thread.MyServiceThread
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanPointProcessVariableClassificationDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanPointProcessVariableClassificationDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvPointProcessVariableClassificationDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvPointProcessVariableClassificationDto
;
...
@@ -1151,7 +1152,7 @@ public class CommonServiceImpl {
...
@@ -1151,7 +1152,7 @@ public class CommonServiceImpl {
query
.
ge
(
IdxBizFanHealthLevel:
:
getGroupUpperLimit
,
object
.
getDouble
(
"indexValue"
));
query
.
ge
(
IdxBizFanHealthLevel:
:
getGroupUpperLimit
,
object
.
getDouble
(
"indexValue"
));
IdxBizFanHealthLevel
idxBizFanHealthLevel
=
idxBizFanHealthLevelMapper
.
selectOne
(
query
);
IdxBizFanHealthLevel
idxBizFanHealthLevel
=
idxBizFanHealthLevelMapper
.
selectOne
(
query
);
idxBizFanHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
idxBizFanHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
idxBizFanHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizFanHealthIndex
.
setAnalysisType
(
WarningPeriodEnum
.
MINUTES
.
getName
()
);
idxBizFanHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizFanHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizFanHealthIndex
.
setANOMALY
(
object
.
getDouble
(
"scoreValue"
));
idxBizFanHealthIndex
.
setANOMALY
(
object
.
getDouble
(
"scoreValue"
));
idxBizFanHealthIndexs
.
add
(
idxBizFanHealthIndex
);
idxBizFanHealthIndexs
.
add
(
idxBizFanHealthIndex
);
...
@@ -1278,7 +1279,7 @@ public class CommonServiceImpl {
...
@@ -1278,7 +1279,7 @@ public class CommonServiceImpl {
query
.
ge
(
IdxBizPvHealthLevel:
:
getGroupUpperLimit
,
object
.
getDouble
(
"indexValue"
));
query
.
ge
(
IdxBizPvHealthLevel:
:
getGroupUpperLimit
,
object
.
getDouble
(
"indexValue"
));
IdxBizPvHealthLevel
idxBizFanHealthLevel
=
idxBizPvHealthLevelMapper
.
selectOne
(
query
);
IdxBizPvHealthLevel
idxBizFanHealthLevel
=
idxBizPvHealthLevelMapper
.
selectOne
(
query
);
idxBizFanHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
idxBizFanHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
idxBizFanHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizFanHealthIndex
.
setAnalysisType
(
WarningPeriodEnum
.
MINUTES
.
getName
()
);
idxBizFanHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizFanHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizFanHealthIndex
.
setANOMALY
(
object
.
getDouble
(
"scoreValue"
));
idxBizFanHealthIndex
.
setANOMALY
(
object
.
getDouble
(
"scoreValue"
));
idxBizPvHealthIndexs
.
add
(
idxBizFanHealthIndex
);
idxBizPvHealthIndexs
.
add
(
idxBizFanHealthIndex
);
...
@@ -1718,7 +1719,7 @@ public class CommonServiceImpl {
...
@@ -1718,7 +1719,7 @@ public class CommonServiceImpl {
}
}
}
}
idxBizFanHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizFanHealthIndex
.
setAnalysisType
(
WarningPeriodEnum
.
MINUTES
.
getName
()
);
idxBizFanHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizFanHealthIndex
.
setAnalysisObjType
(
"测点"
);
if
(
ObjectUtils
.
isEmpty
(
scoreValueArray
.
getDoubleValue
(
i
)))
{
if
(
ObjectUtils
.
isEmpty
(
scoreValueArray
.
getDoubleValue
(
i
)))
{
System
.
out
.
println
(
JSON
.
toJSONString
(
requestMap
));
System
.
out
.
println
(
JSON
.
toJSONString
(
requestMap
));
...
@@ -1747,7 +1748,7 @@ public class CommonServiceImpl {
...
@@ -1747,7 +1748,7 @@ public class CommonServiceImpl {
}
}
// idxBizFanHealthIndexService.saveBatch(idxBizFanHealthIndexs);
// idxBizFanHealthIndexService.saveBatch(idxBizFanHealthIndexs);
// 按时刻相关数据插入TDEngine 【异步】
// 按时刻相关数据插入TDEngine 【异步】
insertFanDataTDEngine
(
fanHealthIndices1
,
format
,
"按时刻"
);
insertFanDataTDEngine
(
fanHealthIndices1
,
format
,
WarningPeriodEnum
.
MINUTES
.
getName
()
);
}
}
...
@@ -2006,7 +2007,7 @@ public class CommonServiceImpl {
...
@@ -2006,7 +2007,7 @@ public class CommonServiceImpl {
}
}
}
}
idxBizPvHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizPvHealthIndex
.
setAnalysisType
(
WarningPeriodEnum
.
MINUTES
.
getName
()
);
idxBizPvHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizPvHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizPvHealthIndex
.
setANOMALY
(
scoreValueArray
.
getDoubleValue
(
i
));
idxBizPvHealthIndex
.
setANOMALY
(
scoreValueArray
.
getDoubleValue
(
i
));
idxBizPvHealthIndex
.
setANALYSISTIME
(
DateUtils
.
getDateNowString
());
idxBizPvHealthIndex
.
setANALYSISTIME
(
DateUtils
.
getDateNowString
());
...
@@ -2028,7 +2029,7 @@ public class CommonServiceImpl {
...
@@ -2028,7 +2029,7 @@ public class CommonServiceImpl {
}
}
// idxBizPvHealthIndexService.saveBatch(idxBizPvHealthIndexs);
// idxBizPvHealthIndexService.saveBatch(idxBizPvHealthIndexs);
//按时刻 - 相关数据插入
//按时刻 - 相关数据插入
insertPvDataTDEngine
(
fanHealthIndices1
,
format
,
"按时刻"
);
insertPvDataTDEngine
(
fanHealthIndices1
,
format
,
WarningPeriodEnum
.
MINUTES
.
getName
()
);
}
}
try
{
try
{
// logger.info("--------------------response: " + response);
// 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 @@
...
@@ -67,8 +67,8 @@
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
</if>
<if
test=
"analysisType == '按
时刻
'"
>
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
</if>
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
...
@@ -98,8 +98,8 @@
...
@@ -98,8 +98,8 @@
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
</if>
<if
test=
"analysisType == '按
时刻
'"
>
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
</if>
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
...
@@ -1036,7 +1036,7 @@
...
@@ -1036,7 +1036,7 @@
ANALYSIS_OBJ_TYPE = '测点'
ANALYSIS_OBJ_TYPE = '测点'
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
OR ( REC_DATE >= CURRENT_DATE ( ) AND ANALYSIS_TYPE = '按天' )
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
) b
INNER JOIN idx_biz_fan_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
INNER JOIN idx_biz_fan_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
AND rule.WARNING_NAME = '注意'
AND rule.WARNING_NAME = '注意'
...
@@ -1082,7 +1082,7 @@
...
@@ -1082,7 +1082,7 @@
ANALYSIS_OBJ_TYPE = '测点'
ANALYSIS_OBJ_TYPE = '测点'
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
OR ( REC_DATE >= CURRENT_DATE ( ) AND ANALYSIS_TYPE = '按天' )
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
) b
INNER JOIN idx_biz_fan_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
INNER JOIN idx_biz_fan_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
AND rule.WARNING_NAME = '注意'
AND rule.WARNING_NAME = '注意'
...
@@ -1126,7 +1126,7 @@
...
@@ -1126,7 +1126,7 @@
ANALYSIS_OBJ_TYPE = '测点'
ANALYSIS_OBJ_TYPE = '测点'
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
OR ( REC_DATE >= CURRENT_DATE ( ) AND ANALYSIS_TYPE = '按天' )
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
) b
INNER JOIN idx_biz_fan_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
INNER JOIN idx_biz_fan_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
AND rule.WARNING_NAME = '注意'
AND rule.WARNING_NAME = '注意'
...
@@ -1205,7 +1205,7 @@
...
@@ -1205,7 +1205,7 @@
<if
test=
"(startTime == null or startTime == '' ) and (endTime == null or endTime =='') "
>
<if
test=
"(startTime == null or startTime == '' ) and (endTime == null or endTime =='') "
>
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 15 HOUR ) )
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 ( 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>
<if
test=
"startTime != null and startTime != '' or endTime != null and endTime != '' "
>
<if
test=
"startTime != null and startTime != '' or endTime != null and endTime != '' "
>
AND REC_DATE >= #{startTime}
AND REC_DATE >= #{startTime}
...
@@ -1322,7 +1322,7 @@
...
@@ -1322,7 +1322,7 @@
WHERE
WHERE
#{recDate} >= REC_DATE
#{recDate} >= REC_DATE
AND REC_DATE >= DATE_ADD( #{recDate}, INTERVAL - 12 hour )
AND REC_DATE >= DATE_ADD( #{recDate}, INTERVAL - 12 hour )
AND ANALYSIS_TYPE = '按
时刻
'
AND ANALYSIS_TYPE = '按
10分钟
'
AND INDEX_ADDRESS = #{indexAddress}
AND INDEX_ADDRESS = #{indexAddress}
AND GATEWAY_ID = #{fanGatewayId}
AND GATEWAY_ID = #{fanGatewayId}
</select>
</select>
...
@@ -1349,8 +1349,8 @@
...
@@ -1349,8 +1349,8 @@
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
</if>
<if
test=
"analysisType == '按
时刻
'"
>
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
...
@@ -1375,8 +1375,8 @@
...
@@ -1375,8 +1375,8 @@
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
</if>
<if
test=
"analysisType == '按
时刻
'"
>
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
...
@@ -1407,8 +1407,8 @@
...
@@ -1407,8 +1407,8 @@
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
</if>
<if
test=
"analysisType == '按
时刻
'"
>
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
...
@@ -1433,8 +1433,8 @@
...
@@ -1433,8 +1433,8 @@
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
</if>
<if
test=
"analysisType == '按
时刻
'"
>
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
...
@@ -1468,8 +1468,8 @@
...
@@ -1468,8 +1468,8 @@
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
</if>
<if
test=
"analysisType == '按
时刻
'"
>
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
...
@@ -1494,8 +1494,8 @@
...
@@ -1494,8 +1494,8 @@
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
</if>
<if
test=
"analysisType == '按
时刻
'"
>
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
...
@@ -1527,8 +1527,8 @@
...
@@ -1527,8 +1527,8 @@
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
</if>
<if
test=
"analysisType == '按
时刻
'"
>
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
...
@@ -1553,8 +1553,8 @@
...
@@ -1553,8 +1553,8 @@
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
</if>
<if
test=
"analysisType == '按
时刻
'"
>
<if
test=
"analysisType == '按
10分钟
'"
>
AND ANALYSIS_TYPE = '按
时刻
'
AND ANALYSIS_TYPE = '按
10分钟
'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
</if>
<if
test=
"gatewayIds != null and gatewayIds.size() > 0"
>
and GATEWAY_ID in
<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 @@
...
@@ -112,7 +112,7 @@
ANALYSIS_OBJ_TYPE = '测点'
ANALYSIS_OBJ_TYPE = '测点'
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
OR ( REC_DATE >= CURRENT_DATE ( ) AND ANALYSIS_TYPE = '按天' )
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
) b
INNER JOIN idx_biz_pv_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
INNER JOIN idx_biz_pv_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
AND rule.WARNING_NAME = '注意'
AND rule.WARNING_NAME = '注意'
...
@@ -164,7 +164,7 @@
...
@@ -164,7 +164,7 @@
ANALYSIS_OBJ_TYPE = '测点'
ANALYSIS_OBJ_TYPE = '测点'
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
OR ( REC_DATE >= CURRENT_DATE ( ) AND ANALYSIS_TYPE = '按天' )
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
) b
INNER JOIN idx_biz_pv_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
INNER JOIN idx_biz_pv_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
AND rule.WARNING_NAME = '注意'
AND rule.WARNING_NAME = '注意'
...
@@ -214,7 +214,7 @@
...
@@ -214,7 +214,7 @@
ANALYSIS_OBJ_TYPE = '测点'
ANALYSIS_OBJ_TYPE = '测点'
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 1 HOUR ) )
OR ( REC_DATE >= CURRENT_DATE ( ) AND ANALYSIS_TYPE = '按天' )
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
) b
INNER JOIN idx_biz_pv_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
INNER JOIN idx_biz_pv_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
AND rule.WARNING_NAME = '注意'
AND rule.WARNING_NAME = '注意'
...
@@ -303,7 +303,7 @@
...
@@ -303,7 +303,7 @@
<if
test=
"(startTime == null or startTime == '' ) and (endTime == null or endTime =='') "
>
<if
test=
"(startTime == null or startTime == '' ) and (endTime == null or endTime =='') "
>
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 15 HOUR ) )
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 ( 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>
<if
test=
"startTime != null and startTime != '' or endTime != null and endTime != '' "
>
<if
test=
"startTime != null and startTime != '' or endTime != null and endTime != '' "
>
AND REC_DATE >= #{startTime}
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 @@
...
@@ -336,7 +336,7 @@
WHERE
WHERE
#{recDate} >= ts
#{recDate} >= ts
AND ts >= #{date12}
AND ts >= #{date12}
AND analysis_type = '按
时刻
'
AND analysis_type = '按
10分钟
'
AND index_address = #{indexAddress}
AND index_address = #{indexAddress}
AND gateway_id = #{fanGatewayId}
AND gateway_id = #{fanGatewayId}
</select>
</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