|
@@ -3,7 +3,10 @@
|
|
<mapper namespace="com.bowintek.practice.mapper.cquery.WellInfoCQuery">
|
|
<mapper namespace="com.bowintek.practice.mapper.cquery.WellInfoCQuery">
|
|
|
|
|
|
<select id="getWellInfo" resultType="java.util.HashMap">
|
|
<select id="getWellInfo" resultType="java.util.HashMap">
|
|
- select well.*,
|
|
|
|
|
|
+ select
|
|
|
|
+ well.well_id, well.well_common_name, well_purpose, well.well_type, well.budgeted_md, well.completion_formation,
|
|
|
|
+ well.completion_method, well.org_id_a1, well.org_id_a2, well.org_name_a2,well.project_id, well.project_name,
|
|
|
|
+ TO_CHAR(well.spud_date , 'YYYY-MM-dd') spud_date,TO_CHAR(well.end_drilling_date , 'YYYY-MM-dd') end_drilling_date,
|
|
fact_daily.fluid_prod_daily,
|
|
fact_daily.fluid_prod_daily,
|
|
fact_daily.oil_prod_daily,
|
|
fact_daily.oil_prod_daily,
|
|
fact_daily.water_cut,
|
|
fact_daily.water_cut,
|
|
@@ -24,9 +27,11 @@
|
|
str.ko_horizontal_dislocation,
|
|
str.ko_horizontal_dislocation,
|
|
str.azimuth_angle,
|
|
str.azimuth_angle,
|
|
str.well_coordinates_x,
|
|
str.well_coordinates_x,
|
|
- str.well_coordinates_y
|
|
|
|
|
|
+ str.well_coordinates_y,
|
|
|
|
+ intr.well_state
|
|
from by_dwr.fact_dwr_well_basic_information well
|
|
from by_dwr.fact_dwr_well_basic_information well
|
|
left join by_dwr.fact_dwr_well_structure str on well.well_id = str.well_id
|
|
left join by_dwr.fact_dwr_well_structure str on well.well_id = str.well_id
|
|
|
|
+ left join by_dwr.fact_dwr_well_history_introduction intr on well.well_id=intr.well_id
|
|
left join (
|
|
left join (
|
|
select daily.*
|
|
select daily.*
|
|
from by_dwr.fact_dwr_pc_pro_well_vol_d daily
|
|
from by_dwr.fact_dwr_pc_pro_well_vol_d daily
|
|
@@ -48,17 +53,20 @@
|
|
<select id="getWellInfoList" parameterType="com.bowintek.practice.vo.query.WellInfoParams"
|
|
<select id="getWellInfoList" parameterType="com.bowintek.practice.vo.query.WellInfoParams"
|
|
resultType="java.util.HashMap">
|
|
resultType="java.util.HashMap">
|
|
select
|
|
select
|
|
- well.well_id, well.well_common_name, well_purpose, well.well_type, well.spud_date, well.end_drilling_date, well.budgeted_md, well.completion_formation,
|
|
|
|
|
|
+ well.well_id, well.well_common_name, well_purpose, well.well_type, well.end_drilling_date, well.budgeted_md, well.completion_formation,
|
|
well.completion_method, well.org_id_a1, well.org_id_a2, well.org_name_a2,well.project_id, well.project_name,
|
|
well.completion_method, well.org_id_a1, well.org_id_a2, well.org_name_a2,well.project_id, well.project_name,
|
|
- station.name org_name_a1,
|
|
|
|
|
|
+ TO_CHAR(well.spud_date , 'YYYY-MM-dd') spud_date,TO_CHAR(well.end_drilling_date , 'YYYY-MM-dd') end_drilling_date,
|
|
|
|
+ station.name org_name_a1,
|
|
TO_CHAR(fact_daily.oil_prod_begin_date , 'YYYY-MM-dd') oil_prod_begin_date,
|
|
TO_CHAR(fact_daily.oil_prod_begin_date , 'YYYY-MM-dd') oil_prod_begin_date,
|
|
TO_CHAR(fact_daily.oil_prod_recent_date , 'YYYY-MM-dd') oil_prod_recent_date,
|
|
TO_CHAR(fact_daily.oil_prod_recent_date , 'YYYY-MM-dd') oil_prod_recent_date,
|
|
fact_daily.current_state,fact_daily.water_cut,
|
|
fact_daily.current_state,fact_daily.water_cut,
|
|
fact_mon.oil_prod_mon,fact_mon.gas_prod_mon,fact_mon.gas_prod_year,fact_mon.oil_prod_year
|
|
fact_mon.oil_prod_mon,fact_mon.gas_prod_mon,fact_mon.gas_prod_year,fact_mon.oil_prod_year
|
|
,fact_mon.water_prod_mon,fact_mon.water_prod_year,
|
|
,fact_mon.water_prod_mon,fact_mon.water_prod_year,
|
|
well_stt.well_coordinates_x x,
|
|
well_stt.well_coordinates_x x,
|
|
- well_stt.well_coordinates_y y
|
|
|
|
|
|
+ well_stt.well_coordinates_y y,
|
|
|
|
+ intr.well_state
|
|
from by_dwr.fact_dwr_well_basic_information well
|
|
from by_dwr.fact_dwr_well_basic_information well
|
|
|
|
+ left join by_dwr.fact_dwr_well_history_introduction intr on well.well_id=intr.well_id
|
|
left join (
|
|
left join (
|
|
select daily.* from by_dwr.fact_dwr_pc_pro_well_vol_d daily
|
|
select daily.* from by_dwr.fact_dwr_pc_pro_well_vol_d daily
|
|
inner join(
|
|
inner join(
|
|
@@ -198,7 +206,7 @@
|
|
</select>
|
|
</select>
|
|
<select id="selectAnalyticalAssaysList" resultType="java.util.HashMap">
|
|
<select id="selectAnalyticalAssaysList" resultType="java.util.HashMap">
|
|
select *
|
|
select *
|
|
- from by_dm.dws_dm_analytical_assays aa
|
|
|
|
|
|
+ from by_dm.dws_dm_analytical_assays_new aa
|
|
where aa.well_id = #{well_id}
|
|
where aa.well_id = #{well_id}
|
|
</select>
|
|
</select>
|
|
<select id="selectAnalyticalAssaysSummary" resultType="java.util.HashMap">
|
|
<select id="selectAnalyticalAssaysSummary" resultType="java.util.HashMap">
|
|
@@ -211,7 +219,7 @@
|
|
SUM(CASE WHEN item_code = '录井综合解释' THEN 1 ELSE 0 END) AS 录井综合解释,
|
|
SUM(CASE WHEN item_code = '录井综合解释' THEN 1 ELSE 0 END) AS 录井综合解释,
|
|
SUM(CASE WHEN item_code = '气测解释' THEN 1 ELSE 0 END) AS 气测解释,
|
|
SUM(CASE WHEN item_code = '气测解释' THEN 1 ELSE 0 END) AS 气测解释,
|
|
SUM(CASE WHEN item_code = '定量荧光解释' THEN 1 ELSE 0 END) AS 定量荧光解释
|
|
SUM(CASE WHEN item_code = '定量荧光解释' THEN 1 ELSE 0 END) AS 定量荧光解释
|
|
- FROM by_dm.dws_dm_analytical_assays
|
|
|
|
|
|
+ FROM by_dm.dws_dm_analytical_assays_new
|
|
where well_id = #{well_id}
|
|
where well_id = #{well_id}
|
|
GROUP BY item_code;
|
|
GROUP BY item_code;
|
|
</select>
|
|
</select>
|