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
2dd4708f
Commit
2dd4708f
authored
Sep 22, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
锦浪云-日发电量增加格式转换、入库代码调整
parent
94254d38
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
12 deletions
+15
-12
GoLangConstant.java
...eejoin/amos/api/householdapi/constant/GoLangConstant.java
+1
-0
HouseholdTestController.java
.../api/householdapi/controller/HouseholdTestController.java
+2
-1
HYGFJPDayPower.java
...pi/face/orm/houseapi/entity/tdeingine/HYGFJPDayPower.java
+4
-2
GoLangDataAcquisitionServiceImpl.java
...i/face/service/impl/GoLangDataAcquisitionServiceImpl.java
+8
-9
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/constant/GoLangConstant.java
View file @
2dd4708f
...
@@ -56,4 +56,5 @@ public class GoLangConstant {
...
@@ -56,4 +56,5 @@ public class GoLangConstant {
public
static
String
requestPost
=
"POST"
;
public
static
String
requestPost
=
"POST"
;
public
static
String
datePattern
=
"yyyy-MM-dd HH:mm:ss.SSS"
;
public
static
String
datePattern
=
"yyyy-MM-dd HH:mm:ss.SSS"
;
public
static
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
datePattern
);
public
static
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
datePattern
);
public
static
Double
kwhToMwh
=
0.0001
;
}
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/controller/HouseholdTestController.java
View file @
2dd4708f
...
@@ -56,10 +56,11 @@ public class HouseholdTestController {
...
@@ -56,10 +56,11 @@ public class HouseholdTestController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"锦浪云"
,
notes
=
"锦浪云"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"锦浪云"
,
notes
=
"锦浪云"
)
public
void
golangnew
()
throws
IOException
{
public
void
golangnew
()
throws
IOException
{
// goLangDataAcquisitionService.stationList();
// goLangDataAcquisitionService.stationList();
goLangDataAcquisitionService
.
stationDetail
();
// goLangDataAcquisitionService.collectorList();
// goLangDataAcquisitionService.collectorList();
//// goLangDataAcquisitionService.inverterList();
//// goLangDataAcquisitionService.inverterList();
// goLangDataAcquisitionService.collectorDetail();
// goLangDataAcquisitionService.collectorDetail();
goLangDataAcquisitionService
.
inverterDetail
();
//
goLangDataAcquisitionService.inverterDetail();
// goLangDataAcquisitionService.inverAlramInfo();
// goLangDataAcquisitionService.inverAlramInfo();
}
}
}
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/houseapi/entity/tdeingine/HYGFJPDayPower.java
View file @
2dd4708f
...
@@ -3,9 +3,11 @@ package com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine;
...
@@ -3,9 +3,11 @@ package com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
@Data
@TableName
(
value
=
"td_hygf_day_power"
,
autoResultMap
=
true
)
@TableName
(
value
=
"td_hygf_day_power"
,
autoResultMap
=
true
)
public
class
HYGFJPDayPower
{
public
class
HYGFJPDayPower
implements
Serializable
{
private
Long
createdTime
;
private
Long
createdTime
;
private
String
tationId
;
private
String
tationId
;
private
String
hour
;
private
String
hour
;
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/GoLangDataAcquisitionServiceImpl.java
View file @
2dd4708f
...
@@ -40,7 +40,7 @@ import java.util.concurrent.TimeUnit;
...
@@ -40,7 +40,7 @@ import java.util.concurrent.TimeUnit;
@Service
@Service
public
class
GoLangDataAcquisitionServiceImpl
implements
GoLangDataAcquisitionService
{
public
class
GoLangDataAcquisitionServiceImpl
implements
GoLangDataAcquisitionService
{
private
final
String
dataRequstScheduled
=
"0 0/10 * * * *"
;
private
final
String
dataRequstScheduled
=
"0 0/10 * * * *"
;
private
final
String
stationPowerScheduled
=
"0 0 * * * *"
;
@Autowired
@Autowired
private
GolangRequestUtil
golangRequestUtil
;
private
GolangRequestUtil
golangRequestUtil
;
@Autowired
@Autowired
...
@@ -142,7 +142,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
...
@@ -142,7 +142,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
jpStation
.
setThirdCode
(
PVProducerInfoEnum
.
JLY
.
getCode
());
jpStation
.
setThirdCode
(
PVProducerInfoEnum
.
JLY
.
getCode
());
jpStation
.
setRealTimePower
(
golangStationDetail
.
getPower
());
jpStation
.
setRealTimePower
(
golangStationDetail
.
getPower
());
jpStation
.
setState
(
GoLangConstant
.
intoNetWorkStatus
.
get
(
String
.
valueOf
(
golangStationDetail
.
getStationtypenew
())));
jpStation
.
setState
(
GoLangConstant
.
intoNetWorkStatus
.
get
(
String
.
valueOf
(
golangStationDetail
.
getStationtypenew
())));
jpStation
.
setDayGenerate
(
golangStationDetail
.
getDayenergy
());
jpStation
.
setDayGenerate
(
golangStationDetail
.
getDayenergy
()
*
GoLangConstant
.
kwhToMwh
);
jpStation
.
setMonthGenerate
(
golangStationDetail
.
getMonthenergy
());
jpStation
.
setMonthGenerate
(
golangStationDetail
.
getMonthenergy
());
jpStation
.
setYearGenerate
(
golangStationDetail
.
getYearenergy
());
jpStation
.
setYearGenerate
(
golangStationDetail
.
getYearenergy
());
jpStation
.
setDayIncome
(
golangStationDetail
.
getDayincome
());
jpStation
.
setDayIncome
(
golangStationDetail
.
getDayincome
());
...
@@ -162,16 +162,16 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
...
@@ -162,16 +162,16 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpStationPowerHistory
.
setThirdCode
(
jpStation
.
getThirdCode
());
hygfjpStationPowerHistory
.
setThirdCode
(
jpStation
.
getThirdCode
());
hygfjpStationPowerHistory
.
setTime
(
System
.
currentTimeMillis
());
hygfjpStationPowerHistory
.
setTime
(
System
.
currentTimeMillis
());
hygfjpStationPowerHistoryMapper
.
insert
(
hygfjpStationPowerHistory
);
hygfjpStationPowerHistoryMapper
.
insert
(
hygfjpStationPowerHistory
);
HYGFJPDayPower
hygfjpDayPower
=
hygfjpDayPowerMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPDayPower
>().
HYGFJPDayPower
hygfjpDayPower
=
hygfjpDayPowerMapper
.
selectOne
(
eq
(
"tation_id"
,
String
.
valueOf
(
golangStationDetail
.
getId
())).
new
QueryWrapper
<
HYGFJPDayPower
>().
eq
(
"tation_id"
,
stationIds
.
get
(
i
)).
eq
(
"year_month_day"
,
today
).
eq
(
"year_month_day"
,
today
).
eq
(
"hour"
,
hour
)
eq
(
"hour"
,
hour
)
);
);
if
(
ObjectUtils
.
isEmpty
(
hygfjpDayPower
))
{
if
(
ObjectUtils
.
isEmpty
(
hygfjpDayPower
))
{
hygfjpDayPower
=
new
HYGFJPDayPower
();
hygfjpDayPower
=
new
HYGFJPDayPower
();
}
}
hygfjpDayPower
=
new
HYGFJPDayPower
();
hygfjpDayPower
.
setTationId
(
stationIds
.
get
(
i
));
hygfjpDayPower
.
setTationId
(
String
.
valueOf
(
golangStationDetail
.
getId
()));
hygfjpDayPower
.
setHour
(
hour
);
hygfjpDayPower
.
setHour
(
hour
);
hygfjpDayPower
.
setYearMonthDay
(
today
);
hygfjpDayPower
.
setYearMonthDay
(
today
);
hygfjpDayPower
.
setPower
(
golangStationDetail
.
getPower
());
hygfjpDayPower
.
setPower
(
golangStationDetail
.
getPower
());
...
@@ -346,7 +346,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
...
@@ -346,7 +346,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
jpInverter
.
setCollectorSnCode
(
inverterDetailDto
.
getCollectorsn
());
jpInverter
.
setCollectorSnCode
(
inverterDetailDto
.
getCollectorsn
());
jpInverter
.
setUpdateTime
(
new
Date
());
jpInverter
.
setUpdateTime
(
new
Date
());
jpInverter
.
setCurrentPower
(
inverterDetailDto
.
getPac
());
jpInverter
.
setCurrentPower
(
inverterDetailDto
.
getPac
());
jpInverter
.
setDayPowerGeneration
(
inverterDetailDto
.
getEToday
());
jpInverter
.
setDayPowerGeneration
(
inverterDetailDto
.
getEToday
()
*
GoLangConstant
.
kwhToMwh
);
jpInverter
.
setMonthPowerGeneration
(
inverterDetailDto
.
getEMonth
());
jpInverter
.
setMonthPowerGeneration
(
inverterDetailDto
.
getEMonth
());
jpInverter
.
setYearPowerGeneration
(
inverterDetailDto
.
getEYear
());
jpInverter
.
setYearPowerGeneration
(
inverterDetailDto
.
getEYear
());
jpInverter
.
setTotalPowerGeneration
(
inverterDetailDto
.
getETotal
());
jpInverter
.
setTotalPowerGeneration
(
inverterDetailDto
.
getETotal
());
...
@@ -436,8 +436,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
...
@@ -436,8 +436,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpInverterHistory
.
setSnCode
(
inverterDetailDto
.
getSn
());
hygfjpInverterHistory
.
setSnCode
(
inverterDetailDto
.
getSn
());
hygfjpInverterHistory
.
setThirdCode
(
PVProducerInfoEnum
.
JLY
.
getCode
());
hygfjpInverterHistory
.
setThirdCode
(
PVProducerInfoEnum
.
JLY
.
getCode
());
hygfjpInverterHistory
.
setGenerationHours
(
inverterDetailDto
.
getFullHour
());
hygfjpInverterHistory
.
setGenerationHours
(
inverterDetailDto
.
getFullHour
());
hygfjpInverterHistory
.
setPowerGeneration
(
inverterDetailDto
.
getEToday
());
hygfjpInverterHistory
.
setPowerGeneration
(
inverterDetailDto
.
getEToday
()*
GoLangConstant
.
kwhToMwh
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
GoLangConstant
.
datePattern
);
if
(
ObjectUtils
.
isEmpty
(
hygfjpInverterHistory
.
getCreatedTime
()))
{
if
(
ObjectUtils
.
isEmpty
(
hygfjpInverterHistory
.
getCreatedTime
()))
{
hygfjpInverterHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpInverterHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpInverterHistoryMapper
.
insert
(
hygfjpInverterHistory
);
hygfjpInverterHistoryMapper
.
insert
(
hygfjpInverterHistory
);
...
...
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