|
@@ -10,7 +10,7 @@
|
|
|
SUM(t.water_prod_daily) water,
|
|
|
SUM(t.water_cut) watercut
|
|
|
FROM ( SELECT wd.well_id,
|
|
|
- TO_CHAR(wd.prod_date , 'YYYY-MM-dd') prod_time_str,
|
|
|
+ TO_CHAR(wd.prod_date , 'YYYY-MM-DD') prod_time_str,
|
|
|
COALESCE(wd.gas_prod_daily, 0) gas_prod_daily,
|
|
|
COALESCE(wd.oil_prod_daily, 0) oil_prod_daily,
|
|
|
COALESCE(wd.fluid_prod_daily, 0) fluid_prod_daily,
|
|
@@ -35,15 +35,15 @@
|
|
|
SUM(t.fluid_prod_mon) fluid,
|
|
|
0 watercut
|
|
|
FROM ( SELECT wm.well_id,
|
|
|
- to_char(to_date(CONCAT(wm.prod_date,'-01'), '%Y-%m-%d'), 'YYYY年MM月') prod_time_str,
|
|
|
+ to_char(to_date(CONCAT(wm.prod_date,'-01'), 'YYYY-MM-DD'), 'YYYY年MM月') prod_time_str,
|
|
|
COALESCE(wm.gas_prod_mon, 0) gas_prod_mon,
|
|
|
COALESCE(wm.oil_prod_mon, 0) oil_prod_mon,
|
|
|
COALESCE(wm.water_prod_mon, 0) water_prod_mon,
|
|
|
COALESCE(wm.fluid_prod_mon, 0) fluid_prod_mon
|
|
|
FROM by_dwr.fact_dwr_pc_pro_well_vol_m wm
|
|
|
WHERE wm.prod_date is not null
|
|
|
- and to_date(CONCAT(wm.prod_date,'-01'), '%Y-%m-%d') <![CDATA[ >= ]]> to_date(#{startDay},'YYYY-MM-DD')
|
|
|
- and to_date(CONCAT(wm.prod_date,'-01'), '%Y-%m-%d') <![CDATA[ <= ]]> to_date(#{endDay},'YYYY-MM-DD')
|
|
|
+ and to_date(CONCAT(wm.prod_date,'-01'), 'YYYY-MM-DD') <![CDATA[ >= ]]> to_date(#{startDay},'YYYY-MM-DD')
|
|
|
+ and to_date(CONCAT(wm.prod_date,'-01'), 'YYYY-MM-DD') <![CDATA[ <= ]]> to_date(#{endDay},'YYYY-MM-DD')
|
|
|
<if test="wellId!='' and wellId!=null">
|
|
|
and wm.well_id=#{wellId}
|
|
|
</if>
|
|
@@ -67,8 +67,8 @@
|
|
|
COALESCE(wm.fluid_prod_mon, 0) fluid_prod_mon
|
|
|
FROM by_dwr.fact_dwr_pc_pro_well_vol_m wm
|
|
|
WHERE wm.prod_date is not null
|
|
|
- and to_date(CONCAT(wm.prod_date,'-01'), '%Y-%m-%d') <![CDATA[ >= ]]> to_date(#{startDay},'YYYY-MM-DD')
|
|
|
- and to_date(CONCAT(wm.prod_date,'-01'), '%Y-%m-%d') <![CDATA[ <= ]]> to_date(#{endDay},'YYYY-MM-DD')
|
|
|
+ and to_date(CONCAT(wm.prod_date,'-01'), 'YYYY-MM-DD') <![CDATA[ >= ]]> to_date(#{startDay},'YYYY-MM-DD')
|
|
|
+ and to_date(CONCAT(wm.prod_date,'-01'), 'YYYY-MM-DD') <![CDATA[ <= ]]> to_date(#{endDay},'YYYY-MM-DD')
|
|
|
<if test="wellId!='' and wellId!=null">
|
|
|
and wm.well_id=#{wellId}
|
|
|
</if>
|