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
42d6aa9d
Commit
42d6aa9d
authored
Dec 17, 2024
by
ZWT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
得到的
parent
30c7fd52
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
82 deletions
+1
-82
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/PlantPredictedPowerCloudServiceImpl.java
...ediction/service/PlantPredictedPowerCloudServiceImpl.java
+1
-82
No files found.
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/PlantPredictedPowerCloudServiceImpl.java
View file @
42d6aa9d
...
...
@@ -194,87 +194,6 @@ public class PlantPredictedPowerCloudServiceImpl implements IPlantPredictedPower
GetPredictedPowerViewOutput
.
class
));
}
public
XServiceResult
test
(
XContext
context
)
{
List
<
WellheadDailyProductionSituationJob
>
list
=
null
;
IWellDailyProductionSituationCloudService
service
=
context
.
getBean
(
IWellDailyProductionSituationCloudService
.
class
);
XListResult
<
GetWellheadDailyProductionSituationOutput
>
result
=
service
.
getWellDailyProductionSituationList
(
context
,
GetWellheadDailyProductionSituationInput
.
builder
()
.
build
());
result
.
throwIfFail
();
List
<
GetWellheadDailyProductionSituationOutput
>
dailyList
=
result
.
getResult
();
if
(
CollUtil
.
isNotEmpty
(
dailyList
))
{
list
=
new
ArrayList
<>(
dailyList
.
size
());
for
(
GetWellheadDailyProductionSituationOutput
output
:
dailyList
)
{
list
.
add
(
WellheadDailyProductionSituationJob
.
builder
()
.
wellNumber
(
output
.
getWellNumber
())
.
dataDate
(
DateUtil
.
parseDate
(
output
.
getDataDate
()))
.
dailyLiquidProduction
(
output
.
getDailyLiquidProduction
())
.
productionTime
(
output
.
getProductionTime
())
.
dailyElectricityConsumption
(
output
.
getDailyElectricityConsumption
())
.
dailyUtilityElectricityConsumption
(
output
.
getDailyUtilityElectricityConsumption
())
.
electricityConsumptionPh
(
output
.
getElectricityConsumptionPh
())
.
electricityConsumptionHh
(
output
.
getElectricityConsumptionHh
())
.
electricityConsumptionNp
(
output
.
getElectricityConsumptionNp
())
.
electricityConsumptionVh
(
output
.
getElectricityConsumptionVh
())
.
electricityChargeCity
(
output
.
getElectricityChargeCity
())
.
electricityChargesPh
(
output
.
getElectricityChargesPh
())
.
peakHourTariff
(
output
.
getPeakHourTariff
())
.
normalPeriodTariff
(
output
.
getNormalPeriodTariff
())
.
alleyHoursTariff
(
output
.
getAlleyHoursTariff
())
.
build
()
);
}
}
if
(
CollUtil
.
isEmpty
(
list
))
{
return
XServiceResult
.
OK
;
}
List
<
String
>
collect
=
list
.
stream
()
.
map
(
WellheadDailyProductionSituationJob:
:
getWellNumber
)
.
collect
(
Collectors
.
toList
());
Map
<
String
,
String
>
map
=
ServiceUtil
.
getBaseWellheadList
(
context
,
DynamicQueryBaseWellheadInput
.
builder
()
.
wellNumbers
(
collect
)
.
build
()).
stream
()
.
collect
(
Collectors
.
toMap
(
DynamicQueryBaseWellheadOutput:
:
getWellNumber
,
DynamicQueryBaseWellheadOutput:
:
getId
));
DateTime
now
=
DateUtil
.
date
();
List
<
WellheadDailyProductionSituationView
>
dtoList
=
new
ArrayList
<>(
list
.
size
());
for
(
WellheadDailyProductionSituationJob
wellhead
:
list
)
{
dtoList
.
add
(
WellheadDailyProductionSituationView
.
builder
()
.
id
(
BaseUtils
.
randomUUIDString
())
.
wellNumber
(
wellhead
.
getWellNumber
())
.
dataDate
(
wellhead
.
getDataDate
())
.
dailyLiquidProduction
(
ObjectUtil
.
defaultIfNull
(
wellhead
.
getDailyLiquidProduction
(),
BigDecimal
.
ZERO
))
.
productionTime
(
ObjectUtil
.
defaultIfNull
(
wellhead
.
getProductionTime
(),
BigDecimal
.
ZERO
))
.
dailyElectricityConsumption
(
ObjectUtil
.
defaultIfNull
(
wellhead
.
getDailyElectricityConsumption
(),
BigDecimal
.
ZERO
))
.
wellheadId
(
map
.
get
(
wellhead
.
getWellNumber
()))
.
dailyUtilityElectricityConsumption
(
ObjectUtil
.
defaultIfNull
(
wellhead
.
getDailyUtilityElectricityConsumption
(),
BigDecimal
.
ZERO
))
.
electricityConsumptionPh
(
ObjectUtil
.
defaultIfNull
(
wellhead
.
getElectricityConsumptionPh
(),
BigDecimal
.
ZERO
))
.
electricityConsumptionHh
(
ObjectUtil
.
defaultIfNull
(
wellhead
.
getElectricityConsumptionHh
(),
BigDecimal
.
ZERO
))
.
electricityConsumptionNp
(
ObjectUtil
.
defaultIfNull
(
wellhead
.
getElectricityConsumptionNp
(),
BigDecimal
.
ZERO
))
.
electricityConsumptionVh
(
ObjectUtil
.
defaultIfNull
(
wellhead
.
getElectricityConsumptionVh
(),
BigDecimal
.
ZERO
))
.
electricityChargeCity
(
ObjectUtil
.
defaultIfNull
(
wellhead
.
getElectricityChargeCity
(),
BigDecimal
.
ZERO
))
.
electricityChargesPh
(
ObjectUtil
.
defaultIfNull
(
wellhead
.
getElectricityChargesPh
(),
BigDecimal
.
ZERO
))
.
peakHourTariff
(
ObjectUtil
.
defaultIfNull
(
wellhead
.
getPeakHourTariff
(),
BigDecimal
.
ZERO
))
.
normalPeriodTariff
(
ObjectUtil
.
defaultIfNull
(
wellhead
.
getNormalPeriodTariff
(),
BigDecimal
.
ZERO
))
.
alleyHoursTariff
(
ObjectUtil
.
defaultIfNull
(
wellhead
.
getAlleyHoursTariff
(),
BigDecimal
.
ZERO
))
.
systemSource
(
"SY"
)
.
createDate
(
now
)
.
build
()
);
}
return
XTransactionHelper
.
begin
(
context
,
()
->
{
WellheadDailyProductionSituationViewMapper
mapper
=
context
.
getBean
(
WellheadDailyProductionSituationViewMapper
.
class
);
if
(
CollUtil
.
isNotEmpty
(
dtoList
))
{
if
(
dtoList
.
size
()
>
BaseUtils
.
BATCH_SIZE
)
{
List
<
List
<
WellheadDailyProductionSituationView
>>
subList
=
BaseUtils
.
getSubList
(
dtoList
);
subList
.
forEach
(
mapper:
:
batchInsertList
);
}
else
{
mapper
.
batchInsertList
(
dtoList
);
}
}
return
XServiceResult
.
OK
;
});
}
/**
* 日耗电日产液信息定时任务
*
...
...
@@ -335,7 +254,7 @@ public class PlantPredictedPowerCloudServiceImpl implements IPlantPredictedPower
default
:
}
if
(
CollUtil
.
isEmpty
(
list
))
{
context
.
getLogger
().
info
(
"------ WellTechDailyJob 未发现数据: {}"
,
DateUtil
.
yesterday
().
to
String
(
"yyyy-MM-dd"
));
context
.
getLogger
().
info
(
"------ WellTechDailyJob 未发现数据: {}"
,
DateUtil
.
yesterday
().
to
DateStr
(
));
return
XServiceResult
.
OK
;
}
List
<
String
>
collect
=
list
.
stream
()
...
...
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