Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
0b0d798c
Commit
0b0d798c
authored
Apr 15, 2024
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
运行监盘返回数据为空问题处理。
parent
fea573c4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
5 deletions
+16
-5
StationCacheInfoDto.java
...n/amos/boot/module/jxiop/biz/dto/StationCacheInfoDto.java
+1
-1
CoreCommonService.java
...amos/boot/module/jxiop/biz/service/CoreCommonService.java
+1
-1
CoreCommonServiceImpl.java
.../module/jxiop/biz/service/impl/CoreCommonServiceImpl.java
+7
-1
MonitorServiceImpl.java
...oot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
+7
-2
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/StationCacheInfoDto.java
View file @
0b0d798c
...
...
@@ -21,7 +21,7 @@ public class StationCacheInfoDto implements Serializable {
//所属片区
private
String
belongArea
;
//装机容量
private
String
installedCapacity
=
"0.0"
;
private
String
installedCapacity
;
//设备数量
private
String
equipmentNumbers
;
//风机网关
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/CoreCommonService.java
View file @
0b0d798c
...
...
@@ -14,7 +14,7 @@ import java.util.stream.Collectors;
public
interface
CoreCommonService
{
/**
* @deprecated 远程调用core服务根据
厂长
名称
* @deprecated 远程调用core服务根据
场站
名称
* @param stationNames 要查的场站名称需要使用逗号分隔 eg:夏造风机,石灰山风机
* @param pointsNames 要查的测点名称需要使用逗号分隔开 eg:日发电量,月发电量,年发电
* @return CoreValuesDto
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CoreCommonServiceImpl.java
View file @
0b0d798c
...
...
@@ -28,14 +28,20 @@ public class CoreCommonServiceImpl implements CoreCommonService {
@Override
public
List
<
CoreValuesDto
>
getValuesByStationNamesAndPointsNames
(
String
stationNames
,
String
pointsNames
)
{
List
<
CoreValuesDto
>
result
=
new
ArrayList
<>();
try
{
FeignClientResult
<
List
<
Object
>>
feignClientResult
=
coreFeignClient
.
getValues
(
stationNames
,
pointsNames
);
List
<
Object
>
list
=
feignClientResult
.
getResult
();
List
<
CoreValuesDto
>
result
=
new
ArrayList
<>();
list
.
forEach
(
o
->
{
CoreValuesDto
coreValuesDto
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
o
),
CoreValuesDto
.
class
);
coreValuesDto
.
setDataMap
(
coreValuesDto
.
getData
().
stream
().
flatMap
(
m
->
m
.
entrySet
().
stream
()).
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
,
(
a
,
b
)
->
b
)));
result
.
add
(
coreValuesDto
);
});
}
catch
(
Exception
e
){
e
.
printStackTrace
();
return
result
;
}
return
result
;
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
View file @
0b0d798c
...
...
@@ -254,7 +254,6 @@ public class MonitorServiceImpl implements MonitorService {
List
<
StationCoordinate
>
stationCoordinateList
=
stationCoordinateMapper
.
selectList
(
new
QueryWrapper
<
StationCoordinate
>().
isNotNull
(
"station_id"
).
eq
(
"is_main_coordinate"
,
0
));
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
HashMap
<
String
,
Double
>
hashMap
=
new
HashMap
<>();
StationCacheInfoDto
stationCacheInfoDto
=
list
.
get
(
i
);
RegionNationWideDto
regionNationWideDto
=
new
RegionNationWideDto
();
regionNationWideDto
.
setStaitionId
(
String
.
valueOf
(
stationCacheInfoDto
.
getStationId
()));
...
...
@@ -279,7 +278,13 @@ public class MonitorServiceImpl implements MonitorService {
speendOrirradiate
=
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
buDunStationDetailInfo
.
getWind_as_irradiance
());
}
}
BuDunStationDetailInfo
buDunStationDetailInfo
=
buDunStationDetailInfos
.
stream
().
filter
(
buDunStationDetailInfo1
->
buDunStationDetailInfo1
.
getStation_name
().
contains
(
stationCacheInfoDto
.
getStationName
().
replace
(
"风电站"
,
""
).
replace
(
"风电场"
,
""
).
replace
(
"光伏电站"
,
""
))).
findFirst
().
orElse
(
null
);
if
(!
ObjectUtils
.
isEmpty
(
buDunStationDetailInfo
)&&!
ObjectUtils
.
isEmpty
(
buDunStationDetailInfo
.
getWind_as_irradiance
())){
speendOrirradiate
=
buDunStationDetailInfo
.
getWind_as_irradiance
().
toString
();
if
(
ObjectUtils
.
isEmpty
(
regionNationWideDto
.
getStationCapacity
())&&!
ObjectUtils
.
isEmpty
(
buDunStationDetailInfo
.
getActual_installed_capacity
())){
regionNationWideDto
.
setStationCapacity
(
buDunStationDetailInfo
.
getActual_installed_capacity
().
toString
());
}
}
regionNationWideDto
.
setSpeendOrirradiate
(
speendOrirradiate
);
StationCoordinate
stationCoordinate
=
stationCoordinateList
.
stream
().
filter
(
stationCoordinate1
->
String
.
valueOf
(
stationCoordinate1
.
getStationId
()).
equals
(
stationCacheInfoDto
.
getStationId
())).
collect
(
Collectors
.
toList
()).
get
(
0
);
hashMap
.
put
(
"lng"
,
Double
.
valueOf
(
stationCoordinate
.
getLongitude
()));
...
...
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