Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gf_back
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tianchao
gf_back
Commits
433a818a
Commit
433a818a
authored
Dec 17, 2024
by
ZWT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
得到的
parent
ad1e1c31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
61 deletions
+0
-61
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/ThirdDataAccessCloudServiceImpl.java
...e/prediction/service/ThirdDataAccessCloudServiceImpl.java
+0
-61
No files found.
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/ThirdDataAccessCloudServiceImpl.java
View file @
433a818a
...
...
@@ -55,67 +55,6 @@ import java.util.stream.Collectors;
@XService
public
class
ThirdDataAccessCloudServiceImpl
implements
IThirdDataAccessCloudService
{
public
XServiceResult
test
(
XContext
context
)
{
//条件查询实际功率
IThirdActivePowerCloudService
service
=
context
.
getBean
(
IThirdActivePowerCloudService
.
class
);
XListResult
<
pps
.
cloud
.
middle
.
service
.
data
.
third_active_power
.
GetThirdActivePowerViewOutput
>
result
=
service
.
getThirdActivePowerList
(
context
,
GetThirdActivePowerViewInput
.
builder
()
.
build
());
result
.
throwIfFail
();
List
<
GetThirdActivePowerViewOutput
>
outputs
=
XCopyUtils
.
copyNewList
(
result
.
getResult
(),
GetThirdActivePowerViewOutput
.
class
);
//数据处理
if
(
CollUtil
.
isEmpty
(
outputs
))
{
return
XServiceResult
.
OK
;
}
Map
<
String
,
String
>
collect
=
this
.
getPhotovoltaicPlantMap
(
context
);
List
<
ThirdActivePowerView
>
dtoList
=
new
ArrayList
<>(
outputs
.
size
());
List
<
ThirdActivePowerDailyUpdateView
>
dtoDailyList
=
new
ArrayList
<>(
outputs
.
size
());
DateTime
now
=
DateTime
.
now
();
DateTime
saveDate
=
DateUtil
.
beginOfDay
(
now
);
DateTime
saveHour
=
DateUtil
.
beginOfHour
(
now
);
LambdaQueryWrapper
<
ThirdActivePowerEnt
>
queryWrapper
=
new
LambdaQueryWrapper
<
ThirdActivePowerEnt
>()
.
select
(
ThirdActivePowerEnt:
:
getId
);
for
(
GetThirdActivePowerViewOutput
o
:
outputs
)
{
BigDecimal
photovoltaicPower
=
Optional
.
ofNullable
(
o
.
getPhotovoltaicPower
())
.
orElse
(
BigDecimal
.
ZERO
)
.
abs
();
BigDecimal
meterPower
=
Optional
.
ofNullable
(
o
.
getMeterPower
())
.
orElse
(
BigDecimal
.
ZERO
)
.
abs
();
dtoList
.
add
(
ThirdActivePowerView
.
builder
()
.
id
(
BaseUtils
.
randomUUIDString
())
.
stationName
(
o
.
getStationName
())
.
stationId
(
collect
.
get
(
o
.
getStationName
()))
.
createDate
(
o
.
getCreateDate
())
.
photovoltaicPower
(
photovoltaicPower
)
.
meterPower
(
meterPower
)
.
systemSource
(
"SY"
)
.
inputTime
(
now
)
.
build
()
);
queryWrapper
.
or
(
w
->
w
.
eq
(
ThirdActivePowerEnt:
:
getStationName
,
o
.
getStationName
())
.
eq
(
ThirdActivePowerEnt:
:
getCreateDate
,
o
.
getCreateDate
())
.
eq
(
ThirdActivePowerEnt:
:
getPhotovoltaicPower
,
photovoltaicPower
)
.
eq
(
ThirdActivePowerEnt:
:
getMeterPower
,
meterPower
)
.
eq
(
ThirdActivePowerEnt:
:
getSystemSource
,
"SY"
)
);
dtoDailyList
.
add
(
ThirdActivePowerDailyUpdateView
.
builder
()
.
id
(
BaseUtils
.
randomUUIDString
())
.
stationName
(
o
.
getStationName
())
.
stationId
(
collect
.
get
(
o
.
getStationName
()))
.
createDate
(
o
.
getCreateDate
())
.
photovoltaicPower
(
photovoltaicPower
)
.
meterPower
(
meterPower
)
.
systemSource
(
"SY"
)
.
saveDate
(
saveDate
)
.
saveHour
(
saveHour
)
.
build
()
);
}
return
this
.
batchInsertThirdActive
(
context
,
queryWrapper
,
saveHour
,
dtoList
,
dtoDailyList
);
}
/**
* 第三方有功功率定时任务
*
...
...
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