<?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.odcc.cpzidc.bis.mapper.IdcUseBaseMapper">
|
|
<resultMap type="IdcUseBase" id="IdcUseBaseResult">
|
<result property="id" column="id" />
|
<result property="buildId" column="build_id" />
|
<result property="idcNo" column="idc_no" />
|
<result property="type" column="type" />
|
<result property="businessType" column="business_type" />
|
<result property="frameNum" column="frame_num" />
|
<result property="framePower" column="frame_power" />
|
<result property="name" column="name" />
|
<result property="province" column="province" />
|
<result property="city" column="city" />
|
<result property="area" column="area" />
|
<result property="address" column="address" />
|
<result property="addressExt" column="address_ext" />
|
<result property="building" column="building" />
|
<result property="creditCode" column="credit_code" />
|
<result property="mainbody" column="mainbody" />
|
<result property="mainbodyHeader" column="mainbody_header" />
|
<result property="mainbodyType" column="mainbody_type" />
|
<result property="investment" column="investment" />
|
<result property="productionTime" column="production_time" />
|
<result property="dcBuildingLevel" column="dc_building_level" />
|
<result property="dcAllArea" column="dc_all_area" />
|
<result property="dcItArea" column="dc_it_area" />
|
<result property="buildingType" column="building_type" />
|
<result property="cityElectricityType" column="city_electricity_type" />
|
<result property="cityElectricityTypeOther" column="city_electricity_type_other" />
|
<result property="powerDistribution" column="power_distribution" />
|
<result property="electricityType" column="electricity_type" />
|
<result property="electricityTypeOther" column="electricity_type_other" />
|
<result property="pueDesign" column="pue_design" />
|
<result property="waterDesign" column="water_design" />
|
<result property="netLevel" column="net_level" />
|
<result property="netOperator" column="net_operator" />
|
<result property="netOperatorOther" column="net_operator_other" />
|
<result property="airRefrigerationType" column="air_refrigeration_type" />
|
<result property="airRefrigerationTypeOther" column="air_refrigeration_type_other" />
|
<result property="sort" column="sort_" />
|
<result property="message" column="message" />
|
<result property="state" column="state" />
|
<result property="isEnable" column="is_enable" />
|
<result property="createUser" column="create_user" />
|
<result property="createTime" column="create_time" />
|
<result property="updateUser" column="update_user" />
|
<result property="updateTime" column="update_time" />
|
<result property="remark" column="remark" />
|
</resultMap>
|
|
<sql id="selectIdcUseBaseVo">
|
select id, build_id, idc_no, type, business_type, frame_num, frame_power, name, province, city, area, address, address_ext, building, credit_code, mainbody, mainbody_header, mainbody_type, investment, production_time, dc_building_level, dc_all_area, dc_it_area, building_type, city_electricity_type, city_electricity_type_other, power_distribution, electricity_type, electricity_type_other, pue_design, water_design, net_level, net_operator, net_operator_other, air_refrigeration_type, air_refrigeration_type_other, sort_, message, state, is_enable, create_user, create_time, update_user, update_time, remark from idc_use_base
|
</sql>
|
|
<select id="selectIdcUseBaseList" parameterType="IdcUseBase" resultMap="IdcUseBaseResult">
|
<include refid="selectIdcUseBaseVo"/>
|
<where>
|
<if test="buildId != null "> and build_id = #{buildId}</if>
|
<if test="idcNo != null and idcNo != ''"> and idc_no = #{idcNo}</if>
|
<if test="type != null "> and type = #{type}</if>
|
<if test="businessType != null "> and business_type = #{businessType}</if>
|
<if test="frameNum != null "> and frame_num = #{frameNum}</if>
|
<if test="framePower != null "> and frame_power = #{framePower}</if>
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
<if test="province != null and province != ''"> and province = #{province}</if>
|
<if test="city != null and city != ''"> and city = #{city}</if>
|
<if test="area != null and area != ''"> and area = #{area}</if>
|
<if test="address != null and address != ''"> and address = #{address}</if>
|
<if test="addressExt != null and addressExt != ''"> and address_ext = #{addressExt}</if>
|
<if test="building != null and building != ''"> and building = #{building}</if>
|
<if test="creditCode != null and creditCode != ''"> and credit_code = #{creditCode}</if>
|
<if test="mainbody != null and mainbody != ''"> and mainbody = #{mainbody}</if>
|
<if test="mainbodyHeader != null and mainbodyHeader != ''"> and mainbody_header = #{mainbodyHeader}</if>
|
<if test="mainbodyType != null and mainbodyType != ''"> and mainbody_type = #{mainbodyType}</if>
|
<if test="investment != null and investment != ''"> and investment = #{investment}</if>
|
<if test="productionTime != null and productionTime != ''"> and production_time = #{productionTime}</if>
|
<if test="dcBuildingLevel != null and dcBuildingLevel != ''"> and dc_building_level = #{dcBuildingLevel}</if>
|
<if test="dcAllArea != null "> and dc_all_area = #{dcAllArea}</if>
|
<if test="dcItArea != null "> and dc_it_area = #{dcItArea}</if>
|
<if test="buildingType != null and buildingType != ''"> and building_type = #{buildingType}</if>
|
<if test="cityElectricityType != null and cityElectricityType != ''"> and city_electricity_type = #{cityElectricityType}</if>
|
<if test="cityElectricityTypeOther != null and cityElectricityTypeOther != ''"> and city_electricity_type_other = #{cityElectricityTypeOther}</if>
|
<if test="powerDistribution != null "> and power_distribution = #{powerDistribution}</if>
|
<if test="electricityType != null and electricityType != ''"> and electricity_type = #{electricityType}</if>
|
<if test="electricityTypeOther != null and electricityTypeOther != ''"> and electricity_type_other = #{electricityTypeOther}</if>
|
<if test="pueDesign != null "> and pue_design = #{pueDesign}</if>
|
<if test="waterDesign != null and waterDesign != ''"> and water_design = #{waterDesign}</if>
|
<if test="netLevel != null and netLevel != ''"> and net_level = #{netLevel}</if>
|
<if test="netOperator != null and netOperator != ''"> and net_operator = #{netOperator}</if>
|
<if test="netOperatorOther != null and netOperatorOther != ''"> and net_operator_other = #{netOperatorOther}</if>
|
<if test="airRefrigerationType != null and airRefrigerationType != ''"> and air_refrigeration_type = #{airRefrigerationType}</if>
|
<if test="airRefrigerationTypeOther != null and airRefrigerationTypeOther != ''"> and air_refrigeration_type_other = #{airRefrigerationTypeOther}</if>
|
<if test="sort != null "> and sort_ = #{sort}</if>
|
<if test="message != null and message != ''"> and message = #{message}</if>
|
<if test="state != null "> and state = #{state}</if>
|
<if test="isEnable != null "> and is_enable = #{isEnable}</if>
|
<if test="createUser != null "> and create_user = #{createUser}</if>
|
<if test="updateUser != null "> and update_user = #{updateUser}</if>
|
</where>
|
</select>
|
|
<select id="selectIdcUseBaseById" parameterType="Long" resultMap="IdcUseBaseResult">
|
<include refid="selectIdcUseBaseVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertIdcUseBase" parameterType="IdcUseBase" useGeneratedKeys="true" keyProperty="id">
|
insert into idc_use_base
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="buildId != null">build_id,</if>
|
<if test="idcNo != null">idc_no,</if>
|
<if test="type != null">type,</if>
|
<if test="businessType != null">business_type,</if>
|
<if test="frameNum != null">frame_num,</if>
|
<if test="framePower != null">frame_power,</if>
|
<if test="name != null and name != ''">name,</if>
|
<if test="province != null and province != ''">province,</if>
|
<if test="city != null and city != ''">city,</if>
|
<if test="area != null and area != ''">area,</if>
|
<if test="address != null and address != ''">address,</if>
|
<if test="addressExt != null and addressExt != ''">address_ext,</if>
|
<if test="building != null and building != ''">building,</if>
|
<if test="creditCode != null and creditCode != ''">credit_code,</if>
|
<if test="mainbody != null and mainbody != ''">mainbody,</if>
|
<if test="mainbodyHeader != null and mainbodyHeader != ''">mainbody_header,</if>
|
<if test="mainbodyType != null and mainbodyType != ''">mainbody_type,</if>
|
<if test="investment != null">investment,</if>
|
<if test="productionTime != null and productionTime != ''">production_time,</if>
|
<if test="dcBuildingLevel != null and dcBuildingLevel != ''">dc_building_level,</if>
|
<if test="dcAllArea != null">dc_all_area,</if>
|
<if test="dcItArea != null">dc_it_area,</if>
|
<if test="buildingType != null and buildingType != ''">building_type,</if>
|
<if test="cityElectricityType != null and cityElectricityType != ''">city_electricity_type,</if>
|
<if test="cityElectricityTypeOther != null and cityElectricityTypeOther != ''">city_electricity_type_other,</if>
|
<if test="powerDistribution != null">power_distribution,</if>
|
<if test="electricityType != null and electricityType != ''">electricity_type,</if>
|
<if test="electricityTypeOther != null and electricityTypeOther != ''">electricity_type_other,</if>
|
<if test="pueDesign != null">pue_design,</if>
|
<if test="waterDesign != null and waterDesign != ''">water_design,</if>
|
<if test="netLevel != null and netLevel != ''">net_level,</if>
|
<if test="netOperator != null and netOperator != ''">net_operator,</if>
|
<if test="netOperatorOther != null and netOperatorOther != ''">net_operator_other,</if>
|
<if test="airRefrigerationType != null and airRefrigerationType != ''">air_refrigeration_type,</if>
|
<if test="airRefrigerationTypeOther != null and airRefrigerationTypeOther != ''">air_refrigeration_type_other,</if>
|
<if test="sort != null">sort_,</if>
|
<if test="message != null">message,</if>
|
<if test="state != null">state,</if>
|
<if test="isEnable != null">is_enable,</if>
|
<if test="createUser != null">create_user,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="updateUser != null">update_user,</if>
|
<if test="updateTime != null">update_time,</if>
|
<if test="remark != null">remark,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="buildId != null">#{buildId},</if>
|
<if test="idcNo != null">#{idcNo},</if>
|
<if test="type != null">#{type},</if>
|
<if test="businessType != null">#{businessType},</if>
|
<if test="frameNum != null">#{frameNum},</if>
|
<if test="framePower != null">#{framePower},</if>
|
<if test="name != null and name != ''">#{name},</if>
|
<if test="province != null and province != ''">#{province},</if>
|
<if test="city != null and city != ''">#{city},</if>
|
<if test="area != null and area != ''">#{area},</if>
|
<if test="address != null and address != ''">#{address},</if>
|
<if test="addressExt != null and addressExt != ''">#{addressExt},</if>
|
<if test="building != null and building != ''">#{building},</if>
|
<if test="creditCode != null and creditCode != ''">#{creditCode},</if>
|
<if test="mainbody != null and mainbody != ''">#{mainbody},</if>
|
<if test="mainbodyHeader != null and mainbodyHeader != ''">#{mainbodyHeader},</if>
|
<if test="mainbodyType != null and mainbodyType != ''">#{mainbodyType},</if>
|
<if test="investment != null">#{investment},</if>
|
<if test="productionTime != null and productionTime != ''">#{productionTime},</if>
|
<if test="dcBuildingLevel != null and dcBuildingLevel != ''">#{dcBuildingLevel},</if>
|
<if test="dcAllArea != null">#{dcAllArea},</if>
|
<if test="dcItArea != null">#{dcItArea},</if>
|
<if test="buildingType != null and buildingType != ''">#{buildingType},</if>
|
<if test="cityElectricityType != null and cityElectricityType != ''">#{cityElectricityType},</if>
|
<if test="cityElectricityTypeOther != null and cityElectricityTypeOther != ''">#{cityElectricityTypeOther},</if>
|
<if test="powerDistribution != null">#{powerDistribution},</if>
|
<if test="electricityType != null and electricityType != ''">#{electricityType},</if>
|
<if test="electricityTypeOther != null and electricityTypeOther != ''">#{electricityTypeOther},</if>
|
<if test="pueDesign != null">#{pueDesign},</if>
|
<if test="waterDesign != null and waterDesign != ''">#{waterDesign},</if>
|
<if test="netLevel != null and netLevel != ''">#{netLevel},</if>
|
<if test="netOperator != null and netOperator != ''">#{netOperator},</if>
|
<if test="netOperatorOther != null and netOperatorOther != ''">#{netOperatorOther},</if>
|
<if test="airRefrigerationType != null and airRefrigerationType != ''">#{airRefrigerationType},</if>
|
<if test="airRefrigerationTypeOther != null and airRefrigerationTypeOther != ''">#{airRefrigerationTypeOther},</if>
|
<if test="sort != null">#{sort},</if>
|
<if test="message != null">#{message},</if>
|
<if test="state != null">#{state},</if>
|
<if test="isEnable != null">#{isEnable},</if>
|
<if test="createUser != null">#{createUser},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateUser != null">#{updateUser},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="remark != null">#{remark},</if>
|
</trim>
|
</insert>
|
|
<update id="updateIdcUseBase" parameterType="IdcUseBase">
|
update idc_use_base
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="buildId != null">build_id = #{buildId},</if>
|
<if test="idcNo != null">idc_no = #{idcNo},</if>
|
<if test="type != null">type = #{type},</if>
|
<if test="businessType != null">business_type = #{businessType},</if>
|
<if test="frameNum != null">frame_num = #{frameNum},</if>
|
<if test="framePower != null">frame_power = #{framePower},</if>
|
<if test="name != null and name != ''">name = #{name},</if>
|
<if test="province != null and province != ''">province = #{province},</if>
|
<if test="city != null and city != ''">city = #{city},</if>
|
<if test="area != null and area != ''">area = #{area},</if>
|
<if test="address != null and address != ''">address = #{address},</if>
|
<if test="addressExt != null and addressExt != ''">address_ext = #{addressExt},</if>
|
<if test="building != null and building != ''">building = #{building},</if>
|
<if test="creditCode != null and creditCode != ''">credit_code = #{creditCode},</if>
|
<if test="mainbody != null and mainbody != ''">mainbody = #{mainbody},</if>
|
<if test="mainbodyHeader != null and mainbodyHeader != ''">mainbody_header = #{mainbodyHeader},</if>
|
<if test="mainbodyType != null and mainbodyType != ''">mainbody_type = #{mainbodyType},</if>
|
<if test="investment != null">investment = #{investment},</if>
|
<if test="productionTime != null and productionTime != ''">production_time = #{productionTime},</if>
|
<if test="dcBuildingLevel != null and dcBuildingLevel != ''">dc_building_level = #{dcBuildingLevel},</if>
|
<if test="dcAllArea != null">dc_all_area = #{dcAllArea},</if>
|
<if test="dcItArea != null">dc_it_area = #{dcItArea},</if>
|
<if test="buildingType != null and buildingType != ''">building_type = #{buildingType},</if>
|
<if test="cityElectricityType != null and cityElectricityType != ''">city_electricity_type = #{cityElectricityType},</if>
|
<if test="cityElectricityTypeOther != null and cityElectricityTypeOther != ''">city_electricity_type_other = #{cityElectricityTypeOther},</if>
|
<if test="powerDistribution != null">power_distribution = #{powerDistribution},</if>
|
<if test="electricityType != null and electricityType != ''">electricity_type = #{electricityType},</if>
|
<if test="electricityTypeOther != null and electricityTypeOther != ''">electricity_type_other = #{electricityTypeOther},</if>
|
<if test="pueDesign != null">pue_design = #{pueDesign},</if>
|
<if test="waterDesign != null and waterDesign != ''">water_design = #{waterDesign},</if>
|
<if test="netLevel != null and netLevel != ''">net_level = #{netLevel},</if>
|
<if test="netOperator != null and netOperator != ''">net_operator = #{netOperator},</if>
|
<if test="netOperatorOther != null and netOperatorOther != ''">net_operator_other = #{netOperatorOther},</if>
|
<if test="airRefrigerationType != null and airRefrigerationType != ''">air_refrigeration_type = #{airRefrigerationType},</if>
|
<if test="airRefrigerationTypeOther != null and airRefrigerationTypeOther != ''">air_refrigeration_type_other = #{airRefrigerationTypeOther},</if>
|
<if test="sort != null">sort_ = #{sort},</if>
|
<if test="message != null">message = #{message},</if>
|
<if test="state != null">state = #{state},</if>
|
<if test="isEnable != null">is_enable = #{isEnable},</if>
|
<if test="createUser != null">create_user = #{createUser},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="updateUser != null">update_user = #{updateUser},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteIdcUseBaseById" parameterType="Long">
|
delete from idc_use_base where id = #{id}
|
</delete>
|
|
<delete id="deleteIdcUseBaseByIds" parameterType="String">
|
delete from idc_use_base where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|