Commit d42087b8 authored by ZWT's avatar ZWT

feat(吉林演示): 松原

1.修改实际功率数据获取定时任务功能,修改定时配置,增加接入吉林实际功率数据逻辑,完成功能验证;
2.修改实际井口状态数据获取定时任务功能,修改定时配置,增加接入吉林实际井口状态数据逻辑,完成功能验证;
3.修改天气数据接收处理定时任务功能,在光伏数据处理完成插入后,添加预测功能远程调用逻辑,完成功能验证;
4.开发光伏预测结果集训练定时任务,完成定时任务配置及功能验证;
5.修改井场日累计数据数据获取定时任务功能,修改定时配置,增加接入吉林实际发电量数据逻辑,完成功能验证;
6.修改光伏电站日累计发电量数据数据获取定时任务功能,修改定时配置,增加接入吉林实际发电量数据逻辑,完成功能验证;
7.修改单井平均发电量数据数据获取定时任务功能,修改定时配置,增加接入吉林实际发电量数据逻辑,完成功能验证;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent fbcd7a70
...@@ -1189,7 +1189,11 @@ public class BaseWeatherCloudServiceImpl implements IBaseWeatherCloudService { ...@@ -1189,7 +1189,11 @@ public class BaseWeatherCloudServiceImpl implements IBaseWeatherCloudService {
this.photovoltaicDataProcess(context, jsonObjectList); this.photovoltaicDataProcess(context, jsonObjectList);
//预测接口 //预测接口
XThreadHelper.async(() -> { XThreadHelper.async(() -> {
HttpUtil.get("http://127.0.0.1:10060/api/photovoltaic/predict?secretKey=fZ1kC1aV8bO7rH3bL8oE5zI0mY3vW1sG"); try {
HttpUtil.get("http://127.0.0.1:10060/api/photovoltaic/predict?secretKey=fZ1kC1aV8bO7rH3bL8oE5zI0mY3vW1sG");
} catch (Exception e) {
context.getLogger().error("---- predict", e);
}
}); });
}); });
} }
......
...@@ -40,7 +40,11 @@ public class PhotovoltaicTrainJob implements XJob { ...@@ -40,7 +40,11 @@ public class PhotovoltaicTrainJob implements XJob {
ServiceUtil.setCache(xContext, key); ServiceUtil.setCache(xContext, key);
try { try {
XThreadHelper.async(() -> { XThreadHelper.async(() -> {
HttpUtil.get("http://127.0.0.1:10060/api/photovoltaic/train?secretKey=fZ1kC1aV8bO7rH3bL8oE5zI0mY3vW1sG"); try {
HttpUtil.get("http://127.0.0.1:10060/api/photovoltaic/train?secretKey=fZ1kC1aV8bO7rH3bL8oE5zI0mY3vW1sG");
} catch (Exception e) {
xContext.getLogger().error("---- train", e);
}
}); });
} catch (Exception e) { } catch (Exception e) {
xContext.getLogger().error("------ PhotovoltaicTrainJob Exception: ", e); xContext.getLogger().error("------ PhotovoltaicTrainJob Exception: ", e);
......
...@@ -20,7 +20,8 @@ import xstartup.data.XServiceResult; ...@@ -20,7 +20,8 @@ import xstartup.data.XServiceResult;
public class ThirdWellAvgActivePowerJob { public class ThirdWellAvgActivePowerJob {
/** /**
* 十分钟一次隔3分钟 * 长庆:10分钟一次隔3分钟 0 3/10 * * * ?
* 吉林:30分钟一次隔3分钟 0 3/30 * * * ?
* *
* @param xContext x上下文 * @param xContext x上下文
* @return {@link XServiceResult} * @return {@link XServiceResult}
......
...@@ -11,10 +11,7 @@ import pps.cloud.base.service.data.base_photovoltaic_plant.GetBasePhotovoltaicPl ...@@ -11,10 +11,7 @@ import pps.cloud.base.service.data.base_photovoltaic_plant.GetBasePhotovoltaicPl
import pps.cloud.base.service.data.base_photovoltaic_plant.GetBasePhotovoltaicPlantCloudOutput; import pps.cloud.base.service.data.base_photovoltaic_plant.GetBasePhotovoltaicPlantCloudOutput;
import pps.cloud.base.service.data.base_power_line.DynamicQueryBasePowerLineInput; import pps.cloud.base.service.data.base_power_line.DynamicQueryBasePowerLineInput;
import pps.cloud.base.service.data.base_power_line.DynamicQueryBasePowerLineOutput; import pps.cloud.base.service.data.base_power_line.DynamicQueryBasePowerLineOutput;
import pps.cloud.middle.service.IThirdActivePowerCloudService; import pps.cloud.middle.service.*;
import pps.cloud.middle.service.IThirdCurrentWellConditionCloudService;
import pps.cloud.middle.service.IThirdDailyAccumulationCloudService;
import pps.cloud.middle.service.IThirdPhotovoltaicPowerCloudService;
import pps.cloud.middle.service.data.third_active_power.GetThirdActivePowerViewInput; import pps.cloud.middle.service.data.third_active_power.GetThirdActivePowerViewInput;
import pps.cloud.middle.service.data.third_current_well_condition.GetThirdCurrentWellConditionInput; import pps.cloud.middle.service.data.third_current_well_condition.GetThirdCurrentWellConditionInput;
import pps.cloud.middle.service.data.third_current_well_condition.GetThirdCurrentWellConditionOutput; import pps.cloud.middle.service.data.third_current_well_condition.GetThirdCurrentWellConditionOutput;
...@@ -22,6 +19,7 @@ import pps.cloud.middle.service.data.third_daily_accumulation.GetThirdDailyAccum ...@@ -22,6 +19,7 @@ import pps.cloud.middle.service.data.third_daily_accumulation.GetThirdDailyAccum
import pps.cloud.middle.service.data.third_daily_accumulation.GetThirdDailyAccumulationOutput; import pps.cloud.middle.service.data.third_daily_accumulation.GetThirdDailyAccumulationOutput;
import pps.cloud.middle.service.data.third_photovoltaic_power.GetThirdPhotovoltaicPowerInput; import pps.cloud.middle.service.data.third_photovoltaic_power.GetThirdPhotovoltaicPowerInput;
import pps.cloud.middle.service.data.third_photovoltaic_power.GetThirdPhotovoltaicPowerOutput; import pps.cloud.middle.service.data.third_photovoltaic_power.GetThirdPhotovoltaicPowerOutput;
import pps.cloud.middle.service.data.third_well_avg_active_power.GetThirdWellAvgActivePowerInput;
import pps.cloud.prediction.service.IThirdDataAccessCloudService; import pps.cloud.prediction.service.IThirdDataAccessCloudService;
import pps.core.common.constant.BusinessConstant; import pps.core.common.constant.BusinessConstant;
import pps.core.prediction.constant.ThirdPartyApiConstant; import pps.core.prediction.constant.ThirdPartyApiConstant;
...@@ -459,15 +457,29 @@ public class ThirdDataAccessCloudServiceImpl implements IThirdDataAccessCloudSer ...@@ -459,15 +457,29 @@ public class ThirdDataAccessCloudServiceImpl implements IThirdDataAccessCloudSer
*/ */
@Override @Override
public XServiceResult thirdWellAvgActivePowerJob(XContext context) { public XServiceResult thirdWellAvgActivePowerJob(XContext context) {
String resultStr = ServiceUtil.doPostFormCq(context, List<GetThirdWellAvgActivePowerOutput> outputs;
ThirdPartyApiConstant.CQ_AVG_ACTIVE_POWER, //区分环境
new HashMap<>(0)); String oilFieldCode = ServiceUtil.getOilFieldCode(context);
context.getLogger().info("*** CQ_AVG_ACTIVE_POWER : {}", resultStr); switch (oilFieldCode) {
List<GetThirdWellAvgActivePowerOutput> outputs = JSON.parseArray(resultStr, GetThirdWellAvgActivePowerOutput.class); case BusinessConstant.ENV_SY:
IThirdWellAvgActivePowerCloudService service = context.getBean(IThirdWellAvgActivePowerCloudService.class);
XListResult<pps.cloud.middle.service.data.third_well_avg_active_power.GetThirdWellAvgActivePowerOutput> result = service.getThirdActivePowerList(context, new GetThirdWellAvgActivePowerInput());
result.throwIfFail();
outputs = XCopyUtils.copyNewList(result.getResult(), GetThirdWellAvgActivePowerOutput.class);
break;
case BusinessConstant.ENV_CQ:
String resultStr = ServiceUtil.doPostFormCq(context,
ThirdPartyApiConstant.CQ_AVG_ACTIVE_POWER,
new HashMap<>(0));
context.getLogger().info("*** CQ_AVG_ACTIVE_POWER : {}", resultStr);
outputs = JSON.parseArray(resultStr, GetThirdWellAvgActivePowerOutput.class);
break;
default:
return XServiceResult.OK;
}
if (CollUtil.isEmpty(outputs)) { if (CollUtil.isEmpty(outputs)) {
return XServiceResult.OK; return XServiceResult.OK;
} }
String oilFieldCode = ServiceUtil.getOilFieldCode(context);
DateTime beginOfDay = DateUtil.date(); DateTime beginOfDay = DateUtil.date();
//封装数据 //封装数据
List<ThirdWellAvgActivePowerView> dtoList = new ArrayList<>(outputs.size()); List<ThirdWellAvgActivePowerView> dtoList = new ArrayList<>(outputs.size());
......
package pps.cloud.middle.service;
import pps.cloud.middle.service.data.third_well_avg_active_power.GetThirdWellAvgActivePowerInput;
import pps.cloud.middle.service.data.third_well_avg_active_power.GetThirdWellAvgActivePowerOutput;
import xstartup.annotation.XService;
import xstartup.annotation.XText;
import xstartup.base.XContext;
import xstartup.data.XListResult;
/**
* 单井平均实际功率
*
* @author ZWT
* @date 2024/10/19 19:57
*/
@XText("单井平均实际功率Cloud模块")
@XService
public interface IThirdWellAvgActivePowerCloudService {
/**
* 实际功率列表
*
* @param context 上下文
* @param input 输入
* @return {@link XListResult }<{@link GetThirdWellAvgActivePowerOutput }>
*/
@XText("实际功率列表")
XListResult<GetThirdWellAvgActivePowerOutput> getThirdActivePowerList(XContext context, GetThirdWellAvgActivePowerInput input);
}
package pps.cloud.middle.service.data.third_well_avg_active_power;
import xstartup.annotation.XText;
import java.math.BigDecimal;
import java.util.Date;
public class CreateThirdWellAvgActivePowerInput {
@XText("ID")
private Long id;
@XText("井号")
private String wellNumber;
@XText("采集时间")
private Date inputTime;
@XText("平均有功功率(KW)")
private BigDecimal avgActivePower;
@XText("来源系统")
private String systemSource;
@XText("入库日期")
private Date saveDate;
public Long getId() {
return this.id;
}
public void setId(Long value) {
this.id = value;
}
public String getWellNumber() {
return this.wellNumber;
}
public void setWellNumber(String value) {
this.wellNumber = value;
}
public Date getInputTime() {
return this.inputTime;
}
public void setInputTime(Date value) {
this.inputTime = value;
}
public BigDecimal getAvgActivePower() {
return this.avgActivePower;
}
public void setAvgActivePower(BigDecimal value) {
this.avgActivePower = value;
}
public String getSystemSource() {
return this.systemSource;
}
public void setSystemSource(String value) {
this.systemSource = value;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date value) {
this.saveDate = value;
}
}
package pps.cloud.middle.service.data.third_well_avg_active_power;
import xstartup.annotation.XText;
import java.math.BigDecimal;
import java.util.Date;
public class CreateThirdWellAvgActivePowerOutput {
@XText("ID")
private Long id;
@XText("井号")
private String wellNumber;
@XText("采集时间")
private Date inputTime;
@XText("平均有功功率(KW)")
private BigDecimal avgActivePower;
@XText("来源系统")
private String systemSource;
@XText("入库日期")
private Date saveDate;
public Long getId() {
return this.id;
}
public void setId(Long value) {
this.id = value;
}
public String getWellNumber() {
return this.wellNumber;
}
public void setWellNumber(String value) {
this.wellNumber = value;
}
public Date getInputTime() {
return this.inputTime;
}
public void setInputTime(Date value) {
this.inputTime = value;
}
public BigDecimal getAvgActivePower() {
return this.avgActivePower;
}
public void setAvgActivePower(BigDecimal value) {
this.avgActivePower = value;
}
public String getSystemSource() {
return this.systemSource;
}
public void setSystemSource(String value) {
this.systemSource = value;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date value) {
this.saveDate = value;
}
}
package pps.cloud.middle.service.data.third_well_avg_active_power;
import xstartup.annotation.XText;
import java.math.BigDecimal;
import java.util.Date;
public class DeleteThirdWellAvgActivePowerInput {
@XText("ID")
private Long id;
@XText("井号")
private String wellNumber;
@XText("采集时间")
private Date inputTime;
@XText("平均有功功率(KW)")
private BigDecimal avgActivePower;
@XText("来源系统")
private String systemSource;
@XText("入库日期")
private Date saveDate;
public Long getId() {
return this.id;
}
public void setId(Long value) {
this.id = value;
}
public String getWellNumber() {
return this.wellNumber;
}
public void setWellNumber(String value) {
this.wellNumber = value;
}
public Date getInputTime() {
return this.inputTime;
}
public void setInputTime(Date value) {
this.inputTime = value;
}
public BigDecimal getAvgActivePower() {
return this.avgActivePower;
}
public void setAvgActivePower(BigDecimal value) {
this.avgActivePower = value;
}
public String getSystemSource() {
return this.systemSource;
}
public void setSystemSource(String value) {
this.systemSource = value;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date value) {
this.saveDate = value;
}
}
package pps.cloud.middle.service.data.third_well_avg_active_power;
import xstartup.annotation.XText;
import java.math.BigDecimal;
import java.util.Date;
public class DeleteThirdWellAvgActivePowerOutput {
@XText("ID")
private Long id;
@XText("井号")
private String wellNumber;
@XText("采集时间")
private Date inputTime;
@XText("平均有功功率(KW)")
private BigDecimal avgActivePower;
@XText("来源系统")
private String systemSource;
@XText("入库日期")
private Date saveDate;
public Long getId() {
return this.id;
}
public void setId(Long value) {
this.id = value;
}
public String getWellNumber() {
return this.wellNumber;
}
public void setWellNumber(String value) {
this.wellNumber = value;
}
public Date getInputTime() {
return this.inputTime;
}
public void setInputTime(Date value) {
this.inputTime = value;
}
public BigDecimal getAvgActivePower() {
return this.avgActivePower;
}
public void setAvgActivePower(BigDecimal value) {
this.avgActivePower = value;
}
public String getSystemSource() {
return this.systemSource;
}
public void setSystemSource(String value) {
this.systemSource = value;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date value) {
this.saveDate = value;
}
}
package pps.cloud.middle.service.data.third_well_avg_active_power;
import xstartup.annotation.XText;
import java.math.BigDecimal;
import java.util.Date;
public class DynamicQueryThirdWellAvgActivePowerInput {
@XText("ID")
private Long id;
@XText("井号")
private String wellNumber;
@XText("采集时间")
private Date inputTime;
@XText("平均有功功率(KW)")
private BigDecimal avgActivePower;
@XText("来源系统")
private String systemSource;
@XText("入库日期")
private Date saveDate;
public Long getId() {
return this.id;
}
public void setId(Long value) {
this.id = value;
}
public String getWellNumber() {
return this.wellNumber;
}
public void setWellNumber(String value) {
this.wellNumber = value;
}
public Date getInputTime() {
return this.inputTime;
}
public void setInputTime(Date value) {
this.inputTime = value;
}
public BigDecimal getAvgActivePower() {
return this.avgActivePower;
}
public void setAvgActivePower(BigDecimal value) {
this.avgActivePower = value;
}
public String getSystemSource() {
return this.systemSource;
}
public void setSystemSource(String value) {
this.systemSource = value;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date value) {
this.saveDate = value;
}
}
package pps.cloud.middle.service.data.third_well_avg_active_power;
import xstartup.annotation.XText;
import java.math.BigDecimal;
import java.util.Date;
public class DynamicQueryThirdWellAvgActivePowerOutput {
@XText("ID")
private Long id;
@XText("井号")
private String wellNumber;
@XText("采集时间")
private Date inputTime;
@XText("平均有功功率(KW)")
private BigDecimal avgActivePower;
@XText("来源系统")
private String systemSource;
@XText("入库日期")
private Date saveDate;
public Long getId() {
return this.id;
}
public void setId(Long value) {
this.id = value;
}
public String getWellNumber() {
return this.wellNumber;
}
public void setWellNumber(String value) {
this.wellNumber = value;
}
public Date getInputTime() {
return this.inputTime;
}
public void setInputTime(Date value) {
this.inputTime = value;
}
public BigDecimal getAvgActivePower() {
return this.avgActivePower;
}
public void setAvgActivePower(BigDecimal value) {
this.avgActivePower = value;
}
public String getSystemSource() {
return this.systemSource;
}
public void setSystemSource(String value) {
this.systemSource = value;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date value) {
this.saveDate = value;
}
}
package pps.cloud.middle.service.data.third_well_avg_active_power;
import xstartup.annotation.XText;
import java.math.BigDecimal;
import java.util.Date;
public class DynamicQueryThirdWellAvgActivePowerViewOutput {
@XText("ID")
private Long id;
@XText("井号")
private String wellNumber;
@XText("采集时间")
private Date inputTime;
@XText("平均有功功率(KW)")
private BigDecimal avgActivePower;
@XText("来源系统")
private String systemSource;
@XText("入库日期")
private Date saveDate;
public Long getId() {
return this.id;
}
public void setId(Long value) {
this.id = value;
}
public String getWellNumber() {
return this.wellNumber;
}
public void setWellNumber(String value) {
this.wellNumber = value;
}
public Date getInputTime() {
return this.inputTime;
}
public void setInputTime(Date value) {
this.inputTime = value;
}
public BigDecimal getAvgActivePower() {
return this.avgActivePower;
}
public void setAvgActivePower(BigDecimal value) {
this.avgActivePower = value;
}
public String getSystemSource() {
return this.systemSource;
}
public void setSystemSource(String value) {
this.systemSource = value;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date value) {
this.saveDate = value;
}
}
package pps.cloud.middle.service.data.third_well_avg_active_power; package pps.cloud.middle.service.data.third_well_avg_active_power;
import lombok.Data;
import xstartup.annotation.XText; import xstartup.annotation.XText;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/**
* 单井平均实际功率
*
* @author ZWT
* @date 2024/10/19
*/
@Data
public class GetThirdWellAvgActivePowerInput { public class GetThirdWellAvgActivePowerInput {
@XText("ID") @XText("ID")
private Long id; private Long id;
...@@ -23,53 +31,4 @@ public class GetThirdWellAvgActivePowerInput { ...@@ -23,53 +31,4 @@ public class GetThirdWellAvgActivePowerInput {
@XText("入库日期") @XText("入库日期")
private Date saveDate; private Date saveDate;
public Long getId() {
return this.id;
}
public void setId(Long value) {
this.id = value;
}
public String getWellNumber() {
return this.wellNumber;
}
public void setWellNumber(String value) {
this.wellNumber = value;
}
public Date getInputTime() {
return this.inputTime;
}
public void setInputTime(Date value) {
this.inputTime = value;
}
public BigDecimal getAvgActivePower() {
return this.avgActivePower;
}
public void setAvgActivePower(BigDecimal value) {
this.avgActivePower = value;
}
public String getSystemSource() {
return this.systemSource;
}
public void setSystemSource(String value) {
this.systemSource = value;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date value) {
this.saveDate = value;
}
} }
package pps.cloud.middle.service.data.third_well_avg_active_power; package pps.cloud.middle.service.data.third_well_avg_active_power;
import lombok.Data;
import xstartup.annotation.XText; import xstartup.annotation.XText;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/**
* 单井平均实际功率
*
* @author ZWT
* @date 2024/10/19
*/
@Data
public class GetThirdWellAvgActivePowerOutput { public class GetThirdWellAvgActivePowerOutput {
@XText("ID") @XText("ID")
private Long id; private Long id;
...@@ -23,53 +31,4 @@ public class GetThirdWellAvgActivePowerOutput { ...@@ -23,53 +31,4 @@ public class GetThirdWellAvgActivePowerOutput {
@XText("入库日期") @XText("入库日期")
private Date saveDate; private Date saveDate;
public Long getId() {
return this.id;
}
public void setId(Long value) {
this.id = value;
}
public String getWellNumber() {
return this.wellNumber;
}
public void setWellNumber(String value) {
this.wellNumber = value;
}
public Date getInputTime() {
return this.inputTime;
}
public void setInputTime(Date value) {
this.inputTime = value;
}
public BigDecimal getAvgActivePower() {
return this.avgActivePower;
}
public void setAvgActivePower(BigDecimal value) {
this.avgActivePower = value;
}
public String getSystemSource() {
return this.systemSource;
}
public void setSystemSource(String value) {
this.systemSource = value;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date value) {
this.saveDate = value;
}
} }
package pps.cloud.middle.service.data.third_well_avg_active_power;
import xstartup.annotation.XText;
import java.math.BigDecimal;
import java.util.Date;
public class GetThirdWellAvgActivePowerViewInput {
@XText("ID")
private Long id;
@XText("井号")
private String wellNumber;
@XText("采集时间")
private Date inputTime;
@XText("平均有功功率(KW)")
private BigDecimal avgActivePower;
@XText("来源系统")
private String systemSource;
@XText("入库日期")
private Date saveDate;
public Long getId() {
return this.id;
}
public void setId(Long value) {
this.id = value;
}
public String getWellNumber() {
return this.wellNumber;
}
public void setWellNumber(String value) {
this.wellNumber = value;
}
public Date getInputTime() {
return this.inputTime;
}
public void setInputTime(Date value) {
this.inputTime = value;
}
public BigDecimal getAvgActivePower() {
return this.avgActivePower;
}
public void setAvgActivePower(BigDecimal value) {
this.avgActivePower = value;
}
public String getSystemSource() {
return this.systemSource;
}
public void setSystemSource(String value) {
this.systemSource = value;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date value) {
this.saveDate = value;
}
}
package pps.cloud.middle.service.data.third_well_avg_active_power;
import xstartup.annotation.XText;
import java.math.BigDecimal;
import java.util.Date;
public class GetThirdWellAvgActivePowerViewOutput {
@XText("ID")
private Long id;
@XText("井号")
private String wellNumber;
@XText("采集时间")
private Date inputTime;
@XText("平均有功功率(KW)")
private BigDecimal avgActivePower;
@XText("来源系统")
private String systemSource;
@XText("入库日期")
private Date saveDate;
public Long getId() {
return this.id;
}
public void setId(Long value) {
this.id = value;
}
public String getWellNumber() {
return this.wellNumber;
}
public void setWellNumber(String value) {
this.wellNumber = value;
}
public Date getInputTime() {
return this.inputTime;
}
public void setInputTime(Date value) {
this.inputTime = value;
}
public BigDecimal getAvgActivePower() {
return this.avgActivePower;
}
public void setAvgActivePower(BigDecimal value) {
this.avgActivePower = value;
}
public String getSystemSource() {
return this.systemSource;
}
public void setSystemSource(String value) {
this.systemSource = value;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date value) {
this.saveDate = value;
}
}
package pps.cloud.middle.service.data.third_well_avg_active_power;
import xstartup.annotation.XText;
import xstartup.base.data.XPageInput;
import java.math.BigDecimal;
import java.util.Date;
public class QueryThirdWellAvgActivePowerInput extends XPageInput {
@XText("ID")
private Long id;
@XText("井号")
private String wellNumber;
@XText("采集时间")
private Date inputTime;
@XText("平均有功功率(KW)")
private BigDecimal avgActivePower;
@XText("来源系统")
private String systemSource;
@XText("入库日期")
private Date saveDate;
public Long getId() {
return this.id;
}
public void setId(Long value) {
this.id = value;
}
public String getWellNumber() {
return this.wellNumber;
}
public void setWellNumber(String value) {
this.wellNumber = value;
}
public Date getInputTime() {
return this.inputTime;
}
public void setInputTime(Date value) {
this.inputTime = value;
}
public BigDecimal getAvgActivePower() {
return this.avgActivePower;
}
public void setAvgActivePower(BigDecimal value) {
this.avgActivePower = value;
}
public String getSystemSource() {
return this.systemSource;
}
public void setSystemSource(String value) {
this.systemSource = value;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date value) {
this.saveDate = value;
}
}
package pps.cloud.middle.service.data.third_well_avg_active_power;
import xstartup.annotation.XText;
import xstartup.base.data.XPageInput;
import java.math.BigDecimal;
import java.util.Date;
public class QueryThirdWellAvgActivePowerOutput extends XPageInput {
@XText("ID")
private Long id;
@XText("井号")
private String wellNumber;
@XText("采集时间")
private Date inputTime;
@XText("平均有功功率(KW)")
private BigDecimal avgActivePower;
@XText("来源系统")
private String systemSource;
@XText("入库日期")
private Date saveDate;
public Long getId() {
return this.id;
}
public void setId(Long value) {
this.id = value;
}
public String getWellNumber() {
return this.wellNumber;
}
public void setWellNumber(String value) {
this.wellNumber = value;
}
public Date getInputTime() {
return this.inputTime;
}
public void setInputTime(Date value) {
this.inputTime = value;
}
public BigDecimal getAvgActivePower() {
return this.avgActivePower;
}
public void setAvgActivePower(BigDecimal value) {
this.avgActivePower = value;
}
public String getSystemSource() {
return this.systemSource;
}
public void setSystemSource(String value) {
this.systemSource = value;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date value) {
this.saveDate = value;
}
}
package pps.cloud.middle.service.data.third_well_avg_active_power;
import xstartup.annotation.XText;
import xstartup.base.data.XPageInput;
import java.math.BigDecimal;
import java.util.Date;
public class QueryThirdWellAvgActivePowerViewInput extends XPageInput {
@XText("ID")
private Long id;
@XText("井号")
private String wellNumber;
@XText("采集时间")
private Date inputTime;
@XText("平均有功功率(KW)")
private BigDecimal avgActivePower;
@XText("来源系统")
private String systemSource;
@XText("入库日期")
private Date saveDate;
public Long getId() {
return this.id;
}
public void setId(Long value) {
this.id = value;
}
public String getWellNumber() {
return this.wellNumber;
}
public void setWellNumber(String value) {
this.wellNumber = value;
}
public Date getInputTime() {
return this.inputTime;
}
public void setInputTime(Date value) {
this.inputTime = value;
}
public BigDecimal getAvgActivePower() {
return this.avgActivePower;
}
public void setAvgActivePower(BigDecimal value) {
this.avgActivePower = value;
}
public String getSystemSource() {
return this.systemSource;
}
public void setSystemSource(String value) {
this.systemSource = value;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date value) {
this.saveDate = value;
}
}
package pps.cloud.middle.service.data.third_well_avg_active_power;
import xstartup.annotation.XText;
import xstartup.base.data.XPageInput;
import java.math.BigDecimal;
import java.util.Date;
public class QueryThirdWellAvgActivePowerViewOutput extends XPageInput {
@XText("ID")
private Long id;
@XText("井号")
private String wellNumber;
@XText("采集时间")
private Date inputTime;
@XText("平均有功功率(KW)")
private BigDecimal avgActivePower;
@XText("来源系统")
private String systemSource;
@XText("入库日期")
private Date saveDate;
public Long getId() {
return this.id;
}
public void setId(Long value) {
this.id = value;
}
public String getWellNumber() {
return this.wellNumber;
}
public void setWellNumber(String value) {
this.wellNumber = value;
}
public Date getInputTime() {
return this.inputTime;
}
public void setInputTime(Date value) {
this.inputTime = value;
}
public BigDecimal getAvgActivePower() {
return this.avgActivePower;
}
public void setAvgActivePower(BigDecimal value) {
this.avgActivePower = value;
}
public String getSystemSource() {
return this.systemSource;
}
public void setSystemSource(String value) {
this.systemSource = value;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date value) {
this.saveDate = value;
}
}
package pps.cloud.middle.service.data.third_well_avg_active_power;
import xstartup.annotation.XText;
import java.math.BigDecimal;
import java.util.Date;
public class UpdateThirdWellAvgActivePowerInput {
@XText("ID")
private Long id;
@XText("井号")
private String wellNumber;
@XText("采集时间")
private Date inputTime;
@XText("平均有功功率(KW)")
private BigDecimal avgActivePower;
@XText("来源系统")
private String systemSource;
@XText("入库日期")
private Date saveDate;
public Long getId() {
return this.id;
}
public void setId(Long value) {
this.id = value;
}
public String getWellNumber() {
return this.wellNumber;
}
public void setWellNumber(String value) {
this.wellNumber = value;
}
public Date getInputTime() {
return this.inputTime;
}
public void setInputTime(Date value) {
this.inputTime = value;
}
public BigDecimal getAvgActivePower() {
return this.avgActivePower;
}
public void setAvgActivePower(BigDecimal value) {
this.avgActivePower = value;
}
public String getSystemSource() {
return this.systemSource;
}
public void setSystemSource(String value) {
this.systemSource = value;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date value) {
this.saveDate = value;
}
}
package pps.cloud.middle.service.data.third_well_avg_active_power;
import xstartup.annotation.XText;
import java.math.BigDecimal;
import java.util.Date;
public class UpdateThirdWellAvgActivePowerOutput {
@XText("ID")
private Long id;
@XText("井号")
private String wellNumber;
@XText("采集时间")
private Date inputTime;
@XText("平均有功功率(KW)")
private BigDecimal avgActivePower;
@XText("来源系统")
private String systemSource;
@XText("入库日期")
private Date saveDate;
public Long getId() {
return this.id;
}
public void setId(Long value) {
this.id = value;
}
public String getWellNumber() {
return this.wellNumber;
}
public void setWellNumber(String value) {
this.wellNumber = value;
}
public Date getInputTime() {
return this.inputTime;
}
public void setInputTime(Date value) {
this.inputTime = value;
}
public BigDecimal getAvgActivePower() {
return this.avgActivePower;
}
public void setAvgActivePower(BigDecimal value) {
this.avgActivePower = value;
}
public String getSystemSource() {
return this.systemSource;
}
public void setSystemSource(String value) {
this.systemSource = value;
}
public Date getSaveDate() {
return this.saveDate;
}
public void setSaveDate(Date value) {
this.saveDate = value;
}
}
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/10/18 * @date 2024/10/18
*/ */
@Data @Data
@TableName("third_well_avg_active_power") @TableName("THIRD_WELL_AVG_ACTIVE_POWER")
public class ThirdWellAvgActivePowerEnt implements Serializable { public class ThirdWellAvgActivePowerEnt implements Serializable {
@XText("ID") @XText("ID")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -12,7 +12,7 @@ import java.math.BigDecimal; ...@@ -12,7 +12,7 @@ import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@Data @Data
@TableName("weather_bureau_data") @TableName("WEATHER_BUREAU_DATA")
public class WeatherBureauDataEnt implements Serializable { public class WeatherBureauDataEnt implements Serializable {
@XText("ID") @XText("ID")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -4,6 +4,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -4,6 +4,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import pps.core.middle.entity.ThirdWellAvgActivePowerEnt; import pps.core.middle.entity.ThirdWellAvgActivePowerEnt;
/**
* 单井平均实际功率
*
* @author ZWT
* @date 2024/10/19
*/
@Repository(value = "pps.core.middle.mapper.ThirdWellAvgActivePowerMapper") @Repository(value = "pps.core.middle.mapper.ThirdWellAvgActivePowerMapper")
public interface ThirdWellAvgActivePowerMapper extends BaseMapper<ThirdWellAvgActivePowerEnt> { public interface ThirdWellAvgActivePowerMapper extends BaseMapper<ThirdWellAvgActivePowerEnt> {
} }
...@@ -5,6 +5,12 @@ import pps.core.middle.entity.ThirdWellAvgActivePowerView; ...@@ -5,6 +5,12 @@ import pps.core.middle.entity.ThirdWellAvgActivePowerView;
import java.util.List; import java.util.List;
/**
* 单井平均实际功率
*
* @author ZWT
* @date 2024/10/19
*/
@Repository(value = "pps.core.middle.mapper.ThirdWellAvgActivePowerViewMapper") @Repository(value = "pps.core.middle.mapper.ThirdWellAvgActivePowerViewMapper")
public interface ThirdWellAvgActivePowerViewMapper { public interface ThirdWellAvgActivePowerViewMapper {
ThirdWellAvgActivePowerView selectOne(ThirdWellAvgActivePowerView record); ThirdWellAvgActivePowerView selectOne(ThirdWellAvgActivePowerView record);
......
package pps.core.middle.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import pps.cloud.middle.service.IThirdWellAvgActivePowerCloudService;
import pps.cloud.middle.service.data.third_well_avg_active_power.GetThirdWellAvgActivePowerInput;
import pps.cloud.middle.service.data.third_well_avg_active_power.GetThirdWellAvgActivePowerOutput;
import pps.core.middle.entity.ThirdWellAvgActivePowerEnt;
import pps.core.middle.mapper.ThirdWellAvgActivePowerMapper;
import xstartup.annotation.XService;
import xstartup.base.XContext;
import xstartup.base.util.XCopyUtils;
import xstartup.data.XListResult;
import java.util.List;
/**
* 单井平均实际功率
*
* @author ZWT
* @date 2024/10/19 20:05
*/
@XService
public class ThirdWellAvgActivePowerCloudServiceImpl implements IThirdWellAvgActivePowerCloudService {
@Override
public XListResult<GetThirdWellAvgActivePowerOutput> getThirdActivePowerList(XContext context, GetThirdWellAvgActivePowerInput input) {
ThirdWellAvgActivePowerMapper mapper = context.getBean(ThirdWellAvgActivePowerMapper.class);
List<ThirdWellAvgActivePowerEnt> list = mapper.selectList(new QueryWrapper<ThirdWellAvgActivePowerEnt>()
.select("WELL_NUMBER", "INPUT_TIME", "AVG_ACTIVE_POWER"));
return XListResult.success(XCopyUtils.copyNewList(list, GetThirdWellAvgActivePowerOutput.class));
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment