<?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.BasicStorehouseMapper" >
  <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.basicdata.model.BasicStorehouse" >
    <id column="storehouse_id" property="storehouseId" jdbcType="INTEGER" />
    <result column="uuid" property="uuid" jdbcType="VARCHAR" />
    <result column="depot_id" property="depotId" jdbcType="INTEGER" />
    <result column="depot_name" property="depotName" jdbcType="VARCHAR" />
    <result column="org_id" property="orgId" jdbcType="INTEGER" />
    <result column="org_name" property="orgName" jdbcType="VARCHAR" />
    <result column="storehouse_code" property="storehouseCode" jdbcType="VARCHAR" />
    <result column="storehouse_name" property="storehouseName" jdbcType="VARCHAR" />
    <result column="storehouse_type" property="storehouseType" jdbcType="INTEGER" />
    <result column="storehouse_type_mx" property="storehouseTypeMx" jdbcType="INTEGER" />
    <result column="architecture_type" property="architectureType" jdbcType="VARCHAR" />
    <result column="store_img" property="storeImg" jdbcType="VARCHAR" />
    <result column="ground" property="ground" jdbcType="VARCHAR" />
    <result column="wall" property="wall" jdbcType="INTEGER" />
    <result column="roof" property="roof" jdbcType="VARCHAR" />
    <result column="house" property="house" jdbcType="VARCHAR" />
    <result column="design_capacity" property="designCapacity" jdbcType="DECIMAL" />
    <result column="keeping_way" property="keepingWay" jdbcType="INTEGER" />
    <result column="grain_heigth" property="grainHeigth" jdbcType="DECIMAL" />
    <result column="store_outside_length" property="storeOutsideLength" jdbcType="DECIMAL" />
    <result column="store_outside_width" property="storeOutsideWidth" jdbcType="DECIMAL" />
    <result column="store_outside_heigth" property="storeOutsideHeigth" jdbcType="DECIMAL" />
    <result column="store_outside_top_heigth" property="storeOutsideTopHeigth" jdbcType="DECIMAL" />
    <result column="outside_silo_diameter" property="outsideSiloDiameter" jdbcType="DECIMAL" />
    <result column="outer_wall_area" property="outerWallArea" jdbcType="DECIMAL" />
    <result column="deduct_volume" property="deductVolume" jdbcType="DECIMAL" />
    <result column="length" property="length" jdbcType="DECIMAL" />
    <result column="width" property="width" jdbcType="DECIMAL" />
    <result column="heigth" property="heigth" jdbcType="DECIMAL" />
    <result column="grain_line_heigth" property="grainLineHeigth" jdbcType="DECIMAL" />
    <result column="silo_diameter" property="siloDiameter" jdbcType="DECIMAL" />
    <result column="bin_volume" property="binVolume" jdbcType="DECIMAL" />
    <result column="grain_pile_volume" property="grainPileVolume" jdbcType="DECIMAL" />
    <result column="house_door_num" property="houseDoorNum" jdbcType="INTEGER" />
    <result column="house_doot_position" property="houseDootPosition" jdbcType="VARCHAR" />
    <result column="house_door_width" property="houseDoorWidth" jdbcType="DECIMAL" />
    <result column="house_door_heigth" property="houseDoorHeigth" jdbcType="DECIMAL" />
    <result column="draftType" property="drafttype" jdbcType="INTEGER" />
    <result column="heatInsulationStep_roof" property="heatinsulationstepRoof" jdbcType="VARCHAR" />
    <result column="heatInsulationStep_window" property="heatinsulationstepWindow" jdbcType="VARCHAR" />
    <result column="actual_capacity" property="actualCapacity" jdbcType="DECIMAL" />
    <result column="completion_date" property="completionDate" jdbcType="TIMESTAMP" />
    <result column="useDate" property="usedate" jdbcType="TIMESTAMP" />
    <result column="storehouse_state" property="storehouseState" jdbcType="INTEGER" />
    <result column="store_way" property="storeWay" jdbcType="INTEGER" />
    <result column="currentType" property="currenttype" jdbcType="INTEGER" />
    <result column="dutyStoreman" property="dutystoreman" jdbcType="VARCHAR" />
    <result column="remark" property="remark" jdbcType="VARCHAR" />
    <result column="createName" property="createname" jdbcType="VARCHAR" />
    <result column="createDate" property="createdate" jdbcType="TIMESTAMP" />
    <result column="updateName" property="updatename" jdbcType="VARCHAR" />
    <result column="updateDate" property="updatedate" jdbcType="TIMESTAMP" />
    <result column="working_status" property="workingStatus" jdbcType="INTEGER" />
    <result column="del_flag" property="delFlag" jdbcType="INTEGER" />
    <result column="library_type" property="libraryType" jdbcType="VARCHAR" />
  </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" >
    storehouse_id, uuid, depot_id, depot_name, org_id, org_name, storehouse_code, storehouse_name, 
    storehouse_type, storehouse_type_mx, architecture_type, store_img, ground, wall, 
    roof, house, design_capacity, keeping_way, grain_heigth, store_outside_length, store_outside_width, 
    store_outside_heigth, store_outside_top_heigth, outside_silo_diameter, outer_wall_area, 
    deduct_volume, length, width, heigth, grain_line_heigth, silo_diameter, bin_volume, 
    grain_pile_volume, house_door_num, house_doot_position, house_door_width, house_door_heigth, 
    draftType, heatInsulationStep_roof, heatInsulationStep_window, actual_capacity, completion_date, 
    useDate, storehouse_state, store_way, currentType, dutyStoreman, remark, createName, 
    createDate, updateName, updateDate, working_status, del_flag, library_type
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.basicdata.model.BasicStorehouseExample" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from basic_storehouse
    <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.Integer" >
    select 
    <include refid="Base_Column_List" />
    from basic_storehouse
    where storehouse_id = #{storehouseId,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from basic_storehouse
    where storehouse_id = #{storehouseId,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.BasicStorehouseExample" >
    delete from basic_storehouse
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.chinaitop.depot.intelligent.basicdata.model.BasicStorehouse" >
    insert into basic_storehouse (storehouse_id, uuid, depot_id, 
      depot_name, org_id, org_name, 
      storehouse_code, storehouse_name, storehouse_type, 
      storehouse_type_mx, architecture_type, store_img, 
      ground, wall, roof, 
      house, design_capacity, keeping_way, 
      grain_heigth, store_outside_length, store_outside_width, 
      store_outside_heigth, store_outside_top_heigth, 
      outside_silo_diameter, outer_wall_area, deduct_volume, 
      length, width, heigth, 
      grain_line_heigth, silo_diameter, bin_volume, 
      grain_pile_volume, house_door_num, house_doot_position, 
      house_door_width, house_door_heigth, draftType, 
      heatInsulationStep_roof, heatInsulationStep_window, 
      actual_capacity, completion_date, useDate, 
      storehouse_state, store_way, currentType, 
      dutyStoreman, remark, createName, 
      createDate, updateName, updateDate, 
      working_status, del_flag, library_type
      )
    values (#{storehouseId,jdbcType=INTEGER}, #{uuid,jdbcType=VARCHAR}, #{depotId,jdbcType=INTEGER}, 
      #{depotName,jdbcType=VARCHAR}, #{orgId,jdbcType=INTEGER}, #{orgName,jdbcType=VARCHAR}, 
      #{storehouseCode,jdbcType=VARCHAR}, #{storehouseName,jdbcType=VARCHAR}, #{storehouseType,jdbcType=INTEGER}, 
      #{storehouseTypeMx,jdbcType=INTEGER}, #{architectureType,jdbcType=VARCHAR}, #{storeImg,jdbcType=VARCHAR}, 
      #{ground,jdbcType=VARCHAR}, #{wall,jdbcType=INTEGER}, #{roof,jdbcType=VARCHAR}, 
      #{house,jdbcType=VARCHAR}, #{designCapacity,jdbcType=DECIMAL}, #{keepingWay,jdbcType=INTEGER}, 
      #{grainHeigth,jdbcType=DECIMAL}, #{storeOutsideLength,jdbcType=DECIMAL}, #{storeOutsideWidth,jdbcType=DECIMAL}, 
      #{storeOutsideHeigth,jdbcType=DECIMAL}, #{storeOutsideTopHeigth,jdbcType=DECIMAL}, 
      #{outsideSiloDiameter,jdbcType=DECIMAL}, #{outerWallArea,jdbcType=DECIMAL}, #{deductVolume,jdbcType=DECIMAL}, 
      #{length,jdbcType=DECIMAL}, #{width,jdbcType=DECIMAL}, #{heigth,jdbcType=DECIMAL}, 
      #{grainLineHeigth,jdbcType=DECIMAL}, #{siloDiameter,jdbcType=DECIMAL}, #{binVolume,jdbcType=DECIMAL}, 
      #{grainPileVolume,jdbcType=DECIMAL}, #{houseDoorNum,jdbcType=INTEGER}, #{houseDootPosition,jdbcType=VARCHAR}, 
      #{houseDoorWidth,jdbcType=DECIMAL}, #{houseDoorHeigth,jdbcType=DECIMAL}, #{drafttype,jdbcType=INTEGER}, 
      #{heatinsulationstepRoof,jdbcType=VARCHAR}, #{heatinsulationstepWindow,jdbcType=VARCHAR}, 
      #{actualCapacity,jdbcType=DECIMAL}, #{completionDate,jdbcType=TIMESTAMP}, #{usedate,jdbcType=TIMESTAMP}, 
      #{storehouseState,jdbcType=INTEGER}, #{storeWay,jdbcType=INTEGER}, #{currenttype,jdbcType=INTEGER}, 
      #{dutystoreman,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createname,jdbcType=VARCHAR}, 
      #{createdate,jdbcType=TIMESTAMP}, #{updatename,jdbcType=VARCHAR}, #{updatedate,jdbcType=TIMESTAMP}, 
      #{workingStatus,jdbcType=INTEGER}, #{delFlag,jdbcType=INTEGER}, #{libraryType,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.BasicStorehouse" >
    insert into basic_storehouse
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="storehouseId != null" >
        storehouse_id,
      </if>
      <if test="uuid != null" >
        uuid,
      </if>
      <if test="depotId != null" >
        depot_id,
      </if>
      <if test="depotName != null" >
        depot_name,
      </if>
      <if test="orgId != null" >
        org_id,
      </if>
      <if test="orgName != null" >
        org_name,
      </if>
      <if test="storehouseCode != null" >
        storehouse_code,
      </if>
      <if test="storehouseName != null" >
        storehouse_name,
      </if>
      <if test="storehouseType != null" >
        storehouse_type,
      </if>
      <if test="storehouseTypeMx != null" >
        storehouse_type_mx,
      </if>
      <if test="architectureType != null" >
        architecture_type,
      </if>
      <if test="storeImg != null" >
        store_img,
      </if>
      <if test="ground != null" >
        ground,
      </if>
      <if test="wall != null" >
        wall,
      </if>
      <if test="roof != null" >
        roof,
      </if>
      <if test="house != null" >
        house,
      </if>
      <if test="designCapacity != null" >
        design_capacity,
      </if>
      <if test="keepingWay != null" >
        keeping_way,
      </if>
      <if test="grainHeigth != null" >
        grain_heigth,
      </if>
      <if test="storeOutsideLength != null" >
        store_outside_length,
      </if>
      <if test="storeOutsideWidth != null" >
        store_outside_width,
      </if>
      <if test="storeOutsideHeigth != null" >
        store_outside_heigth,
      </if>
      <if test="storeOutsideTopHeigth != null" >
        store_outside_top_heigth,
      </if>
      <if test="outsideSiloDiameter != null" >
        outside_silo_diameter,
      </if>
      <if test="outerWallArea != null" >
        outer_wall_area,
      </if>
      <if test="deductVolume != null" >
        deduct_volume,
      </if>
      <if test="length != null" >
        length,
      </if>
      <if test="width != null" >
        width,
      </if>
      <if test="heigth != null" >
        heigth,
      </if>
      <if test="grainLineHeigth != null" >
        grain_line_heigth,
      </if>
      <if test="siloDiameter != null" >
        silo_diameter,
      </if>
      <if test="binVolume != null" >
        bin_volume,
      </if>
      <if test="grainPileVolume != null" >
        grain_pile_volume,
      </if>
      <if test="houseDoorNum != null" >
        house_door_num,
      </if>
      <if test="houseDootPosition != null" >
        house_doot_position,
      </if>
      <if test="houseDoorWidth != null" >
        house_door_width,
      </if>
      <if test="houseDoorHeigth != null" >
        house_door_heigth,
      </if>
      <if test="drafttype != null" >
        draftType,
      </if>
      <if test="heatinsulationstepRoof != null" >
        heatInsulationStep_roof,
      </if>
      <if test="heatinsulationstepWindow != null" >
        heatInsulationStep_window,
      </if>
      <if test="actualCapacity != null" >
        actual_capacity,
      </if>
      <if test="completionDate != null" >
        completion_date,
      </if>
      <if test="usedate != null" >
        useDate,
      </if>
      <if test="storehouseState != null" >
        storehouse_state,
      </if>
      <if test="storeWay != null" >
        store_way,
      </if>
      <if test="currenttype != null" >
        currentType,
      </if>
      <if test="dutystoreman != null" >
        dutyStoreman,
      </if>
      <if test="remark != null" >
        remark,
      </if>
      <if test="createname != null" >
        createName,
      </if>
      <if test="createdate != null" >
        createDate,
      </if>
      <if test="updatename != null" >
        updateName,
      </if>
      <if test="updatedate != null" >
        updateDate,
      </if>
      <if test="workingStatus != null" >
        working_status,
      </if>
      <if test="delFlag != null" >
        del_flag,
      </if>
      <if test="libraryType != null" >
        library_type,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="storehouseId != null" >
        #{storehouseId,jdbcType=INTEGER},
      </if>
      <if test="uuid != null" >
        #{uuid,jdbcType=VARCHAR},
      </if>
      <if test="depotId != null" >
        #{depotId,jdbcType=INTEGER},
      </if>
      <if test="depotName != null" >
        #{depotName,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null" >
        #{orgId,jdbcType=INTEGER},
      </if>
      <if test="orgName != null" >
        #{orgName,jdbcType=VARCHAR},
      </if>
      <if test="storehouseCode != null" >
        #{storehouseCode,jdbcType=VARCHAR},
      </if>
      <if test="storehouseName != null" >
        #{storehouseName,jdbcType=VARCHAR},
      </if>
      <if test="storehouseType != null" >
        #{storehouseType,jdbcType=INTEGER},
      </if>
      <if test="storehouseTypeMx != null" >
        #{storehouseTypeMx,jdbcType=INTEGER},
      </if>
      <if test="architectureType != null" >
        #{architectureType,jdbcType=VARCHAR},
      </if>
      <if test="storeImg != null" >
        #{storeImg,jdbcType=VARCHAR},
      </if>
      <if test="ground != null" >
        #{ground,jdbcType=VARCHAR},
      </if>
      <if test="wall != null" >
        #{wall,jdbcType=INTEGER},
      </if>
      <if test="roof != null" >
        #{roof,jdbcType=VARCHAR},
      </if>
      <if test="house != null" >
        #{house,jdbcType=VARCHAR},
      </if>
      <if test="designCapacity != null" >
        #{designCapacity,jdbcType=DECIMAL},
      </if>
      <if test="keepingWay != null" >
        #{keepingWay,jdbcType=INTEGER},
      </if>
      <if test="grainHeigth != null" >
        #{grainHeigth,jdbcType=DECIMAL},
      </if>
      <if test="storeOutsideLength != null" >
        #{storeOutsideLength,jdbcType=DECIMAL},
      </if>
      <if test="storeOutsideWidth != null" >
        #{storeOutsideWidth,jdbcType=DECIMAL},
      </if>
      <if test="storeOutsideHeigth != null" >
        #{storeOutsideHeigth,jdbcType=DECIMAL},
      </if>
      <if test="storeOutsideTopHeigth != null" >
        #{storeOutsideTopHeigth,jdbcType=DECIMAL},
      </if>
      <if test="outsideSiloDiameter != null" >
        #{outsideSiloDiameter,jdbcType=DECIMAL},
      </if>
      <if test="outerWallArea != null" >
        #{outerWallArea,jdbcType=DECIMAL},
      </if>
      <if test="deductVolume != null" >
        #{deductVolume,jdbcType=DECIMAL},
      </if>
      <if test="length != null" >
        #{length,jdbcType=DECIMAL},
      </if>
      <if test="width != null" >
        #{width,jdbcType=DECIMAL},
      </if>
      <if test="heigth != null" >
        #{heigth,jdbcType=DECIMAL},
      </if>
      <if test="grainLineHeigth != null" >
        #{grainLineHeigth,jdbcType=DECIMAL},
      </if>
      <if test="siloDiameter != null" >
        #{siloDiameter,jdbcType=DECIMAL},
      </if>
      <if test="binVolume != null" >
        #{binVolume,jdbcType=DECIMAL},
      </if>
      <if test="grainPileVolume != null" >
        #{grainPileVolume,jdbcType=DECIMAL},
      </if>
      <if test="houseDoorNum != null" >
        #{houseDoorNum,jdbcType=INTEGER},
      </if>
      <if test="houseDootPosition != null" >
        #{houseDootPosition,jdbcType=VARCHAR},
      </if>
      <if test="houseDoorWidth != null" >
        #{houseDoorWidth,jdbcType=DECIMAL},
      </if>
      <if test="houseDoorHeigth != null" >
        #{houseDoorHeigth,jdbcType=DECIMAL},
      </if>
      <if test="drafttype != null" >
        #{drafttype,jdbcType=INTEGER},
      </if>
      <if test="heatinsulationstepRoof != null" >
        #{heatinsulationstepRoof,jdbcType=VARCHAR},
      </if>
      <if test="heatinsulationstepWindow != null" >
        #{heatinsulationstepWindow,jdbcType=VARCHAR},
      </if>
      <if test="actualCapacity != null" >
        #{actualCapacity,jdbcType=DECIMAL},
      </if>
      <if test="completionDate != null" >
        #{completionDate,jdbcType=TIMESTAMP},
      </if>
      <if test="usedate != null" >
        #{usedate,jdbcType=TIMESTAMP},
      </if>
      <if test="storehouseState != null" >
        #{storehouseState,jdbcType=INTEGER},
      </if>
      <if test="storeWay != null" >
        #{storeWay,jdbcType=INTEGER},
      </if>
      <if test="currenttype != null" >
        #{currenttype,jdbcType=INTEGER},
      </if>
      <if test="dutystoreman != null" >
        #{dutystoreman,jdbcType=VARCHAR},
      </if>
      <if test="remark != null" >
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createname != null" >
        #{createname,jdbcType=VARCHAR},
      </if>
      <if test="createdate != null" >
        #{createdate,jdbcType=TIMESTAMP},
      </if>
      <if test="updatename != null" >
        #{updatename,jdbcType=VARCHAR},
      </if>
      <if test="updatedate != null" >
        #{updatedate,jdbcType=TIMESTAMP},
      </if>
      <if test="workingStatus != null" >
        #{workingStatus,jdbcType=INTEGER},
      </if>
      <if test="delFlag != null" >
        #{delFlag,jdbcType=INTEGER},
      </if>
      <if test="libraryType != null" >
        #{libraryType,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.BasicStorehouseExample" resultType="java.lang.Integer" >
    select count(*) from basic_storehouse
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map" >
    update basic_storehouse
    <set >
      <if test="record.storehouseId != null" >
        storehouse_id = #{record.storehouseId,jdbcType=INTEGER},
      </if>
      <if test="record.uuid != null" >
        uuid = #{record.uuid,jdbcType=VARCHAR},
      </if>
      <if test="record.depotId != null" >
        depot_id = #{record.depotId,jdbcType=INTEGER},
      </if>
      <if test="record.depotName != null" >
        depot_name = #{record.depotName,jdbcType=VARCHAR},
      </if>
      <if test="record.orgId != null" >
        org_id = #{record.orgId,jdbcType=INTEGER},
      </if>
      <if test="record.orgName != null" >
        org_name = #{record.orgName,jdbcType=VARCHAR},
      </if>
      <if test="record.storehouseCode != null" >
        storehouse_code = #{record.storehouseCode,jdbcType=VARCHAR},
      </if>
      <if test="record.storehouseName != null" >
        storehouse_name = #{record.storehouseName,jdbcType=VARCHAR},
      </if>
      <if test="record.storehouseType != null" >
        storehouse_type = #{record.storehouseType,jdbcType=INTEGER},
      </if>
      <if test="record.storehouseTypeMx != null" >
        storehouse_type_mx = #{record.storehouseTypeMx,jdbcType=INTEGER},
      </if>
      <if test="record.architectureType != null" >
        architecture_type = #{record.architectureType,jdbcType=VARCHAR},
      </if>
      <if test="record.storeImg != null" >
        store_img = #{record.storeImg,jdbcType=VARCHAR},
      </if>
      <if test="record.ground != null" >
        ground = #{record.ground,jdbcType=VARCHAR},
      </if>
      <if test="record.wall != null" >
        wall = #{record.wall,jdbcType=INTEGER},
      </if>
      <if test="record.roof != null" >
        roof = #{record.roof,jdbcType=VARCHAR},
      </if>
      <if test="record.house != null" >
        house = #{record.house,jdbcType=VARCHAR},
      </if>
      <if test="record.designCapacity != null" >
        design_capacity = #{record.designCapacity,jdbcType=DECIMAL},
      </if>
      <if test="record.keepingWay != null" >
        keeping_way = #{record.keepingWay,jdbcType=INTEGER},
      </if>
      <if test="record.grainHeigth != null" >
        grain_heigth = #{record.grainHeigth,jdbcType=DECIMAL},
      </if>
      <if test="record.storeOutsideLength != null" >
        store_outside_length = #{record.storeOutsideLength,jdbcType=DECIMAL},
      </if>
      <if test="record.storeOutsideWidth != null" >
        store_outside_width = #{record.storeOutsideWidth,jdbcType=DECIMAL},
      </if>
      <if test="record.storeOutsideHeigth != null" >
        store_outside_heigth = #{record.storeOutsideHeigth,jdbcType=DECIMAL},
      </if>
      <if test="record.storeOutsideTopHeigth != null" >
        store_outside_top_heigth = #{record.storeOutsideTopHeigth,jdbcType=DECIMAL},
      </if>
      <if test="record.outsideSiloDiameter != null" >
        outside_silo_diameter = #{record.outsideSiloDiameter,jdbcType=DECIMAL},
      </if>
      <if test="record.outerWallArea != null" >
        outer_wall_area = #{record.outerWallArea,jdbcType=DECIMAL},
      </if>
      <if test="record.deductVolume != null" >
        deduct_volume = #{record.deductVolume,jdbcType=DECIMAL},
      </if>
      <if test="record.length != null" >
        length = #{record.length,jdbcType=DECIMAL},
      </if>
      <if test="record.width != null" >
        width = #{record.width,jdbcType=DECIMAL},
      </if>
      <if test="record.heigth != null" >
        heigth = #{record.heigth,jdbcType=DECIMAL},
      </if>
      <if test="record.grainLineHeigth != null" >
        grain_line_heigth = #{record.grainLineHeigth,jdbcType=DECIMAL},
      </if>
      <if test="record.siloDiameter != null" >
        silo_diameter = #{record.siloDiameter,jdbcType=DECIMAL},
      </if>
      <if test="record.binVolume != null" >
        bin_volume = #{record.binVolume,jdbcType=DECIMAL},
      </if>
      <if test="record.grainPileVolume != null" >
        grain_pile_volume = #{record.grainPileVolume,jdbcType=DECIMAL},
      </if>
      <if test="record.houseDoorNum != null" >
        house_door_num = #{record.houseDoorNum,jdbcType=INTEGER},
      </if>
      <if test="record.houseDootPosition != null" >
        house_doot_position = #{record.houseDootPosition,jdbcType=VARCHAR},
      </if>
      <if test="record.houseDoorWidth != null" >
        house_door_width = #{record.houseDoorWidth,jdbcType=DECIMAL},
      </if>
      <if test="record.houseDoorHeigth != null" >
        house_door_heigth = #{record.houseDoorHeigth,jdbcType=DECIMAL},
      </if>
      <if test="record.drafttype != null" >
        draftType = #{record.drafttype,jdbcType=INTEGER},
      </if>
      <if test="record.heatinsulationstepRoof != null" >
        heatInsulationStep_roof = #{record.heatinsulationstepRoof,jdbcType=VARCHAR},
      </if>
      <if test="record.heatinsulationstepWindow != null" >
        heatInsulationStep_window = #{record.heatinsulationstepWindow,jdbcType=VARCHAR},
      </if>
      <if test="record.actualCapacity != null" >
        actual_capacity = #{record.actualCapacity,jdbcType=DECIMAL},
      </if>
      <if test="record.completionDate != null" >
        completion_date = #{record.completionDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.usedate != null" >
        useDate = #{record.usedate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.storehouseState != null" >
        storehouse_state = #{record.storehouseState,jdbcType=INTEGER},
      </if>
      <if test="record.storeWay != null" >
        store_way = #{record.storeWay,jdbcType=INTEGER},
      </if>
      <if test="record.currenttype != null" >
        currentType = #{record.currenttype,jdbcType=INTEGER},
      </if>
      <if test="record.dutystoreman != null" >
        dutyStoreman = #{record.dutystoreman,jdbcType=VARCHAR},
      </if>
      <if test="record.remark != null" >
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.createname != null" >
        createName = #{record.createname,jdbcType=VARCHAR},
      </if>
      <if test="record.createdate != null" >
        createDate = #{record.createdate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updatename != null" >
        updateName = #{record.updatename,jdbcType=VARCHAR},
      </if>
      <if test="record.updatedate != null" >
        updateDate = #{record.updatedate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.workingStatus != null" >
        working_status = #{record.workingStatus,jdbcType=INTEGER},
      </if>
      <if test="record.delFlag != null" >
        del_flag = #{record.delFlag,jdbcType=INTEGER},
      </if>
      <if test="record.libraryType != null" >
        library_type = #{record.libraryType,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map" >
    update basic_storehouse
    set storehouse_id = #{record.storehouseId,jdbcType=INTEGER},
      uuid = #{record.uuid,jdbcType=VARCHAR},
      depot_id = #{record.depotId,jdbcType=INTEGER},
      depot_name = #{record.depotName,jdbcType=VARCHAR},
      org_id = #{record.orgId,jdbcType=INTEGER},
      org_name = #{record.orgName,jdbcType=VARCHAR},
      storehouse_code = #{record.storehouseCode,jdbcType=VARCHAR},
      storehouse_name = #{record.storehouseName,jdbcType=VARCHAR},
      storehouse_type = #{record.storehouseType,jdbcType=INTEGER},
      storehouse_type_mx = #{record.storehouseTypeMx,jdbcType=INTEGER},
      architecture_type = #{record.architectureType,jdbcType=VARCHAR},
      store_img = #{record.storeImg,jdbcType=VARCHAR},
      ground = #{record.ground,jdbcType=VARCHAR},
      wall = #{record.wall,jdbcType=INTEGER},
      roof = #{record.roof,jdbcType=VARCHAR},
      house = #{record.house,jdbcType=VARCHAR},
      design_capacity = #{record.designCapacity,jdbcType=DECIMAL},
      keeping_way = #{record.keepingWay,jdbcType=INTEGER},
      grain_heigth = #{record.grainHeigth,jdbcType=DECIMAL},
      store_outside_length = #{record.storeOutsideLength,jdbcType=DECIMAL},
      store_outside_width = #{record.storeOutsideWidth,jdbcType=DECIMAL},
      store_outside_heigth = #{record.storeOutsideHeigth,jdbcType=DECIMAL},
      store_outside_top_heigth = #{record.storeOutsideTopHeigth,jdbcType=DECIMAL},
      outside_silo_diameter = #{record.outsideSiloDiameter,jdbcType=DECIMAL},
      outer_wall_area = #{record.outerWallArea,jdbcType=DECIMAL},
      deduct_volume = #{record.deductVolume,jdbcType=DECIMAL},
      length = #{record.length,jdbcType=DECIMAL},
      width = #{record.width,jdbcType=DECIMAL},
      heigth = #{record.heigth,jdbcType=DECIMAL},
      grain_line_heigth = #{record.grainLineHeigth,jdbcType=DECIMAL},
      silo_diameter = #{record.siloDiameter,jdbcType=DECIMAL},
      bin_volume = #{record.binVolume,jdbcType=DECIMAL},
      grain_pile_volume = #{record.grainPileVolume,jdbcType=DECIMAL},
      house_door_num = #{record.houseDoorNum,jdbcType=INTEGER},
      house_doot_position = #{record.houseDootPosition,jdbcType=VARCHAR},
      house_door_width = #{record.houseDoorWidth,jdbcType=DECIMAL},
      house_door_heigth = #{record.houseDoorHeigth,jdbcType=DECIMAL},
      draftType = #{record.drafttype,jdbcType=INTEGER},
      heatInsulationStep_roof = #{record.heatinsulationstepRoof,jdbcType=VARCHAR},
      heatInsulationStep_window = #{record.heatinsulationstepWindow,jdbcType=VARCHAR},
      actual_capacity = #{record.actualCapacity,jdbcType=DECIMAL},
      completion_date = #{record.completionDate,jdbcType=TIMESTAMP},
      useDate = #{record.usedate,jdbcType=TIMESTAMP},
      storehouse_state = #{record.storehouseState,jdbcType=INTEGER},
      store_way = #{record.storeWay,jdbcType=INTEGER},
      currentType = #{record.currenttype,jdbcType=INTEGER},
      dutyStoreman = #{record.dutystoreman,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR},
      createName = #{record.createname,jdbcType=VARCHAR},
      createDate = #{record.createdate,jdbcType=TIMESTAMP},
      updateName = #{record.updatename,jdbcType=VARCHAR},
      updateDate = #{record.updatedate,jdbcType=TIMESTAMP},
      working_status = #{record.workingStatus,jdbcType=INTEGER},
      del_flag = #{record.delFlag,jdbcType=INTEGER},
      library_type = #{record.libraryType,jdbcType=VARCHAR}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.BasicStorehouse" >
    update basic_storehouse
    <set >
      <if test="uuid != null" >
        uuid = #{uuid,jdbcType=VARCHAR},
      </if>
      <if test="depotId != null" >
        depot_id = #{depotId,jdbcType=INTEGER},
      </if>
      <if test="depotName != null" >
        depot_name = #{depotName,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null" >
        org_id = #{orgId,jdbcType=INTEGER},
      </if>
      <if test="orgName != null" >
        org_name = #{orgName,jdbcType=VARCHAR},
      </if>
      <if test="storehouseCode != null" >
        storehouse_code = #{storehouseCode,jdbcType=VARCHAR},
      </if>
      <if test="storehouseName != null" >
        storehouse_name = #{storehouseName,jdbcType=VARCHAR},
      </if>
      <if test="storehouseType != null" >
        storehouse_type = #{storehouseType,jdbcType=INTEGER},
      </if>
      <if test="storehouseTypeMx != null" >
        storehouse_type_mx = #{storehouseTypeMx,jdbcType=INTEGER},
      </if>
      <if test="architectureType != null" >
        architecture_type = #{architectureType,jdbcType=VARCHAR},
      </if>
      <if test="storeImg != null" >
        store_img = #{storeImg,jdbcType=VARCHAR},
      </if>
      <if test="ground != null" >
        ground = #{ground,jdbcType=VARCHAR},
      </if>
      <if test="wall != null" >
        wall = #{wall,jdbcType=INTEGER},
      </if>
      <if test="roof != null" >
        roof = #{roof,jdbcType=VARCHAR},
      </if>
      <if test="house != null" >
        house = #{house,jdbcType=VARCHAR},
      </if>
      <if test="designCapacity != null" >
        design_capacity = #{designCapacity,jdbcType=DECIMAL},
      </if>
      <if test="keepingWay != null" >
        keeping_way = #{keepingWay,jdbcType=INTEGER},
      </if>
      <if test="grainHeigth != null" >
        grain_heigth = #{grainHeigth,jdbcType=DECIMAL},
      </if>
      <if test="storeOutsideLength != null" >
        store_outside_length = #{storeOutsideLength,jdbcType=DECIMAL},
      </if>
      <if test="storeOutsideWidth != null" >
        store_outside_width = #{storeOutsideWidth,jdbcType=DECIMAL},
      </if>
      <if test="storeOutsideHeigth != null" >
        store_outside_heigth = #{storeOutsideHeigth,jdbcType=DECIMAL},
      </if>
      <if test="storeOutsideTopHeigth != null" >
        store_outside_top_heigth = #{storeOutsideTopHeigth,jdbcType=DECIMAL},
      </if>
      <if test="outsideSiloDiameter != null" >
        outside_silo_diameter = #{outsideSiloDiameter,jdbcType=DECIMAL},
      </if>
      <if test="outerWallArea != null" >
        outer_wall_area = #{outerWallArea,jdbcType=DECIMAL},
      </if>
      <if test="deductVolume != null" >
        deduct_volume = #{deductVolume,jdbcType=DECIMAL},
      </if>
      <if test="length != null" >
        length = #{length,jdbcType=DECIMAL},
      </if>
      <if test="width != null" >
        width = #{width,jdbcType=DECIMAL},
      </if>
      <if test="heigth != null" >
        heigth = #{heigth,jdbcType=DECIMAL},
      </if>
      <if test="grainLineHeigth != null" >
        grain_line_heigth = #{grainLineHeigth,jdbcType=DECIMAL},
      </if>
      <if test="siloDiameter != null" >
        silo_diameter = #{siloDiameter,jdbcType=DECIMAL},
      </if>
      <if test="binVolume != null" >
        bin_volume = #{binVolume,jdbcType=DECIMAL},
      </if>
      <if test="grainPileVolume != null" >
        grain_pile_volume = #{grainPileVolume,jdbcType=DECIMAL},
      </if>
      <if test="houseDoorNum != null" >
        house_door_num = #{houseDoorNum,jdbcType=INTEGER},
      </if>
      <if test="houseDootPosition != null" >
        house_doot_position = #{houseDootPosition,jdbcType=VARCHAR},
      </if>
      <if test="houseDoorWidth != null" >
        house_door_width = #{houseDoorWidth,jdbcType=DECIMAL},
      </if>
      <if test="houseDoorHeigth != null" >
        house_door_heigth = #{houseDoorHeigth,jdbcType=DECIMAL},
      </if>
      <if test="drafttype != null" >
        draftType = #{drafttype,jdbcType=INTEGER},
      </if>
      <if test="heatinsulationstepRoof != null" >
        heatInsulationStep_roof = #{heatinsulationstepRoof,jdbcType=VARCHAR},
      </if>
      <if test="heatinsulationstepWindow != null" >
        heatInsulationStep_window = #{heatinsulationstepWindow,jdbcType=VARCHAR},
      </if>
      <if test="actualCapacity != null" >
        actual_capacity = #{actualCapacity,jdbcType=DECIMAL},
      </if>
      <if test="completionDate != null" >
        completion_date = #{completionDate,jdbcType=TIMESTAMP},
      </if>
      <if test="usedate != null" >
        useDate = #{usedate,jdbcType=TIMESTAMP},
      </if>
      <if test="storehouseState != null" >
        storehouse_state = #{storehouseState,jdbcType=INTEGER},
      </if>
      <if test="storeWay != null" >
        store_way = #{storeWay,jdbcType=INTEGER},
      </if>
      <if test="currenttype != null" >
        currentType = #{currenttype,jdbcType=INTEGER},
      </if>
      <if test="dutystoreman != null" >
        dutyStoreman = #{dutystoreman,jdbcType=VARCHAR},
      </if>
      <if test="remark != null" >
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createname != null" >
        createName = #{createname,jdbcType=VARCHAR},
      </if>
      <if test="createdate != null" >
        createDate = #{createdate,jdbcType=TIMESTAMP},
      </if>
      <if test="updatename != null" >
        updateName = #{updatename,jdbcType=VARCHAR},
      </if>
      <if test="updatedate != null" >
        updateDate = #{updatedate,jdbcType=TIMESTAMP},
      </if>
      <if test="workingStatus != null" >
        working_status = #{workingStatus,jdbcType=INTEGER},
      </if>
      <if test="delFlag != null" >
        del_flag = #{delFlag,jdbcType=INTEGER},
      </if>
      <if test="libraryType != null" >
        library_type = #{libraryType,jdbcType=VARCHAR},
      </if>
    </set>
    where storehouse_id = #{storehouseId,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.basicdata.model.BasicStorehouse" >
    update basic_storehouse
    set uuid = #{uuid,jdbcType=VARCHAR},
      depot_id = #{depotId,jdbcType=INTEGER},
      depot_name = #{depotName,jdbcType=VARCHAR},
      org_id = #{orgId,jdbcType=INTEGER},
      org_name = #{orgName,jdbcType=VARCHAR},
      storehouse_code = #{storehouseCode,jdbcType=VARCHAR},
      storehouse_name = #{storehouseName,jdbcType=VARCHAR},
      storehouse_type = #{storehouseType,jdbcType=INTEGER},
      storehouse_type_mx = #{storehouseTypeMx,jdbcType=INTEGER},
      architecture_type = #{architectureType,jdbcType=VARCHAR},
      store_img = #{storeImg,jdbcType=VARCHAR},
      ground = #{ground,jdbcType=VARCHAR},
      wall = #{wall,jdbcType=INTEGER},
      roof = #{roof,jdbcType=VARCHAR},
      house = #{house,jdbcType=VARCHAR},
      design_capacity = #{designCapacity,jdbcType=DECIMAL},
      keeping_way = #{keepingWay,jdbcType=INTEGER},
      grain_heigth = #{grainHeigth,jdbcType=DECIMAL},
      store_outside_length = #{storeOutsideLength,jdbcType=DECIMAL},
      store_outside_width = #{storeOutsideWidth,jdbcType=DECIMAL},
      store_outside_heigth = #{storeOutsideHeigth,jdbcType=DECIMAL},
      store_outside_top_heigth = #{storeOutsideTopHeigth,jdbcType=DECIMAL},
      outside_silo_diameter = #{outsideSiloDiameter,jdbcType=DECIMAL},
      outer_wall_area = #{outerWallArea,jdbcType=DECIMAL},
      deduct_volume = #{deductVolume,jdbcType=DECIMAL},
      length = #{length,jdbcType=DECIMAL},
      width = #{width,jdbcType=DECIMAL},
      heigth = #{heigth,jdbcType=DECIMAL},
      grain_line_heigth = #{grainLineHeigth,jdbcType=DECIMAL},
      silo_diameter = #{siloDiameter,jdbcType=DECIMAL},
      bin_volume = #{binVolume,jdbcType=DECIMAL},
      grain_pile_volume = #{grainPileVolume,jdbcType=DECIMAL},
      house_door_num = #{houseDoorNum,jdbcType=INTEGER},
      house_doot_position = #{houseDootPosition,jdbcType=VARCHAR},
      house_door_width = #{houseDoorWidth,jdbcType=DECIMAL},
      house_door_heigth = #{houseDoorHeigth,jdbcType=DECIMAL},
      draftType = #{drafttype,jdbcType=INTEGER},
      heatInsulationStep_roof = #{heatinsulationstepRoof,jdbcType=VARCHAR},
      heatInsulationStep_window = #{heatinsulationstepWindow,jdbcType=VARCHAR},
      actual_capacity = #{actualCapacity,jdbcType=DECIMAL},
      completion_date = #{completionDate,jdbcType=TIMESTAMP},
      useDate = #{usedate,jdbcType=TIMESTAMP},
      storehouse_state = #{storehouseState,jdbcType=INTEGER},
      store_way = #{storeWay,jdbcType=INTEGER},
      currentType = #{currenttype,jdbcType=INTEGER},
      dutyStoreman = #{dutystoreman,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      createName = #{createname,jdbcType=VARCHAR},
      createDate = #{createdate,jdbcType=TIMESTAMP},
      updateName = #{updatename,jdbcType=VARCHAR},
      updateDate = #{updatedate,jdbcType=TIMESTAMP},
      working_status = #{workingStatus,jdbcType=INTEGER},
      del_flag = #{delFlag,jdbcType=INTEGER},
      library_type = #{libraryType,jdbcType=VARCHAR}
    where storehouse_id = #{storehouseId,jdbcType=INTEGER}
  </update>
</mapper>