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
a44039e0
Commit
a44039e0
authored
Aug 06, 2024
by
lilongyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://36.40.66.175:5000/moa/jxdj_zx/amos-boot-zx-biz
into developer
parents
66a8a6fb
aae0a6f0
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
164 additions
and
104 deletions
+164
-104
DateUtils.java
...ava/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
+1
-1
EquipmentSpecificIndex.java
...yeejoin/amos/api/alarm/entity/EquipmentSpecificIndex.java
+1
-1
IdxBizFanHealthIndexController.java
.../jxiop/biz/controller/IdxBizFanHealthIndexController.java
+7
-7
IdxBizPvHealthIndexController.java
...e/jxiop/biz/controller/IdxBizPvHealthIndexController.java
+6
-6
TDBigScreenAnalyseController.java
...le/jxiop/biz/controller/TDBigScreenAnalyseController.java
+1
-1
TdInfoQueryController.java
...ot/module/jxiop/biz/controller/TdInfoQueryController.java
+62
-12
TestController.java
...amos/boot/module/jxiop/biz/controller/TestController.java
+9
-22
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+3
-5
HealthStatusIndicatorServiceImpl.java
...op/biz/service/impl/HealthStatusIndicatorServiceImpl.java
+0
-15
PvHealthIndexServiceImpl.java
...dule/jxiop/biz/service/impl/PvHealthIndexServiceImpl.java
+2
-2
TdengineTimeServiceImpl.java
...odule/jxiop/biz/service/impl/TdengineTimeServiceImpl.java
+60
-26
FanHealthIndexDayMapper.java
...t/module/jxiop/biz/tdMapper2/FanHealthIndexDayMapper.java
+1
-1
FanHealthIndexHourMapper.java
.../module/jxiop/biz/tdMapper2/FanHealthIndexHourMapper.java
+1
-1
FanHealthIndexMomentMapper.java
...odule/jxiop/biz/tdMapper2/FanHealthIndexMomentMapper.java
+1
-1
PvHealthIndexDayMapper.java
...ot/module/jxiop/biz/tdMapper2/PvHealthIndexDayMapper.java
+1
-1
PvHealthIndexHourMapper.java
...t/module/jxiop/biz/tdMapper2/PvHealthIndexHourMapper.java
+1
-1
PvHealthIndexMomentMapper.java
...module/jxiop/biz/tdMapper2/PvHealthIndexMomentMapper.java
+1
-1
EarningsForecastImpl.java
...t/module/jxiop/biz/service/impl/EarningsForecastImpl.java
+6
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
View file @
a44039e0
...
...
@@ -20,7 +20,7 @@ public class DateUtils {
public
static
final
String
DATE_TIME_PATTERN
=
"yyyy-MM-dd HH:mm:ss"
;
public
static
final
String
MINUTE_PATTERN
=
"yyyy-MM-dd HH:mm"
;
public
static
final
String
HOUR_PATTERN
=
"yyyy-MM-dd HH
:mm:ss
"
;
public
static
final
String
HOUR_PATTERN
=
"yyyy-MM-dd HH"
;
public
static
final
String
DATE_PATTERN
=
"yyyy-MM-dd"
;
public
static
final
String
MONTH_PATTERN
=
"yyyy-MM"
;
public
static
final
String
YEAR_PATTERN
=
"yyyy"
;
...
...
amos-boot-data/amos-boot-data-alarm/src/main/java/com/yeejoin/amos/api/alarm/entity/EquipmentSpecificIndex.java
View file @
a44039e0
...
...
@@ -50,7 +50,7 @@ public class EquipmentSpecificIndex {
private
String
emergencyLevelColor
;
@TableField
(
"is_alarm"
)
private
boolean
isAlarm
;
private
Double
isAlarm
;
@TableField
(
"emergency_level"
)
private
String
emergencyLevel
;
...
...
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 @
a44039e0
...
...
@@ -798,7 +798,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
Date
startDate
=
DateUtils
.
dateParse
(
startTimeTop
);
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
FanHealthIndexDay
>
fanHealthIndexDays
=
fanHealthIndexDayMapper
.
selectTrendData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
,
orgCode
);
fanHealthIndexDays
=
fanHealthIndexDays
.
stream
().
sorted
(
Comparator
.
comparing
(
FanHealthIndexDay:
:
get
AnalysisTim
e
)).
collect
(
Collectors
.
toList
());
fanHealthIndexDays
=
fanHealthIndexDays
.
stream
().
sorted
(
Comparator
.
comparing
(
FanHealthIndexDay:
:
get
RecDat
e
)).
collect
(
Collectors
.
toList
());
for
(
FanHealthIndexDay
obj
:
fanHealthIndexDays
)
{
if
(
type
.
equals
(
"0"
)){
...
...
@@ -814,13 +814,13 @@ public class IdxBizFanHealthIndexController extends BaseController {
}
else
if
(
WarningPeriodEnum
.
HOUR
.
getName
().
equals
(
requiredType
)){
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
date
AddHours
(
DateUtils
.
dateParse
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
date
Parse
(
endTimeTop
);
endTimeTop
=
formatter
.
format
(
endDate
);
}
Date
startDate
=
DateUtils
.
date
AddHours
(
DateUtils
.
dateParse
(
startTimeTop
),
-
8
);
Date
startDate
=
DateUtils
.
date
Parse
(
startTimeTop
);
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
FanHealthIndexHour
>
fanHealthIndexHours
=
fanHealthIndexHourMapper
.
selectTrendData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
,
orgCode
);
fanHealthIndexHours
=
fanHealthIndexHours
.
stream
().
sorted
(
Comparator
.
comparing
(
FanHealthIndexHour:
:
get
AnalysisTim
e
)).
collect
(
Collectors
.
toList
());
fanHealthIndexHours
=
fanHealthIndexHours
.
stream
().
sorted
(
Comparator
.
comparing
(
FanHealthIndexHour:
:
get
RecDat
e
)).
collect
(
Collectors
.
toList
());
for
(
FanHealthIndexHour
obj
:
fanHealthIndexHours
)
{
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())));
...
...
@@ -837,14 +837,14 @@ public class IdxBizFanHealthIndexController extends BaseController {
}
else
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
date
AddHours
(
DateUtils
.
dateParse
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
date
Parse
(
endTimeTop
);
endTimeTop
=
formatter
.
format
(
endDate
);
}
Date
startDate
=
DateUtils
.
date
AddHours
(
DateUtils
.
dateParse
(
startTimeTop
),
-
8
);
Date
startDate
=
DateUtils
.
date
Parse
(
startTimeTop
);
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
FanHealthIndexMoment
>
fanHealthIndexMoments
=
fanHealthIndexMomentMapper
.
selectTrendData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
,
orgCode
);
fanHealthIndexMoments
=
fanHealthIndexMoments
.
stream
().
sorted
(
Comparator
.
comparing
(
FanHealthIndexMoment:
:
get
AnalysisTim
e
)).
collect
(
Collectors
.
toList
());
fanHealthIndexMoments
=
fanHealthIndexMoments
.
stream
().
sorted
(
Comparator
.
comparing
(
FanHealthIndexMoment:
:
get
RecDat
e
)).
collect
(
Collectors
.
toList
());
for
(
FanHealthIndexMoment
obj
:
fanHealthIndexMoments
)
{
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())));
...
...
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 @
a44039e0
...
...
@@ -475,7 +475,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
PvHealthIndexDay
>
fanHealthIndexDays
=
pvHealthIndexDayMapper
.
selectTrendData
(
station
,
analysisType
,
indexAddress
,
healthLevel
,
area
,
analysisObjType
,
subarray
,
pointName
,
startTimeTop
,
endTimeTop
,
equipmentName
,
null
,
null
,
orgCode
);
fanHealthIndexDays
=
fanHealthIndexDays
.
stream
().
sorted
(
Comparator
.
comparing
(
PvHealthIndexDay:
:
get
AnalysisTim
e
)).
collect
(
Collectors
.
toList
());
fanHealthIndexDays
=
fanHealthIndexDays
.
stream
().
sorted
(
Comparator
.
comparing
(
PvHealthIndexDay:
:
get
RecDat
e
)).
collect
(
Collectors
.
toList
());
for
(
PvHealthIndexDay
obj
:
fanHealthIndexDays
)
{
if
(
type
.
equals
(
"0"
)){
...
...
@@ -491,13 +491,13 @@ public class IdxBizPvHealthIndexController extends BaseController {
}
else
if
(
WarningPeriodEnum
.
HOUR
.
getName
().
equals
(
requiredType
)){
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
date
AddHours
(
DateUtils
.
dateParse
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
date
Parse
(
endTimeTop
);
endTimeTop
=
formatter
.
format
(
endDate
);
}
Date
startDate
=
DateUtils
.
date
AddHours
(
DateUtils
.
dateParse
(
startTimeTop
),
-
8
);
Date
startDate
=
DateUtils
.
date
Parse
(
startTimeTop
);
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
PvHealthIndexHour
>
fanHealthIndexHours
=
pvHealthIndexHourMapper
.
selectTrendData
(
healthLevel
,
area
,
equipmentName
,
subarray
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
,
orgCode
);
fanHealthIndexHours
=
fanHealthIndexHours
.
stream
().
sorted
(
Comparator
.
comparing
(
PvHealthIndexHour:
:
get
AnalysisTim
e
)).
collect
(
Collectors
.
toList
());
fanHealthIndexHours
=
fanHealthIndexHours
.
stream
().
sorted
(
Comparator
.
comparing
(
PvHealthIndexHour:
:
get
RecDat
e
)).
collect
(
Collectors
.
toList
());
for
(
PvHealthIndexHour
obj
:
fanHealthIndexHours
)
{
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())));
...
...
@@ -517,10 +517,10 @@ public class IdxBizPvHealthIndexController extends BaseController {
SimpleDateFormat
formatterNYRSF
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
date
AddHours
(
DateUtils
.
dateParse
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
date
Parse
(
endTimeTop
);
endTimeTop
=
formatter
.
format
(
endDate
);
}
Date
startDate
=
DateUtils
.
date
AddHours
(
DateUtils
.
dateParse
(
startTimeTop
),
-
8
);
Date
startDate
=
DateUtils
.
date
Parse
(
startTimeTop
);
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
PvHealthIndexMoment
>
fanHealthIndexMoments
=
pvHealthIndexMomentMapper
.
selectTrendData
(
healthLevel
,
area
,
equipmentName
,
subarray
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
,
orgCode
);
...
...
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 @
a44039e0
...
...
@@ -1016,7 +1016,7 @@ public class TDBigScreenAnalyseController extends BaseController {
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"设备"
);
query
.
eq
(
IdxBizPvHealthLevel:
:
getStatus
,
item
.
get
(
"station"
));
query
.
l
e
(
IdxBizPvHealthLevel:
:
getGroupLowerLimit
,
equipmentHealthScore
);
query
.
l
t
(
IdxBizPvHealthLevel:
:
getGroupLowerLimit
,
equipmentHealthScore
);
query
.
ge
(
IdxBizPvHealthLevel:
:
getGroupUpperLimit
,
equipmentHealthScore
);
IdxBizPvHealthLevel
idxBizFanHealthLevel
=
idxBizPvHealthLevelMapper
.
selectOne
(
query
);
if
(
ObjectUtils
.
isEmpty
(
idxBizFanHealthLevel
))
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TdInfoQueryController.java
View file @
a44039e0
...
...
@@ -104,13 +104,13 @@ public class TdInfoQueryController extends BaseController {
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getStartDate
()))
{
String
startDate
=
dto
.
getStartDate
();
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
&&
startDate
.
length
()
==
10
)
{
startDate
=
startDate
+
"
"
+
hhmmss
.
format
(
currentDate
)
;
startDate
=
startDate
+
"
00:00:00"
;
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按小时"
)
&&
startDate
.
length
()
==
13
)
{
startDate
=
startDate
+
":
"
+
mmss
.
format
(
currentDate
)
;
startDate
=
startDate
+
":
00:00"
;
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按10分钟"
)
&&
startDate
.
length
()
==
16
)
{
startDate
=
startDate
+
":
"
+
ss
.
format
(
currentDate
)
;
startDate
=
startDate
+
":
00"
;
}
Date
date
=
DateUtils
.
dateParse
(
startDate
,
DATE_TIME_PATTERN
);
...
...
@@ -121,13 +121,13 @@ public class TdInfoQueryController extends BaseController {
String
endDate
=
dto
.
getEndDate
();
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
&&
endDate
.
length
()
==
10
)
{
endDate
=
endDate
+
"
"
+
hhmmss
.
format
(
currentDate
)
;
endDate
=
endDate
+
"
00:00:00"
;
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按小时"
)
&&
endDate
.
length
()
==
13
)
{
endDate
=
endDate
+
":
"
+
mmss
.
format
(
currentDate
)
;
endDate
=
endDate
+
":
00:00"
;
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按10分钟"
)
&&
endDate
.
length
()
==
16
)
{
endDate
=
endDate
+
":
"
+
ss
.
format
(
currentDate
)
;
endDate
=
endDate
+
":
00"
;
}
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
,
DATE_TIME_PATTERN
);
...
...
@@ -204,13 +204,13 @@ public class TdInfoQueryController extends BaseController {
String
startDate
=
dto
.
getStartDate
();
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
&&
startDate
.
length
()
==
10
)
{
startDate
=
startDate
+
"
"
+
hhmmss
.
format
(
currentDate
)
;
startDate
=
startDate
+
"
00:00:00"
;
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按小时"
)
&&
startDate
.
length
()
==
13
)
{
startDate
=
startDate
+
":
"
+
mmss
.
format
(
currentDate
)
;
startDate
=
startDate
+
":
00:00"
;
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按10分钟"
)
&&
startDate
.
length
()
==
16
)
{
startDate
=
startDate
+
":
"
+
ss
.
format
(
currentDate
)
;
startDate
=
startDate
+
":
00"
;
}
...
...
@@ -222,13 +222,13 @@ public class TdInfoQueryController extends BaseController {
String
endDate
=
dto
.
getEndDate
();
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按天"
)
&&
endDate
.
length
()
==
10
)
{
endDate
=
endDate
+
"
"
+
hhmmss
.
format
(
currentDate
)
;
endDate
=
endDate
+
"
00:00:00"
;
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按小时"
)
&&
endDate
.
length
()
==
13
)
{
endDate
=
endDate
+
":
"
+
mmss
.
format
(
currentDate
)
;
endDate
=
endDate
+
":
00:00"
;
}
if
(
dto
.
getAnalysisType
()
!=
null
&&
dto
.
getAnalysisType
().
equals
(
"按10分钟"
)
&&
endDate
.
length
()
==
16
)
{
endDate
=
endDate
+
":
"
+
ss
.
format
(
currentDate
)
;
endDate
=
endDate
+
":
00"
;
}
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
,
DATE_TIME_PATTERN
);
...
...
@@ -282,14 +282,40 @@ public class TdInfoQueryController extends BaseController {
orgCode
=
stdUserEmpower
.
getAmosOrgCode
().
get
(
0
)+
"%"
;
}
dto
.
setOrgCode
(
orgCode
);
Date
currentDate
=
new
Date
();
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getStartDate
()))
{
String
startDate
=
dto
.
getStartDate
();
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按天"
)
&&
startDate
.
length
()
==
10
)
{
startDate
=
startDate
+
" 00:00:00"
;
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按小时"
)
&&
startDate
.
length
()
==
13
)
{
startDate
=
startDate
+
":00:00"
;
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按10分钟"
)
&&
startDate
.
length
()
==
16
)
{
startDate
=
startDate
+
":00"
;
}
Date
date
=
DateUtils
.
dateParse
(
startDate
,
DATE_TIME_PATTERN
);
String
startDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
date
,
-
8
),
DATE_TIME_PATTERN
);
dto
.
setStartDate
(
startDateString
);
}
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getEndDate
()))
{
String
endDate
=
dto
.
getEndDate
();
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按天"
)
&&
endDate
.
length
()
==
10
)
{
endDate
=
endDate
+
" 00:00:00"
;
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按小时"
)
&&
endDate
.
length
()
==
13
)
{
endDate
=
endDate
+
":00:00"
;
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按10分钟"
)
&&
endDate
.
length
()
==
16
)
{
endDate
=
endDate
+
":00"
;
}
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
,
DATE_TIME_PATTERN
);
String
endDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
);
dto
.
setEndDate
(
endDateString
);
...
...
@@ -340,14 +366,38 @@ public class TdInfoQueryController extends BaseController {
orgCode
=
stdUserEmpower
.
getAmosOrgCode
().
get
(
0
)+
"%"
;
}
dto
.
setOrgCode
(
orgCode
);
Date
currentDate
=
new
Date
();
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getStartDate
()))
{
String
startDate
=
dto
.
getStartDate
();
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按天"
)
&&
startDate
.
length
()
==
10
)
{
startDate
=
startDate
+
" 00:00:00"
;
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按小时"
)
&&
startDate
.
length
()
==
13
)
{
startDate
=
startDate
+
":00:00"
;
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按10分钟"
)
&&
startDate
.
length
()
==
16
)
{
startDate
=
startDate
+
":00"
;
}
Date
date
=
DateUtils
.
dateParse
(
startDate
,
DATE_TIME_PATTERN
);
String
startDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
date
,
-
8
),
DATE_TIME_PATTERN
);
dto
.
setStartDate
(
startDateString
);
}
if
(
CharSequenceUtil
.
isNotEmpty
(
dto
.
getEndDate
()))
{
String
endDate
=
dto
.
getEndDate
();
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按天"
)
&&
endDate
.
length
()
==
10
)
{
endDate
=
endDate
+
" 00:00:00"
;
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按小时"
)
&&
endDate
.
length
()
==
13
)
{
endDate
=
endDate
+
":00:00"
;
}
if
(
dto
.
getWarningPeriod
()
!=
null
&&
dto
.
getWarningPeriod
().
equals
(
"按10分钟"
)
&&
endDate
.
length
()
==
16
)
{
endDate
=
endDate
+
":00"
;
}
Date
endDateDate
=
DateUtils
.
dateParse
(
endDate
,
DATE_TIME_PATTERN
);
String
endDateString
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
endDateDate
,
-
8
),
DATE_TIME_PATTERN
);
dto
.
setEndDate
(
endDateString
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TestController.java
View file @
a44039e0
...
...
@@ -9,6 +9,7 @@ import java.util.Map;
import
java.util.Map.Entry
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.HealthStatusIndicatorServiceImpl
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -47,6 +48,8 @@ public class TestController extends BaseController {
IndicatorDataMapper
indicatorDataMapper
;
@Autowired
CommonServiceImpl
commonService
;
@Autowired
HealthStatusIndicatorServiceImpl
healthStatusIndicatorService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"test1"
,
notes
=
"test1"
)
...
...
@@ -162,29 +165,13 @@ public class TestController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"test2"
,
notes
=
"test1"
)
@GetMapping
(
"/
set-date
"
)
@GetMapping
(
"/
test123
"
)
public
void
clearRecord
()
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
d
=
sdf
.
format
(
new
Date
());
LambdaQueryWrapper
<
FanWarningRecord
>
wf
=
new
LambdaQueryWrapper
<>();
wf
.
isNull
(
FanWarningRecord:
:
getDisposotionDate
);
List
<
FanWarningRecord
>
list
=
fanWaringRecordMapper
.
selectList
(
wf
);
if
(!
list
.
isEmpty
())
{
list
.
forEach
(
i
->
{
i
.
setDisposotionDate
(
d
);
});
fanWaringRecordMapper
.
saveBatchWarningRecords
(
list
);
}
LambdaQueryWrapper
<
PvWarningRecord
>
pf
=
new
LambdaQueryWrapper
<>();
pf
.
isNull
(
PvWarningRecord:
:
getDisposotionDate
);
List
<
PvWarningRecord
>
list1
=
pvWaringRecordMapper
.
selectList
(
pf
);
if
(!
list1
.
isEmpty
())
{
list1
.
forEach
(
i
->
{
i
.
setDisposotionDate
(
d
);
});
pvWaringRecordMapper
.
saveBatchWarningRecords
(
list1
);
}
Date
time
=
new
Date
();
time
=
DateUtil
.
offsetMinute
(
time
,
-
DateUtil
.
minute
(
time
)
%
10
);
String
format
=
DateUtil
.
format
(
time
,
"yyyy-MM-dd HH:mm:00"
);
time
=
DateUtil
.
parse
(
format
,
"yyyy-MM-dd HH:mm:00"
);
healthStatusIndicatorService
.
healthWarningMinuteGF
(
time
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
PUBLIC
,
needAuth
=
false
)
...
...
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 @
a44039e0
...
...
@@ -2073,7 +2073,7 @@ public class CommonServiceImpl {
// 获取健康指数对应等级
for
(
IdxBizFanHealthLevel
idxBizFanHealthLevel
:
idxBizFanHealthLevels
)
{
if
(
indexValueArray
.
getDoubleValue
(
i
)
<=
idxBizFanHealthLevel
.
getGroupUpperLimit
()
&&
indexValueArray
.
getDoubleValue
(
i
)
>
=
idxBizFanHealthLevel
.
getGroupLowerLimit
())
{
&&
indexValueArray
.
getDoubleValue
(
i
)
>
idxBizFanHealthLevel
.
getGroupLowerLimit
())
{
idxBizFanHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
}
...
...
@@ -2430,7 +2430,6 @@ public class CommonServiceImpl {
*
* @param fanHealthIndices
*/
@Async
public
void
insertFanDataTDEngine
(
ArrayList
<
FanHealthIndex
>
fanHealthIndices
,
String
recDate
,
String
analysisType
)
{
idxFanHealthIndexMapper
.
deleteAllDataByTableName
(
"fan_health_index_latest_data"
,
analysisType
);
// 按时刻 - 测点插入
...
...
@@ -2680,7 +2679,7 @@ public class CommonServiceImpl {
for
(
IdxBizPvHealthLevel
idxBizFanHealthLevel
:
idxBizFanHealthLevels
)
{
if
(
indexValueArray
.
getDoubleValue
(
i
)
<=
idxBizFanHealthLevel
.
getGroupUpperLimit
()
&&
indexValueArray
.
getDoubleValue
(
i
)
>
=
idxBizFanHealthLevel
.
getGroupLowerLimit
())
{
&&
indexValueArray
.
getDoubleValue
(
i
)
>
idxBizFanHealthLevel
.
getGroupLowerLimit
())
{
idxBizPvHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
}
...
...
@@ -2694,7 +2693,7 @@ public class CommonServiceImpl {
BeanUtil
.
copyProperties
(
idxBizPvHealthIndex
,
pvHealthIndex
);
pvHealthIndex
.
setWeight
(
idxBizPvHealthIndex
.
getWeigth
());
pvHealthIndex
.
setAnomaly
(
idxBizPvHealthIndex
.
getANOMALY
());
pvHealthIndex
.
setRecDate
(
DateUtil
.
now
()
);
pvHealthIndex
.
setRecDate
(
format
);
pvHealthIndex
.
setArea
(
idxBizPvHealthIndex
.
getArae
());
pvHealthIndex
.
setAnalysisTime
(
format
);
pvHealthIndex
.
setHealthLevel
(
idxBizPvHealthIndex
.
getHealthLevel
());
...
...
@@ -2988,7 +2987,6 @@ public class CommonServiceImpl {
*
* @param pvHealthIndices
*/
@Async
public
void
insertPvDataTDEngine
(
ArrayList
<
PvHealthIndex
>
pvHealthIndices
,
String
recDate
,
String
analysisType
)
{
idxFanHealthIndexMapper
.
deleteAllDataByTableName
(
"pv_health_index_latest_data"
,
analysisType
);
...
...
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 @
a44039e0
...
...
@@ -167,11 +167,7 @@ public class HealthStatusIndicatorServiceImpl {
*/
// @Scheduled(cron = "0 0 */1 * * ?")
@Async
(
"async"
)
public
void
healthWarningMinuteGF
(
Date
time
)
{
if
(!
openHealth
)
{
return
;
}
String
format
=
DateUtil
.
format
(
time
,
"yyyy-MM-dd HH:mm:00"
);
// Date date = DateUtils.dateAddHours(time, -8);
log
.
info
(
"光伏---------------------预警时间----"
+
time
);
...
...
@@ -548,7 +544,6 @@ public class HealthStatusIndicatorServiceImpl {
//
// }
@Async
(
"async"
)
public
void
healthWarningMinuteGF
(
Date
time
,
String
gatewayId
)
{
if
(!
openHealth
)
{
return
;
...
...
@@ -756,7 +751,6 @@ public class HealthStatusIndicatorServiceImpl {
*/
// @Scheduled(cron = "0 0 0/1 * * ?")
@Async
(
"async"
)
public
void
healthWarningHourGF
()
{
if
(!
openHealth
)
{
return
;
...
...
@@ -962,7 +956,6 @@ public class HealthStatusIndicatorServiceImpl {
// @Scheduled(cron = "0 0 0/1 * * ?")
// @Scheduled(cron = "0 0/5 * * * ?")
@Async
(
"async"
)
public
void
healthWarningHourGFNew
()
{
if
(!
openHealth
)
{
...
...
@@ -1184,7 +1177,6 @@ public class HealthStatusIndicatorServiceImpl {
*/
// @Scheduled(cron = "0 0 0 0/1 * ? ")
@Async
(
"async"
)
public
void
healthWarningDayGF
()
{
if
(!
openHealth
)
{
return
;
...
...
@@ -1393,7 +1385,6 @@ public class HealthStatusIndicatorServiceImpl {
}
// @Scheduled(cron = "0 0 0 0/1 * ? ")
@Async
(
"async"
)
public
void
healthWarningDayGFNew
()
{
if
(!
openHealth
)
{
return
;
...
...
@@ -1614,7 +1605,6 @@ public class HealthStatusIndicatorServiceImpl {
}
// @Scheduled(cron = "0 0 */1 * * ?")
@Async
(
"async"
)
public
void
healthWarningMinute
(
Date
time
)
{
if
(!
openHealth
)
{
return
;
...
...
@@ -1839,7 +1829,6 @@ public class HealthStatusIndicatorServiceImpl {
fetchDataFan
(
tdFanWarningRecordList
,
stationMap
);
}
@Async
(
"async"
)
// @PostConstruct
public
void
healthWarningMinute
(
Date
time
,
String
gatewayId
)
{
if
(!
openHealth
)
{
...
...
@@ -2072,7 +2061,6 @@ public class HealthStatusIndicatorServiceImpl {
*/
// @Scheduled(cron = "0 0 0/1 * * ?")
@Async
(
"async"
)
// @PostConstruct
public
void
healthWarningHour
()
{
// if (!openHealth) {
...
...
@@ -2297,7 +2285,6 @@ public class HealthStatusIndicatorServiceImpl {
}
// @Scheduled(cron = "0 0 0/1 * * ?")
@Async
(
"async"
)
public
void
healthWarningHourNew
()
{
if
(!
openHealth
)
{
return
;
...
...
@@ -2520,7 +2507,6 @@ public class HealthStatusIndicatorServiceImpl {
*/
// @Scheduled(cron = "0 0 0 0/1 * ? ")
@Async
(
"async"
)
public
void
healthWarningDay
()
{
if
(!
openHealth
)
{
return
;
...
...
@@ -2737,7 +2723,6 @@ public class HealthStatusIndicatorServiceImpl {
}
// @Scheduled(cron = "0 0 0 0/1 * ? ")
@Async
(
"async"
)
public
void
healthWarningDayNew
()
{
if
(!
openHealth
)
{
return
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/PvHealthIndexServiceImpl.java
View file @
a44039e0
...
...
@@ -162,7 +162,7 @@ public class PvHealthIndexServiceImpl implements IPvHealthIndexService {
String
analysisObjectType
)
{
List
<
PvHealthIndex
>
pvHealthIndices
=
pvHealthIndexMapper
.
getInfoList
(
startTime
,
tableName
,
analysisObjectType
);
QueryWrapper
<
IdxBizPvWeight
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"type"
,
"
3
"
);
queryWrapper
.
eq
(
"type"
,
"
4
"
);
queryWrapper
.
isNotNull
(
"value"
);
List
<
IdxBizPvWeight
>
idxBizFanWeights
=
idxBizPvWeightMapper
.
selectList
(
queryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
(),
IdxBizPvWeight:
:
getValue
));
...
...
@@ -215,7 +215,7 @@ public class PvHealthIndexServiceImpl implements IPvHealthIndexService {
String
analysisObjectType
)
{
List
<
PvHealthIndex
>
pvHealthIndices
=
pvHealthIndexMapper
.
getInfoList
(
startTime
,
tableName
,
analysisObjectType
);
QueryWrapper
<
IdxBizPvWeight
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"type"
,
"
4
"
);
queryWrapper
.
eq
(
"type"
,
"
3
"
);
queryWrapper
.
isNotNull
(
"value"
);
List
<
IdxBizPvWeight
>
idxBizFanWeights
=
idxBizPvWeightMapper
.
selectList
(
queryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
(),
IdxBizPvWeight:
:
getValue
));
...
...
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 @
a44039e0
...
...
@@ -30,6 +30,8 @@ import java.util.Date;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.annotation.PostConstruct
;
@Slf4j
@Service
...
...
@@ -106,43 +108,51 @@ public class TdengineTimeServiceImpl {
String
recDate
=
DateUtil
.
format
(
new
Date
(),
"yyyy-MM-dd HH:00:00"
);
// 8小时 + 59分钟
String
startTime
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddMinutes
(
new
Date
(),
-
541
),
DateUtils
.
DATE_TIME_PATTERN
);
// // 测点
// List<IdxBizFanHealthLevel> levelList = idxBizFanHealthLevelMapper.selectList(new LambdaQueryWrapper<IdxBizFanHealthLevel>().eq(IdxBizFanHealthLevel::getAnalysisObjType, "测点").last("limit 4"));
// List<FanHealthIndex> fanHealthIndices = fanHealthIndexService.getInfoListByGroupByCdFan(startTime, "fan_health_index_moment", "测点");
// saveBatchFan(fanHealthIndices, "fan_health_index_hour", recDate, WarningPeriodEnum.HOUR.getName(), levelList);
// 测点
List
<
IdxBizFanHealthLevel
>
levelList
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"测点"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndices
=
fanHealthIndexService
.
getInfoListByGroupByCdFan
(
startTime
,
"fan_health_index_moment"
,
"测点"
);
saveBatchFan
(
fanH
ealthIndices
,
"fan_health_index_hour"
,
recDate
,
WarningPeriodEnum
.
HOUR
.
getName
(),
levelList
);
List
<
FanHealthIndex
>
healthIndices
=
fanHealthIndexMapper
.
getInfoListByGroupByCdFan
(
startTime
,
"fan_health_index_moment"
,
"测点"
);
saveBatchFan
(
h
ealthIndices
,
"fan_health_index_hour"
,
recDate
,
WarningPeriodEnum
.
HOUR
.
getName
(),
levelList
);
// 子系统
List
<
IdxBizFanHealthLevel
>
levelListZxt
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"子系统"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndicesZxt
=
fanHealthIndexService
.
getInfoListByGroupByZxtFan
(
startTime
,
"fan_health_index_
moment
"
,
"测点"
);
List
<
FanHealthIndex
>
fanHealthIndicesZxt
=
fanHealthIndexService
.
getInfoListByGroupByZxtFan
(
startTime
,
"fan_health_index_
hour
"
,
"测点"
);
saveBatchFan
(
fanHealthIndicesZxt
,
"fan_health_index_hour"
,
recDate
,
WarningPeriodEnum
.
HOUR
.
getName
(),
levelListZxt
);
// 设备
List
<
IdxBizFanHealthLevel
>
levelListSb
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"设备"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndicesSb
=
fanHealthIndexService
.
getInfoListByGroupBySbFan
(
startTime
,
"fan_health_index_
moment
"
,
"子系统"
);
List
<
FanHealthIndex
>
fanHealthIndicesSb
=
fanHealthIndexService
.
getInfoListByGroupBySbFan
(
startTime
,
"fan_health_index_
hour
"
,
"子系统"
);
saveBatchFan
(
fanHealthIndicesSb
,
"fan_health_index_hour"
,
recDate
,
WarningPeriodEnum
.
HOUR
.
getName
(),
levelListSb
);
// 场站
List
<
IdxBizFanHealthLevel
>
levelListCz
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"场站"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndicesCz
=
fanHealthIndexService
.
getInfoListByGroupByCzFan
(
startTime
,
"fan_health_index_
moment
"
,
"设备"
);
List
<
FanHealthIndex
>
fanHealthIndicesCz
=
fanHealthIndexService
.
getInfoListByGroupByCzFan
(
startTime
,
"fan_health_index_
hour
"
,
"设备"
);
saveBatchFan
(
fanHealthIndicesCz
,
"fan_health_index_hour"
,
recDate
,
WarningPeriodEnum
.
HOUR
.
getName
(),
levelListCz
);
idxFanHealthIndexMapper
.
deleteAllDataByTableName
(
"pv_health_index_latest_data"
,
WarningPeriodEnum
.
HOUR
.
getName
());
// // 测点
// List<IdxBizPvHealthLevel> pvLevelList = idxBizPvHealthLevelMapper.selectList(new LambdaQueryWrapper<IdxBizPvHealthLevel>().eq(IdxBizPvHealthLevel::getAnalysisObjType, "测点").last("limit 4"));
// List<PvHealthIndex> pvHealthIndices = pvHealthIndexService.getInfoListByGroupByCdPv(startTime, "pv_health_index_hour", "测点");
// saveBatchPv(pvHealthIndices, "pv_health_index_hour", recDate, WarningPeriodEnum.HOUR.getName(), pvLevelList);
// 测点
List
<
IdxBizPvHealthLevel
>
pv
L
evelList
=
idxBizPvHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>().
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"测点"
).
last
(
"limit 4"
));
List
<
PvHealthIndex
>
pvHealthIndices
=
pvHealthIndex
Service
.
getInfoListByGroupByCdPv
(
startTime
,
"pv_health_index_moment"
,
"测点"
);
saveBatchPv
(
pvHealthIndices
,
"pv_health_index_hour"
,
recDate
,
WarningPeriodEnum
.
HOUR
.
getName
(),
pv
L
evelList
);
List
<
IdxBizPvHealthLevel
>
pv
l
evelList
=
idxBizPvHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>().
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"测点"
).
last
(
"limit 4"
));
List
<
PvHealthIndex
>
pvHealthIndices
=
pvHealthIndex
Mapper
.
getInfoListByGroupByCdPv
(
startTime
,
"pv_health_index_moment"
,
"测点"
);
saveBatchPv
(
pvHealthIndices
,
"pv_health_index_hour"
,
recDate
,
WarningPeriodEnum
.
HOUR
.
getName
(),
pv
l
evelList
);
// 设备
List
<
IdxBizPvHealthLevel
>
pvLevelListSb
=
idxBizPvHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>().
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"设备"
).
last
(
"limit 4"
));
List
<
PvHealthIndex
>
pvHealthIndicesSb
=
pvHealthIndexService
.
getInfoListByGroupBySbPv
(
startTime
,
"pv_health_index_
moment
"
,
"测点"
);
List
<
PvHealthIndex
>
pvHealthIndicesSb
=
pvHealthIndexService
.
getInfoListByGroupBySbPv
(
startTime
,
"pv_health_index_
hour
"
,
"测点"
);
saveBatchPv
(
pvHealthIndicesSb
,
"pv_health_index_hour"
,
recDate
,
WarningPeriodEnum
.
HOUR
.
getName
(),
pvLevelListSb
);
// 子阵
List
<
IdxBizPvHealthLevel
>
pvLevelListZz
=
idxBizPvHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>().
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"子阵"
).
last
(
"limit 4"
));
List
<
PvHealthIndex
>
pvHealthIndicesZz
=
pvHealthIndexService
.
getInfoListByGroupByZzPv
(
startTime
,
"pv_health_index_
moment
"
,
"设备"
);
List
<
PvHealthIndex
>
pvHealthIndicesZz
=
pvHealthIndexService
.
getInfoListByGroupByZzPv
(
startTime
,
"pv_health_index_
hour
"
,
"设备"
);
saveBatchPv
(
pvHealthIndicesZz
,
"pv_health_index_hour"
,
recDate
,
WarningPeriodEnum
.
HOUR
.
getName
(),
pvLevelListZz
);
// 场站
List
<
IdxBizPvHealthLevel
>
pvLevelListCz
=
idxBizPvHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>().
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"场站"
).
last
(
"limit 4"
));
List
<
PvHealthIndex
>
pvHealthIndicesCz
=
pvHealthIndexService
.
getInfoListByGroupByCzPv
(
startTime
,
"pv_health_index_
moment
"
,
"子阵"
);
List
<
PvHealthIndex
>
pvHealthIndicesCz
=
pvHealthIndexService
.
getInfoListByGroupByCzPv
(
startTime
,
"pv_health_index_
hour
"
,
"子阵"
);
saveBatchPv
(
pvHealthIndicesCz
,
"pv_health_index_hour"
,
recDate
,
WarningPeriodEnum
.
HOUR
.
getName
(),
pvLevelListCz
);
// 区域
List
<
HealthIndexDTO
>
healthIndexQyDTOS
=
fanHealthIndexService
.
getInfoListByGroupByQy
(
startTime
,
"fan_health_index_
moment"
,
"pv_health_index_moment
"
,
"场站"
);
List
<
HealthIndexDTO
>
healthIndexQyDTOS
=
fanHealthIndexService
.
getInfoListByGroupByQy
(
startTime
,
"fan_health_index_
hour"
,
"pv_health_index_hour
"
,
"场站"
);
List
<
IdxBizFanHealthLevel
>
levelListQy
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"片区"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndicesQy
=
healthIndexQyDTOS
.
stream
().
map
(
o
->
fanHealthIndexService
.
toFanHealthIndex
(
o
)).
collect
(
Collectors
.
toList
());
saveBatchFan
(
fanHealthIndicesQy
,
"fan_health_index_hour"
,
recDate
,
WarningPeriodEnum
.
HOUR
.
getName
(),
levelListQy
);
...
...
@@ -152,7 +162,7 @@ public class TdengineTimeServiceImpl {
saveBatchPv
(
pvHealthIndicesQy
,
"pv_health_index_hour"
,
recDate
,
WarningPeriodEnum
.
HOUR
.
getName
(),
pvLevelListQy
);
// 全域【所有 / 全国】
List
<
HealthIndexDTO
>
healthIndexQgDTOS
=
fanHealthIndexService
.
getInfoListByGroupByQg
(
startTime
,
"fan_health_index_
moment"
,
"pv_health_index_moment
"
,
"片区"
);
List
<
HealthIndexDTO
>
healthIndexQgDTOS
=
fanHealthIndexService
.
getInfoListByGroupByQg
(
startTime
,
"fan_health_index_
hour"
,
"pv_health_index_hour
"
,
"片区"
);
List
<
IdxBizFanHealthLevel
>
levelListQg
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"全域"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndicesQg
=
healthIndexQgDTOS
.
stream
().
map
(
o
->
fanHealthIndexService
.
toFanHealthIndex
(
o
)).
collect
(
Collectors
.
toList
());
saveBatchFan
(
fanHealthIndicesQg
,
"fan_health_index_hour"
,
recDate
,
WarningPeriodEnum
.
HOUR
.
getName
(),
levelListQg
);
...
...
@@ -181,42 +191,48 @@ public class TdengineTimeServiceImpl {
String
recDate
=
DateUtil
.
format
(
recOriginalDate
,
"yyyy-MM-dd"
);
String
startTime
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
new
Date
(),
-
32
),
DateUtils
.
DATE_TIME_PATTERN
);
// List<IdxBizFanHealthLevel> levelList = idxBizFanHealthLevelMapper.selectList(new LambdaQueryWrapper<IdxBizFanHealthLevel>().eq(IdxBizFanHealthLevel::getAnalysisObjType, "测点").last("limit 4"));
// List<FanHealthIndex> fanHealthIndices = fanHealthIndexService.getInfoListByGroupByCdFan(startTime, "fan_health_index_hour", "测点");
// saveBatchFan(fanHealthIndices, "fan_health_index_day", recDate, WarningPeriodEnum.DAY.getName(), levelList);
List
<
IdxBizFanHealthLevel
>
levelList
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"测点"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndices
=
fanHealthIndex
Service
.
getInfoListByGroupByCdFan
(
startTime
,
"fan_health_index_hour"
,
"测点"
);
saveBatchFan
(
fanHealthIndices
,
"
fan
_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
levelList
);
List
<
FanHealthIndex
>
fanHealthIndices
=
fanHealthIndex
Mapper
.
getInfoListByGroupByCdFan
(
startTime
,
"fan_health_index_hour"
,
"测点"
);
saveBatchFan
(
fanHealthIndices
,
"
pv
_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
levelList
);
// 子系统
List
<
IdxBizFanHealthLevel
>
levelListZxt
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"子系统"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndicesZxt
=
fanHealthIndexService
.
getInfoListByGroupByZxtFan
(
startTime
,
"fan_health_index_
hour
"
,
"测点"
);
List
<
FanHealthIndex
>
fanHealthIndicesZxt
=
fanHealthIndexService
.
getInfoListByGroupByZxtFan
(
startTime
,
"fan_health_index_
day
"
,
"测点"
);
saveBatchFan
(
fanHealthIndicesZxt
,
"fan_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
levelListZxt
);
// 设备
List
<
IdxBizFanHealthLevel
>
levelListSb
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"设备"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndicesSb
=
fanHealthIndexService
.
getInfoListByGroupBySbFan
(
startTime
,
"fan_health_index_
hour
"
,
"子系统"
);
List
<
FanHealthIndex
>
fanHealthIndicesSb
=
fanHealthIndexService
.
getInfoListByGroupBySbFan
(
startTime
,
"fan_health_index_
day
"
,
"子系统"
);
saveBatchFan
(
fanHealthIndicesSb
,
"fan_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
levelListSb
);
// 场站
List
<
IdxBizFanHealthLevel
>
levelListCz
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"场站"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndicesCz
=
fanHealthIndexService
.
getInfoListByGroupByCzFan
(
startTime
,
"fan_health_index_
hour
"
,
"设备"
);
List
<
FanHealthIndex
>
fanHealthIndicesCz
=
fanHealthIndexService
.
getInfoListByGroupByCzFan
(
startTime
,
"fan_health_index_
day
"
,
"设备"
);
saveBatchFan
(
fanHealthIndicesCz
,
"fan_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
levelListCz
);
idxFanHealthIndexMapper
.
deleteAllDataByTableName
(
"pv_health_index_latest_data"
,
WarningPeriodEnum
.
DAY
.
getName
());
List
<
IdxBizPvHealthLevel
>
pvLevelList
=
idxBizPvHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>().
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"测点"
).
last
(
"limit 4"
));
List
<
PvHealthIndex
>
pvHealthIndices
=
pvHealthIndexService
.
getInfoListByGroupByCdPv
(
startTime
,
"pv_health_index_hour"
,
"测点"
);
saveBatchPv
(
pvHealthIndices
,
"pv_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
pvLevelList
);
// List<IdxBizPvHealthLevel> pvLevelList = idxBizPvHealthLevelMapper.selectList(new LambdaQueryWrapper<IdxBizPvHealthLevel>().eq(IdxBizPvHealthLevel::getAnalysisObjType, "测点").last("limit 4"));
// List<PvHealthIndex> pvHealthIndices = pvHealthIndexService.getInfoListByGroupByCdPv(startTime, "pv_health_index_day", "测点");
// saveBatchPv(pvHealthIndices, "pv_health_index_day", recDate, WarningPeriodEnum.DAY.getName(), pvLevelList);
List
<
IdxBizPvHealthLevel
>
pvlevelList
=
idxBizPvHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>().
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"测点"
).
last
(
"limit 4"
));
List
<
PvHealthIndex
>
pvHealthIndices
=
pvHealthIndexMapper
.
getInfoListByGroupByCdPv
(
startTime
,
"pv_health_index_hour"
,
"测点"
);
saveBatchPv
(
pvHealthIndices
,
"pv_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
pvlevelList
);
// 设备
List
<
IdxBizPvHealthLevel
>
pvLevelListSb
=
idxBizPvHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>().
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"设备"
).
last
(
"limit 4"
));
List
<
PvHealthIndex
>
pvHealthIndicesSb
=
pvHealthIndexService
.
getInfoListByGroupBySbPv
(
startTime
,
"pv_health_index_
hour
"
,
"测点"
);
List
<
PvHealthIndex
>
pvHealthIndicesSb
=
pvHealthIndexService
.
getInfoListByGroupBySbPv
(
startTime
,
"pv_health_index_
day
"
,
"测点"
);
saveBatchPv
(
pvHealthIndicesSb
,
"pv_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
pvLevelListSb
);
// 子阵
List
<
IdxBizPvHealthLevel
>
pvLevelListZz
=
idxBizPvHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>().
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"子阵"
).
last
(
"limit 4"
));
List
<
PvHealthIndex
>
pvHealthIndicesZz
=
pvHealthIndexService
.
getInfoListByGroupByZzPv
(
startTime
,
"pv_health_index_
hour
"
,
"设备"
);
List
<
PvHealthIndex
>
pvHealthIndicesZz
=
pvHealthIndexService
.
getInfoListByGroupByZzPv
(
startTime
,
"pv_health_index_
day
"
,
"设备"
);
saveBatchPv
(
pvHealthIndicesZz
,
"pv_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
pvLevelListZz
);
// 场站
List
<
IdxBizPvHealthLevel
>
pvLevelListCz
=
idxBizPvHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>().
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"场站"
).
last
(
"limit 4"
));
List
<
PvHealthIndex
>
pvHealthIndicesCz
=
pvHealthIndexService
.
getInfoListByGroupByCzPv
(
startTime
,
"pv_health_index_
hour
"
,
"子阵"
);
List
<
PvHealthIndex
>
pvHealthIndicesCz
=
pvHealthIndexService
.
getInfoListByGroupByCzPv
(
startTime
,
"pv_health_index_
day
"
,
"子阵"
);
saveBatchPv
(
pvHealthIndicesCz
,
"pv_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
pvLevelListCz
);
// 区域
List
<
HealthIndexDTO
>
healthIndexQyDTOS
=
fanHealthIndexService
.
getInfoListByGroupByQy
(
startTime
,
"fan_health_index_
hour"
,
"pv_health_index_hour
"
,
"场站"
);
List
<
HealthIndexDTO
>
healthIndexQyDTOS
=
fanHealthIndexService
.
getInfoListByGroupByQy
(
startTime
,
"fan_health_index_
day"
,
"pv_health_index_day
"
,
"场站"
);
List
<
IdxBizFanHealthLevel
>
levelListQy
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"片区"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndicesQy
=
healthIndexQyDTOS
.
stream
().
map
(
o
->
fanHealthIndexService
.
toFanHealthIndex
(
o
)).
collect
(
Collectors
.
toList
());
saveBatchFan
(
fanHealthIndicesQy
,
"fan_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
levelListQy
);
...
...
@@ -226,7 +242,7 @@ public class TdengineTimeServiceImpl {
saveBatchPv
(
pvHealthIndicesQy
,
"pv_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
pvLevelListQy
);
// 全域【所有 / 全国】
List
<
HealthIndexDTO
>
healthIndexQgDTOS
=
fanHealthIndexService
.
getInfoListByGroupByQg
(
startTime
,
"fan_health_index_
hour"
,
"pv_health_index_hour
"
,
"片区"
);
List
<
HealthIndexDTO
>
healthIndexQgDTOS
=
fanHealthIndexService
.
getInfoListByGroupByQg
(
startTime
,
"fan_health_index_
day"
,
"pv_health_index_day
"
,
"片区"
);
List
<
IdxBizFanHealthLevel
>
levelListQg
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"全域"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndicesQg
=
healthIndexQgDTOS
.
stream
().
map
(
o
->
fanHealthIndexService
.
toFanHealthIndex
(
o
)).
collect
(
Collectors
.
toList
());
saveBatchFan
(
fanHealthIndicesQg
,
"fan_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
levelListQg
);
...
...
@@ -519,4 +535,22 @@ public class TdengineTimeServiceImpl {
List
<
PvHealthIndex
>
pvHealthIndicesQg
=
healthIndexQgDTOS
.
stream
().
map
(
o
->
fanHealthIndexService
.
toPvHealthIndex
(
o
)).
collect
(
Collectors
.
toList
());
log
.
info
(
"片区 => {}"
,
healthIndexQgDTOS
);
}
//@PostConstruct
public
void
test
()
throws
ParseException
{
Date
recOriginalDate
=
new
Date
();
recOriginalDate
=
DateUtil
.
offsetDay
(
recOriginalDate
,
-
1
);
String
recDate
=
DateUtil
.
format
(
recOriginalDate
,
"yyyy-MM-dd"
);
String
startTime
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
new
Date
(),
-
32
),
DateUtils
.
DATE_TIME_PATTERN
);
// 全域【所有 / 全国】
List
<
HealthIndexDTO
>
healthIndexQgDTOS
=
fanHealthIndexService
.
getInfoListByGroupByQg
(
startTime
,
"fan_health_index_day"
,
"fan_health_index_day"
,
"片区"
);
List
<
IdxBizFanHealthLevel
>
levelListQg
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"全域"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndicesQg
=
healthIndexQgDTOS
.
stream
().
map
(
o
->
fanHealthIndexService
.
toFanHealthIndex
(
o
)).
collect
(
Collectors
.
toList
());
saveBatchFan
(
fanHealthIndicesQg
,
"fan_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
levelListQg
);
// 全域【所有 / 全国】
List
<
IdxBizPvHealthLevel
>
pvLevelListQg
=
idxBizPvHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>().
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"全域"
).
last
(
"limit 4"
));
List
<
PvHealthIndex
>
pvHealthIndicesQg
=
healthIndexQgDTOS
.
stream
().
map
(
o
->
fanHealthIndexService
.
toPvHealthIndex
(
o
)).
collect
(
Collectors
.
toList
());
saveBatchPv
(
pvHealthIndicesQg
,
"pv_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
pvLevelListQg
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdMapper2/FanHealthIndexDayMapper.java
View file @
a44039e0
...
...
@@ -80,7 +80,7 @@ public interface FanHealthIndexDayMapper extends BaseMapper<FanHealthIndexDay> {
"<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> "
+
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>"
+
"<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>"
+
"order by
health_index
"
+
"order by
rec_date
"
+
"<if test='current != null and size != null'>limit ${current},${size} </if>"
+
"</script>"
)
List
<
FanHealthIndexDay
>
selectTrendData
(
@Param
(
"healthLevel"
)
String
healthLevel
,
@Param
(
"area"
)
String
area
,
@Param
(
"equipmentName"
)
String
equipmentName
,
@Param
(
"subSystem"
)
String
subSystem
,
@Param
(
"analysisType"
)
String
analysisType
,
@Param
(
"analysisObjType"
)
String
analysisObjType
,
@Param
(
"station"
)
String
station
,
@Param
(
"pointName"
)
String
pointName
,
@Param
(
"indexAddress"
)
String
indexAddress
,
@Param
(
"startTimeTop"
)
String
startTimeTop
,
@Param
(
"endTimeTop"
)
String
endTimeTop
,
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdMapper2/FanHealthIndexHourMapper.java
View file @
a44039e0
...
...
@@ -40,7 +40,7 @@ public interface FanHealthIndexHourMapper extends BaseMapper<FanHealthIndexHour>
"<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> "
+
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>"
+
"<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>"
+
"order by
health_index
"
+
"order by
rec_date
"
+
"<if test='current != null and size != null'>limit ${current},${size} </if>"
+
"</script>"
)
List
<
FanHealthIndexHour
>
selectTrendData
(
@Param
(
"healthLevel"
)
String
healthLevel
,
@Param
(
"area"
)
String
area
,
@Param
(
"equipmentName"
)
String
equipmentName
,
@Param
(
"subSystem"
)
String
subSystem
,
@Param
(
"analysisType"
)
String
analysisType
,
@Param
(
"analysisObjType"
)
String
analysisObjType
,
@Param
(
"station"
)
String
station
,
@Param
(
"pointName"
)
String
pointName
,
@Param
(
"indexAddress"
)
String
indexAddress
,
@Param
(
"startTimeTop"
)
String
startTimeTop
,
@Param
(
"endTimeTop"
)
String
endTimeTop
,
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdMapper2/FanHealthIndexMomentMapper.java
View file @
a44039e0
...
...
@@ -39,7 +39,7 @@ public interface FanHealthIndexMomentMapper extends BaseMapper<FanHealthIndexMom
"<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> "
+
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>"
+
"<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>"
+
"order by
health_index
"
+
"order by
rec_date
"
+
"<if test='current != null and size != null'>limit ${current},${size} </if>"
+
"</script>"
)
List
<
FanHealthIndexMoment
>
selectTrendData
(
@Param
(
"healthLevel"
)
String
healthLevel
,
@Param
(
"area"
)
String
area
,
@Param
(
"equipmentName"
)
String
equipmentName
,
@Param
(
"subSystem"
)
String
subSystem
,
@Param
(
"analysisType"
)
String
analysisType
,
@Param
(
"analysisObjType"
)
String
analysisObjType
,
@Param
(
"station"
)
String
station
,
@Param
(
"pointName"
)
String
pointName
,
@Param
(
"indexAddress"
)
String
indexAddress
,
@Param
(
"startTimeTop"
)
String
startTimeTop
,
@Param
(
"endTimeTop"
)
String
endTimeTop
,
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdMapper2/PvHealthIndexDayMapper.java
View file @
a44039e0
...
...
@@ -93,7 +93,7 @@ public interface PvHealthIndexDayMapper extends BaseMapper<PvHealthIndexDay> {
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>"
+
"<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>"
+
// "<if test='gatewayIds != null and gatewayIds.size() > 0'>AND GATEWAY_ID IN <foreach collection='gatewayIds' item='gatewayId' open='(' separator=',' close=')'>#{gatewayId}</foreach></if>" +
"order by
health_index
"
+
"order by
rec_date
"
+
"<if test='current != null and size != null'>limit ${current},${size} </if>"
+
"</script>"
)
List
<
PvHealthIndexDay
>
selectTrendData
(
@Param
(
"station"
)
String
station
,
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdMapper2/PvHealthIndexHourMapper.java
View file @
a44039e0
...
...
@@ -61,7 +61,7 @@ public interface PvHealthIndexHourMapper extends BaseMapper<PvHealthIndexHour> {
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>"
+
"<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>"
+
// "<if test='gatewayIds != null and gatewayIds.size() > 0'>AND GATEWAY_ID IN <foreach collection='gatewayIds' item='gatewayId' open='(' separator=',' close=')'>#{gatewayId}</foreach></if>" +
"order by
health_index
"
+
"order by
rec_date
"
+
"<if test='current != null and size != null'>limit ${current},${size} </if>"
+
"</script>"
)
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdMapper2/PvHealthIndexMomentMapper.java
View file @
a44039e0
...
...
@@ -60,7 +60,7 @@ public interface PvHealthIndexMomentMapper extends BaseMapper<PvHealthIndexMomen
"<if test='subarray!= null'>AND subarray = #{subarray} </if> "
+
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>"
+
"<if test='orgCode!= null'>AND org_code like '${orgCode}' </if>"
+
"order by
health_index
"
+
"order by
rec_date
"
+
"<if test='current != null and size != null'>limit ${current},${size} </if>"
+
"</script>"
)
List
<
PvHealthIndexMoment
>
selectTrendData
(
@Param
(
"healthLevel"
)
String
healthLevel
,
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/EarningsForecastImpl.java
View file @
a44039e0
...
...
@@ -66,6 +66,9 @@ public class EarningsForecastImpl {
});
TreeMap
<
String
,
Double
>
map
=
commonService
.
getListDataByCondtionsSum
(
queryCondtion1
,
objects
,
ESMoonPowerGeneration
.
class
,
null
);
if
(
null
==
map
||
map
.
isEmpty
()
){
return
null
;
}
TreeMap
<
String
,
String
>
carbonDioxide
=
new
TreeMap
<>();
TreeMap
<
String
,
String
>
standardCoal
=
new
TreeMap
<>();
TreeMap
<
String
,
String
>
toner
=
new
TreeMap
<>();
...
...
@@ -162,6 +165,9 @@ public class EarningsForecastImpl {
});
TreeMap
<
String
,
Double
>
map
=
commonService
.
getListDataByCondtionsSum
(
queryCondtion1
,
objects
,
ESMoonPowerGeneration
.
class
,
null
);
if
(
null
==
map
||
map
.
isEmpty
()
){
return
null
;
}
TreeMap
<
String
,
String
>
carbonDioxide
=
new
TreeMap
<>();
TreeMap
<
String
,
String
>
standardCoal
=
new
TreeMap
<>();
TreeMap
<
String
,
String
>
toner
=
new
TreeMap
<>();
...
...
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