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
afe8e5ba
Commit
afe8e5ba
authored
Jul 25, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改分析适配
parent
d1eac0ba
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
137 additions
and
43 deletions
+137
-43
DateUtils.java
...ava/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
+25
-0
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+12
-33
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 @
afe8e5ba
...
@@ -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-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
afe8e5ba
...
@@ -67,12 +67,11 @@
...
@@ -67,12 +67,11 @@
<if
test=
"analysisType == '按小时'"
>
<if
test=
"analysisType == '按小时'"
>
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
AND REC_DATE >= get_time_sub(59,'MINUTE')
</if>
</if>
<if
test=
"analysisType == '按10分钟'"
>
<if
test=
"analysisType == '按10分钟'"
>
AND ANALYSIS_TYPE = '按10分钟'
AND ANALYSIS_TYPE = '按10分钟'
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
AND REC_DATE >= get_time_sub(9,'MINUTE')
</if>
</if>
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE like concat('%', #{areaCode}, '%')
AND ARAE like concat('%', #{areaCode}, '%')
...
@@ -96,17 +95,15 @@
...
@@ -96,17 +95,15 @@
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = get_time_sub(1,'DAY')
</if>
</if>
<if
test=
"analysisType == '按小时'"
>
<if
test=
"analysisType == '按小时'"
>
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
AND REC_DATE >= get_time_sub(59,'MINUTE')
</if>
</if>
<if
test=
"analysisType == '按10分钟'"
>
<if
test=
"analysisType == '按10分钟'"
>
AND ANALYSIS_TYPE = '按10分钟'
AND ANALYSIS_TYPE = '按10分钟'
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
AND REC_DATE >= get_time_sub(9,'MINUTE')
</if>
</if>
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE like concat('%', #{areaCode}, '%')
AND ARAE like concat('%', #{areaCode}, '%')
...
@@ -132,7 +129,6 @@
...
@@ -132,7 +129,6 @@
ANALYSIS_TYPE = '按10分钟'
ANALYSIS_TYPE = '按10分钟'
<!-- AND DATE_ADD(DATE_FORMAT( REC_DATE, '%Y-%m-%d' ),INTERVAL 1 DAY) = CURRENT_DATE-->
<!-- AND DATE_ADD(DATE_FORMAT( REC_DATE, '%Y-%m-%d' ),INTERVAL 1 DAY) = CURRENT_DATE-->
<!-- AND CURRENT_DATE = get_time_add(1,'DAY')-->
<!-- AND CURRENT_DATE = get_time_add(1,'DAY')-->
AND REC_DATE >= get_time_sub(9,'MINUTE')
<if
test=
"stationCode != null and stationCode != ''"
>
<if
test=
"stationCode != null and stationCode != ''"
>
AND GATEWAY_ID = #{stationCode}
AND GATEWAY_ID = #{stationCode}
AND ANALYSIS_OBJ_TYPE = '场站'
AND ANALYSIS_OBJ_TYPE = '场站'
...
@@ -250,7 +246,7 @@
...
@@ -250,7 +246,7 @@
AND ANALYSIS_TYPE = '按10分钟'
AND ANALYSIS_TYPE = '按10分钟'
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE - INTERVAL 1 DAY-->
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURRENT_DATE - INTERVAL 1 DAY-->
<!--AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = get_time_sub(1,'DAY')-->
<!--AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = get_time_sub(1,'DAY')-->
AND REC_DATE >= get_time_sub(9,'MINUTE')
GROUP BY ARAE
GROUP BY ARAE
UNION ALL
UNION ALL
(
(
...
@@ -324,7 +320,6 @@ FROM (
...
@@ -324,7 +320,6 @@ FROM (
AND ANALYSIS_TYPE = '按10分钟'
AND ANALYSIS_TYPE = '按10分钟'
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURRENT_DATE - INTERVAL 1 DAY-->
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = CURRENT_DATE - INTERVAL 1 DAY-->
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')-->
<!--AND DATE_FORMAT( REC_DATE, '%Y-%m-%d' ) = get_time_sub(1,'DAY')-->
AND REC_DATE >= get_time_sub(9,'MINUTE')
<if
test=
"areaCode != null and areaCode != ''"
>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE like concat('%', #{areaCode}, '%')
AND ARAE like concat('%', #{areaCode}, '%')
</if>
</if>
...
@@ -633,7 +628,7 @@ FROM (
...
@@ -633,7 +628,7 @@ FROM (
<select
id=
"getPvInfoByPage"
resultType=
"java.util.Map"
>
<select
id=
"getPvInfoByPage"
resultType=
"java.util.Map"
>
SELECT
SELECT
SUBARRAY as subarray,
SUBARRAY as subarray,
STATION
AS station
Max(STATION)
AS station
FROM
FROM
idx_biz_pv_point_process_variable_classification
idx_biz_pv_point_process_variable_classification
<where>
<where>
...
@@ -1403,17 +1398,15 @@ FROM (
...
@@ -1403,17 +1398,15 @@ FROM (
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = get_time_sub(1,'DAY')
</if>
</if>
<if
test=
"analysisType == '按小时'"
>
<if
test=
"analysisType == '按小时'"
>
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
AND REC_DATE >= get_time_sub(59,'MINUTE')
</if>
</if>
<if
test=
"analysisType == '按10分钟'"
>
<if
test=
"analysisType == '按10分钟'"
>
AND ANALYSIS_TYPE = '按10分钟'
AND ANALYSIS_TYPE = '按10分钟'
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
AND REC_DATE >= get_time_sub(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
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
...
@@ -1432,17 +1425,15 @@ FROM (
...
@@ -1432,17 +1425,15 @@ FROM (
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = get_time_sub(1,'DAY')
</if>
</if>
<if
test=
"analysisType == '按小时'"
>
<if
test=
"analysisType == '按小时'"
>
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
AND REC_DATE >= get_time_sub(59,'MINUTE')
</if>
</if>
<if
test=
"analysisType == '按10分钟'"
>
<if
test=
"analysisType == '按10分钟'"
>
AND ANALYSIS_TYPE = '按10分钟'
AND ANALYSIS_TYPE = '按10分钟'
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
AND REC_DATE >= get_time_sub(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
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
...
@@ -1467,17 +1458,15 @@ FROM (
...
@@ -1467,17 +1458,15 @@ FROM (
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = get_time_sub(1,'DAY')
</if>
</if>
<if
test=
"analysisType == '按小时'"
>
<if
test=
"analysisType == '按小时'"
>
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
AND REC_DATE >= get_time_sub(59,'MINUTE')
</if>
</if>
<if
test=
"analysisType == '按10分钟'"
>
<if
test=
"analysisType == '按10分钟'"
>
AND ANALYSIS_TYPE = '按10分钟'
AND ANALYSIS_TYPE = '按10分钟'
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
AND REC_DATE >= get_time_sub(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
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
...
@@ -1496,17 +1485,15 @@ FROM (
...
@@ -1496,17 +1485,15 @@ FROM (
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = get_time_sub(1,'DAY')
</if>
</if>
<if
test=
"analysisType == '按小时'"
>
<if
test=
"analysisType == '按小时'"
>
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
AND REC_DATE >= get_time_sub(59,'MINUTE')
</if>
</if>
<if
test=
"analysisType == '按10分钟'"
>
<if
test=
"analysisType == '按10分钟'"
>
AND ANALYSIS_TYPE = '按10分钟'
AND ANALYSIS_TYPE = '按10分钟'
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
AND REC_DATE >= get_time_sub(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
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
...
@@ -1534,17 +1521,15 @@ FROM (
...
@@ -1534,17 +1521,15 @@ FROM (
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = get_time_sub(1,'DAY')
</if>
</if>
<if
test=
"analysisType == '按小时'"
>
<if
test=
"analysisType == '按小时'"
>
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
AND REC_DATE >= get_time_sub(59,'MINUTE')
</if>
</if>
<if
test=
"analysisType == '按10分钟'"
>
<if
test=
"analysisType == '按10分钟'"
>
AND ANALYSIS_TYPE = '按10分钟'
AND ANALYSIS_TYPE = '按10分钟'
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
AND REC_DATE >= get_time_sub(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
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
...
@@ -1563,17 +1548,15 @@ FROM (
...
@@ -1563,17 +1548,15 @@ FROM (
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = get_time_sub(1,'DAY')
</if>
</if>
<if
test=
"analysisType == '按小时'"
>
<if
test=
"analysisType == '按小时'"
>
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
AND REC_DATE >= get_time_sub(59,'MINUTE')
</if>
</if>
<if
test=
"analysisType == '按10分钟'"
>
<if
test=
"analysisType == '按10分钟'"
>
AND ANALYSIS_TYPE = '按10分钟'
AND ANALYSIS_TYPE = '按10分钟'
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
AND REC_DATE >= get_time_sub(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
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
...
@@ -1599,17 +1582,15 @@ FROM (
...
@@ -1599,17 +1582,15 @@ FROM (
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = get_time_sub(1,'DAY')
</if>
</if>
<if
test=
"analysisType == '按小时'"
>
<if
test=
"analysisType == '按小时'"
>
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
AND REC_DATE >= get_time_sub(59,'MINUTE')
</if>
</if>
<if
test=
"analysisType == '按10分钟'"
>
<if
test=
"analysisType == '按10分钟'"
>
AND ANALYSIS_TYPE = '按10分钟'
AND ANALYSIS_TYPE = '按10分钟'
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
AND REC_DATE >= get_time_sub(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
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
...
@@ -1628,17 +1609,15 @@ FROM (
...
@@ -1628,17 +1609,15 @@ FROM (
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
<!-- AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = CURDATE() - INTERVAL 1 DAY -->
AND DATE_FORMAT(REC_DATE, '%Y-%m-%d') = get_time_sub(1,'DAY')
</if>
</if>
<if
test=
"analysisType == '按小时'"
>
<if
test=
"analysisType == '按小时'"
>
AND ANALYSIS_TYPE = '按小时'
AND ANALYSIS_TYPE = '按小时'
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
<!--AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE ) -->
AND REC_DATE >= get_time_sub(59,'MINUTE')
</if>
</if>
<if
test=
"analysisType == '按10分钟'"
>
<if
test=
"analysisType == '按10分钟'"
>
AND ANALYSIS_TYPE = '按10分钟'
AND ANALYSIS_TYPE = '按10分钟'
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
<!-- AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE ) -->
AND REC_DATE >= get_time_sub(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
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
<foreach
item=
"item"
index=
"index"
collection=
"gatewayIds"
open=
"("
separator=
","
close=
")"
>
...
...
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 @
afe8e5ba
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 @
afe8e5ba
...
@@ -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 @
afe8e5ba
...
@@ -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 @
afe8e5ba
...
@@ -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