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
01fcc8cd
Commit
01fcc8cd
authored
Jul 18, 2024
by
yangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接 碳银电站接口
parent
cf90321e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
TanYinDataAcquisitionServiceImpl.java
...i/face/service/impl/TanYinDataAcquisitionServiceImpl.java
+8
-3
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/TanYinDataAcquisitionServiceImpl.java
View file @
01fcc8cd
...
...
@@ -216,8 +216,9 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
long
ts
=
System
.
currentTimeMillis
();
log
.
info
(
"-------碳银同步电站开始: {} ------- "
,
ts
);
List
<
String
>
projectNos
=
tanYinCustomerInfoMapper
.
listProjectNo
();
projectNos
.
add
(
"TF2024060312382700202"
);
String
powerDate
=
"2024-07-17"
;
// projectNos.add("TF2024060312382700202");
// String powerDate = "2024-07-17";
String
powerDate
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
if
(
CollectionUtils
.
isEmpty
(
projectNos
))
{
return
;
}
...
...
@@ -427,7 +428,6 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
if
(
CollectionUtils
.
isEmpty
(
tanYinInveterInfos
))
{
return
;
}
Map
<
String
,
TanYinInveterInfo
>
tanYinInveterInfoMap
=
tanYinInveterInfos
.
stream
().
collect
(
Collectors
.
toMap
(
TanYinInveterInfo:
:
getSn
,
v
->
v
,
(
k1
,
k2
)
->
k1
));
List
<
String
>
stationIds
=
tanYinInveterInfos
.
stream
().
map
(
TanYinInveterInfo:
:
getProjectNo
).
collect
(
Collectors
.
toList
());
List
<
JpStation
>
jpStations
=
jpStationMapper
.
selectList
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
TANYIN
.
getCode
()).
in
(
"third_station_id"
,
stationIds
));
Map
<
String
,
JpStation
>
jpStationMap
=
jpStations
.
stream
().
collect
(
Collectors
.
toMap
(
JpStation:
:
getThirdStationId
,
Function
.
identity
()));
...
...
@@ -471,6 +471,11 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
jpInverter
.
setUpdateTime
(
tanYinInveterInfoDTO
.
getGmtCreate
()
!=
null
?
new
Date
(
Long
.
parseLong
(
tanYinInveterInfoDTO
.
getGmtCreate
()))
:
new
Date
());
JpStation
jpStation
=
jpStationMap
.
get
(
tanYinInveterInfo
.
getProjectNo
());
if
(
jpStation
!=
null
)
{
if
(!
"离线"
.
equals
(
jpStation
.
getState
())
&&
!
"异常"
.
equals
(
jpStation
.
getState
()))
{
jpStation
.
setState
(
TanYinConstant
.
stationStatus
.
get
(
tanYinInveterInfoDTO
.
getStatus
()));
jpStationMapper
.
updateById
(
jpStation
);
jpStationMap
.
put
(
tanYinInveterInfo
.
getProjectNo
(),
jpStation
);
}
// 逆变器没有就空着
// jpInverter.setDayPowerGeneration(jpStation.getDayGenerate());
// jpInverter.setMonthPowerGeneration(jpStation.getMonthGenerate());
...
...
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