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
c58efed9
Commit
c58efed9
authored
Nov 30, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采集器与逆变器数量与第三方不一致问题修改处理。
parent
c0ac0241
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
GoLangDataAcquisitionServiceImpl.java
...i/face/service/impl/GoLangDataAcquisitionServiceImpl.java
+9
-9
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/GoLangDataAcquisitionServiceImpl.java
View file @
c58efed9
...
...
@@ -297,15 +297,15 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Override
public
void
collectorList
()
{
List
<
String
>
stationIds
=
golangStationMapper
.
getStationIds
();
for
(
int
i
=
0
;
i
<
stationIds
.
size
();
i
++)
{
//
List<String> stationIds = golangStationMapper.getStationIds();
//
for (int i = 0; i < stationIds.size(); i++) {
try
{
TimeUnit
.
SECONDS
.
sleep
(
1
);
}
catch
(
InterruptedException
e
)
{
throw
new
RuntimeException
(
e
);
}
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
requestInfo
.
put
(
"stationId"
,
Long
.
valueOf
(
stationIds
.
get
(
i
)));
//
requestInfo.put("stationId", Long.valueOf(stationIds.get(i)));
requestInfo
.
put
(
"pageNo"
,
1
);
requestInfo
.
put
(
"pageSize"
,
100
);
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
...
...
@@ -320,7 +320,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
golangCollectorList
.
setCreatedTime
(
System
.
currentTimeMillis
());
golangCollectorListMapper
.
insert
(
golangCollectorList
);
}
}
//
}
}
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
...
...
@@ -401,22 +401,22 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Override
public
void
inverterList
()
{
List
<
String
>
stationIds
=
golangStationMapper
.
getStationIds
();
for
(
int
i
=
0
;
i
<
stationIds
.
size
();
i
++)
{
//
List<String> stationIds = golangStationMapper.getStationIds();
//
for (int i = 0; i < stationIds.size(); i++) {
try
{
TimeUnit
.
SECONDS
.
sleep
(
1
);
}
catch
(
InterruptedException
e
)
{
throw
new
RuntimeException
(
e
);
}
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
requestInfo
.
put
(
"stationId"
,
Long
.
valueOf
(
stationIds
.
get
(
i
)));
//
requestInfo.put("stationId", Long.valueOf(stationIds.get(i)));
requestInfo
.
put
(
"pageNo"
,
1
);
requestInfo
.
put
(
"pageSize"
,
100
);
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
List
<
GolangInverterList
>
result
=
golangRequestUtil
.
getResPonse
(
GoLangConstant
.
inverterListUrl
,
GoLangConstant
.
requestPost
,
requestParaminfo
,
GoLangConstant
.
resovleRule_data
,
GoLangConstant
.
resovleRule_data
_page_records
,
GolangInverterList
.
class
);
for
(
int
j
=
0
;
j
<
result
.
size
();
j
++)
{
...
...
@@ -424,7 +424,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
golangInverterList
.
setCreatedTime
(
System
.
currentTimeMillis
());
golangInverterListMapper
.
insert
(
golangInverterList
);
}
}
//
}
}
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
...
...
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