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
fec7e7a7
Commit
fec7e7a7
authored
Mar 18, 2024
by
ZWT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nocommit
parent
6121514d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
92 additions
and
378 deletions
+92
-378
C09-base/pps-cloud-base/src/main/java/pps/cloud/base/service/data/base_wellhead/DynamicQueryBaseWellheadInput.java
...ice/data/base_wellhead/DynamicQueryBaseWellheadInput.java
+3
-0
C09-base/pps-core-base/src/main/java/pps/core/base/service/BaseWellheadCloudServiceImpl.java
...a/pps/core/base/service/BaseWellheadCloudServiceImpl.java
+2
-0
C10-task/pps-core-task/src/main/java/pps/core/task/job/WellTechDailyJob.java
...ask/src/main/java/pps/core/task/job/WellTechDailyJob.java
+1
-1
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/entity/WellheadDailyProductionSituationEnt.java
...rediction/entity/WellheadDailyProductionSituationEnt.java
+6
-0
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/entity/WellheadDailyProductionSituationView.java
...ediction/entity/WellheadDailyProductionSituationView.java
+6
-0
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/mapper/WellheadDailyProductionSituationViewMapper.java
...on/mapper/WellheadDailyProductionSituationViewMapper.java
+9
-0
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/PlantPredictedPowerCloudServiceImpl.java
...ediction/service/PlantPredictedPowerCloudServiceImpl.java
+49
-377
C12-prediction/pps-core-prediction/src/main/resources/mybatis/mapper/pps/core/prediction/WellheadDailyProductionSituationViewMapper.xml
...prediction/WellheadDailyProductionSituationViewMapper.xml
+16
-0
No files found.
C09-base/pps-cloud-base/src/main/java/pps/cloud/base/service/data/base_wellhead/DynamicQueryBaseWellheadInput.java
View file @
fec7e7a7
...
@@ -25,4 +25,7 @@ public class DynamicQueryBaseWellheadInput {
...
@@ -25,4 +25,7 @@ public class DynamicQueryBaseWellheadInput {
@XText
(
"井口ID集合"
)
@XText
(
"井口ID集合"
)
private
List
<
String
>
wellheadIds
;
private
List
<
String
>
wellheadIds
;
@XText
(
"井号名称集合"
)
private
List
<
String
>
wellNumbers
;
}
}
C09-base/pps-core-base/src/main/java/pps/core/base/service/BaseWellheadCloudServiceImpl.java
View file @
fec7e7a7
...
@@ -38,12 +38,14 @@ public class BaseWellheadCloudServiceImpl implements IBaseWellheadCloudService {
...
@@ -38,12 +38,14 @@ public class BaseWellheadCloudServiceImpl implements IBaseWellheadCloudService {
public
XListResult
<
DynamicQueryBaseWellheadOutput
>
queryBaseWellheadListByParam
(
XContext
context
,
DynamicQueryBaseWellheadInput
input
)
{
public
XListResult
<
DynamicQueryBaseWellheadOutput
>
queryBaseWellheadListByParam
(
XContext
context
,
DynamicQueryBaseWellheadInput
input
)
{
String
wellheadId
=
input
.
getWellheadId
();
String
wellheadId
=
input
.
getWellheadId
();
List
<
String
>
wellheadIds
=
input
.
getWellheadIds
();
List
<
String
>
wellheadIds
=
input
.
getWellheadIds
();
List
<
String
>
wellNumbers
=
input
.
getWellNumbers
();
BaseWellheadMapper
mapper
=
context
.
getBean
(
BaseWellheadMapper
.
class
);
BaseWellheadMapper
mapper
=
context
.
getBean
(
BaseWellheadMapper
.
class
);
List
<
BaseWellheadEnt
>
list
=
mapper
.
selectList
(
List
<
BaseWellheadEnt
>
list
=
mapper
.
selectList
(
new
LambdaQueryWrapper
<
BaseWellheadEnt
>()
new
LambdaQueryWrapper
<
BaseWellheadEnt
>()
.
eq
(
BaseModel:
:
getIsDeleted
,
BusinessConstant
.
ONE
)
.
eq
(
BaseModel:
:
getIsDeleted
,
BusinessConstant
.
ONE
)
.
eq
(
StringUtils
.
isNotBlank
(
wellheadId
),
BaseModel:
:
getId
,
wellheadId
)
.
eq
(
StringUtils
.
isNotBlank
(
wellheadId
),
BaseModel:
:
getId
,
wellheadId
)
.
in
(
CollUtil
.
isNotEmpty
(
wellheadIds
),
BaseModel:
:
getId
,
wellheadIds
)
.
in
(
CollUtil
.
isNotEmpty
(
wellheadIds
),
BaseModel:
:
getId
,
wellheadIds
)
.
in
(
CollUtil
.
isNotEmpty
(
wellNumbers
),
BaseWellheadEnt:
:
getWellNumber
,
wellNumbers
)
);
);
List
<
DynamicQueryBaseWellheadOutput
>
outputs
;
List
<
DynamicQueryBaseWellheadOutput
>
outputs
;
if
(
CollUtil
.
isEmpty
(
list
))
{
if
(
CollUtil
.
isEmpty
(
list
))
{
...
...
C10-task/pps-core-task/src/main/java/pps/core/task/job/WellTechDailyJob.java
View file @
fec7e7a7
...
@@ -27,7 +27,7 @@ public class WellTechDailyJob implements XJob {
...
@@ -27,7 +27,7 @@ public class WellTechDailyJob implements XJob {
* @param xContext x上下文
* @param xContext x上下文
* @return {@link XServiceResult}
* @return {@link XServiceResult}
*/
*/
@XCronTrigger
(
value
=
TaskConstant
.
EVERY_DAY_ZERO
)
@XCronTrigger
(
value
=
XCronTrigger
.
PRE_10S
)
@Override
@Override
public
XServiceResult
execute
(
XContext
xContext
)
{
public
XServiceResult
execute
(
XContext
xContext
)
{
xContext
.
getLogger
().
info
(
"------ WellTechDailyJob start:{}"
,
System
.
currentTimeMillis
());
xContext
.
getLogger
().
info
(
"------ WellTechDailyJob start:{}"
,
System
.
currentTimeMillis
());
...
...
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/entity/WellheadDailyProductionSituationEnt.java
View file @
fec7e7a7
...
@@ -4,7 +4,10 @@ import com.baomidou.mybatisplus.annotation.IdType;
...
@@ -4,7 +4,10 @@ import com.baomidou.mybatisplus.annotation.IdType;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
xstartup.annotation.XText
;
import
xstartup.annotation.XText
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
@@ -18,6 +21,9 @@ import java.util.Date;
...
@@ -18,6 +21,9 @@ import java.util.Date;
* @date 2023/09/27
* @date 2023/09/27
*/
*/
@Data
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName
(
"wellhead_daily_production_situation"
)
@TableName
(
"wellhead_daily_production_situation"
)
public
class
WellheadDailyProductionSituationEnt
implements
Serializable
{
public
class
WellheadDailyProductionSituationEnt
implements
Serializable
{
@XText
(
"ID"
)
@XText
(
"ID"
)
...
...
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/entity/WellheadDailyProductionSituationView.java
View file @
fec7e7a7
package
pps.core.prediction.entity
;
package
pps.core.prediction.entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
xstartup.annotation.XText
;
import
xstartup.annotation.XText
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
@@ -15,6 +18,9 @@ import java.util.Date;
...
@@ -15,6 +18,9 @@ import java.util.Date;
* @date 2023/09/27
* @date 2023/09/27
*/
*/
@Data
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public
class
WellheadDailyProductionSituationView
implements
Serializable
{
public
class
WellheadDailyProductionSituationView
implements
Serializable
{
@XText
(
"ID"
)
@XText
(
"ID"
)
@TableField
@TableField
...
...
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/mapper/WellheadDailyProductionSituationViewMapper.java
View file @
fec7e7a7
package
pps.core.prediction.mapper
;
package
pps.core.prediction.mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
pps.core.prediction.entity.WellheadDailyProductionSituationView
;
import
pps.core.prediction.entity.WellheadDailyProductionSituationView
;
...
@@ -17,4 +18,12 @@ public interface WellheadDailyProductionSituationViewMapper {
...
@@ -17,4 +18,12 @@ public interface WellheadDailyProductionSituationViewMapper {
WellheadDailyProductionSituationView
selectOne
(
WellheadDailyProductionSituationView
record
);
WellheadDailyProductionSituationView
selectOne
(
WellheadDailyProductionSituationView
record
);
List
<
WellheadDailyProductionSituationView
>
selectList
(
WellheadDailyProductionSituationView
record
);
List
<
WellheadDailyProductionSituationView
>
selectList
(
WellheadDailyProductionSituationView
record
);
/**
* 批量新增
*
* @param list 列表
* @return int
*/
int
batchInsertList
(
@Param
(
value
=
"list"
)
List
<
WellheadDailyProductionSituationView
>
list
);
}
}
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/PlantPredictedPowerCloudServiceImpl.java
View file @
fec7e7a7
package
pps.core.prediction.service
;
package
pps.core.prediction.service
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson2.JSON
;
import
com.alibaba.fastjson2.JSON
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
pps.cloud.base.service.IBaseWellheadCloudService
;
import
pps.cloud.base.service.data.base_wellhead.DynamicQueryBaseWellheadInput
;
import
pps.cloud.base.service.data.base_wellhead.DynamicQueryBaseWellheadOutput
;
import
pps.cloud.prediction.service.IPlantPredictedPowerCloudService
;
import
pps.cloud.prediction.service.IPlantPredictedPowerCloudService
;
import
pps.cloud.prediction.service.data.plant_predicted_power_data.DynamicQueryPlantPredictedPowerInput
;
import
pps.cloud.prediction.service.data.plant_predicted_power_data.DynamicQueryPlantPredictedPowerInput
;
import
pps.cloud.prediction.service.data.plant_predicted_power_data.DynamicQueryPlantPredictedPowerOutput
;
import
pps.cloud.prediction.service.data.plant_predicted_power_data.DynamicQueryPlantPredictedPowerOutput
;
import
pps.core.auth.HttpRequestClient
;
import
pps.core.prediction.constant.ThirdPartyApiConstant
;
import
pps.core.prediction.entity.PlantPredictedPowerDataEnt
;
import
pps.core.prediction.entity.PlantPredictedPowerDataEnt
;
import
pps.core.prediction.entity.PlantPredictedPowerLongTermDataEnt
;
import
pps.core.prediction.entity.PlantPredictedPowerLongTermDataEnt
;
import
pps.core.prediction.entity.WellheadDailyProductionSituationView
;
import
pps.core.prediction.mapper.PlantPredictedPowerDataMapper
;
import
pps.core.prediction.mapper.PlantPredictedPowerDataMapper
;
import
pps.core.prediction.mapper.PlantPredictedPowerLongTermDataMapper
;
import
pps.core.prediction.mapper.PlantPredictedPowerLongTermDataMapper
;
import
pps.core.prediction.mapper.WellheadDailyProductionSituationViewMapper
;
import
pps.core.prediction.service.data.wellhead_daily_production_situation.WellheadDailyProductionSituationJob
;
import
pps.core.prediction.service.data.wellhead_daily_production_situation.WellheadDailyProductionSituationJob
;
import
pps.core.prediction.utils.ServiceUtil
;
import
xstartup.annotation.XService
;
import
xstartup.annotation.XService
;
import
xstartup.base.XContext
;
import
xstartup.base.XContext
;
import
xstartup.base.XStartup
;
import
xstartup.base.util.XCopyUtils
;
import
xstartup.base.util.XCopyUtils
;
import
xstartup.data.XListResult
;
import
xstartup.data.XListResult
;
import
xstartup.data.XServiceResult
;
import
xstartup.data.XServiceResult
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
* 光伏预测Cloud模块
* 光伏预测Cloud模块
...
@@ -171,384 +184,43 @@ public class PlantPredictedPowerCloudServiceImpl implements IPlantPredictedPower
...
@@ -171,384 +184,43 @@ public class PlantPredictedPowerCloudServiceImpl implements IPlantPredictedPower
*/
*/
@Override
@Override
public
XServiceResult
wellTechDailyJob
(
XContext
context
)
{
public
XServiceResult
wellTechDailyJob
(
XContext
context
)
{
String
s
=
"{\n"
+
String
token
=
ServiceUtil
.
getToken
(
context
);
"\t\"status\": 100,\n"
+
HttpRequestClient
client
=
new
HttpRequestClient
(
token
);
"\t\"msg\": \"执行成功!\",\n"
+
Map
<
String
,
Object
>
param
=
new
HashMap
<>(
4
);
"\t\"data\": [\n"
+
param
.
put
(
"Calc_Date"
,
DateUtil
.
yesterday
().
toString
(
"yyyy-MM-dd"
));
"\t\t{\n"
+
String
url
=
XStartup
.
getCurrent
().
getProperty
(
"third-party.chang-qing.url"
);
"\t\t\t\"welL_NAME\": \"王侧11-8\",\n"
+
url
+=
ThirdPartyApiConstant
.
CQ_WELL_TECH_DAILY
;
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
String
resultStr
=
client
.
doPostForm
(
url
,
param
);
"\t\t\t\"poweR_CONSUME_DAILY\": 40.37,\n"
+
JSONObject
jsonObject
=
JSON
.
parseObject
(
resultStr
);
"\t\t\t\"reaL_LIQUID_DAILY\": 2.2,\n"
+
"\t\t\t\"starthours\": 900,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"塞侧29-4\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 39.71,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 2.04,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山31-14\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 78.33,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 2.69,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山33-13\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 56.01,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 3.74,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山33-14\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": null,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 1.8,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山34-13\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": null,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 4.6,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山36-13\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 25.09,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 4.49,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山39-12\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 25.36,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 1.29,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山40-11\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 26.54,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 2.19,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山41-9\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 68.46,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 0.58,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山43-5\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 16.67,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 1.03,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"午249-9\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 18.71,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 2.44,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"午252-9\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 42.02,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 6.65,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"午291\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": null,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 1.36,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"午侧249-8\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 206.96,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 6.01,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"午平231-04\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 81.51,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 5.9,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山30-15\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 25.11,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 1.31,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山35-12\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 189.94,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 2.41,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山38-13\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 25.52,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 2.71,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山39-11\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 19.98,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 1.73,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山41-6\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 55.08,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 5.04,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"午250-10\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 62.34,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 6.71,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"午251-10\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 39.17,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 8.26,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山37-11\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 40.29,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 4.52,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山33-15\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 236.27,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 2.92,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"午222-210X\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 43.76,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 0.93,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山37-13\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 17.33,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 1.85,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山35-14\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": null,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 0.66,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山35-15\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 169.45,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 2.61,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山38-11\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 34.55,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 3.57,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山42-9\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 27.9,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 1.29,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"山32-13\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": null,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 0,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"成36-46\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 65.95,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 2.79,\n"
+
"\t\t\t\"starthours\": 40,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"塬49-90\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 178,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 4.99,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"塬46-89\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 56.22,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 0.4,\n"
+
"\t\t\t\"starthours\": 8,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"塬46-93\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 86.54,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 1.88,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"塬32-92\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 44.45,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 1.53,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"成37-46\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 59.16,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 0.81,\n"
+
"\t\t\t\"starthours\": 44,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"塬46-90\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 74.08,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 1.85,\n"
+
"\t\t\t\"starthours\": 44,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"成63-10\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 68.32,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 2.59,\n"
+
"\t\t\t\"starthours\": 40,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t},\n"
+
"\t\t{\n"
+
"\t\t\t\"welL_NAME\": \"塬46-92\",\n"
+
"\t\t\t\"caL_DATE\": \"2024-03-15T00:00:00\",\n"
+
"\t\t\t\"poweR_CONSUME_DAILY\": 60.54,\n"
+
"\t\t\t\"reaL_LIQUID_DAILY\": 3.62,\n"
+
"\t\t\t\"starthours\": 0,\n"
+
"\t\t\t\"status\": null,\n"
+
"\t\t\t\"next_ExecDate\": \"0001-01-01T00:00:00\"\n"
+
"\t\t}\n"
+
"\t]\n"
+
"}"
;
JSONObject
jsonObject
=
JSON
.
parseObject
(
s
);
String
data
=
jsonObject
.
getString
(
"data"
);
String
data
=
jsonObject
.
getString
(
"data"
);
List
<
WellheadDailyProductionSituationJob
>
wellheadDailyProductionSituationJobs
=
JSON
.
parseArray
(
data
,
WellheadDailyProductionSituationJob
.
class
);
List
<
WellheadDailyProductionSituationJob
>
list
=
JSON
.
parseArray
(
data
,
WellheadDailyProductionSituationJob
.
class
);
if
(
CollUtil
.
isEmpty
(
list
))
{
return
XServiceResult
.
OK
;
}
List
<
String
>
collect
=
list
.
stream
()
.
map
(
WellheadDailyProductionSituationJob:
:
getWellNumber
)
.
collect
(
Collectors
.
toList
());
IBaseWellheadCloudService
bean
=
context
.
getBean
(
IBaseWellheadCloudService
.
class
);
XListResult
<
DynamicQueryBaseWellheadOutput
>
result
=
bean
.
queryBaseWellheadListByParam
(
context
,
DynamicQueryBaseWellheadInput
.
builder
()
.
wellNumbers
(
collect
)
.
build
());
result
.
throwIfFail
();
Map
<
String
,
String
>
map
=
result
.
getResult
().
stream
()
.
collect
(
Collectors
.
toMap
(
DynamicQueryBaseWellheadOutput:
:
getWellNumber
,
DynamicQueryBaseWellheadOutput:
:
getId
));
List
<
WellheadDailyProductionSituationView
>
dtoList
=
new
ArrayList
<>(
list
.
size
());
for
(
WellheadDailyProductionSituationJob
wellhead
:
list
)
{
dtoList
.
add
(
WellheadDailyProductionSituationView
.
builder
()
.
wellNumber
(
wellhead
.
getWellNumber
())
.
dataDate
(
wellhead
.
getDataDate
())
.
dailyLiquidProduction
(
wellhead
.
getDailyLiquidProduction
())
.
productionTime
(
wellhead
.
getProductionTime
())
.
dailyElectricityConsumption
(
wellhead
.
getDailyElectricityConsumption
())
.
wellheadId
(
map
.
get
(
wellhead
.
getWellNumber
()))
.
build
()
);
}
WellheadDailyProductionSituationViewMapper
mapper
=
context
.
getBean
(
WellheadDailyProductionSituationViewMapper
.
class
);
mapper
.
batchInsertList
(
dtoList
);
return
XServiceResult
.
OK
;
return
XServiceResult
.
OK
;
}
}
}
}
C12-prediction/pps-core-prediction/src/main/resources/mybatis/mapper/pps/core/prediction/WellheadDailyProductionSituationViewMapper.xml
View file @
fec7e7a7
...
@@ -36,4 +36,20 @@
...
@@ -36,4 +36,20 @@
where
where
id=#{id}
id=#{id}
</select>
</select>
<insert
id=
"batchInsertList"
parameterType=
"list"
>
INSERT INTO wellhead_daily_production_situation ( wellhead_id, well_number, data_date, production_time,
daily_electricity_consumption, daily_liquid_production )
VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.wellheadId},
#{item.wellNumber},
#{item.dataDate},
#{item.productionTime},
#{item.dailyElectricityConsumption},
#{item.dailyLiquidProduction}
)
</foreach>
</insert>
</mapper>
</mapper>
\ 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