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
6a458722
Commit
6a458722
authored
Oct 19, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
3d73e199
426dcdf5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
62 deletions
+68
-62
GoLangDataAcquisitionServiceImpl.java
...i/face/service/impl/GoLangDataAcquisitionServiceImpl.java
+10
-8
ImasterDataServiceImpl.java
...ouseholdapi/face/service/impl/ImasterDataServiceImpl.java
+9
-12
KsolarDataAcquisitionServiceImpl.java
...i/face/service/impl/KsolarDataAcquisitionServiceImpl.java
+41
-40
application-dev.properties
...-housepvapi/src/main/resources/application-dev.properties
+8
-2
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 @
6a458722
...
@@ -22,6 +22,7 @@ import com.yeejoin.amos.api.householdapi.face.orm.mapper.hygf.JpStationMapper;
...
@@ -22,6 +22,7 @@ import com.yeejoin.amos.api.householdapi.face.orm.mapper.hygf.JpStationMapper;
import
com.yeejoin.amos.openapi.enums.PVProducerInfoEnum
;
import
com.yeejoin.amos.openapi.enums.PVProducerInfoEnum
;
import
fastjson.JSON
;
import
fastjson.JSON
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -37,7 +38,8 @@ import java.util.concurrent.TimeUnit;
...
@@ -37,7 +38,8 @@ import java.util.concurrent.TimeUnit;
@Service
@Service
public
class
GoLangDataAcquisitionServiceImpl
implements
GoLangDataAcquisitionService
{
public
class
GoLangDataAcquisitionServiceImpl
implements
GoLangDataAcquisitionService
{
//定时任务执行频率 当前为10分钟一次
//定时任务执行频率 当前为10分钟一次
private
final
String
dataRequstScheduled
=
"0 0/60 * * * *"
;
//锦浪云请求工具封装
//锦浪云请求工具封装
@Autowired
@Autowired
...
@@ -85,7 +87,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
...
@@ -85,7 +87,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
@Autowired
@Autowired
private
HYGFJPDayPowerMapper
hygfjpDayPowerMapper
;
private
HYGFJPDayPowerMapper
hygfjpDayPowerMapper
;
@Scheduled
(
cron
=
dataRequstScheduled
)
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Override
@Override
public
void
stationList
()
{
public
void
stationList
()
{
...
@@ -106,7 +108,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
...
@@ -106,7 +108,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
}
}
}
@Scheduled
(
cron
=
dataRequstScheduled
)
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Override
@Override
public
void
stationDetail
()
{
public
void
stationDetail
()
{
List
<
String
>
stationIds
=
golangStationMapper
.
getStationIds
();
List
<
String
>
stationIds
=
golangStationMapper
.
getStationIds
();
...
@@ -204,7 +206,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
...
@@ -204,7 +206,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
}
@Scheduled
(
cron
=
dataRequstScheduled
)
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Override
@Override
public
void
collectorList
()
{
public
void
collectorList
()
{
List
<
String
>
stationIds
=
golangStationMapper
.
getStationIds
();
List
<
String
>
stationIds
=
golangStationMapper
.
getStationIds
();
...
@@ -233,7 +235,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
...
@@ -233,7 +235,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
}
}
}
@Scheduled
(
cron
=
dataRequstScheduled
)
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Override
@Override
public
void
collectorDetail
()
{
public
void
collectorDetail
()
{
List
<
Long
>
collectorIds
=
golangCollectorListMapper
.
getCollectIds
();
List
<
Long
>
collectorIds
=
golangCollectorListMapper
.
getCollectIds
();
...
@@ -305,7 +307,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
...
@@ -305,7 +307,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
}
}
}
@Scheduled
(
cron
=
dataRequstScheduled
)
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Override
@Override
public
void
inverterList
()
{
public
void
inverterList
()
{
List
<
String
>
stationIds
=
golangStationMapper
.
getStationIds
();
List
<
String
>
stationIds
=
golangStationMapper
.
getStationIds
();
...
@@ -334,7 +336,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
...
@@ -334,7 +336,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
}
}
}
@Scheduled
(
cron
=
dataRequstScheduled
)
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Override
@Override
public
void
inverterDetail
()
{
public
void
inverterDetail
()
{
List
<
String
>
inverterSns
=
golangInverterListMapper
.
getInverterSns
();
List
<
String
>
inverterSns
=
golangInverterListMapper
.
getInverterSns
();
...
@@ -472,7 +474,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
...
@@ -472,7 +474,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
}
}
}
@Scheduled
(
cron
=
dataRequstScheduled
)
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Override
@Override
public
void
inverAlramInfo
()
{
public
void
inverAlramInfo
()
{
List
<
String
>
inverterIds
=
golangInverterListMapper
.
getInverterSns
();
List
<
String
>
inverterIds
=
golangInverterListMapper
.
getInverterSns
();
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/ImasterDataServiceImpl.java
View file @
6a458722
...
@@ -23,6 +23,7 @@ import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum;
...
@@ -23,6 +23,7 @@ import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum;
import
fastjson.JSON
;
import
fastjson.JSON
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
...
@@ -37,6 +38,8 @@ import java.util.stream.Collectors;
...
@@ -37,6 +38,8 @@ import java.util.stream.Collectors;
@Service
@Service
public
class
ImasterDataServiceImpl
implements
ImasterDataService
{
public
class
ImasterDataServiceImpl
implements
ImasterDataService
{
//北向请求工具封装
//北向请求工具封装
@Autowired
@Autowired
private
ImasterUtils
imasterUtils
;
private
ImasterUtils
imasterUtils
;
...
@@ -80,12 +83,6 @@ public class ImasterDataServiceImpl implements ImasterDataService {
...
@@ -80,12 +83,6 @@ public class ImasterDataServiceImpl implements ImasterDataService {
//定时任务执行频率 当前为10分钟一次
private
final
String
dataRequstScheduled
=
"0 0/60 * * * *"
;
//监盘场站mapper
//监盘场站mapper
@Autowired
@Autowired
private
JpStationMapper
jpStationMapper
;
private
JpStationMapper
jpStationMapper
;
...
@@ -120,7 +117,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
...
@@ -120,7 +117,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
JpInverterElectricityMapper
jpInverterElectricityMapper
;
JpInverterElectricityMapper
jpInverterElectricityMapper
;
@Scheduled
(
cron
=
dataRequstScheduled
)
@Scheduled
(
cron
=
"${dataRequstScheduled.huawei}"
)
@Override
@Override
public
void
stationList
()
{
public
void
stationList
()
{
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
...
@@ -140,7 +137,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
...
@@ -140,7 +137,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
}
}
@Scheduled
(
cron
=
dataRequstScheduled
)
@Scheduled
(
cron
=
"${dataRequstScheduled.huawei}"
)
@Override
@Override
public
void
stationDetail
()
{
public
void
stationDetail
()
{
...
@@ -295,7 +292,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
...
@@ -295,7 +292,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
}
}
@Scheduled
(
cron
=
dataRequstScheduled
)
@Scheduled
(
cron
=
"${dataRequstScheduled.huawei}"
)
@Override
@Override
public
void
collectorList
()
{
public
void
collectorList
()
{
List
<
String
>
stationIds
=
imasterStationMapper
.
getStationIds
();
List
<
String
>
stationIds
=
imasterStationMapper
.
getStationIds
();
...
@@ -387,7 +384,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
...
@@ -387,7 +384,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
}
}
@Scheduled
(
cron
=
dataRequstScheduled
)
@Scheduled
(
cron
=
"${dataRequstScheduled.huawei}"
)
@Override
@Override
public
void
inverterList
()
{
public
void
inverterList
()
{
List
<
String
>
stationIds
=
imasterStationMapper
.
getStationIds
();
List
<
String
>
stationIds
=
imasterStationMapper
.
getStationIds
();
...
@@ -425,7 +422,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
...
@@ -425,7 +422,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
}
}
@Scheduled
(
cron
=
dataRequstScheduled
)
@Scheduled
(
cron
=
"${dataRequstScheduled.huawei}"
)
@Override
@Override
public
void
inverterDetail
()
{
public
void
inverterDetail
()
{
List
<
String
>
inverterSns
=
imasterInverterListMapper
.
getCollectIds
();
List
<
String
>
inverterSns
=
imasterInverterListMapper
.
getCollectIds
();
...
@@ -675,7 +672,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
...
@@ -675,7 +672,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
}
}
@Scheduled
(
cron
=
dataRequstScheduled
)
@Scheduled
(
cron
=
"${dataRequstScheduled.huawei}"
)
@Override
@Override
public
void
inverAlramInfo
()
{
public
void
inverAlramInfo
()
{
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/KsolarDataAcquisitionServiceImpl.java
View file @
6a458722
This diff is collapsed.
Click to expand it.
amos-boot-data/amos-boot-data-housepvapi/src/main/resources/application-dev.properties
View file @
6a458722
...
@@ -65,4 +65,10 @@ spring.influx.database=station_platform
...
@@ -65,4 +65,10 @@ spring.influx.database=station_platform
spring.influx.retention_policy
=
default
spring.influx.retention_policy
=
default
spring.influx.retention_policy_time
=
30d
spring.influx.retention_policy_time
=
30d
spring.influx.actions
=
10000
spring.influx.actions
=
10000
spring.influx.bufferLimit
=
20000
spring.influx.bufferLimit
=
20000
\ No newline at end of file
# ??????????
dataRequstScheduled.jinlangyun
=
0 0/10 * * * *
dataRequstScheduled.huawei
=
0 0/10 * * * *
dataRequstScheduled.keshida
=
0 0/10 * * * *
\ No newline at end of file
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