<?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.chinaitop.depot.intelligent.basicdata.mapper.TWarehouseMapper" >
  <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.basicdata.model.TWarehouse" >
    <id column="id" property="id" jdbcType="VARCHAR" />
    <result column="v_kd_code" property="vKdCode" jdbcType="VARCHAR" />
    <result column="v_cf_code" property="vCfCode" jdbcType="VARCHAR" />
    <result column="v_cf_name" property="vCfName" jdbcType="VARCHAR" />
    <result column="v_cf_type" property="vCfType" jdbcType="VARCHAR" />
    <result column="v_cf_struct" property="vCfStruct" jdbcType="VARCHAR" />
    <result column="v_build_type" property="vBuildType" jdbcType="VARCHAR" />
    <result column="v_cf_long" property="vCfLong" jdbcType="DECIMAL" />
    <result column="v_cf_wide" property="vCfWide" jdbcType="DECIMAL" />
    <result column="v_cf_high" property="vCfHigh" jdbcType="DECIMAL" />
    <result column="f_design_cap" property="fDesignCap" jdbcType="DECIMAL" />
    <result column="f_act_cap" property="fActCap" jdbcType="DECIMAL" />
    <result column="v_work_date" property="vWorkDate" jdbcType="TIMESTAMP" />
    <result column="v_cf_status" property="vCfStatus" jdbcType="VARCHAR" />
    <result column="v_remark" property="vRemark" jdbcType="VARCHAR" />
    <result column="v_keeper_id" property="vKeeperId" jdbcType="VARCHAR" />
    <result column="duiliang_h" property="duiliangH" jdbcType="VARCHAR" />
    <result column="isshuliangjiace" property="isshuliangjiace" jdbcType="INTEGER" />
    <result column="is_in_check" property="isInCheck" jdbcType="INTEGER" />
    <result column="check_mode" property="checkMode" jdbcType="VARCHAR" />
    <result column="is_wzc" property="isWzc" jdbcType="VARCHAR" />
    <result column="type" property="type" jdbcType="VARCHAR" />
    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Example_Where_Clause" >
    <where >
      <foreach collection="oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <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 collection="criterion.value" item="listItem" open="(" close=")" 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="(" suffix=")" prefixOverrides="and" >
            <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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List" >
    id, v_kd_code, v_cf_code, v_cf_name, v_cf_type, v_cf_struct, v_build_type, v_cf_long, 
    v_cf_wide, v_cf_high, f_design_cap, f_act_cap, v_work_date, v_cf_status, v_remark, 
    v_keeper_id, duiliang_h, isshuliangjiace, is_in_check, check_mode, is_wzc, type, 
    update_time
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TWarehouseExample" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from t_warehouse
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null" >
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select 
    <include refid="Base_Column_List" />
    from t_warehouse
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
    delete from t_warehouse
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TWarehouseExample" >
    delete from t_warehouse
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TWarehouse" >
    insert into t_warehouse (id, v_kd_code, v_cf_code, 
      v_cf_name, v_cf_type, v_cf_struct, 
      v_build_type, v_cf_long, v_cf_wide, 
      v_cf_high, f_design_cap, f_act_cap, 
      v_work_date, v_cf_status, v_remark, 
      v_keeper_id, duiliang_h, isshuliangjiace, 
      is_in_check, check_mode, is_wzc, 
      type, update_time)
    values (#{id,jdbcType=VARCHAR}, #{vKdCode,jdbcType=VARCHAR}, #{vCfCode,jdbcType=VARCHAR}, 
      #{vCfName,jdbcType=VARCHAR}, #{vCfType,jdbcType=VARCHAR}, #{vCfStruct,jdbcType=VARCHAR}, 
      #{vBuildType,jdbcType=VARCHAR}, #{vCfLong,jdbcType=DECIMAL}, #{vCfWide,jdbcType=DECIMAL}, 
      #{vCfHigh,jdbcType=DECIMAL}, #{fDesignCap,jdbcType=DECIMAL}, #{fActCap,jdbcType=DECIMAL}, 
      #{vWorkDate,jdbcType=TIMESTAMP}, #{vCfStatus,jdbcType=VARCHAR}, #{vRemark,jdbcType=VARCHAR}, 
      #{vKeeperId,jdbcType=VARCHAR}, #{duiliangH,jdbcType=VARCHAR}, #{isshuliangjiace,jdbcType=INTEGER}, 
      #{isInCheck,jdbcType=INTEGER}, #{checkMode,jdbcType=VARCHAR}, #{isWzc,jdbcType=VARCHAR}, 
      #{type,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TWarehouse" >
    insert into t_warehouse
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="vKdCode != null" >
        v_kd_code,
      </if>
      <if test="vCfCode != null" >
        v_cf_code,
      </if>
      <if test="vCfName != null" >
        v_cf_name,
      </if>
      <if test="vCfType != null" >
        v_cf_type,
      </if>
      <if test="vCfStruct != null" >
        v_cf_struct,
      </if>
      <if test="vBuildType != null" >
        v_build_type,
      </if>
      <if test="vCfLong != null" >
        v_cf_long,
      </if>
      <if test="vCfWide != null" >
        v_cf_wide,
      </if>
      <if test="vCfHigh != null" >
        v_cf_high,
      </if>
      <if test="fDesignCap != null" >
        f_design_cap,
      </if>
      <if test="fActCap != null" >
        f_act_cap,
      </if>
      <if test="vWorkDate != null" >
        v_work_date,
      </if>
      <if test="vCfStatus != null" >
        v_cf_status,
      </if>
      <if test="vRemark != null" >
        v_remark,
      </if>
      <if test="vKeeperId != null" >
        v_keeper_id,
      </if>
      <if test="duiliangH != null" >
        duiliang_h,
      </if>
      <if test="isshuliangjiace != null" >
        isshuliangjiace,
      </if>
      <if test="isInCheck != null" >
        is_in_check,
      </if>
      <if test="checkMode != null" >
        check_mode,
      </if>
      <if test="isWzc != null" >
        is_wzc,
      </if>
      <if test="type != null" >
        type,
      </if>
      <if test="updateTime != null" >
        update_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="vKdCode != null" >
        #{vKdCode,jdbcType=VARCHAR},
      </if>
      <if test="vCfCode != null" >
        #{vCfCode,jdbcType=VARCHAR},
      </if>
      <if test="vCfName != null" >
        #{vCfName,jdbcType=VARCHAR},
      </if>
      <if test="vCfType != null" >
        #{vCfType,jdbcType=VARCHAR},
      </if>
      <if test="vCfStruct != null" >
        #{vCfStruct,jdbcType=VARCHAR},
      </if>
      <if test="vBuildType != null" >
        #{vBuildType,jdbcType=VARCHAR},
      </if>
      <if test="vCfLong != null" >
        #{vCfLong,jdbcType=DECIMAL},
      </if>
      <if test="vCfWide != null" >
        #{vCfWide,jdbcType=DECIMAL},
      </if>
      <if test="vCfHigh != null" >
        #{vCfHigh,jdbcType=DECIMAL},
      </if>
      <if test="fDesignCap != null" >
        #{fDesignCap,jdbcType=DECIMAL},
      </if>
      <if test="fActCap != null" >
        #{fActCap,jdbcType=DECIMAL},
      </if>
      <if test="vWorkDate != null" >
        #{vWorkDate,jdbcType=TIMESTAMP},
      </if>
      <if test="vCfStatus != null" >
        #{vCfStatus,jdbcType=VARCHAR},
      </if>
      <if test="vRemark != null" >
        #{vRemark,jdbcType=VARCHAR},
      </if>
      <if test="vKeeperId != null" >
        #{vKeeperId,jdbcType=VARCHAR},
      </if>
      <if test="duiliangH != null" >
        #{duiliangH,jdbcType=VARCHAR},
      </if>
      <if test="isshuliangjiace != null" >
        #{isshuliangjiace,jdbcType=INTEGER},
      </if>
      <if test="isInCheck != null" >
        #{isInCheck,jdbcType=INTEGER},
      </if>
      <if test="checkMode != null" >
        #{checkMode,jdbcType=VARCHAR},
      </if>
      <if test="isWzc != null" >
        #{isWzc,jdbcType=VARCHAR},
      </if>
      <if test="type != null" >
        #{type,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null" >
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TWarehouseExample" resultType="java.lang.Integer" >
    select count(*) from t_warehouse
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map" >
    update t_warehouse
    <set >
      <if test="record.id != null" >
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.vKdCode != null" >
        v_kd_code = #{record.vKdCode,jdbcType=VARCHAR},
      </if>
      <if test="record.vCfCode != null" >
        v_cf_code = #{record.vCfCode,jdbcType=VARCHAR},
      </if>
      <if test="record.vCfName != null" >
        v_cf_name = #{record.vCfName,jdbcType=VARCHAR},
      </if>
      <if test="record.vCfType != null" >
        v_cf_type = #{record.vCfType,jdbcType=VARCHAR},
      </if>
      <if test="record.vCfStruct != null" >
        v_cf_struct = #{record.vCfStruct,jdbcType=VARCHAR},
      </if>
      <if test="record.vBuildType != null" >
        v_build_type = #{record.vBuildType,jdbcType=VARCHAR},
      </if>
      <if test="record.vCfLong != null" >
        v_cf_long = #{record.vCfLong,jdbcType=DECIMAL},
      </if>
      <if test="record.vCfWide != null" >
        v_cf_wide = #{record.vCfWide,jdbcType=DECIMAL},
      </if>
      <if test="record.vCfHigh != null" >
        v_cf_high = #{record.vCfHigh,jdbcType=DECIMAL},
      </if>
      <if test="record.fDesignCap != null" >
        f_design_cap = #{record.fDesignCap,jdbcType=DECIMAL},
      </if>
      <if test="record.fActCap != null" >
        f_act_cap = #{record.fActCap,jdbcType=DECIMAL},
      </if>
      <if test="record.vWorkDate != null" >
        v_work_date = #{record.vWorkDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.vCfStatus != null" >
        v_cf_status = #{record.vCfStatus,jdbcType=VARCHAR},
      </if>
      <if test="record.vRemark != null" >
        v_remark = #{record.vRemark,jdbcType=VARCHAR},
      </if>
      <if test="record.vKeeperId != null" >
        v_keeper_id = #{record.vKeeperId,jdbcType=VARCHAR},
      </if>
      <if test="record.duiliangH != null" >
        duiliang_h = #{record.duiliangH,jdbcType=VARCHAR},
      </if>
      <if test="record.isshuliangjiace != null" >
        isshuliangjiace = #{record.isshuliangjiace,jdbcType=INTEGER},
      </if>
      <if test="record.isInCheck != null" >
        is_in_check = #{record.isInCheck,jdbcType=INTEGER},
      </if>
      <if test="record.checkMode != null" >
        check_mode = #{record.checkMode,jdbcType=VARCHAR},
      </if>
      <if test="record.isWzc != null" >
        is_wzc = #{record.isWzc,jdbcType=VARCHAR},
      </if>
      <if test="record.type != null" >
        type = #{record.type,jdbcType=VARCHAR},
      </if>
      <if test="record.updateTime != null" >
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map" >
    update t_warehouse
    set id = #{record.id,jdbcType=VARCHAR},
      v_kd_code = #{record.vKdCode,jdbcType=VARCHAR},
      v_cf_code = #{record.vCfCode,jdbcType=VARCHAR},
      v_cf_name = #{record.vCfName,jdbcType=VARCHAR},
      v_cf_type = #{record.vCfType,jdbcType=VARCHAR},
      v_cf_struct = #{record.vCfStruct,jdbcType=VARCHAR},
      v_build_type = #{record.vBuildType,jdbcType=VARCHAR},
      v_cf_long = #{record.vCfLong,jdbcType=DECIMAL},
      v_cf_wide = #{record.vCfWide,jdbcType=DECIMAL},
      v_cf_high = #{record.vCfHigh,jdbcType=DECIMAL},
      f_design_cap = #{record.fDesignCap,jdbcType=DECIMAL},
      f_act_cap = #{record.fActCap,jdbcType=DECIMAL},
      v_work_date = #{record.vWorkDate,jdbcType=TIMESTAMP},
      v_cf_status = #{record.vCfStatus,jdbcType=VARCHAR},
      v_remark = #{record.vRemark,jdbcType=VARCHAR},
      v_keeper_id = #{record.vKeeperId,jdbcType=VARCHAR},
      duiliang_h = #{record.duiliangH,jdbcType=VARCHAR},
      isshuliangjiace = #{record.isshuliangjiace,jdbcType=INTEGER},
      is_in_check = #{record.isInCheck,jdbcType=INTEGER},
      check_mode = #{record.checkMode,jdbcType=VARCHAR},
      is_wzc = #{record.isWzc,jdbcType=VARCHAR},
      type = #{record.type,jdbcType=VARCHAR},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TWarehouse" >
    update t_warehouse
    <set >
      <if test="vKdCode != null" >
        v_kd_code = #{vKdCode,jdbcType=VARCHAR},
      </if>
      <if test="vCfCode != null" >
        v_cf_code = #{vCfCode,jdbcType=VARCHAR},
      </if>
      <if test="vCfName != null" >
        v_cf_name = #{vCfName,jdbcType=VARCHAR},
      </if>
      <if test="vCfType != null" >
        v_cf_type = #{vCfType,jdbcType=VARCHAR},
      </if>
      <if test="vCfStruct != null" >
        v_cf_struct = #{vCfStruct,jdbcType=VARCHAR},
      </if>
      <if test="vBuildType != null" >
        v_build_type = #{vBuildType,jdbcType=VARCHAR},
      </if>
      <if test="vCfLong != null" >
        v_cf_long = #{vCfLong,jdbcType=DECIMAL},
      </if>
      <if test="vCfWide != null" >
        v_cf_wide = #{vCfWide,jdbcType=DECIMAL},
      </if>
      <if test="vCfHigh != null" >
        v_cf_high = #{vCfHigh,jdbcType=DECIMAL},
      </if>
      <if test="fDesignCap != null" >
        f_design_cap = #{fDesignCap,jdbcType=DECIMAL},
      </if>
      <if test="fActCap != null" >
        f_act_cap = #{fActCap,jdbcType=DECIMAL},
      </if>
      <if test="vWorkDate != null" >
        v_work_date = #{vWorkDate,jdbcType=TIMESTAMP},
      </if>
      <if test="vCfStatus != null" >
        v_cf_status = #{vCfStatus,jdbcType=VARCHAR},
      </if>
      <if test="vRemark != null" >
        v_remark = #{vRemark,jdbcType=VARCHAR},
      </if>
      <if test="vKeeperId != null" >
        v_keeper_id = #{vKeeperId,jdbcType=VARCHAR},
      </if>
      <if test="duiliangH != null" >
        duiliang_h = #{duiliangH,jdbcType=VARCHAR},
      </if>
      <if test="isshuliangjiace != null" >
        isshuliangjiace = #{isshuliangjiace,jdbcType=INTEGER},
      </if>
      <if test="isInCheck != null" >
        is_in_check = #{isInCheck,jdbcType=INTEGER},
      </if>
      <if test="checkMode != null" >
        check_mode = #{checkMode,jdbcType=VARCHAR},
      </if>
      <if test="isWzc != null" >
        is_wzc = #{isWzc,jdbcType=VARCHAR},
      </if>
      <if test="type != null" >
        type = #{type,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null" >
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TWarehouse" >
    update t_warehouse
    set v_kd_code = #{vKdCode,jdbcType=VARCHAR},
      v_cf_code = #{vCfCode,jdbcType=VARCHAR},
      v_cf_name = #{vCfName,jdbcType=VARCHAR},
      v_cf_type = #{vCfType,jdbcType=VARCHAR},
      v_cf_struct = #{vCfStruct,jdbcType=VARCHAR},
      v_build_type = #{vBuildType,jdbcType=VARCHAR},
      v_cf_long = #{vCfLong,jdbcType=DECIMAL},
      v_cf_wide = #{vCfWide,jdbcType=DECIMAL},
      v_cf_high = #{vCfHigh,jdbcType=DECIMAL},
      f_design_cap = #{fDesignCap,jdbcType=DECIMAL},
      f_act_cap = #{fActCap,jdbcType=DECIMAL},
      v_work_date = #{vWorkDate,jdbcType=TIMESTAMP},
      v_cf_status = #{vCfStatus,jdbcType=VARCHAR},
      v_remark = #{vRemark,jdbcType=VARCHAR},
      v_keeper_id = #{vKeeperId,jdbcType=VARCHAR},
      duiliang_h = #{duiliangH,jdbcType=VARCHAR},
      isshuliangjiace = #{isshuliangjiace,jdbcType=INTEGER},
      is_in_check = #{isInCheck,jdbcType=INTEGER},
      check_mode = #{checkMode,jdbcType=VARCHAR},
      is_wzc = #{isWzc,jdbcType=VARCHAR},
      type = #{type,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=VARCHAR}
  </update>
</mapper>