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
bd0b5024
Commit
bd0b5024
authored
Aug 07, 2024
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改计算天
parent
1d580963
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
TdengineTimeServiceImpl.java
...odule/jxiop/biz/service/impl/TdengineTimeServiceImpl.java
+7
-4
No files found.
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 @
bd0b5024
...
@@ -196,7 +196,7 @@ public class TdengineTimeServiceImpl {
...
@@ -196,7 +196,7 @@ public class TdengineTimeServiceImpl {
// saveBatchFan(fanHealthIndices, "fan_health_index_day", recDate, WarningPeriodEnum.DAY.getName(), levelList);
// 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
<
IdxBizFanHealthLevel
>
levelList
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"测点"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndices
=
fanHealthIndexMapper
.
getInfoListByGroupByCdFan
(
startTime
,
"fan_health_index_hour"
,
"测点"
);
List
<
FanHealthIndex
>
fanHealthIndices
=
fanHealthIndexMapper
.
getInfoListByGroupByCdFan
(
startTime
,
"fan_health_index_hour"
,
"测点"
);
saveBatchFan
(
fanHealthIndices
,
"
pv
_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
levelList
);
saveBatchFan
(
fanHealthIndices
,
"
fan
_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
levelList
);
// 子系统
// 子系统
List
<
IdxBizFanHealthLevel
>
levelListZxt
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"子系统"
).
last
(
"limit 4"
));
List
<
IdxBizFanHealthLevel
>
levelListZxt
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"子系统"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndicesZxt
=
fanHealthIndexService
.
getInfoListByGroupByZxtFan
(
startTime
,
"fan_health_index_day"
,
"测点"
);
List
<
FanHealthIndex
>
fanHealthIndicesZxt
=
fanHealthIndexService
.
getInfoListByGroupByZxtFan
(
startTime
,
"fan_health_index_day"
,
"测点"
);
...
@@ -543,14 +543,17 @@ public class TdengineTimeServiceImpl {
...
@@ -543,14 +543,17 @@ public class TdengineTimeServiceImpl {
recOriginalDate
=
DateUtil
.
offsetDay
(
recOriginalDate
,
-
1
);
recOriginalDate
=
DateUtil
.
offsetDay
(
recOriginalDate
,
-
1
);
String
recDate
=
DateUtil
.
format
(
recOriginalDate
,
"yyyy-MM-dd"
);
String
recDate
=
DateUtil
.
format
(
recOriginalDate
,
"yyyy-MM-dd"
);
String
startTime
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
new
Date
(),
-
32
),
DateUtils
.
DATE_TIME_PATTERN
);
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
<
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
<
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
());
List
<
FanHealthIndex
>
fanHealthIndicesQg
=
healthIndexQgDTOS
.
stream
().
map
(
o
->
fanHealthIndexService
.
toFanHealthIndex
(
o
)).
collect
(
Collectors
.
toList
());
saveBatchFan
(
fanHealthIndicesQg
,
"fan_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
levelListQg
);
//
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
<
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
());
List
<
PvHealthIndex
>
pvHealthIndicesQg
=
healthIndexQgDTOS
.
stream
().
map
(
o
->
fanHealthIndexService
.
toPvHealthIndex
(
o
)).
collect
(
Collectors
.
toList
());
saveBatchPv
(
pvHealthIndicesQg
,
"pv_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
pvLevelListQg
);
//
saveBatchPv(pvHealthIndicesQg, "pv_health_index_day", recDate, WarningPeriodEnum.DAY.getName(), pvLevelListQg);
}
}
}
}
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