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