Commit f2a75550 authored by ZWT's avatar ZWT

feat(吉林演示): 松原

1.开发间开优化结果统计功能,创建间开优化效果统计表,生成对应代码;
2.修改15天,10天,3天,1天间开优化功能,修改代码结构;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 16c4a660
...@@ -10,7 +10,7 @@ import java.io.Serializable; ...@@ -10,7 +10,7 @@ import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@TableName("base_data") @TableName("BASE_DATA")
public class BaseDataEnt implements Serializable { public class BaseDataEnt implements Serializable {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
......
...@@ -24,7 +24,7 @@ import java.util.Date; ...@@ -24,7 +24,7 @@ import java.util.Date;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
@TableName("energy_consumption_analysis") @TableName("ENERGY_CONSUMPTION_ANALYSIS")
public class EnergyConsumptionAnalysisEnt implements Serializable { public class EnergyConsumptionAnalysisEnt implements Serializable {
@XText("ID") @XText("ID")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2023/09/28 * @date 2023/09/28
*/ */
@Data @Data
@TableName("photovoltaic_electricity_consumption") @TableName("PHOTOVOLTAIC_ELECTRICITY_CONSUMPTION")
public class PhotovoltaicElectricityConsumptionEnt implements Serializable { public class PhotovoltaicElectricityConsumptionEnt implements Serializable {
@XText("ID") @XText("ID")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -11,7 +11,7 @@ import java.io.Serializable; ...@@ -11,7 +11,7 @@ import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
@Data @Data
@TableName("plant_power_data") @TableName("PLANT_POWER_DATA")
public class PlantPowerDataEnt implements Serializable { public class PlantPowerDataEnt implements Serializable {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
......
...@@ -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("plant_predicted_power_data") @TableName("PLANT_PREDICTED_POWER_DATA")
public class PlantPredictedPowerDataEnt implements Serializable { public class PlantPredictedPowerDataEnt implements Serializable {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
......
...@@ -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("plant_predicted_power_long_term_data") @TableName("PLANT_PREDICTED_POWER_LONG_TERM_DATA")
public class PlantPredictedPowerLongTermDataEnt implements Serializable { public class PlantPredictedPowerLongTermDataEnt implements Serializable {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
......
...@@ -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("plant_predicted_power_mid_term") @TableName("PLANT_PREDICTED_POWER_MID_TERM")
public class PlantPredictedPowerMidTermEnt implements Serializable { public class PlantPredictedPowerMidTermEnt implements Serializable {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
......
...@@ -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("plant_predicted_power_short_term") @TableName("PLANT_PREDICTED_POWER_SHORT_TERM")
public class PlantPredictedPowerShortTermEnt implements Serializable { public class PlantPredictedPowerShortTermEnt implements Serializable {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
......
...@@ -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("plant_predicted_power_ultra_term") @TableName("`PLANT_PREDICTED_POWER_ULTRA_TERM`")
public class PlantPredictedPowerUltraTermEnt implements Serializable { public class PlantPredictedPowerUltraTermEnt implements Serializable {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
......
...@@ -11,7 +11,7 @@ import java.io.Serializable; ...@@ -11,7 +11,7 @@ import java.io.Serializable;
import java.util.Date; import java.util.Date;
@Data @Data
@TableName("plant_train_power_task") @TableName("PLANT_TRAIN_POWER_TASK")
public class PlantTrainPowerTaskEnt implements Serializable { public class PlantTrainPowerTaskEnt implements Serializable {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
......
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/10/20 * @date 2024/10/20
*/ */
@Data @Data
@TableName("station_daily_production_situation") @TableName("STATION_DAILY_PRODUCTION_SITUATION")
public class StationDailyProductionSituationEnt implements Serializable { public class StationDailyProductionSituationEnt implements Serializable {
@XText("ID") @XText("ID")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2023/09/20 * @date 2023/09/20
*/ */
@Data @Data
@TableName("storage_predicted_power_data") @TableName("STORAGE_PREDICTED_POWER_DATA")
public class StoragePredictedPowerDataEnt implements Serializable { public class StoragePredictedPowerDataEnt implements Serializable {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
......
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/03/19 * @date 2024/03/19
*/ */
@Data @Data
@TableName("third_active_power_daily_update") @TableName("THIRD_ACTIVE_POWER_DAILY_UPDATE")
public class ThirdActivePowerDailyUpdateEnt implements Serializable { public class ThirdActivePowerDailyUpdateEnt implements Serializable {
@XText("ID") @XText("ID")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/03/19 * @date 2024/03/19
*/ */
@Data @Data
@TableName("third_active_power") @TableName("THIRD_ACTIVE_POWER")
public class ThirdActivePowerEnt implements Serializable { public class ThirdActivePowerEnt implements Serializable {
@XText("ID") @XText("ID")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/03/19 * @date 2024/03/19
*/ */
@Data @Data
@TableName("third_current_well_condition") @TableName("THIRD_CURRENT_WELL_CONDITION")
public class ThirdCurrentWellConditionEnt implements Serializable { public class ThirdCurrentWellConditionEnt implements Serializable {
@XText("ID") @XText("ID")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/04/01 * @date 2024/04/01
*/ */
@Data @Data
@TableName("third_daily_accumulation") @TableName("THIRD_DAILY_ACCUMULATION")
public class ThirdDailyAccumulationEnt implements Serializable { public class ThirdDailyAccumulationEnt implements Serializable {
@XText("ID") @XText("ID")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/04/02 * @date 2024/04/02
*/ */
@Data @Data
@TableName("third_daily_accumulation_update") @TableName("THIRD_DAILY_ACCUMULATION_UPDATE")
public class ThirdDailyAccumulationUpdateEnt implements Serializable { public class ThirdDailyAccumulationUpdateEnt implements Serializable {
@XText("ID") @XText("ID")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/03/19 * @date 2024/03/19
*/ */
@Data @Data
@TableName("third_photovoltaic_power") @TableName("THIRD_PHOTOVOLTAIC_POWER")
public class ThirdPhotovoltaicPowerEnt implements Serializable { public class ThirdPhotovoltaicPowerEnt implements Serializable {
@XText("ID") @XText("ID")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -18,7 +18,7 @@ import java.util.Date; ...@@ -18,7 +18,7 @@ import java.util.Date;
* @date 2024/04/01 * @date 2024/04/01
*/ */
@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)
......
...@@ -24,7 +24,7 @@ import java.util.Date; ...@@ -24,7 +24,7 @@ import java.util.Date;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @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")
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from energy_consumption_analysis from ENERGY_CONSUMPTION_ANALYSIS
where where
id=#{id} id=#{id}
</select> </select>
...@@ -32,13 +32,13 @@ ...@@ -32,13 +32,13 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from energy_consumption_analysis from ENERGY_CONSUMPTION_ANALYSIS
where where
id=#{id} id=#{id}
</select> </select>
<insert id="batchInsertList" parameterType="list"> <insert id="batchInsertList" parameterType="list">
INSERT INTO energy_consumption_analysis ( line_id, station_name, power_generation, power_consumption, INSERT INTO ENERGY_CONSUMPTION_ANALYSIS ( line_id, station_name, power_generation, power_consumption,
data_date, system_source ) data_date, system_source )
VALUES VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from photovoltaic_electricity_consumption from PHOTOVOLTAIC_ELECTRICITY_CONSUMPTION
where where
id=#{id} id=#{id}
</select> </select>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from photovoltaic_electricity_consumption from PHOTOVOLTAIC_ELECTRICITY_CONSUMPTION
where where
id=#{id} id=#{id}
</select> </select>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pps.core.prediction.mapper.PlantPowerDataViewMapper"> <mapper namespace="pps.core.prediction.mapper.PlantPowerDataViewMapper">
<insert id="insertBatch" parameterType="java.util.List"> <insert id="insertBatch" parameterType="java.util.List">
INSERT INTO plant_power_data INSERT INTO PLANT_POWER_DATA
(plant_id, (plant_id,
data_date, data_date,
temperature, temperature,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pps.core.prediction.mapper.PlantPredictedPowerLongTermDataViewMapper"> <mapper namespace="pps.core.prediction.mapper.PlantPredictedPowerLongTermDataViewMapper">
<insert id="insertBatch" parameterType="java.util.List"> <insert id="insertBatch" parameterType="java.util.List">
INSERT INTO plant_predicted_power_long_term_data INSERT INTO PLANT_PREDICTED_POWER_LONG_TERM_DATA
(plant_id, (plant_id,
data_date, data_date,
year_time, year_time,
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</otherwise> </otherwise>
</choose> </choose>
FROM FROM
plant_predicted_power_mid_term PLANT_PREDICTED_POWER_MID_TERM
WHERE WHERE
plant_id IN plant_id IN
<foreach collection="plantIds" item="item" open="(" separator="," close=")"> <foreach collection="plantIds" item="item" open="(" separator="," close=")">
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</otherwise> </otherwise>
</choose> </choose>
FROM FROM
plant_predicted_power_short_term PLANT_PREDICTED_POWER_SHORT_TERM
WHERE WHERE
plant_id IN plant_id IN
<foreach collection="plantIds" item="item" open="(" separator="," close=")"> <foreach collection="plantIds" item="item" open="(" separator="," close=")">
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
predict_power, predict_power,
HOUR( data_date ) AS create_time HOUR( data_date ) AS create_time
FROM FROM
plant_predicted_power_mid_term PLANT_PREDICTED_POWER_MID_TERM
WHERE WHERE
plant_id IN plant_id IN
<foreach collection="plantIds" item="item" open="(" separator="," close=")"> <foreach collection="plantIds" item="item" open="(" separator="," close=")">
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
predict_power, predict_power,
HOUR( data_date ) AS create_time HOUR( data_date ) AS create_time
FROM FROM
plant_predicted_power_short_term PLANT_PREDICTED_POWER_SHORT_TERM
<where> <where>
<if test="plantIds != null and plantIds.size() > 0"> <if test="plantIds != null and plantIds.size() > 0">
AND plant_id IN AND plant_id IN
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
</choose> </choose>
, '%H:%i:%s' ) AS create_time , '%H:%i:%s' ) AS create_time
FROM FROM
plant_predicted_power_mid_term PLANT_PREDICTED_POWER_MID_TERM
WHERE WHERE
plant_id IN plant_id IN
<foreach collection="plantIds" item="item" open="(" separator="," close=")"> <foreach collection="plantIds" item="item" open="(" separator="," close=")">
...@@ -221,7 +221,7 @@ ...@@ -221,7 +221,7 @@
</choose> </choose>
, '%H:%i:%s' ) AS create_time , '%H:%i:%s' ) AS create_time
FROM FROM
plant_predicted_power_short_term PLANT_PREDICTED_POWER_SHORT_TERM
WHERE WHERE
plant_id IN plant_id IN
<foreach collection="plantIds" item="item" open="(" separator="," close=")"> <foreach collection="plantIds" item="item" open="(" separator="," close=")">
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from station_daily_production_situation from STATION_DAILY_PRODUCTION_SITUATION
where where
id=#{id} id=#{id}
</select> </select>
...@@ -59,12 +59,12 @@ ...@@ -59,12 +59,12 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from station_daily_production_situation from STATION_DAILY_PRODUCTION_SITUATION
where where
id=#{id} id=#{id}
</select> </select>
<insert id="batchInsert" parameterType="list"> <insert id="batchInsert" parameterType="list">
INSERT INTO station_daily_production_situation ( INSERT INTO STATION_DAILY_PRODUCTION_SITUATION (
station_name, station_name,
data_date, data_date,
production_time, production_time,
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
IFNULL( ROUND( AVG( daily_electricity_consumption ), 2 ), 0 ) AS daily_electricity_consumption, IFNULL( ROUND( AVG( daily_electricity_consumption ), 2 ), 0 ) AS daily_electricity_consumption,
IFNULL( ROUND( AVG( photovoltaic_power ), 2 ), 0 ) AS photovoltaic_power IFNULL( ROUND( AVG( photovoltaic_power ), 2 ), 0 ) AS photovoltaic_power
FROM FROM
station_daily_production_situation WHERE STATION_DAILY_PRODUCTION_SITUATION WHERE
data_date BETWEEN #{beginTime} AND #{endTime} data_date BETWEEN #{beginTime} AND #{endTime}
AND station_name IN AND station_name IN
<foreach collection="stationNameList" open="(" close=")" separator="," item="item"> <foreach collection="stationNameList" open="(" close=")" separator="," item="item">
...@@ -144,14 +144,14 @@ ...@@ -144,14 +144,14 @@
station_name station_name
) d ) d
LEFT JOIN ( SELECT IFNULL( SUM( photovoltaic_power ), 0 ) AS month_photovoltaic_power, station_name FROM LEFT JOIN ( SELECT IFNULL( SUM( photovoltaic_power ), 0 ) AS month_photovoltaic_power, station_name FROM
station_daily_production_situation WHERE MONTH ( data_date ) = #{month} STATION_DAILY_PRODUCTION_SITUATION WHERE MONTH ( data_date ) = #{month}
AND station_name IN AND station_name IN
<foreach collection="stationNameList" open="(" close=")" separator="," item="item"> <foreach collection="stationNameList" open="(" close=")" separator="," item="item">
#{item} #{item}
</foreach> </foreach>
GROUP BY station_name ) m ON d.station_name = m.station_name GROUP BY station_name ) m ON d.station_name = m.station_name
LEFT JOIN ( SELECT IFNULL( SUM( photovoltaic_power ), 0 ) AS year_photovoltaic_power, station_name FROM LEFT JOIN ( SELECT IFNULL( SUM( photovoltaic_power ), 0 ) AS year_photovoltaic_power, station_name FROM
station_daily_production_situation WHERE YEAR ( data_date ) = #{year} STATION_DAILY_PRODUCTION_SITUATION WHERE YEAR ( data_date ) = #{year}
AND station_name IN AND station_name IN
<foreach collection="stationNameList" open="(" close=")" separator="," item="item"> <foreach collection="stationNameList" open="(" close=")" separator="," item="item">
#{item} #{item}
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from storage_predicted_power_data from STORAGE_PREDICTED_POWER_DATA
where where
id=#{id} id=#{id}
</select> </select>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from storage_predicted_power_data from STORAGE_PREDICTED_POWER_DATA
where where
id=#{id} id=#{id}
</select> </select>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_active_power_daily_update from THIRD_ACTIVE_POWER_DAILY_UPDATE
where where
id=#{id} id=#{id}
</select> </select>
...@@ -36,14 +36,14 @@ ...@@ -36,14 +36,14 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_active_power_daily_update from THIRD_ACTIVE_POWER_DAILY_UPDATE
where where
id=#{id} id=#{id}
</select> </select>
<delete id="deleteByCurrentDayData" parameterType="java.util.List"> <delete id="deleteByCurrentDayData" parameterType="java.util.List">
delete delete
from third_active_power_daily_update from THIRD_ACTIVE_POWER_DAILY_UPDATE
where save_hour = #{currentDay} where save_hour = #{currentDay}
and station_name IN and station_name IN
<foreach collection="list" item="item" open="(" separator="," close=")"> <foreach collection="list" item="item" open="(" separator="," close=")">
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<delete id="deleteByCurrentDayDataList" parameterType="java.util.List"> <delete id="deleteByCurrentDayDataList" parameterType="java.util.List">
delete delete
from third_active_power_daily_update from THIRD_ACTIVE_POWER_DAILY_UPDATE
where save_hour IN where save_hour IN
<foreach collection="currentDayList" item="item" open="(" separator="," close=")"> <foreach collection="currentDayList" item="item" open="(" separator="," close=")">
#{item} #{item}
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</delete> </delete>
<insert id="batchInsertList" parameterType="java.util.List"> <insert id="batchInsertList" parameterType="java.util.List">
insert into third_active_power_daily_update (station_name, station_id, create_date, photovoltaic_power, insert into THIRD_ACTIVE_POWER_DAILY_UPDATE (station_name, station_id, create_date, photovoltaic_power,
meter_power, meter_power,
system_source, save_date, save_hour) system_source, save_date, save_hour)
values values
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
IFNULL( ROUND( AVG( photovoltaic_power ), 2 ), 0 ) AS photovoltaic_power, IFNULL( ROUND( AVG( photovoltaic_power ), 2 ), 0 ) AS photovoltaic_power,
IFNULL( ROUND( AVG( meter_power ), 2 ), 0 ) AS meter_power IFNULL( ROUND( AVG( meter_power ), 2 ), 0 ) AS meter_power
FROM (SELECT station_name, HOUR ( create_date ) AS hour_str, photovoltaic_power, meter_power FROM (SELECT station_name, HOUR ( create_date ) AS hour_str, photovoltaic_power, meter_power
FROM third_active_power_daily_update FROM THIRD_ACTIVE_POWER_DAILY_UPDATE
<where> <where>
<if test="systemSource != null"> <if test="systemSource != null">
AND system_source = #{systemSource} AND system_source = #{systemSource}
......
...@@ -24,20 +24,20 @@ ...@@ -24,20 +24,20 @@
<select id="selectOne" parameterType="pps.core.prediction.entity.ThirdActivePowerView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.prediction.entity.ThirdActivePowerView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_active_power from THIRD_ACTIVE_POWER
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.prediction.entity.ThirdActivePowerView" resultMap="BaseResultMap"> <select id="selectList" parameterType="pps.core.prediction.entity.ThirdActivePowerView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_active_power from THIRD_ACTIVE_POWER
where where
id=#{id} id=#{id}
</select> </select>
<insert id="batchInsertList" parameterType="list"> <insert id="batchInsertList" parameterType="list">
INSERT INTO third_active_power ( station_name, station_id, create_date, photovoltaic_power, meter_power, INSERT INTO THIRD_ACTIVE_POWER ( station_name, station_id, create_date, photovoltaic_power, meter_power,
system_source, input_time) system_source, input_time)
VALUES VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
IFNULL(AVG(photovoltaic_power), 0) AS photovoltaic_power, IFNULL(AVG(photovoltaic_power), 0) AS photovoltaic_power,
IFNULL(AVG(meter_power), 0) AS meter_power IFNULL(AVG(meter_power), 0) AS meter_power
FROM (SELECT station_name, HOUR ( create_date ) AS hour_str, photovoltaic_power, meter_power FROM (SELECT station_name, HOUR ( create_date ) AS hour_str, photovoltaic_power, meter_power
FROM third_active_power FROM THIRD_ACTIVE_POWER
WHERE station_name = #{stationName} WHERE station_name = #{stationName}
AND DATE ( create_date ) = #{createDate}) z AND DATE ( create_date ) = #{createDate}) z
GROUP BY hour_str GROUP BY hour_str
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
</otherwise> </otherwise>
</choose> </choose>
station_name station_name
FROM third_active_power FROM THIRD_ACTIVE_POWER
WHERE ( WHERE (
<if test="stationNames != null and stationNames.size() > 0"> <if test="stationNames != null and stationNames.size() > 0">
station_name IN station_name IN
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
UNIX_TIMESTAMP(create_date) AS time_stamp, UNIX_TIMESTAMP(create_date) AS time_stamp,
UNIX_TIMESTAMP(create_date) % 10 AS mo UNIX_TIMESTAMP(create_date) % 10 AS mo
FROM FROM
third_active_power THIRD_ACTIVE_POWER
WHERE WHERE
DATE ( create_date ) = #{createDate} DATE ( create_date ) = #{createDate}
<if test="systemSource != null"> <if test="systemSource != null">
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
</otherwise> </otherwise>
</choose> </choose>
FROM FROM
third_active_power THIRD_ACTIVE_POWER
WHERE WHERE
station_id = #{stationId} station_id = #{stationId}
AND input_time &gt;= #{startTime} AND input_time &gt;= #{startTime}
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_current_well_condition from THIRD_CURRENT_WELL_CONDITION
where where
id=#{id} id=#{id}
</select> </select>
...@@ -34,13 +34,13 @@ ...@@ -34,13 +34,13 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_current_well_condition from THIRD_CURRENT_WELL_CONDITION
where where
id=#{id} id=#{id}
</select> </select>
<delete id="deleteByParams" parameterType="list"> <delete id="deleteByParams" parameterType="list">
DELETE FROM third_current_well_condition DELETE FROM THIRD_CURRENT_WELL_CONDITION
WHERE WHERE
well_number IN well_number IN
<foreach collection="list" item="item" open="(" separator="," close=")"> <foreach collection="list" item="item" open="(" separator="," close=")">
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</delete> </delete>
<insert id="batchInsertList" parameterType="list"> <insert id="batchInsertList" parameterType="list">
INSERT INTO third_current_well_condition (well_number, next_time, well_status, cumulative_production, INSERT INTO THIRD_CURRENT_WELL_CONDITION (well_number, next_time, well_status, cumulative_production,
running_time, system_source, update_time) running_time, system_source, update_time)
VALUES VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_daily_accumulation_update from THIRD_DAILY_ACCUMULATION_UPDATE
where where
id=#{id} id=#{id}
</select> </select>
...@@ -42,13 +42,13 @@ ...@@ -42,13 +42,13 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_daily_accumulation_update from THIRD_DAILY_ACCUMULATION_UPDATE
where where
id=#{id} id=#{id}
</select> </select>
<insert id="batchInsertList" parameterType="list"> <insert id="batchInsertList" parameterType="list">
INSERT INTO third_daily_accumulation_update ( station_name, station_id, create_date, photovoltaic_power, INSERT INTO THIRD_DAILY_ACCUMULATION_UPDATE ( station_name, station_id, create_date, photovoltaic_power,
daily_electricity_consumption, daily_liquid_production, in_place_consumption, energy_storage_discharge, daily_electricity_consumption, daily_liquid_production, in_place_consumption, energy_storage_discharge,
save_date, system_source, save_date, system_source,
save_hour) save_hour)
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
IFNULL(SUM(daily_electricity_consumption), 0) AS daily_electricity_consumption, IFNULL(SUM(daily_electricity_consumption), 0) AS daily_electricity_consumption,
IFNULL(SUM(in_place_consumption), 0) AS in_place_consumption, IFNULL(SUM(in_place_consumption), 0) AS in_place_consumption,
1 AS day_flag 1 AS day_flag
FROM third_daily_accumulation_update FROM THIRD_DAILY_ACCUMULATION_UPDATE
WHERE WHERE
DATE ( create_date) = #{today} DATE ( create_date) = #{today}
AND system_source = #{systemSource} AND system_source = #{systemSource}
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
IFNULL(SUM(daily_electricity_consumption), 0) AS daily_electricity_consumption, IFNULL(SUM(daily_electricity_consumption), 0) AS daily_electricity_consumption,
IFNULL(SUM(in_place_consumption), 0) AS in_place_consumption, IFNULL(SUM(in_place_consumption), 0) AS in_place_consumption,
2 AS day_flag 2 AS day_flag
FROM third_daily_accumulation_update FROM THIRD_DAILY_ACCUMULATION_UPDATE
WHERE WHERE
DATE ( create_date ) = #{yesterday} DATE ( create_date ) = #{yesterday}
AND system_source = #{systemSource} AND system_source = #{systemSource}
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
IFNULL(SUM(daily_electricity_consumption), 0) AS daily_electricity_consumption, IFNULL(SUM(daily_electricity_consumption), 0) AS daily_electricity_consumption,
IFNULL(SUM(in_place_consumption), 0) AS in_place_consumption, IFNULL(SUM(in_place_consumption), 0) AS in_place_consumption,
3 AS day_flag 3 AS day_flag
FROM third_daily_accumulation_update FROM THIRD_DAILY_ACCUMULATION_UPDATE
WHERE WHERE
DATE ( create_date ) = #{lastYear} DATE ( create_date ) = #{lastYear}
AND system_source = #{systemSource} AND system_source = #{systemSource}
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
</otherwise> </otherwise>
</choose> </choose>
FROM FROM
third_daily_accumulation_update THIRD_DAILY_ACCUMULATION_UPDATE
WHERE WHERE
station_name IN station_name IN
<foreach collection="stationNameList" open="(" close=")" separator="," item="item"> <foreach collection="stationNameList" open="(" close=")" separator="," item="item">
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_daily_accumulation from THIRD_DAILY_ACCUMULATION
where where
id=#{id} id=#{id}
</select> </select>
...@@ -39,13 +39,13 @@ ...@@ -39,13 +39,13 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_daily_accumulation from THIRD_DAILY_ACCUMULATION
where where
id=#{id} id=#{id}
</select> </select>
<insert id="batchInsertList" parameterType="list"> <insert id="batchInsertList" parameterType="list">
INSERT INTO third_daily_accumulation ( station_name, station_id, create_date, photovoltaic_power, INSERT INTO THIRD_DAILY_ACCUMULATION ( station_name, station_id, create_date, photovoltaic_power,
daily_electricity_consumption, daily_liquid_production, in_place_consumption, energy_storage_discharge, daily_electricity_consumption, daily_liquid_production, in_place_consumption, energy_storage_discharge,
save_date, system_source ) save_date, system_source )
VALUES VALUES
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_photovoltaic_power from THIRD_PHOTOVOLTAIC_POWER
where where
id=#{id} id=#{id}
</select> </select>
...@@ -28,13 +28,13 @@ ...@@ -28,13 +28,13 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_photovoltaic_power from THIRD_PHOTOVOLTAIC_POWER
where where
id=#{id} id=#{id}
</select> </select>
<insert id="batchInsertList" parameterType="list"> <insert id="batchInsertList" parameterType="list">
INSERT INTO third_photovoltaic_power (station_name, create_date, photovoltaic_power, system_source) INSERT INTO THIRD_PHOTOVOLTAIC_POWER (station_name, create_date, photovoltaic_power, system_source)
VALUES VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
( (
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_well_avg_active_power from THIRD_WELL_AVG_ACTIVE_POWER
where where
id=#{id} id=#{id}
</select> </select>
...@@ -30,13 +30,13 @@ ...@@ -30,13 +30,13 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from third_well_avg_active_power from THIRD_WELL_AVG_ACTIVE_POWER
where where
id=#{id} id=#{id}
</select> </select>
<insert id="batchInsertList" parameterType="list"> <insert id="batchInsertList" parameterType="list">
INSERT INTO third_well_avg_active_power ( well_number, input_time, avg_active_power, system_source, INSERT INTO THIRD_WELL_AVG_ACTIVE_POWER ( well_number, input_time, avg_active_power, system_source,
save_date ) save_date )
VALUES VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
hour_str AS hour_number, hour_str AS hour_number,
IFNULL( AVG( avg_active_power ), 0 ) AS avg_active_power IFNULL( AVG( avg_active_power ), 0 ) AS avg_active_power
FROM FROM
( SELECT well_number, HOUR ( input_time ) AS hour_str, avg_active_power FROM third_well_avg_active_power ( SELECT well_number, HOUR ( input_time ) AS hour_str, avg_active_power FROM THIRD_WELL_AVG_ACTIVE_POWER
<where> <where>
<if test="inputTime != null"> <if test="inputTime != null">
AND DATE ( input_time ) = #{inputTime} AND DATE ( input_time ) = #{inputTime}
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
</choose> </choose>
well_number well_number
FROM FROM
third_well_avg_active_power THIRD_WELL_AVG_ACTIVE_POWER
WHERE WHERE
( (
<if test="wellNumbers != null and wellNumbers.size() > 0"> <if test="wellNumbers != null and wellNumbers.size() > 0">
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from wellhead_daily_production_situation from WELLHEAD_DAILY_PRODUCTION_SITUATION
where where
id=#{id} id=#{id}
</select> </select>
...@@ -57,13 +57,13 @@ ...@@ -57,13 +57,13 @@
resultMap="BaseResultMap"> resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from wellhead_daily_production_situation from WELLHEAD_DAILY_PRODUCTION_SITUATION
where where
id=#{id} id=#{id}
</select> </select>
<insert id="batchInsertList" parameterType="list"> <insert id="batchInsertList" parameterType="list">
INSERT INTO wellhead_daily_production_situation ( wellhead_id, well_number, data_date, production_time, INSERT INTO WELLHEAD_DAILY_PRODUCTION_SITUATION ( wellhead_id, well_number, data_date, production_time,
daily_electricity_consumption, daily_liquid_production, system_source, daily_utility_electricity_consumption, daily_electricity_consumption, daily_liquid_production, system_source, daily_utility_electricity_consumption,
electricity_consumption_ph, electricity_consumption_ph,
electricity_consumption_hh, electricity_consumption_hh,
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
l.line_name AS line_name, l.line_name AS line_name,
IFNULL(SUM(s.daily_electricity_consumption), 0) AS daily_electricity_consumption IFNULL(SUM(s.daily_electricity_consumption), 0) AS daily_electricity_consumption
FROM BASE_POWER_LINE_WELLHEAD w FROM BASE_POWER_LINE_WELLHEAD w
JOIN wellhead_daily_production_situation s ON w.wellhead_id = s.wellhead_id JOIN WELLHEAD_DAILY_PRODUCTION_SITUATION s ON w.wellhead_id = s.wellhead_id
LEFT JOIN BASE_POWER_LINE l ON w.line_id = l.id LEFT JOIN BASE_POWER_LINE l ON w.line_id = l.id
WHERE w.is_deleted = 1 WHERE w.is_deleted = 1
AND s.data_date = #{date} AND s.data_date = #{date}
......
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