中国算力平台算力登记系统2.0
yanzhaofeige
3 days ago 5cc82f45d73865489cc39e5ffbf521bf4279ec53
commit | author | age
5cc82f 1 <?xml version="1.0" encoding="UTF-8" ?>
Y 2 <!DOCTYPE mapper
3 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5 <mapper namespace="com.odcc.cpzidc.bis.mapper.IdcUseBaseMapper">
6     
7     <resultMap type="IdcUseBase" id="IdcUseBaseResult">
8         <result property="id"    column="id"    />
9         <result property="buildId"    column="build_id"    />
10         <result property="idcNo"    column="idc_no"    />
11         <result property="type"    column="type"    />
12         <result property="businessType"    column="business_type"    />
13         <result property="frameNum"    column="frame_num"    />
14         <result property="framePower"    column="frame_power"    />
15         <result property="name"    column="name"    />
16         <result property="province"    column="province"    />
17         <result property="city"    column="city"    />
18         <result property="area"    column="area"    />
19         <result property="address"    column="address"    />
20         <result property="addressExt"    column="address_ext"    />
21         <result property="building"    column="building"    />
22         <result property="creditCode"    column="credit_code"    />
23         <result property="mainbody"    column="mainbody"    />
24         <result property="mainbodyHeader"    column="mainbody_header"    />
25         <result property="mainbodyType"    column="mainbody_type"    />
26         <result property="investment"    column="investment"    />
27         <result property="productionTime"    column="production_time"    />
28         <result property="dcBuildingLevel"    column="dc_building_level"    />
29         <result property="dcAllArea"    column="dc_all_area"    />
30         <result property="dcItArea"    column="dc_it_area"    />
31         <result property="buildingType"    column="building_type"    />
32         <result property="cityElectricityType"    column="city_electricity_type"    />
33         <result property="cityElectricityTypeOther"    column="city_electricity_type_other"    />
34         <result property="powerDistribution"    column="power_distribution"    />
35         <result property="electricityType"    column="electricity_type"    />
36         <result property="electricityTypeOther"    column="electricity_type_other"    />
37         <result property="pueDesign"    column="pue_design"    />
38         <result property="waterDesign"    column="water_design"    />
39         <result property="netLevel"    column="net_level"    />
40         <result property="netOperator"    column="net_operator"    />
41         <result property="netOperatorOther"    column="net_operator_other"    />
42         <result property="airRefrigerationType"    column="air_refrigeration_type"    />
43         <result property="airRefrigerationTypeOther"    column="air_refrigeration_type_other"    />
44         <result property="sort"    column="sort_"    />
45         <result property="message"    column="message"    />
46         <result property="state"    column="state"    />
47         <result property="isEnable"    column="is_enable"    />
48         <result property="createUser"    column="create_user"    />
49         <result property="createTime"    column="create_time"    />
50         <result property="updateUser"    column="update_user"    />
51         <result property="updateTime"    column="update_time"    />
52         <result property="remark"    column="remark"    />
53     </resultMap>
54
55     <sql id="selectIdcUseBaseVo">
56         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
57     </sql>
58
59     <select id="selectIdcUseBaseList" parameterType="IdcUseBase" resultMap="IdcUseBaseResult">
60         <include refid="selectIdcUseBaseVo"/>
61         <where>  
62             <if test="buildId != null "> and build_id = #{buildId}</if>
63             <if test="idcNo != null  and idcNo != ''"> and idc_no = #{idcNo}</if>
64             <if test="type != null "> and type = #{type}</if>
65             <if test="businessType != null "> and business_type = #{businessType}</if>
66             <if test="frameNum != null "> and frame_num = #{frameNum}</if>
67             <if test="framePower != null "> and frame_power = #{framePower}</if>
68             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
69             <if test="province != null  and province != ''"> and province = #{province}</if>
70             <if test="city != null  and city != ''"> and city = #{city}</if>
71             <if test="area != null  and area != ''"> and area = #{area}</if>
72             <if test="address != null  and address != ''"> and address = #{address}</if>
73             <if test="addressExt != null  and addressExt != ''"> and address_ext = #{addressExt}</if>
74             <if test="building != null  and building != ''"> and building = #{building}</if>
75             <if test="creditCode != null  and creditCode != ''"> and credit_code = #{creditCode}</if>
76             <if test="mainbody != null  and mainbody != ''"> and mainbody = #{mainbody}</if>
77             <if test="mainbodyHeader != null  and mainbodyHeader != ''"> and mainbody_header = #{mainbodyHeader}</if>
78             <if test="mainbodyType != null  and mainbodyType != ''"> and mainbody_type = #{mainbodyType}</if>
79             <if test="investment != null  and investment != ''"> and investment = #{investment}</if>
80             <if test="productionTime != null  and productionTime != ''"> and production_time = #{productionTime}</if>
81             <if test="dcBuildingLevel != null  and dcBuildingLevel != ''"> and dc_building_level = #{dcBuildingLevel}</if>
82             <if test="dcAllArea != null "> and dc_all_area = #{dcAllArea}</if>
83             <if test="dcItArea != null "> and dc_it_area = #{dcItArea}</if>
84             <if test="buildingType != null  and buildingType != ''"> and building_type = #{buildingType}</if>
85             <if test="cityElectricityType != null  and cityElectricityType != ''"> and city_electricity_type = #{cityElectricityType}</if>
86             <if test="cityElectricityTypeOther != null  and cityElectricityTypeOther != ''"> and city_electricity_type_other = #{cityElectricityTypeOther}</if>
87             <if test="powerDistribution != null "> and power_distribution = #{powerDistribution}</if>
88             <if test="electricityType != null  and electricityType != ''"> and electricity_type = #{electricityType}</if>
89             <if test="electricityTypeOther != null  and electricityTypeOther != ''"> and electricity_type_other = #{electricityTypeOther}</if>
90             <if test="pueDesign != null "> and pue_design = #{pueDesign}</if>
91             <if test="waterDesign != null  and waterDesign != ''"> and water_design = #{waterDesign}</if>
92             <if test="netLevel != null  and netLevel != ''"> and net_level = #{netLevel}</if>
93             <if test="netOperator != null  and netOperator != ''"> and net_operator = #{netOperator}</if>
94             <if test="netOperatorOther != null  and netOperatorOther != ''"> and net_operator_other = #{netOperatorOther}</if>
95             <if test="airRefrigerationType != null  and airRefrigerationType != ''"> and air_refrigeration_type = #{airRefrigerationType}</if>
96             <if test="airRefrigerationTypeOther != null  and airRefrigerationTypeOther != ''"> and air_refrigeration_type_other = #{airRefrigerationTypeOther}</if>
97             <if test="sort != null "> and sort_ = #{sort}</if>
98             <if test="message != null  and message != ''"> and message = #{message}</if>
99             <if test="state != null "> and state = #{state}</if>
100             <if test="isEnable != null "> and is_enable = #{isEnable}</if>
101             <if test="createUser != null "> and create_user = #{createUser}</if>
102             <if test="updateUser != null "> and update_user = #{updateUser}</if>
103         </where>
104     </select>
105     
106     <select id="selectIdcUseBaseById" parameterType="Long" resultMap="IdcUseBaseResult">
107         <include refid="selectIdcUseBaseVo"/>
108         where id = #{id}
109     </select>
110
111     <insert id="insertIdcUseBase" parameterType="IdcUseBase" useGeneratedKeys="true" keyProperty="id">
112         insert into idc_use_base
113         <trim prefix="(" suffix=")" suffixOverrides=",">
114             <if test="buildId != null">build_id,</if>
115             <if test="idcNo != null">idc_no,</if>
116             <if test="type != null">type,</if>
117             <if test="businessType != null">business_type,</if>
118             <if test="frameNum != null">frame_num,</if>
119             <if test="framePower != null">frame_power,</if>
120             <if test="name != null and name != ''">name,</if>
121             <if test="province != null and province != ''">province,</if>
122             <if test="city != null and city != ''">city,</if>
123             <if test="area != null and area != ''">area,</if>
124             <if test="address != null and address != ''">address,</if>
125             <if test="addressExt != null and addressExt != ''">address_ext,</if>
126             <if test="building != null and building != ''">building,</if>
127             <if test="creditCode != null and creditCode != ''">credit_code,</if>
128             <if test="mainbody != null and mainbody != ''">mainbody,</if>
129             <if test="mainbodyHeader != null and mainbodyHeader != ''">mainbody_header,</if>
130             <if test="mainbodyType != null and mainbodyType != ''">mainbody_type,</if>
131             <if test="investment != null">investment,</if>
132             <if test="productionTime != null and productionTime != ''">production_time,</if>
133             <if test="dcBuildingLevel != null and dcBuildingLevel != ''">dc_building_level,</if>
134             <if test="dcAllArea != null">dc_all_area,</if>
135             <if test="dcItArea != null">dc_it_area,</if>
136             <if test="buildingType != null and buildingType != ''">building_type,</if>
137             <if test="cityElectricityType != null and cityElectricityType != ''">city_electricity_type,</if>
138             <if test="cityElectricityTypeOther != null and cityElectricityTypeOther != ''">city_electricity_type_other,</if>
139             <if test="powerDistribution != null">power_distribution,</if>
140             <if test="electricityType != null and electricityType != ''">electricity_type,</if>
141             <if test="electricityTypeOther != null and electricityTypeOther != ''">electricity_type_other,</if>
142             <if test="pueDesign != null">pue_design,</if>
143             <if test="waterDesign != null and waterDesign != ''">water_design,</if>
144             <if test="netLevel != null and netLevel != ''">net_level,</if>
145             <if test="netOperator != null and netOperator != ''">net_operator,</if>
146             <if test="netOperatorOther != null and netOperatorOther != ''">net_operator_other,</if>
147             <if test="airRefrigerationType != null and airRefrigerationType != ''">air_refrigeration_type,</if>
148             <if test="airRefrigerationTypeOther != null and airRefrigerationTypeOther != ''">air_refrigeration_type_other,</if>
149             <if test="sort != null">sort_,</if>
150             <if test="message != null">message,</if>
151             <if test="state != null">state,</if>
152             <if test="isEnable != null">is_enable,</if>
153             <if test="createUser != null">create_user,</if>
154             <if test="createTime != null">create_time,</if>
155             <if test="updateUser != null">update_user,</if>
156             <if test="updateTime != null">update_time,</if>
157             <if test="remark != null">remark,</if>
158          </trim>
159         <trim prefix="values (" suffix=")" suffixOverrides=",">
160             <if test="buildId != null">#{buildId},</if>
161             <if test="idcNo != null">#{idcNo},</if>
162             <if test="type != null">#{type},</if>
163             <if test="businessType != null">#{businessType},</if>
164             <if test="frameNum != null">#{frameNum},</if>
165             <if test="framePower != null">#{framePower},</if>
166             <if test="name != null and name != ''">#{name},</if>
167             <if test="province != null and province != ''">#{province},</if>
168             <if test="city != null and city != ''">#{city},</if>
169             <if test="area != null and area != ''">#{area},</if>
170             <if test="address != null and address != ''">#{address},</if>
171             <if test="addressExt != null and addressExt != ''">#{addressExt},</if>
172             <if test="building != null and building != ''">#{building},</if>
173             <if test="creditCode != null and creditCode != ''">#{creditCode},</if>
174             <if test="mainbody != null and mainbody != ''">#{mainbody},</if>
175             <if test="mainbodyHeader != null and mainbodyHeader != ''">#{mainbodyHeader},</if>
176             <if test="mainbodyType != null and mainbodyType != ''">#{mainbodyType},</if>
177             <if test="investment != null">#{investment},</if>
178             <if test="productionTime != null and productionTime != ''">#{productionTime},</if>
179             <if test="dcBuildingLevel != null and dcBuildingLevel != ''">#{dcBuildingLevel},</if>
180             <if test="dcAllArea != null">#{dcAllArea},</if>
181             <if test="dcItArea != null">#{dcItArea},</if>
182             <if test="buildingType != null and buildingType != ''">#{buildingType},</if>
183             <if test="cityElectricityType != null and cityElectricityType != ''">#{cityElectricityType},</if>
184             <if test="cityElectricityTypeOther != null and cityElectricityTypeOther != ''">#{cityElectricityTypeOther},</if>
185             <if test="powerDistribution != null">#{powerDistribution},</if>
186             <if test="electricityType != null and electricityType != ''">#{electricityType},</if>
187             <if test="electricityTypeOther != null and electricityTypeOther != ''">#{electricityTypeOther},</if>
188             <if test="pueDesign != null">#{pueDesign},</if>
189             <if test="waterDesign != null and waterDesign != ''">#{waterDesign},</if>
190             <if test="netLevel != null and netLevel != ''">#{netLevel},</if>
191             <if test="netOperator != null and netOperator != ''">#{netOperator},</if>
192             <if test="netOperatorOther != null and netOperatorOther != ''">#{netOperatorOther},</if>
193             <if test="airRefrigerationType != null and airRefrigerationType != ''">#{airRefrigerationType},</if>
194             <if test="airRefrigerationTypeOther != null and airRefrigerationTypeOther != ''">#{airRefrigerationTypeOther},</if>
195             <if test="sort != null">#{sort},</if>
196             <if test="message != null">#{message},</if>
197             <if test="state != null">#{state},</if>
198             <if test="isEnable != null">#{isEnable},</if>
199             <if test="createUser != null">#{createUser},</if>
200             <if test="createTime != null">#{createTime},</if>
201             <if test="updateUser != null">#{updateUser},</if>
202             <if test="updateTime != null">#{updateTime},</if>
203             <if test="remark != null">#{remark},</if>
204          </trim>
205     </insert>
206
207     <update id="updateIdcUseBase" parameterType="IdcUseBase">
208         update idc_use_base
209         <trim prefix="SET" suffixOverrides=",">
210             <if test="buildId != null">build_id = #{buildId},</if>
211             <if test="idcNo != null">idc_no = #{idcNo},</if>
212             <if test="type != null">type = #{type},</if>
213             <if test="businessType != null">business_type = #{businessType},</if>
214             <if test="frameNum != null">frame_num = #{frameNum},</if>
215             <if test="framePower != null">frame_power = #{framePower},</if>
216             <if test="name != null and name != ''">name = #{name},</if>
217             <if test="province != null and province != ''">province = #{province},</if>
218             <if test="city != null and city != ''">city = #{city},</if>
219             <if test="area != null and area != ''">area = #{area},</if>
220             <if test="address != null and address != ''">address = #{address},</if>
221             <if test="addressExt != null and addressExt != ''">address_ext = #{addressExt},</if>
222             <if test="building != null and building != ''">building = #{building},</if>
223             <if test="creditCode != null and creditCode != ''">credit_code = #{creditCode},</if>
224             <if test="mainbody != null and mainbody != ''">mainbody = #{mainbody},</if>
225             <if test="mainbodyHeader != null and mainbodyHeader != ''">mainbody_header = #{mainbodyHeader},</if>
226             <if test="mainbodyType != null and mainbodyType != ''">mainbody_type = #{mainbodyType},</if>
227             <if test="investment != null">investment = #{investment},</if>
228             <if test="productionTime != null and productionTime != ''">production_time = #{productionTime},</if>
229             <if test="dcBuildingLevel != null and dcBuildingLevel != ''">dc_building_level = #{dcBuildingLevel},</if>
230             <if test="dcAllArea != null">dc_all_area = #{dcAllArea},</if>
231             <if test="dcItArea != null">dc_it_area = #{dcItArea},</if>
232             <if test="buildingType != null and buildingType != ''">building_type = #{buildingType},</if>
233             <if test="cityElectricityType != null and cityElectricityType != ''">city_electricity_type = #{cityElectricityType},</if>
234             <if test="cityElectricityTypeOther != null and cityElectricityTypeOther != ''">city_electricity_type_other = #{cityElectricityTypeOther},</if>
235             <if test="powerDistribution != null">power_distribution = #{powerDistribution},</if>
236             <if test="electricityType != null and electricityType != ''">electricity_type = #{electricityType},</if>
237             <if test="electricityTypeOther != null and electricityTypeOther != ''">electricity_type_other = #{electricityTypeOther},</if>
238             <if test="pueDesign != null">pue_design = #{pueDesign},</if>
239             <if test="waterDesign != null and waterDesign != ''">water_design = #{waterDesign},</if>
240             <if test="netLevel != null and netLevel != ''">net_level = #{netLevel},</if>
241             <if test="netOperator != null and netOperator != ''">net_operator = #{netOperator},</if>
242             <if test="netOperatorOther != null and netOperatorOther != ''">net_operator_other = #{netOperatorOther},</if>
243             <if test="airRefrigerationType != null and airRefrigerationType != ''">air_refrigeration_type = #{airRefrigerationType},</if>
244             <if test="airRefrigerationTypeOther != null and airRefrigerationTypeOther != ''">air_refrigeration_type_other = #{airRefrigerationTypeOther},</if>
245             <if test="sort != null">sort_ = #{sort},</if>
246             <if test="message != null">message = #{message},</if>
247             <if test="state != null">state = #{state},</if>
248             <if test="isEnable != null">is_enable = #{isEnable},</if>
249             <if test="createUser != null">create_user = #{createUser},</if>
250             <if test="createTime != null">create_time = #{createTime},</if>
251             <if test="updateUser != null">update_user = #{updateUser},</if>
252             <if test="updateTime != null">update_time = #{updateTime},</if>
253             <if test="remark != null">remark = #{remark},</if>
254         </trim>
255         where id = #{id}
256     </update>
257
258     <delete id="deleteIdcUseBaseById" parameterType="Long">
259         delete from idc_use_base where id = #{id}
260     </delete>
261
262     <delete id="deleteIdcUseBaseByIds" parameterType="String">
263         delete from idc_use_base where id in 
264         <foreach item="id" collection="array" open="(" separator="," close=")">
265             #{id}
266         </foreach>
267     </delete>
268 </mapper>