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
6a7b92af
Commit
6a7b92af
authored
Jul 22, 2024
by
hezhuozhi
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
83213bc5
909d27d0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
54 deletions
+75
-54
TDBigScreenAnalyseController.java
...le/jxiop/biz/controller/TDBigScreenAnalyseController.java
+64
-47
HealthStatusIndicatorServiceImpl.java
...op/biz/service/impl/HealthStatusIndicatorServiceImpl.java
+1
-1
application-dev1.properties
...nalyse-biz/src/main/resources/application-dev1.properties
+6
-2
application.properties
...iop-analyse-biz/src/main/resources/application.properties
+3
-3
McbWarningMapper.xml
...pi/src/main/resources/mapper/warning/McbWarningMapper.xml
+1
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TDBigScreenAnalyseController.java
View file @
6a7b92af
...
@@ -17,7 +17,9 @@ import java.util.List;
...
@@ -17,7 +17,9 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Objects
;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.function.Predicate
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -457,58 +459,29 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -457,58 +459,29 @@ public class TDBigScreenAnalyseController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"
片区、场站设备健康状态指数 "
,
notes
=
"片区、场站
设备健康状态指数 "
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"
全域片区设备健康状态指数 "
,
notes
=
"全域片区
设备健康状态指数 "
)
@GetMapping
(
value
=
"/getHealthInfoByMinute"
)
@GetMapping
(
value
=
"/get
Area
HealthInfoByMinute"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getHealthInfoBy
Minute
(
@RequestParam
(
required
=
false
)
String
areaCode
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getHealthInfoBy
AreaAndMinute
(
)
{
LambdaQueryWrapper
<
FanHealthIndex
>
wrapper
=
new
LambdaQueryWrapper
<
FanHealthIndex
>();
LambdaQueryWrapper
<
FanHealthIndex
>
wrapper
=
new
LambdaQueryWrapper
<
FanHealthIndex
>();
wrapper
.
orderByDesc
(
FanHealthIndex:
:
getTs
);
wrapper
.
orderByDesc
(
FanHealthIndex:
:
getTs
);
wrapper
.
eq
(
FanHealthIndex:
:
getAnalysisType
,
"按10分钟"
);
wrapper
.
eq
(
FanHealthIndex:
:
getAnalysisType
,
"按10分钟"
);
if
(
CharSequenceUtil
.
isNotEmpty
(
areaCode
))
{
wrapper
.
eq
(
FanHealthIndex:
:
getAnalysisObjType
,
"片区"
);
wrapper
.
eq
(
FanHealthIndex:
:
getAnalysisObjType
,
"场站"
);
wrapper
.
like
(
FanHealthIndex:
:
getArea
,
"%"
+
areaCode
+
"%"
);
}
else
{
wrapper
.
eq
(
FanHealthIndex:
:
getAnalysisObjType
,
"片区"
);
}
List
<
Object
>
seriesData
=
new
ArrayList
<>();
List
<
String
>
axisData
=
new
ArrayList
<>();
List
<
FanHealthIndex
>
fanHealthIndexList
=
fanHealthIndexMapper
.
selectList
(
wrapper
);
List
<
FanHealthIndex
>
fanHealthIndexList
=
fanHealthIndexMapper
.
selectList
(
wrapper
);
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
if
(
CharSequenceUtil
.
isNotEmpty
(
areaCode
))
{
Map
<
String
,
List
<
FanHealthIndex
>>
groupedData
=
fanHealthIndexList
.
stream
()
Map
<
String
,
Map
<
String
,
List
<
FanHealthIndex
>>>
groupedData
=
fanHealthIndexList
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
FanHealthIndex:
:
getArea
));
.
collect
(
Collectors
.
groupingBy
(
FanHealthIndex:
:
getArea
,
Collectors
.
groupingBy
(
FanHealthIndex:
:
getStation
)));
Map
<
String
,
FanHealthIndex
>
latestData
=
groupedData
.
values
().
stream
().
map
(
list
->
list
.
stream
()
Map
<
String
,
Map
<
String
,
FanHealthIndex
>>
latestData
=
groupedData
.
entrySet
().
stream
()
.
max
(
Comparator
.
comparing
(
FanHealthIndex:
:
getTs
))
.
collect
(
Collectors
.
toMap
(
.
get
()).
collect
(
Collectors
.
toMap
(
FanHealthIndex:
:
getArea
,
Function
.
identity
()));
Map
.
Entry
::
getKey
,
List
<
String
>
axisData
=
latestData
.
values
().
stream
().
map
(
t
->
t
.
getArea
()).
collect
(
Collectors
.
toList
());
e
->
e
.
getValue
().
values
().
stream
()
List
<
String
>
list
=
Arrays
.
asList
(
"华北区域"
,
"东北区域"
,
"华东区域"
,
"华南区域"
,
"西南区域"
,
"西北区域"
,
"华中区域"
);
.
map
(
list
->
list
.
stream
()
List
<
String
>
finalList
=
Stream
.
concat
(
axisData
.
stream
(),
list
.
stream
()).
distinct
().
collect
(
Collectors
.
toList
());
.
max
(
Comparator
.
comparing
(
FanHealthIndex:
:
getTs
))
List
<
Object
>
seriesData
=
new
ArrayList
<>();
.
get
())
latestData
.
values
().
forEach
(
item
->
{
.
collect
(
Collectors
.
toMap
(
FanHealthIndex:
:
getStation
,
Function
.
identity
()))
Predicate
<
String
>
condition
=
finalList:
:
contains
;
));
seriesData
.
add
(
condition
.
test
(
item
.
getArea
())
?
String
.
valueOf
(
BigDecimal
.
valueOf
(
item
.
getHealthIndex
()))
:
"100.0"
);
List
<
Object
>
finalSeriesData
=
new
ArrayList
<>();
});
List
<
String
>
finalAxisData
=
new
ArrayList
<>();
resultMap
.
put
(
"axisData"
,
finalList
);
latestData
.
values
().
forEach
(
s
->
{
s
.
forEach
((
k
,
v
)
->
{
finalSeriesData
.
add
(
v
.
getHealthIndex
());
finalAxisData
.
add
(
v
.
getStation
());
});
});
seriesData
.
addAll
(
finalSeriesData
);
axisData
.
addAll
(
finalAxisData
);
}
else
{
Map
<
String
,
List
<
FanHealthIndex
>>
groupedData
=
fanHealthIndexList
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
FanHealthIndex:
:
getArea
));
Map
<
String
,
FanHealthIndex
>
latestData
=
groupedData
.
values
().
stream
().
map
(
list
->
list
.
stream
()
.
max
(
Comparator
.
comparing
(
FanHealthIndex:
:
getTs
))
.
get
())
.
collect
(
Collectors
.
toMap
(
FanHealthIndex:
:
getArea
,
Function
.
identity
()));
seriesData
=
latestData
.
values
().
stream
().
map
(
t
->
String
.
valueOf
(
BigDecimal
.
valueOf
(
t
.
getHealthIndex
())
.
setScale
(
1
,
BigDecimal
.
ROUND_HALF_UP
))).
collect
(
Collectors
.
toList
());
axisData
=
latestData
.
values
().
stream
().
map
(
t
->
t
.
getArea
()).
collect
(
Collectors
.
toList
());
}
resultMap
.
put
(
"axisData"
,
axisData
);
resultMap
.
put
(
"seriesData"
,
seriesData
);
resultMap
.
put
(
"seriesData"
,
seriesData
);
return
ResponseHelper
.
buildResponse
(
resultMap
);
return
ResponseHelper
.
buildResponse
(
resultMap
);
}
}
...
@@ -516,6 +489,50 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -516,6 +489,50 @@ public class TDBigScreenAnalyseController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"片区场站设备健康状态指数 "
,
notes
=
"片区场站设备健康状态指数 "
)
@GetMapping
(
value
=
"/getStationHealthInfoByMinute"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getHealthInfoByStationAndMinute
(
@RequestParam
(
required
=
false
)
String
areaCode
)
{
LambdaQueryWrapper
<
FanHealthIndex
>
wrapper
=
new
LambdaQueryWrapper
<
FanHealthIndex
>();
wrapper
.
orderByDesc
(
FanHealthIndex:
:
getTs
);
wrapper
.
eq
(
FanHealthIndex:
:
getAnalysisType
,
"按10分钟"
);
wrapper
.
eq
(
FanHealthIndex:
:
getAnalysisObjType
,
"场站"
);
wrapper
.
like
(
FanHealthIndex:
:
getArea
,
"%"
+
areaCode
+
"%"
);
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
FanHealthIndex
>
fanHealthIndexList
=
fanHealthIndexMapper
.
selectList
(
wrapper
);
LambdaQueryWrapper
<
PvHealthIndex
>
pvWrapper
=
new
LambdaQueryWrapper
<
PvHealthIndex
>();
pvWrapper
.
orderByDesc
(
PvHealthIndex:
:
getTs
);
pvWrapper
.
eq
(
PvHealthIndex:
:
getAnalysisType
,
"按10分钟"
);
pvWrapper
.
eq
(
PvHealthIndex:
:
getAnalysisObjType
,
"场站"
);
pvWrapper
.
like
(
PvHealthIndex:
:
getArea
,
"%"
+
areaCode
+
"%"
);
List
<
PvHealthIndex
>
pvHealthIndexList
=
pvHealthIndexMapper
.
selectList
(
pvWrapper
);
Map
<
String
,
List
<
FanHealthIndex
>>
fanHealthGroupedData
=
fanHealthIndexList
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
FanHealthIndex:
:
getArea
));
Map
<
String
,
FanHealthIndex
>
fanHealthLatestData
=
fanHealthGroupedData
.
values
().
stream
().
map
(
list
->
list
.
stream
()
.
max
(
Comparator
.
comparing
(
FanHealthIndex:
:
getTs
))
.
get
()).
collect
(
Collectors
.
toMap
(
FanHealthIndex:
:
getArea
,
Function
.
identity
()));
Map
<
String
,
List
<
PvHealthIndex
>>
pvHealthGroupedData
=
pvHealthIndexList
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
PvHealthIndex:
:
getStation
));
Map
<
String
,
PvHealthIndex
>
pvHealthLatestData
=
pvHealthGroupedData
.
values
().
stream
().
map
(
list
->
list
.
stream
()
.
max
(
Comparator
.
comparing
(
PvHealthIndex:
:
getTs
))
.
get
()).
collect
(
Collectors
.
toMap
(
PvHealthIndex:
:
getStation
,
Function
.
identity
()));
List
<
String
>
finalAxisData
=
new
ArrayList
<>();
List
<
Object
>
finaleSeriesData
=
new
ArrayList
<>();
finalAxisData
.
addAll
(
fanHealthLatestData
.
values
().
stream
().
map
(
t
->
t
.
getArea
()).
collect
(
Collectors
.
toList
()));
finalAxisData
.
addAll
(
pvHealthLatestData
.
values
().
stream
().
map
(
t
->
t
.
getArea
()).
collect
(
Collectors
.
toList
()));
finaleSeriesData
.
addAll
(
fanHealthLatestData
.
values
().
stream
().
map
(
t
->
String
.
valueOf
(
BigDecimal
.
valueOf
(
t
.
getHealthIndex
()))).
collect
(
Collectors
.
toList
()));
finaleSeriesData
.
addAll
(
pvHealthLatestData
.
values
().
stream
().
map
(
t
->
String
.
valueOf
(
BigDecimal
.
valueOf
(
t
.
getHealthIndex
()))).
collect
(
Collectors
.
toList
()));
resultMap
.
put
(
"axisData"
,
finalAxisData
);
resultMap
.
put
(
"seriesData"
,
finaleSeriesData
);
return
ResponseHelper
.
buildResponse
(
resultMap
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"全域各场站设备实时预警处置信息"
,
notes
=
"全域各场站设备实时预警处置信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"全域各场站设备实时预警处置信息"
,
notes
=
"全域各场站设备实时预警处置信息"
)
@GetMapping
(
value
=
"/getEquipWarningInfoByPage"
)
@GetMapping
(
value
=
"/getEquipWarningInfoByPage"
)
public
ResponseModel
<
IPage
<
FanWarningRecord
>>
getEquipWarningInfoByPage
(
public
ResponseModel
<
IPage
<
FanWarningRecord
>>
getEquipWarningInfoByPage
(
...
...
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 @
6a7b92af
...
@@ -741,7 +741,7 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -741,7 +741,7 @@ public class HealthStatusIndicatorServiceImpl {
wrapper
.
orderByAsc
(
PvHealthIndexHour:
:
getTs
);
wrapper
.
orderByAsc
(
PvHealthIndexHour:
:
getTs
);
List
<
PvHealthIndexHour
>
healthIndices
=
pvHealthIndexHourMapper
.
selectList
(
wrapper
);
List
<
PvHealthIndexHour
>
healthIndices
=
pvHealthIndexHourMapper
.
selectList
(
wrapper
);
List
<
String
>
collect
=
healthIndices
.
stream
().
map
(
PvHealthIndexHour:
:
getAnalysisObjSeq
).
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
healthIndices
.
stream
().
map
(
PvHealthIndexHour:
:
getAnalysisObjSeq
).
collect
(
Collectors
.
toList
());
if
(
null
==
healthIndices
)
{
if
(
null
==
healthIndices
||
collect
==
null
||
collect
.
isEmpty
()
)
{
return
;
return
;
}
}
LambdaQueryWrapper
<
IdxBizPvWarningRuleSet
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizPvWarningRuleSet
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/application-dev1.properties
View file @
6a7b92af
...
@@ -197,4 +197,8 @@ base.url.GKHF=http://139.9.171.247:8052/intelligent-analysis/working-condition-d
...
@@ -197,4 +197,8 @@ base.url.GKHF=http://139.9.171.247:8052/intelligent-analysis/working-condition-d
#����� �㷨����
#����� �㷨����
base.url.ZXZ
=
http://139.9.171.247:8052/intelligent-analysis/central-value
base.url.ZXZ
=
http://139.9.171.247:8052/intelligent-analysis/central-value
#ָ���������㷨����
#ָ���������㷨����
base.url.zsfx
:
http://139.9.171.247:8052/intelligent-analysis/index-analysis
base.url.zsfx
:
http://139.9.171.247:8052/intelligent-analysis/index-analysis
\ No newline at end of file
forecast.url
=
logic
=
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/application.properties
View file @
6a7b92af
...
@@ -2,7 +2,7 @@ spring.application.name=AMOS-JXIOP-ANALYSE-CZ
...
@@ -2,7 +2,7 @@ spring.application.name=AMOS-JXIOP-ANALYSE-CZ
server.servlet.context-path
=
/jxiop-analyse
server.servlet.context-path
=
/jxiop-analyse
server.port
=
33400
server.port
=
33400
server.uri-encoding
=
UTF-8
server.uri-encoding
=
UTF-8
spring.profiles.active
=
kingbase8
spring.profiles.active
=
dev1
spring.jackson.time-zone
=
GMT+8
spring.jackson.time-zone
=
GMT+8
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
logging.config
=
classpath:logback-${spring.profiles.active}.xml
logging.config
=
classpath:logback-${spring.profiles.active}.xml
...
@@ -90,4 +90,4 @@ healthValue_HourCount=6
...
@@ -90,4 +90,4 @@ healthValue_HourCount=6
healthValue_MinCount
=
5
healthValue_MinCount
=
5
##是否打开健康计算计算 true 打开 false 关闭
##是否打开健康计算计算 true 打开 false 关闭
openHealth
=
true
openHealth
=
false
\ No newline at end of file
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/warning/McbWarningMapper.xml
View file @
6a7b92af
...
@@ -160,7 +160,7 @@
...
@@ -160,7 +160,7 @@
</if>
</if>
</where>
</where>
ORDER BY
ORDER BY
log.
REC
_DATE DESC
log.
CREATE
_DATE DESC
LIMIT #{start}, #{size}
LIMIT #{start}, #{size}
</select>
</select>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment