中国算力平台算力登记系统2.0
yanzhaofeige
3 days ago 5cc82f45d73865489cc39e5ffbf521bf4279ec53
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<?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>