|
@@ -0,0 +1,366 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="com.bowintek.practice.mapper.FactDwrPcProWellVolDMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.bowintek.practice.model.FactDwrPcProWellVolD">
|
|
|
+ <result column="well_id" jdbcType="VARCHAR" property="well_id" />
|
|
|
+ <result column="well_common_name" jdbcType="VARCHAR" property="well_common_name" />
|
|
|
+ <result column="prod_time" jdbcType="DATE" property="prod_time" />
|
|
|
+ <result column="oil_prod_daily" jdbcType="NUMERIC" property="oil_prod_daily" />
|
|
|
+ <result column="water_prod_daily" jdbcType="NUMERIC" property="water_prod_daily" />
|
|
|
+ <result column="gas_prod_daily" jdbcType="NUMERIC" property="gas_prod_daily" />
|
|
|
+ <result column="water_cut" jdbcType="NUMERIC" property="water_cut" />
|
|
|
+ <result column="sand_content_ratio" jdbcType="NUMERIC" property="sand_content_ratio" />
|
|
|
+ <result column="oil_prod_begin_date" jdbcType="DATE" property="oil_prod_begin_date" />
|
|
|
+ <result column="oil_prod_recent_date" jdbcType="DATE" property="oil_prod_recent_date" />
|
|
|
+ <result column="well_type" jdbcType="VARCHAR" property="well_type" />
|
|
|
+ <result column="spud_date" jdbcType="DATE" property="spud_date" />
|
|
|
+ <result column="end_drilling_date" jdbcType="DATE" property="end_drilling_date" />
|
|
|
+ <result column="budgeted_md" jdbcType="NUMERIC" property="budgeted_md" />
|
|
|
+ <result column="completion_date" jdbcType="DATE" property="completion_date" />
|
|
|
+ <result column="current_state" jdbcType="VARCHAR" property="current_state" />
|
|
|
+ <result column="oil_prod_latest_monthly" jdbcType="NUMERIC" property="oil_prod_latest_monthly" />
|
|
|
+ <result column="gas_prod_cum" jdbcType="NUMERIC" property="gas_prod_cum" />
|
|
|
+ <result column="water_prod_cum" jdbcType="NUMERIC" property="water_prod_cum" />
|
|
|
+ <result column="oil_prod_cum" jdbcType="NUMERIC" property="oil_prod_cum" />
|
|
|
+ <result column="fluid_prod_daily" jdbcType="NUMERIC" property="fluid_prod_daily" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Example_Where_Clause">
|
|
|
+ <where>
|
|
|
+ <foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="Update_By_Example_Where_Clause">
|
|
|
+ <where>
|
|
|
+ <foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ well_id, well_common_name, prod_time, oil_prod_daily, water_prod_daily, gas_prod_daily,
|
|
|
+ water_cut, sand_content_ratio, oil_prod_begin_date, oil_prod_recent_date, well_type,
|
|
|
+ spud_date, end_drilling_date, budgeted_md, completion_date, current_state, oil_prod_latest_monthly,
|
|
|
+ gas_prod_cum, water_prod_cum, oil_prod_cum, fluid_prod_daily
|
|
|
+ </sql>
|
|
|
+ <select id="selectByExample" parameterType="com.bowintek.practice.model.FactDwrPcProWellVolDExample" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from fact_dwr_pc_pro_well_vol_d
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ <if test="orderByClause != null">
|
|
|
+ order by ${orderByClause}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByExample" parameterType="com.bowintek.practice.model.FactDwrPcProWellVolDExample">
|
|
|
+ delete from fact_dwr_pc_pro_well_vol_d
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.bowintek.practice.model.FactDwrPcProWellVolD">
|
|
|
+ insert into fact_dwr_pc_pro_well_vol_d (well_id, well_common_name, prod_time,
|
|
|
+ oil_prod_daily, water_prod_daily, gas_prod_daily,
|
|
|
+ water_cut, sand_content_ratio, oil_prod_begin_date,
|
|
|
+ oil_prod_recent_date, well_type, spud_date,
|
|
|
+ end_drilling_date, budgeted_md, completion_date,
|
|
|
+ current_state, oil_prod_latest_monthly,
|
|
|
+ gas_prod_cum, water_prod_cum, oil_prod_cum,
|
|
|
+ fluid_prod_daily)
|
|
|
+ values (#{well_id,jdbcType=VARCHAR}, #{well_common_name,jdbcType=VARCHAR}, #{prod_time,jdbcType=DATE},
|
|
|
+ #{oil_prod_daily,jdbcType=NUMERIC}, #{water_prod_daily,jdbcType=NUMERIC}, #{gas_prod_daily,jdbcType=NUMERIC},
|
|
|
+ #{water_cut,jdbcType=NUMERIC}, #{sand_content_ratio,jdbcType=NUMERIC}, #{oil_prod_begin_date,jdbcType=DATE},
|
|
|
+ #{oil_prod_recent_date,jdbcType=DATE}, #{well_type,jdbcType=VARCHAR}, #{spud_date,jdbcType=DATE},
|
|
|
+ #{end_drilling_date,jdbcType=DATE}, #{budgeted_md,jdbcType=NUMERIC}, #{completion_date,jdbcType=DATE},
|
|
|
+ #{current_state,jdbcType=VARCHAR}, #{oil_prod_latest_monthly,jdbcType=NUMERIC},
|
|
|
+ #{gas_prod_cum,jdbcType=NUMERIC}, #{water_prod_cum,jdbcType=NUMERIC}, #{oil_prod_cum,jdbcType=NUMERIC},
|
|
|
+ #{fluid_prod_daily,jdbcType=NUMERIC})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.bowintek.practice.model.FactDwrPcProWellVolD">
|
|
|
+ insert into fact_dwr_pc_pro_well_vol_d
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="well_id != null">
|
|
|
+ well_id,
|
|
|
+ </if>
|
|
|
+ <if test="well_common_name != null">
|
|
|
+ well_common_name,
|
|
|
+ </if>
|
|
|
+ <if test="prod_time != null">
|
|
|
+ prod_time,
|
|
|
+ </if>
|
|
|
+ <if test="oil_prod_daily != null">
|
|
|
+ oil_prod_daily,
|
|
|
+ </if>
|
|
|
+ <if test="water_prod_daily != null">
|
|
|
+ water_prod_daily,
|
|
|
+ </if>
|
|
|
+ <if test="gas_prod_daily != null">
|
|
|
+ gas_prod_daily,
|
|
|
+ </if>
|
|
|
+ <if test="water_cut != null">
|
|
|
+ water_cut,
|
|
|
+ </if>
|
|
|
+ <if test="sand_content_ratio != null">
|
|
|
+ sand_content_ratio,
|
|
|
+ </if>
|
|
|
+ <if test="oil_prod_begin_date != null">
|
|
|
+ oil_prod_begin_date,
|
|
|
+ </if>
|
|
|
+ <if test="oil_prod_recent_date != null">
|
|
|
+ oil_prod_recent_date,
|
|
|
+ </if>
|
|
|
+ <if test="well_type != null">
|
|
|
+ well_type,
|
|
|
+ </if>
|
|
|
+ <if test="spud_date != null">
|
|
|
+ spud_date,
|
|
|
+ </if>
|
|
|
+ <if test="end_drilling_date != null">
|
|
|
+ end_drilling_date,
|
|
|
+ </if>
|
|
|
+ <if test="budgeted_md != null">
|
|
|
+ budgeted_md,
|
|
|
+ </if>
|
|
|
+ <if test="completion_date != null">
|
|
|
+ completion_date,
|
|
|
+ </if>
|
|
|
+ <if test="current_state != null">
|
|
|
+ current_state,
|
|
|
+ </if>
|
|
|
+ <if test="oil_prod_latest_monthly != null">
|
|
|
+ oil_prod_latest_monthly,
|
|
|
+ </if>
|
|
|
+ <if test="gas_prod_cum != null">
|
|
|
+ gas_prod_cum,
|
|
|
+ </if>
|
|
|
+ <if test="water_prod_cum != null">
|
|
|
+ water_prod_cum,
|
|
|
+ </if>
|
|
|
+ <if test="oil_prod_cum != null">
|
|
|
+ oil_prod_cum,
|
|
|
+ </if>
|
|
|
+ <if test="fluid_prod_daily != null">
|
|
|
+ fluid_prod_daily,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="well_id != null">
|
|
|
+ #{well_id,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="well_common_name != null">
|
|
|
+ #{well_common_name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="prod_time != null">
|
|
|
+ #{prod_time,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="oil_prod_daily != null">
|
|
|
+ #{oil_prod_daily,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="water_prod_daily != null">
|
|
|
+ #{water_prod_daily,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="gas_prod_daily != null">
|
|
|
+ #{gas_prod_daily,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="water_cut != null">
|
|
|
+ #{water_cut,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="sand_content_ratio != null">
|
|
|
+ #{sand_content_ratio,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="oil_prod_begin_date != null">
|
|
|
+ #{oil_prod_begin_date,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="oil_prod_recent_date != null">
|
|
|
+ #{oil_prod_recent_date,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="well_type != null">
|
|
|
+ #{well_type,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="spud_date != null">
|
|
|
+ #{spud_date,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="end_drilling_date != null">
|
|
|
+ #{end_drilling_date,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="budgeted_md != null">
|
|
|
+ #{budgeted_md,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="completion_date != null">
|
|
|
+ #{completion_date,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="current_state != null">
|
|
|
+ #{current_state,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="oil_prod_latest_monthly != null">
|
|
|
+ #{oil_prod_latest_monthly,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="gas_prod_cum != null">
|
|
|
+ #{gas_prod_cum,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="water_prod_cum != null">
|
|
|
+ #{water_prod_cum,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="oil_prod_cum != null">
|
|
|
+ #{oil_prod_cum,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="fluid_prod_daily != null">
|
|
|
+ #{fluid_prod_daily,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <select id="countByExample" parameterType="com.bowintek.practice.model.FactDwrPcProWellVolDExample" resultType="java.lang.Long">
|
|
|
+ select count(*) from fact_dwr_pc_pro_well_vol_d
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <update id="updateByExampleSelective" parameterType="map">
|
|
|
+ update fact_dwr_pc_pro_well_vol_d
|
|
|
+ <set>
|
|
|
+ <if test="row.well_id != null">
|
|
|
+ well_id = #{row.well_id,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="row.well_common_name != null">
|
|
|
+ well_common_name = #{row.well_common_name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="row.prod_time != null">
|
|
|
+ prod_time = #{row.prod_time,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="row.oil_prod_daily != null">
|
|
|
+ oil_prod_daily = #{row.oil_prod_daily,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="row.water_prod_daily != null">
|
|
|
+ water_prod_daily = #{row.water_prod_daily,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="row.gas_prod_daily != null">
|
|
|
+ gas_prod_daily = #{row.gas_prod_daily,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="row.water_cut != null">
|
|
|
+ water_cut = #{row.water_cut,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="row.sand_content_ratio != null">
|
|
|
+ sand_content_ratio = #{row.sand_content_ratio,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="row.oil_prod_begin_date != null">
|
|
|
+ oil_prod_begin_date = #{row.oil_prod_begin_date,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="row.oil_prod_recent_date != null">
|
|
|
+ oil_prod_recent_date = #{row.oil_prod_recent_date,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="row.well_type != null">
|
|
|
+ well_type = #{row.well_type,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="row.spud_date != null">
|
|
|
+ spud_date = #{row.spud_date,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="row.end_drilling_date != null">
|
|
|
+ end_drilling_date = #{row.end_drilling_date,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="row.budgeted_md != null">
|
|
|
+ budgeted_md = #{row.budgeted_md,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="row.completion_date != null">
|
|
|
+ completion_date = #{row.completion_date,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="row.current_state != null">
|
|
|
+ current_state = #{row.current_state,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="row.oil_prod_latest_monthly != null">
|
|
|
+ oil_prod_latest_monthly = #{row.oil_prod_latest_monthly,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="row.gas_prod_cum != null">
|
|
|
+ gas_prod_cum = #{row.gas_prod_cum,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="row.water_prod_cum != null">
|
|
|
+ water_prod_cum = #{row.water_prod_cum,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="row.oil_prod_cum != null">
|
|
|
+ oil_prod_cum = #{row.oil_prod_cum,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ <if test="row.fluid_prod_daily != null">
|
|
|
+ fluid_prod_daily = #{row.fluid_prod_daily,jdbcType=NUMERIC},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <if test="example != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExample" parameterType="map">
|
|
|
+ update fact_dwr_pc_pro_well_vol_d
|
|
|
+ set well_id = #{row.well_id,jdbcType=VARCHAR},
|
|
|
+ well_common_name = #{row.well_common_name,jdbcType=VARCHAR},
|
|
|
+ prod_time = #{row.prod_time,jdbcType=DATE},
|
|
|
+ oil_prod_daily = #{row.oil_prod_daily,jdbcType=NUMERIC},
|
|
|
+ water_prod_daily = #{row.water_prod_daily,jdbcType=NUMERIC},
|
|
|
+ gas_prod_daily = #{row.gas_prod_daily,jdbcType=NUMERIC},
|
|
|
+ water_cut = #{row.water_cut,jdbcType=NUMERIC},
|
|
|
+ sand_content_ratio = #{row.sand_content_ratio,jdbcType=NUMERIC},
|
|
|
+ oil_prod_begin_date = #{row.oil_prod_begin_date,jdbcType=DATE},
|
|
|
+ oil_prod_recent_date = #{row.oil_prod_recent_date,jdbcType=DATE},
|
|
|
+ well_type = #{row.well_type,jdbcType=VARCHAR},
|
|
|
+ spud_date = #{row.spud_date,jdbcType=DATE},
|
|
|
+ end_drilling_date = #{row.end_drilling_date,jdbcType=DATE},
|
|
|
+ budgeted_md = #{row.budgeted_md,jdbcType=NUMERIC},
|
|
|
+ completion_date = #{row.completion_date,jdbcType=DATE},
|
|
|
+ current_state = #{row.current_state,jdbcType=VARCHAR},
|
|
|
+ oil_prod_latest_monthly = #{row.oil_prod_latest_monthly,jdbcType=NUMERIC},
|
|
|
+ gas_prod_cum = #{row.gas_prod_cum,jdbcType=NUMERIC},
|
|
|
+ water_prod_cum = #{row.water_prod_cum,jdbcType=NUMERIC},
|
|
|
+ oil_prod_cum = #{row.oil_prod_cum,jdbcType=NUMERIC},
|
|
|
+ fluid_prod_daily = #{row.fluid_prod_daily,jdbcType=NUMERIC}
|
|
|
+ <if test="example != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+</mapper>
|