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
672698f3
Commit
672698f3
authored
Mar 08, 2024
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
户用光伏数据采集新灌入月、年发电量
parent
863a80ff
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
6 deletions
+76
-6
GoodWeConstant.java
...eejoin/amos/api/householdapi/constant/GoodWeConstant.java
+1
-0
GoodWEGenStation.java
...join/amos/api/householdapi/face/dto/GoodWEGenStation.java
+10
-0
GoodWeDataAcquisitionService.java
...useholdapi/face/service/GoodWeDataAcquisitionService.java
+7
-0
GoodWeDataAcquisitionServiceImpl.java
...i/face/service/impl/GoodWeDataAcquisitionServiceImpl.java
+58
-6
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/constant/GoodWeConstant.java
View file @
672698f3
...
...
@@ -172,6 +172,7 @@ public class GoodWeConstant {
public
static
String
stationListUrl
=
"/api/OpenApi/GetUserPowerStation"
;
public
static
String
stationListStatusUrl
=
"/api/OpenApi/QueryPowerStationMonitor"
;
public
static
String
stationDetailUrl
=
"/api/OpenApi/GetPowerStationMonitorDetail"
;
public
static
String
stationGenUrl
=
"/api/OpenApi/GetPowerStationPower"
;
public
static
String
collectorListUrl
=
"/v1/api/collectorList"
;
public
static
String
collectorDetailUrl
=
"/v1/api/collectorDetail"
;
public
static
String
queryInventerUrl
=
"/api/OpenApi/QueryInventers"
;
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/dto/GoodWEGenStation.java
0 → 100644
View file @
672698f3
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
dto
;
import
lombok.Data
;
@Data
public
class
GoodWEGenStation
{
private
String
date
;
private
String
power
;
private
String
income
;
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/GoodWeDataAcquisitionService.java
View file @
672698f3
...
...
@@ -9,6 +9,9 @@ public interface GoodWeDataAcquisitionService {
* @descrption 场站详情数据入库
*/
void
stationDetail
();
void
stationMonthGen
();
void
stationYearGen
();
/**
* @descrption 采集器列表数据入库
*/
...
...
@@ -25,6 +28,10 @@ public interface GoodWeDataAcquisitionService {
* @descrption 逆变器详情数据入库
*/
void
inverterDetail
();
void
inverterMonthGen
();
void
inverterYearGen
();
/**
* @descrption 采集器告警列表数据入库
*/
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/GoodWeDataAcquisitionServiceImpl.java
View file @
672698f3
...
...
@@ -104,12 +104,6 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
jpStation
.
setState
(
GoodWeConstant
.
stationStaus
.
get
(
goodWeStationList
.
getStatus
()));
jpStation
.
setDayGenerate
(
goodWeStationList
.
getEday
());
jpStation
.
setDayIncome
(
goodWeStationList
.
getEday_income
());
jpStation
.
setMonthGenerate
(
goodWeStationList
.
getEmonth
());
if
(
ObjectUtils
.
isNotEmpty
(
goodWeStationList
.
getEmonth
())){
jpStation
.
setMonthIncome
(
goodWeStationList
.
getEmonth
()*
jpStation
.
getPrice
());
}
jpStation
.
setYearGenerate
(
0.0
);
jpStation
.
setYearIncome
(
0.0
);
jpStation
.
setAccumulatedPower
(
goodWeStationList
.
getEtotal
());
jpStation
.
setCumulativeIncome
(
goodWeStationList
.
getEtotal_income
());
if
(
ObjectUtils
.
isEmpty
(
jpStation
.
getSequenceNbr
())){
...
...
@@ -242,10 +236,58 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
}
});
}
@Override
public
void
stationMonthGen
()
{
List
<
String
>
stationIds
=
goodWeStationMonitorListMapper
.
getStationIds
();
stationIds
.
forEach
(
stationId
->{
String
currentMonth
=
DateUtil
.
format
(
new
Date
(),
"yyyyMM"
);
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
requestInfo
.
put
(
"id"
,
stationId
);
requestInfo
.
put
(
"date"
,
DateUtil
.
today
());
requestInfo
.
put
(
"count"
,
0
);
requestInfo
.
put
(
"type"
,
1
);
String
requstParam
=
JSON
.
toJSONString
(
requestInfo
);
List
<
GoodWEGenStation
>
goodWEGenStations
=
goodWeRequestUtil
.
getResPonse
(
GoodWeConstant
.
stationGenUrl
,
GoodWeConstant
.
requestPost
,
requstParam
,
GoodWeConstant
.
resovleRule_data
,
GoodWEGenStation
.
class
);
List
<
GoodWEGenStation
>
currentMonthGenStations
=
goodWEGenStations
.
stream
().
filter
(
goodWEGenStation
->
goodWEGenStation
.
getDate
().
equals
(
currentMonth
)).
collect
(
Collectors
.
toList
());
currentMonthGenStations
.
forEach
(
goodWEGenStation
->
{
JpStation
jpStation
=
jpStationMapper
.
selectOne
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
GDW
.
getCode
()).
eq
(
"third_station_id"
,
stationId
));
if
(
ObjectUtils
.
isNotEmpty
(
jpStation
)){
jpStation
.
setMonthGenerate
(
Double
.
parseDouble
(
goodWEGenStation
.
getPower
()));
jpStation
.
setMonthIncome
(
jpStation
.
getMonthGenerate
()*
0.42
);
jpStationMapper
.
updateById
(
jpStation
);
}
});
});
}
@Override
public
void
stationYearGen
()
{
List
<
String
>
stationIds
=
goodWeStationMonitorListMapper
.
getStationIds
();
stationIds
.
forEach
(
stationId
->{
String
currentYear
=
DateUtil
.
format
(
new
Date
(),
"yyyy"
);
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
requestInfo
.
put
(
"id"
,
stationId
);
requestInfo
.
put
(
"date"
,
DateUtil
.
today
());
requestInfo
.
put
(
"count"
,
0
);
requestInfo
.
put
(
"type"
,
2
);
String
requstParam
=
JSON
.
toJSONString
(
requestInfo
);
List
<
GoodWEGenStation
>
goodWEGenStations
=
goodWeRequestUtil
.
getResPonse
(
GoodWeConstant
.
stationGenUrl
,
GoodWeConstant
.
requestPost
,
requstParam
,
GoodWeConstant
.
resovleRule_data
,
GoodWEGenStation
.
class
);
List
<
GoodWEGenStation
>
currentMonthGenStations
=
goodWEGenStations
.
stream
().
filter
(
goodWEGenStation
->
goodWEGenStation
.
getDate
().
equals
(
currentYear
)).
collect
(
Collectors
.
toList
());
currentMonthGenStations
.
forEach
(
goodWEGenStation
->
{
JpStation
jpStation
=
jpStationMapper
.
selectOne
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
GDW
.
getCode
()).
eq
(
"third_station_id"
,
stationId
));
if
(
ObjectUtils
.
isNotEmpty
(
jpStation
)){
jpStation
.
setYearGenerate
(
Double
.
parseDouble
(
goodWEGenStation
.
getPower
()));
jpStation
.
setYearIncome
(
jpStation
.
getYearGenerate
()*
0.42
);
jpStationMapper
.
updateById
(
jpStation
);
}
});
});
}
@Override
public
void
collectorList
()
{
}
...
...
@@ -309,6 +351,16 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
}
@Override
public
void
inverterMonthGen
()
{
}
@Override
public
void
inverterYearGen
()
{
}
@Override
public
void
inverAlramInfo
()
{
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
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