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
f1fbe2b8
Commit
f1fbe2b8
authored
Jun 24, 2024
by
hezhuozhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
26972 【智慧能源一体化】大屏监控查询添加场站过滤
parent
2b0041fe
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
9 deletions
+17
-9
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+6
-4
MonitorService.java
...in/amos/boot/module/jxiop/biz/service/MonitorService.java
+4
-2
MonitorServiceImpl.java
...oot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
+7
-3
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
f1fbe2b8
...
...
@@ -1128,7 +1128,8 @@ public class MonitorFanIdxController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"运维数据 "
)
@GetMapping
(
"/operationData"
)
public
ResponseModel
<
IPage
<
Map
<
String
,
Object
>>>
operationData
(
@RequestParam
(
value
=
"areaCode"
,
required
=
false
)
String
areaCode
)
{
public
ResponseModel
<
IPage
<
Map
<
String
,
Object
>>>
operationData
(
@RequestParam
(
value
=
"areaCode"
,
required
=
false
)
String
areaCode
,
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
{
// List<StationCacheInfoDto> list = commonServiceImpl.getListStationCacheInfoDto();
...
...
@@ -1152,13 +1153,14 @@ public class MonitorFanIdxController extends BaseController {
// result.setRecords(mapList);
// result.setCurrent(1);
// result.setTotal(mapList.size());
return
ResponseHelper
.
buildResponse
(
monitorService
.
operationData
(
areaCode
));
return
ResponseHelper
.
buildResponse
(
monitorService
.
operationData
(
areaCode
,
stationId
));
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"全国新能源接入情况 "
)
@GetMapping
(
"/getAccessSituation"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getAccessSituation
(
@RequestParam
(
value
=
"areaCode"
,
required
=
false
)
String
areaCode
)
{
return
ResponseHelper
.
buildResponse
(
monitorService
.
getAccessSituation
(
areaCode
));
public
ResponseModel
<
Map
<
String
,
Object
>>
getAccessSituation
(
@RequestParam
(
value
=
"areaCode"
,
required
=
false
)
String
areaCode
,
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
{
return
ResponseHelper
.
buildResponse
(
monitorService
.
getAccessSituation
(
areaCode
,
stationId
));
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/MonitorService.java
View file @
f1fbe2b8
...
...
@@ -15,10 +15,11 @@ import java.util.Map;
public
interface
MonitorService
{
/**
* @param areaCode 区域编码
* @param stationId 场站id
* @return 全国运维数据
* @Description 根据区域编码动态运维数据
*/
IPage
<
Map
<
String
,
Object
>>
operationData
(
String
areaCode
);
IPage
<
Map
<
String
,
Object
>>
operationData
(
String
areaCode
,
String
stationId
);
/**
* @return Map<String, Object>
...
...
@@ -122,7 +123,8 @@ public interface MonitorService {
/**
* 获取接入情况
* @param areaCode
* @param stationId
* @return
*/
Map
<
String
,
Object
>
getAccessSituation
(
String
areaCode
);
Map
<
String
,
Object
>
getAccessSituation
(
String
areaCode
,
String
stationId
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
View file @
f1fbe2b8
...
...
@@ -31,6 +31,7 @@ import org.springframework.scheduling.annotation.Scheduled;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
java.io.IOException
;
...
...
@@ -60,11 +61,14 @@ public class MonitorServiceImpl implements MonitorService {
private
Resource
overviewGF
;
@Override
public
IPage
<
Map
<
String
,
Object
>>
operationData
(
String
areaCode
)
{
public
IPage
<
Map
<
String
,
Object
>>
operationData
(
String
areaCode
,
String
stationId
)
{
List
<
StationCacheInfoDto
>
list
=
getListStationCacheInfoDto
();
if
(
null
!=
areaCode
)
{
list
=
list
.
stream
().
filter
(
e
->
e
.
getAreaCode
().
toUpperCase
(
Locale
.
ROOT
).
equals
(
areaCode
.
toUpperCase
(
Locale
.
ROOT
))).
collect
(
Collectors
.
toList
());
}
if
(!
StringUtils
.
isEmpty
(
stationId
))
{
list
=
list
.
stream
().
filter
(
e
->
e
.
getStationId
().
toUpperCase
(
Locale
.
ROOT
).
equals
(
stationId
.
toUpperCase
(
Locale
.
ROOT
))).
collect
(
Collectors
.
toList
());
}
List
<
Map
<
String
,
Object
>>
mapList
=
new
ArrayList
<>();
Map
<
String
,
List
<
StationCacheInfoDto
>>
listMap
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
StationCacheInfoDto:
:
getStationType
,
Collectors
.
toList
()));
for
(
StationType
value
:
StationType
.
values
())
{
...
...
@@ -944,8 +948,8 @@ public class MonitorServiceImpl implements MonitorService {
}
@Override
public
Map
<
String
,
Object
>
getAccessSituation
(
String
areaCode
)
{
IPage
<
Map
<
String
,
Object
>>
page
=
operationData
(
areaCode
);
public
Map
<
String
,
Object
>
getAccessSituation
(
String
areaCode
,
String
stationId
)
{
IPage
<
Map
<
String
,
Object
>>
page
=
operationData
(
areaCode
,
stationId
);
List
<
Map
<
String
,
Object
>>
records
=
page
.
getRecords
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(!
CollectionUtils
.
isEmpty
(
records
))
{
...
...
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