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
3e24f202
Commit
3e24f202
authored
Jul 25, 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
4de47ddc
5ef4db57
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
149 additions
and
32 deletions
+149
-32
DateUtils.java
...ava/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
+25
-0
DayGenerateMapper.xml
.../src/main/resources/mapper/tdengine/DayGenerateMapper.xml
+5
-5
MonthGenerateMapper.xml
...rc/main/resources/mapper/tdengine/MonthGenerateMapper.xml
+1
-1
YearGenerateMapper.xml
...src/main/resources/mapper/tdengine/YearGenerateMapper.xml
+1
-1
TestController.java
...amos/boot/module/jxiop/biz/controller/TestController.java
+2
-2
FanHealthIndexServiceImpl.java
...ule/jxiop/biz/service/impl/FanHealthIndexServiceImpl.java
+0
-0
PvHealthIndexServiceImpl.java
...dule/jxiop/biz/service/impl/PvHealthIndexServiceImpl.java
+0
-0
TdengineTimeServiceImpl.java
...odule/jxiop/biz/service/impl/TdengineTimeServiceImpl.java
+15
-13
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+0
-0
EarningsForecastImpl.java
...t/module/jxiop/biz/service/impl/EarningsForecastImpl.java
+20
-6
SjglZsjZsbtzMapper.java
...mos/boot/module/jxiop/biz/mapper2/SjglZsjZsbtzMapper.java
+3
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+42
-4
SjglZsjZsbtzMapper.xml
.../src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
+35
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
View file @
3e24f202
...
@@ -671,6 +671,9 @@ public class DateUtils {
...
@@ -671,6 +671,9 @@ public class DateUtils {
// System.out.println(getWeekBeginDate(dateParse("2021-10-11", null)));
// System.out.println(getWeekBeginDate(dateParse("2021-10-11", null)));
// System.out.println(getWeekEndDate(dateParse("2021-10-11", null)));
// System.out.println(getWeekEndDate(dateParse("2021-10-11", null)));
System
.
out
.
println
(
secondsToTimeStr
(
3600
));
System
.
out
.
println
(
secondsToTimeStr
(
3600
));
List
<
String
>
beforeCurrentMonth
=
getBeforeCurrentMonth
(
3
,
true
);
System
.
out
.
println
(
beforeCurrentMonth
);
}
}
/**
/**
...
@@ -1073,4 +1076,26 @@ public class DateUtils {
...
@@ -1073,4 +1076,26 @@ public class DateUtils {
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
sdf
.
format
(
endTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
sdf
.
format
(
endTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
return
Duration
.
between
(
start
,
end
).
toDays
();
return
Duration
.
between
(
start
,
end
).
toDays
();
}
}
public
static
List
<
String
>
getBeforeCurrentMonth
(
int
num
,
Boolean
bool
){
int
n
=
0
;
if
(!
bool
){
n
=
n
+
1
;
}
List
<
String
>
objects
=
new
ArrayList
<>();
for
(
int
i
=
n
;
shouldContinue
(
i
,
num
,
bool
);
i
++)
{
Date
date1
=
dateAddMonths
(
new
Date
(),
num
>
0
?
i:
-
i
);
String
s
=
convertDateToString
(
date1
,
MONTH_PATTERN
);
objects
.
add
(
s
);
}
return
objects
;
}
private
static
boolean
shouldContinue
(
int
i
,
int
num
,
Boolean
bool
)
{
return
bool
?
i
<
Math
.
abs
(
num
)
:
i
<=
Math
.
abs
(
num
)
;
}
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/DayGenerateMapper.xml
View file @
3e24f202
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<select
id=
"getDayGenerateph"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.DayGenerate"
>
<select
id=
"getDayGenerateph"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.DayGenerate"
>
SELECT
SELECT
*
*
FROM house_pv_data.td_hygf_station_
day_generate
FROM house_pv_data.td_hygf_station_
generate_month
<where>
<where>
<if
test=
"dto!=null"
>
<if
test=
"dto!=null"
>
third_station_id in
third_station_id in
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
SELECT
SELECT
sum(generate)num,
sum(generate)num,
`day_time` date
`day_time` date
FROM house_pv_data.td_hygf_station_
day_generate
FROM house_pv_data.td_hygf_station_
generate_month
<where>
<where>
<if
test=
"dto!=null"
>
<if
test=
"dto!=null"
>
third_station_id in
third_station_id in
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
SELECT
SELECT
sum(generate)num,
sum(generate)num,
`month_time` date
`month_time` date
FROM house_pv_data.td_hygf_station_
month_generate
FROM house_pv_data.td_hygf_station_
generate_year
<where>
<where>
<if
test=
"dto!=null"
>
<if
test=
"dto!=null"
>
...
@@ -106,7 +106,7 @@
...
@@ -106,7 +106,7 @@
SELECT
SELECT
sum(generate)num,
sum(generate)num,
`year_time` date
`year_time` date
FROM house_pv_data.td_hygf_station_
year_generate
FROM house_pv_data.td_hygf_station_
generate_all
<where>
<where>
<if
test=
"dto!=null"
>
<if
test=
"dto!=null"
>
third_station_id in
third_station_id in
...
@@ -137,7 +137,7 @@
...
@@ -137,7 +137,7 @@
<select
id=
"selectPagenewDayGenerate"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.DayGenerate"
>
<select
id=
"selectPagenewDayGenerate"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.DayGenerate"
>
SELECT
SELECT
*
*
FROM house_pv_data.td_hygf_station_
day_generate
FROM house_pv_data.td_hygf_station_
generate_month
<where>
<where>
<if
test=
"dto!=null"
>
<if
test=
"dto!=null"
>
third_station_id in
third_station_id in
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/MonthGenerateMapper.xml
View file @
3e24f202
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<select
id=
"selectPagenewMonthGenerate"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.MonthGenerate"
>
<select
id=
"selectPagenewMonthGenerate"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.MonthGenerate"
>
SELECT
SELECT
*
*
FROM house_pv_data.td_hygf_station_
month_generate
FROM house_pv_data.td_hygf_station_
generate_year
<where>
<where>
<if
test=
"dto!=null"
>
<if
test=
"dto!=null"
>
third_station_id in
third_station_id in
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/YearGenerateMapper.xml
View file @
3e24f202
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<select
id=
"selectPagenewYearGenerate"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.YearGenerate"
>
<select
id=
"selectPagenewYearGenerate"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.YearGenerate"
>
SELECT
SELECT
*
*
FROM house_pv_data.td_hygf_station_
year_generate
FROM house_pv_data.td_hygf_station_
generate_all
<where>
<where>
<if
test=
"dto!=null"
>
<if
test=
"dto!=null"
>
third_station_id in
third_station_id in
...
...
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 @
3e24f202
...
@@ -196,7 +196,7 @@ public class TestController extends BaseController {
...
@@ -196,7 +196,7 @@ public class TestController extends BaseController {
time
=
DateUtil
.
offsetMinute
(
time
,
-
DateUtil
.
minute
(
time
)
%
10
);
time
=
DateUtil
.
offsetMinute
(
time
,
-
DateUtil
.
minute
(
time
)
%
10
);
String
format
=
DateUtil
.
format
(
time
,
"yyyy-MM-dd HH:mm:00"
);
String
format
=
DateUtil
.
format
(
time
,
"yyyy-MM-dd HH:mm:00"
);
time
=
DateUtil
.
parse
(
format
,
"yyyy-MM-dd HH:mm:00"
);
time
=
DateUtil
.
parse
(
format
,
"yyyy-MM-dd HH:mm:00"
);
tdengineTimeService
.
insertMomentDataTest
(
"2024-07-2
5
08:00:00"
);
tdengineTimeService
.
insertMomentDataTest
(
"2024-07-2
4
08:00:00"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
@@ -211,7 +211,7 @@ public class TestController extends BaseController {
...
@@ -211,7 +211,7 @@ public class TestController extends BaseController {
time
=
DateUtil
.
offsetMinute
(
time
,
-
DateUtil
.
minute
(
time
)
%
10
);
time
=
DateUtil
.
offsetMinute
(
time
,
-
DateUtil
.
minute
(
time
)
%
10
);
String
format
=
DateUtil
.
format
(
time
,
"yyyy-MM-dd HH:mm:00"
);
String
format
=
DateUtil
.
format
(
time
,
"yyyy-MM-dd HH:mm:00"
);
time
=
DateUtil
.
parse
(
format
,
"yyyy-MM-dd HH:mm:00"
);
time
=
DateUtil
.
parse
(
format
,
"yyyy-MM-dd HH:mm:00"
);
//
tdengineTimeService.insertMomentDataPvTest("2024-07-24 08:00:00");
tdengineTimeService
.
insertMomentDataPvTest
(
"2024-07-24 08:00:00"
);
//区域 全域最后统一生成
//区域 全域最后统一生成
tdengineTimeService
.
insertMomentDataAllTest
(
"2024-07-24 08:00:00"
);
tdengineTimeService
.
insertMomentDataAllTest
(
"2024-07-24 08:00:00"
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/FanHealthIndexServiceImpl.java
View file @
3e24f202
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/PvHealthIndexServiceImpl.java
View file @
3e24f202
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 @
3e24f202
...
@@ -108,7 +108,7 @@ public class TdengineTimeServiceImpl {
...
@@ -108,7 +108,7 @@ public class TdengineTimeServiceImpl {
String
startTime
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddMinutes
(
new
Date
(),
-
541
),
DateUtils
.
DATE_TIME_PATTERN
);
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
<
IdxBizFanHealthLevel
>
levelList
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"测点"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndices
=
fanHealthIndex
Mapper
.
getInfoListByGroupByCdFan
(
startTime
,
"fan_health_index_moment"
,
"测点"
);
List
<
FanHealthIndex
>
fanHealthIndices
=
fanHealthIndex
Service
.
getInfoListByGroupByCdFan
(
startTime
,
"fan_health_index_moment"
,
"测点"
);
saveBatchFan
(
fanHealthIndices
,
"fan_health_index_hour"
,
recDate
,
WarningPeriodEnum
.
HOUR
.
getName
(),
levelList
);
saveBatchFan
(
fanHealthIndices
,
"fan_health_index_hour"
,
recDate
,
WarningPeriodEnum
.
HOUR
.
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"
));
...
@@ -126,7 +126,7 @@ public class TdengineTimeServiceImpl {
...
@@ -126,7 +126,7 @@ public class TdengineTimeServiceImpl {
idxFanHealthIndexMapper
.
deleteAllDataByTableName
(
"pv_health_index_latest_data"
,
WarningPeriodEnum
.
HOUR
.
getName
());
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
<
IdxBizPvHealthLevel
>
pvLevelList
=
idxBizPvHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>().
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"测点"
).
last
(
"limit 4"
));
List
<
PvHealthIndex
>
pvHealthIndices
=
pvHealthIndex
Mapper
.
getInfoListByGroupByCdPv
(
startTime
,
"pv_health_index_moment"
,
"测点"
);
List
<
PvHealthIndex
>
pvHealthIndices
=
pvHealthIndex
Service
.
getInfoListByGroupByCdPv
(
startTime
,
"pv_health_index_moment"
,
"测点"
);
saveBatchPv
(
pvHealthIndices
,
"pv_health_index_hour"
,
recDate
,
WarningPeriodEnum
.
HOUR
.
getName
(),
pvLevelList
);
saveBatchPv
(
pvHealthIndices
,
"pv_health_index_hour"
,
recDate
,
WarningPeriodEnum
.
HOUR
.
getName
(),
pvLevelList
);
// 设备
// 设备
List
<
IdxBizPvHealthLevel
>
pvLevelListSb
=
idxBizPvHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>().
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"设备"
).
last
(
"limit 4"
));
List
<
IdxBizPvHealthLevel
>
pvLevelListSb
=
idxBizPvHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>().
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"设备"
).
last
(
"limit 4"
));
...
@@ -200,7 +200,7 @@ public class TdengineTimeServiceImpl {
...
@@ -200,7 +200,7 @@ public class TdengineTimeServiceImpl {
idxFanHealthIndexMapper
.
deleteAllDataByTableName
(
"pv_health_index_latest_data"
,
WarningPeriodEnum
.
DAY
.
getName
());
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
<
IdxBizPvHealthLevel
>
pvLevelList
=
idxBizPvHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>().
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"测点"
).
last
(
"limit 4"
));
List
<
PvHealthIndex
>
pvHealthIndices
=
pvHealthIndex
Mapper
.
getInfoListByGroupByCdPv
(
startTime
,
"pv_health_index_hour"
,
"测点"
);
List
<
PvHealthIndex
>
pvHealthIndices
=
pvHealthIndex
Service
.
getInfoListByGroupByCdPv
(
startTime
,
"pv_health_index_hour"
,
"测点"
);
saveBatchPv
(
pvHealthIndices
,
"pv_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
pvLevelList
);
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
<
IdxBizPvHealthLevel
>
pvLevelListSb
=
idxBizPvHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>().
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"设备"
).
last
(
"limit 4"
));
...
@@ -429,8 +429,11 @@ public class TdengineTimeServiceImpl {
...
@@ -429,8 +429,11 @@ public class TdengineTimeServiceImpl {
}
}
public
void
insertMomentDataTest
(
String
startTime
)
throws
ParseException
{
public
void
insertMomentDataTest
(
String
startTime
)
{
//s 489分钟 为 8小时 + 19分钟
//s 489分钟 为 8小时 + 19分钟
List
<
FanHealthIndex
>
fanHealthIndicesCd
=
fanHealthIndexMapper
.
getInfoListByGroupByCdFan
(
startTime
,
"fan_health_index_moment"
,
"测点"
);
List
<
FanHealthIndex
>
fanHealthIndicesCdNew
=
fanHealthIndexService
.
getInfoListByGroupByCdFan
(
startTime
,
"fan_health_index_moment"
,
"测点"
);
print
(
"测点"
,
fanHealthIndicesCd
,
fanHealthIndicesCdNew
);
// 子系统
// 子系统
List
<
FanHealthIndex
>
fanHealthIndicesZxt
=
fanHealthIndexMapper
.
getInfoListByGroupByZxtFan
(
startTime
,
"fan_health_index_moment"
,
"测点"
);
List
<
FanHealthIndex
>
fanHealthIndicesZxt
=
fanHealthIndexMapper
.
getInfoListByGroupByZxtFan
(
startTime
,
"fan_health_index_moment"
,
"测点"
);
List
<
FanHealthIndex
>
fanHealthIndicesNew
=
fanHealthIndexService
.
getInfoListByGroupByZxtFan
(
startTime
,
"fan_health_index_moment"
,
"测点"
);
List
<
FanHealthIndex
>
fanHealthIndicesNew
=
fanHealthIndexService
.
getInfoListByGroupByZxtFan
(
startTime
,
"fan_health_index_moment"
,
"测点"
);
...
@@ -445,7 +448,10 @@ public class TdengineTimeServiceImpl {
...
@@ -445,7 +448,10 @@ public class TdengineTimeServiceImpl {
print
(
"场站"
,
fanHealthIndicesCz
,
fanHealthIndicesCzNew
);
print
(
"场站"
,
fanHealthIndicesCz
,
fanHealthIndicesCzNew
);
}
}
public
void
insertMomentDataPvTest
(
String
startTime
)
throws
ParseException
{
public
void
insertMomentDataPvTest
(
String
startTime
)
{
List
<
PvHealthIndex
>
pvHealthIndicesCd
=
pvHealthIndexMapper
.
getInfoListByGroupByCdPv
(
startTime
,
"pv_health_index_moment"
,
"测点"
);
List
<
PvHealthIndex
>
pvHealthIndicesCdNew
=
pvHealthIndexService
.
getInfoListByGroupByCdPv
(
startTime
,
"pv_health_index_moment"
,
"测点"
);
printPv
(
"测点"
,
pvHealthIndicesCd
,
pvHealthIndicesCdNew
);
// 设备
// 设备
List
<
PvHealthIndex
>
fanHealthIndicesSb
=
pvHealthIndexMapper
.
getInfoListByGroupBySbPv
(
startTime
,
"pv_health_index_moment"
,
"测点"
);
List
<
PvHealthIndex
>
fanHealthIndicesSb
=
pvHealthIndexMapper
.
getInfoListByGroupBySbPv
(
startTime
,
"pv_health_index_moment"
,
"测点"
);
List
<
PvHealthIndex
>
fanHealthIndicesSbNew
=
pvHealthIndexService
.
getInfoListByGroupBySbPv
(
startTime
,
"pv_health_index_moment"
,
"测点"
);
List
<
PvHealthIndex
>
fanHealthIndicesSbNew
=
pvHealthIndexService
.
getInfoListByGroupBySbPv
(
startTime
,
"pv_health_index_moment"
,
"测点"
);
...
@@ -468,14 +474,10 @@ public class TdengineTimeServiceImpl {
...
@@ -468,14 +474,10 @@ public class TdengineTimeServiceImpl {
}
}
public
void
printPv
(
String
desc
,
List
<
PvHealthIndex
>
olds
,
List
<
PvHealthIndex
>
news
)
{
public
void
printPv
(
String
desc
,
List
<
PvHealthIndex
>
olds
,
List
<
PvHealthIndex
>
news
)
{
try
{
olds
.
sort
(
Comparator
.
comparing
(
PvHealthIndex:
:
getArea
).
thenComparing
(
PvHealthIndex:
:
getStation
).
thenComparing
(
PvHealthIndex:
:
getSubarray
).
thenComparing
(
PvHealthIndex:
:
getEquipmentName
).
thenComparing
(
PvHealthIndex:
:
getPointName
));
olds
.
sort
(
Comparator
.
comparing
(
PvHealthIndex:
:
getArea
).
thenComparing
(
PvHealthIndex:
:
getStation
).
thenComparing
(
PvHealthIndex:
:
getEquipmentName
).
thenComparing
(
PvHealthIndex:
:
getSubarray
).
thenComparing
(
PvHealthIndex:
:
getPointName
));
news
.
sort
(
Comparator
.
comparing
(
PvHealthIndex:
:
getArea
).
thenComparing
(
PvHealthIndex:
:
getStation
).
thenComparing
(
PvHealthIndex:
:
getSubarray
).
thenComparing
(
PvHealthIndex:
:
getEquipmentName
).
thenComparing
(
PvHealthIndex:
:
getPointName
));
news
.
sort
(
Comparator
.
comparing
(
PvHealthIndex:
:
getArea
).
thenComparing
(
PvHealthIndex:
:
getStation
).
thenComparing
(
PvHealthIndex:
:
getEquipmentName
).
thenComparing
(
PvHealthIndex:
:
getSubarray
).
thenComparing
(
PvHealthIndex:
:
getPointName
));
log
.
info
(
"对比{} old => {}"
,
desc
,
olds
);
log
.
info
(
"对比{} old => {}"
,
desc
,
olds
);
log
.
info
(
"对比{} news => {}"
,
desc
,
news
);
log
.
info
(
"对比{} news => {}"
,
desc
,
news
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
public
void
insertMomentDataAll
(
String
recDate
)
throws
ParseException
{
public
void
insertMomentDataAll
(
String
recDate
)
throws
ParseException
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
3e24f202
This diff is collapsed.
Click to expand it.
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 @
3e24f202
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.map.MapBuilder
;
import
cn.hutool.core.map.MapBuilder
;
import
cn.hutool.http.HttpUtil
;
import
cn.hutool.http.HttpUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESMoonPowerGeneration
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESMoonPowerGeneration
;
...
@@ -33,8 +35,16 @@ public class EarningsForecastImpl {
...
@@ -33,8 +35,16 @@ public class EarningsForecastImpl {
private
StationBasicMapper
stationBasicMapper
;
private
StationBasicMapper
stationBasicMapper
;
//收益 时间曲线图数据组装
//收益 时间曲线图数据组装
public
Object
earningsForecastSJQXT
(
Long
stationId
,
String
type
){
public
Object
earningsForecastSJQXT
(
Long
stationId
,
String
type
){
List
<
Map
<
String
,
String
>>
list
=
commonMapper
.
selectAgo10Month
();
List
<
Map
<
String
,
String
>>
lastThreeMonth
=
commonMapper
.
selectLast3Month
();
List
<
String
>
beforeMonth
=
DateUtils
.
getBeforeCurrentMonth
(-
10
,
false
);
List
<
String
>
afterMonth
=
DateUtils
.
getBeforeCurrentMonth
(
3
,
true
);
List
<
Map
<
String
,
String
>>
list
=
beforeMonth
.
stream
()
.
map
(
month
->
MapBuilder
.<
String
,
String
>
create
().
put
(
"MonthYear"
,
month
).
build
())
.
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
String
>>
lastThreeMonth
=
afterMonth
.
stream
()
.
map
(
month
->
MapBuilder
.<
String
,
String
>
create
().
put
(
"MonthYear"
,
month
).
build
())
.
collect
(
Collectors
.
toList
());
Map
<
String
,
List
<
String
>>
queryCondtion1
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion1
=
new
HashMap
<>();
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
...
@@ -124,10 +134,14 @@ public class EarningsForecastImpl {
...
@@ -124,10 +134,14 @@ public class EarningsForecastImpl {
//收益 折线图数据组装
//收益 折线图数据组装
public
Object
earningsForecastZXT
(
Long
stationId
,
String
type
){
public
Object
earningsForecastZXT
(
Long
stationId
,
String
type
){
List
<
Map
<
String
,
String
>>
list
=
commonMapper
.
selectAgo10Month
();
List
<
String
>
beforeMonth
=
DateUtils
.
getBeforeCurrentMonth
(-
10
,
false
);
List
<
Map
<
String
,
String
>>
lastThreeMonth
=
commonMapper
.
selectLast3Month
();
List
<
String
>
afterMonth
=
DateUtils
.
getBeforeCurrentMonth
(
3
,
true
);
List
<
Map
<
String
,
String
>>
list
=
beforeMonth
.
stream
()
.
map
(
month
->
MapBuilder
.<
String
,
String
>
create
().
put
(
"MonthYear"
,
month
).
build
())
.
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
String
>>
lastThreeMonth
=
afterMonth
.
stream
()
.
map
(
month
->
MapBuilder
.<
String
,
String
>
create
().
put
(
"MonthYear"
,
month
).
build
())
.
collect
(
Collectors
.
toList
());
Map
<
String
,
List
<
String
>>
queryCondtion1
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion1
=
new
HashMap
<>();
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
if
(
type
.
equals
(
"FDZ"
)){
if
(
type
.
equals
(
"FDZ"
)){
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/SjglZsjZsbtzMapper.java
View file @
3e24f202
...
@@ -24,6 +24,9 @@ public interface SjglZsjZsbtzMapper extends BaseMapper<SjglZsjZsbtz> {
...
@@ -24,6 +24,9 @@ public interface SjglZsjZsbtzMapper extends BaseMapper<SjglZsjZsbtz> {
List
<
Map
<
String
,
Object
>>
getStationInfoMapByStationWerks
(
String
WERKS
,
String
DATAID
);
List
<
Map
<
String
,
Object
>>
getStationInfoMapByStationWerks
(
String
WERKS
,
String
DATAID
);
List
<
Map
<
String
,
Object
>>
getStationInfoMapByStationWerksNew
(
String
WERKS
,
String
DATAID
);
List
<
Map
<
String
,
Object
>>
getStationInfoMapByStationGFWerks
(
String
WERKS
,
String
DATAID
);
List
<
Map
<
String
,
Object
>>
getStationInfoMapByStationGFWerks
(
String
WERKS
,
String
DATAID
);
List
<
Map
<
String
,
Object
>>
getStationInfoMapByStationGFWerksNew
(
String
WERKS
,
String
DATAID
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
3e24f202
...
@@ -1227,8 +1227,26 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1227,8 +1227,26 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
.
filter
(
esEquipments
->
esEquipments
.
getEquipmentIndexName
().
equals
(
"有功功率"
))
.
filter
(
esEquipments
->
esEquipments
.
getEquipmentIndexName
().
equals
(
"有功功率"
))
.
collect
(
Collectors
.
toMap
(
ESEquipments:
:
getEquipmentNumber
,
ESEquipments:
:
getValueF
));
.
collect
(
Collectors
.
toMap
(
ESEquipments:
:
getEquipmentNumber
,
ESEquipments:
:
getValueF
));
TpriDmpDatabook
tpriDmpDatabook
=
tpriDmpDatabookServiceImpl
.
getTpriDmpDatabookByDataName
(
"风机"
);
TpriDmpDatabook
tpriDmpDatabook
=
tpriDmpDatabookServiceImpl
.
getTpriDmpDatabookByDataName
(
"风机"
);
List
<
Map
<
String
,
Object
>>
dataMaps
=
sjglZsjZsbtzServiceImpl
.
sjglZsjZsbtzMapper
// List<Map<String, Object>> dataMaps = sjglZsjZsbtzServiceImpl.sjglZsjZsbtzMapper
.
getStationInfoMapByStationWerks
(
werks
,
tpriDmpDatabook
.
getDataid
().
toString
());
// .getStationInfoMapByStationWerks(werks, tpriDmpDatabook.getDataid().toString());
List
<
Map
<
String
,
Object
>>
dataMapss
=
sjglZsjZsbtzServiceImpl
.
sjglZsjZsbtzMapper
.
getStationInfoMapByStationWerksNew
(
werks
,
tpriDmpDatabook
.
getDataid
().
toString
());
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
dataResult
=
dataMapss
.
stream
().
collect
(
Collectors
.
groupingBy
(
map
->
(
String
)
map
.
get
(
"name"
)));
List
<
Map
<
String
,
Object
>>
dataMaps
=
new
ArrayList
<>();
dataResult
.
keySet
().
forEach
(
m
->{
String
equipNum
=
dataResult
.
get
(
m
).
stream
()
.
map
(
map
->
map
.
get
(
"equipNum"
).
toString
().
replace
(
m
+
"#"
,
""
))
.
reduce
((
a
,
b
)
->
a
+
","
+
b
)
.
orElse
(
""
);
Map
<
String
,
Object
>
hashMap
=
new
HashMap
<>();
hashMap
.
put
(
"name"
,
m
.
replace
(
"#"
,
""
));
hashMap
.
put
(
"equipNum"
,
equipNum
);
dataMaps
.
add
(
hashMap
);
});
// 获取风机列表
// 获取风机列表
List
<
ESEquipmentsDTO
>
fanStatusList
=
getFanStatusList
(
stationId
);
List
<
ESEquipmentsDTO
>
fanStatusList
=
getFanStatusList
(
stationId
);
fanStatusList
.
forEach
(
equipments
->
{
fanStatusList
.
forEach
(
equipments
->
{
...
@@ -2360,8 +2378,28 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -2360,8 +2378,28 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
map
.
put
(
"state"
+
number
,
equipStatesMap
.
get
(
esEquipments
.
getEquipmentNumber
()));
map
.
put
(
"state"
+
number
,
equipStatesMap
.
get
(
esEquipments
.
getEquipmentNumber
()));
maps
.
add
(
map
);
maps
.
add
(
map
);
}
}
List
<
Map
<
String
,
Object
>>
dataMaps
=
sjglZsjZsbtzServiceImpl
.
sjglZsjZsbtzMapper
// List<Map<String, Object>> dataMaps = sjglZsjZsbtzServiceImpl.sjglZsjZsbtzMapper
.
getStationInfoMapByStationGFWerks
(
werks
,
"集电线"
);
// .getStationInfoMapByStationGFWerks(werks, "集电线");
List
<
Map
<
String
,
Object
>>
dataMapss
=
sjglZsjZsbtzServiceImpl
.
sjglZsjZsbtzMapper
.
getStationInfoMapByStationGFWerksNew
(
werks
,
"集电线"
);
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
dataResult
=
dataMapss
.
stream
().
collect
(
Collectors
.
groupingBy
(
map
->
(
String
)
map
.
get
(
"name"
)));
List
<
Map
<
String
,
Object
>>
dataMaps
=
new
ArrayList
<>();
dataResult
.
keySet
().
forEach
(
m
->{
String
equipNum
=
dataResult
.
get
(
m
).
stream
()
.
map
(
map
->
map
.
get
(
"equipNum"
).
toString
().
replace
(
m
,
""
))
.
reduce
((
a
,
b
)
->
a
+
","
+
b
)
.
orElse
(
""
);
Map
<
String
,
Object
>
hashMap
=
new
HashMap
<>();
hashMap
.
put
(
"name"
,
m
.
replace
(
"#"
,
""
));
hashMap
.
put
(
"equipNum"
,
equipNum
);
dataMaps
.
add
(
hashMap
);
});
int
i
=
0
;
int
i
=
0
;
// 逆变器需要根据所属集电线分类组装 下面循环是将同一子阵下的不同逆变器组装为消息数据
// 逆变器需要根据所属集电线分类组装 下面循环是将同一子阵下的不同逆变器组装为消息数据
for
(
Map
<
String
,
Object
>
dataMap
:
dataMaps
)
{
for
(
Map
<
String
,
Object
>
dataMap
:
dataMaps
)
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
View file @
3e24f202
...
@@ -18,7 +18,31 @@
...
@@ -18,7 +18,31 @@
FSB
FSB
</select>
</select>
<select
id=
"getStationInfoMapByStationWerksNew"
resultType=
"map"
>
SELECT
SUBSTRING(sjgl_zsj_zsbtz.SBMC, 1, 4) AS name,
REPLACE(sjgl_zsj_zsbtz.SBMC, '风机系统', '') as equipNum
FROM
sjgl_zsj_zsbtz
WHERE
FSB IN (
SELECT
DBID
FROM
sjgl_zsj_zsbtz
WHERE
MACHGENRE = (
SELECT
DATAID
FROM
tpri_dmp_databook
WHERE
MACHGENRE = #{DATAID} and WERKS = #{WERKS}
)
)
</select>
<select
id=
"getStationInfoMapByStationGFWerks"
resultType=
"map"
>
<select
id=
"getStationInfoMapByStationGFWerks"
resultType=
"map"
>
SELECT LEFT
SELECT LEFT
...
@@ -37,6 +61,17 @@
...
@@ -37,6 +61,17 @@
B.FSB
B.FSB
</select>
</select>
<select
id=
"getStationInfoMapByStationGFWerksNew"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.entity.SjglZsjZsbtz"
>
SELECT
REPLACE(sjgl_zsj_zsbtz.SBMC, '光伏阵区系统', '') as equipNum,
SUBSTRING(sjgl_zsj_zsbtz.SBMC, 1, LOCATE('#', sjgl_zsj_zsbtz.SBMC)) AS name
FROM
sjgl_zsj_zsbtz
WHERE
FSB IN ( SELECT DBID FROM sjgl_zsj_zsbtz WHERE MACHGENRE = ( SELECT DATAID FROM tpri_dmp_databook WHERE DATANAME = #{DATAID} ) AND WERKS = #{WERKS} )
</select>
<select
id=
"getEquipQrcodeInfo"
resultType=
"com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics"
>
<select
id=
"getEquipQrcodeInfo"
resultType=
"com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics"
>
SELECT
SELECT
WERKS AS code,
WERKS AS code,
...
...
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