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
a86b56ea
Commit
a86b56ea
authored
Mar 04, 2025
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改阳光采集
parent
44bf6c6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
SofarDataAcquisitionServiceImpl.java
...pi/face/service/impl/SofarDataAcquisitionServiceImpl.java
+13
-2
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/SofarDataAcquisitionServiceImpl.java
View file @
a86b56ea
...
...
@@ -12,6 +12,8 @@ import java.util.Map;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
javax.annotation.PostConstruct
;
import
cn.hutool.core.collection.CollectionUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -121,9 +123,11 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
List
<
SofarStationList
>
jsonObject
=
requestUtil
.
getResPonseList
(
SoFarConstant
.
stationListUrl
,
SoFarConstant
.
requestPost
,
requestInfo
,
SoFarConstant
.
resovleRule_data
,
SofarStationList
.
class
);
// 新增td电站
int
i
=
0
;
for
(
SofarStationList
sunlight
:
jsonObject
)
{
sunlight
.
setCreatedTime
(
System
.
currentTimeMillis
());
sofarStationListMapper
.
insert
(
sunlight
);
System
.
out
.
println
(++
i
);
}
//删除多余的信息
deleteSHMessage
(
jsonObject
);
...
...
@@ -191,11 +195,18 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
}
}
List
<
String
>
names
=
jpStations
.
stream
().
map
(
i
->
i
.
getName
()).
collect
(
Collectors
.
toList
());
// 封装电站数据
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
SofarStationList
sunlightDto
=
list
.
get
(
i
);
if
(
names
.
contains
(
sunlightDto
.
getName
()))
{
continue
;
}
// System.out.println(i+"====================================================");
JpStation
jpStation
=
null
;
if
(
bodyparam
.
containsKey
(
sunlightDto
.
getId
().
toString
()))
{
...
...
@@ -383,7 +394,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
if
(
jsonObject1
!=
null
&&
!
jsonObject1
.
isEmpty
())
{
Map
<
String
,
String
>
maps
=
jsonObject1
.
stream
()
.
collect
(
Collectors
.
toMap
(
SofarInverterDto:
:
getKey
,
SofarInverterDto:
:
getValue
));
.
collect
(
Collectors
.
toMap
(
SofarInverterDto:
:
getKey
,
SofarInverterDto:
:
getValue
,(
k1
,
k2
)->
k1
));
// // 功率
// jpStation.setRealTimePower(
// maps != null && maps.containsKey("TPG")
...
...
@@ -484,7 +495,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
if
(!
ObjectUtils
.
isEmpty
(
jpStation
.
getSequenceNbr
()))
{
jpStationMapper
.
updateById
(
jpStation
);
}
else
{
jpStationMapper
.
insert
(
jpStation
);
jpStationMapper
.
insert
(
jpStation
);
}
String
today
=
DateUtil
.
today
();
...
...
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