OrganizationMapper.xml 31 KB
Newer Older
1 2 3
<?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="pwc.taxtech.atms.dao.OrganizationMapper">
4
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.Organization">
5 6 7 8
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
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
    <id column="ID" jdbcType="VARCHAR" property="id" />
    <result column="CLIENT_CODE" jdbcType="VARCHAR" property="clientCode" />
    <result column="NAME" jdbcType="VARCHAR" property="name" />
    <result column="CODE" jdbcType="VARCHAR" property="code" />
    <result column="PARENT_ID" jdbcType="VARCHAR" property="parentId" />
    <result column="TAX_PAYER_NUMBER" jdbcType="VARCHAR" property="taxPayerNumber" />
    <result column="REGION_ID" jdbcType="VARCHAR" property="regionId" />
    <result column="STRUCTURE_ID" jdbcType="VARCHAR" property="structureId" />
    <result column="INDUSTRY_ID" jdbcType="VARCHAR" property="industryId" />
    <result column="BUSINESS_UNIT_ID" jdbcType="VARCHAR" property="businessUnitId" />
    <result column="IS_ACTIVE" jdbcType="DECIMAL" property="isActive" />
    <result column="P_LEVEL" jdbcType="DECIMAL" property="pLevel" />
    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="AREA_ID" jdbcType="VARCHAR" property="areaId" />
    <result column="ENGLISH_NAME" jdbcType="VARCHAR" property="englishName" />
    <result column="ABBREVIATION" jdbcType="VARCHAR" property="abbreviation" />
    <result column="INVOICE_TYPE" jdbcType="VARCHAR" property="invoiceType" />
    <result column="LEGAL_PERSON_NAME" jdbcType="VARCHAR" property="legalPersonName" />
    <result column="MANUFACTURE_ADDRESS" jdbcType="VARCHAR" property="manufactureAddress" />
    <result column="REGISTER_ADDRESS" jdbcType="VARCHAR" property="registerAddress" />
    <result column="BANK_ACCOUNT_NAME" jdbcType="VARCHAR" property="bankAccountName" />
    <result column="BANK_ACCOUNT_NUMBER" jdbcType="VARCHAR" property="bankAccountNumber" />
    <result column="PHONE_NUMBER" jdbcType="VARCHAR" property="phoneNumber" />
    <result column="REGISTRATION_TYPE" jdbcType="VARCHAR" property="registrationType" />
    <result column="REMARK" jdbcType="VARCHAR" property="remark" />
35
    <result column="VEHICLE_ROUTING_LOCATION" jdbcType="VARCHAR" property="vehicleRoutingLocation" />
neo's avatar
neo committed
36 37 38 39 40 41 42 43 44
    <result column="RATEPAYER" jdbcType="VARCHAR" property="ratepayer" />
    <result column="ADDRESS" jdbcType="VARCHAR" property="address" />
    <result column="FOUNDATION_DATE" jdbcType="TIMESTAMP" property="foundationDate" />
    <result column="REGISTRATION_DATE" jdbcType="TIMESTAMP" property="registrationDate" />
    <result column="REGISTRATION_LOCATION" jdbcType="VARCHAR" property="registrationLocation" />
    <result column="REGISTRATION_CAPITAL" jdbcType="VARCHAR" property="registrationCapital" />
    <result column="BUSINESS_ALLOTTED_TIME_FROM" jdbcType="TIMESTAMP" property="businessAllottedTimeFrom" />
    <result column="BUSINESS_ALLOTTED_TIME_TO" jdbcType="TIMESTAMP" property="businessAllottedTimeTo" />
    <result column="LEGAL_CODE" jdbcType="VARCHAR" property="legalCode" />
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
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <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 close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
73
            </foreach>
74
          </trim>
75
        </if>
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
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <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 close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
108
        </if>
109 110 111 112 113 114 115 116
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
117 118 119 120
    ID, CLIENT_CODE, "NAME", CODE, PARENT_ID, TAX_PAYER_NUMBER, REGION_ID, STRUCTURE_ID, 
    INDUSTRY_ID, BUSINESS_UNIT_ID, IS_ACTIVE, P_LEVEL, CREATE_TIME, UPDATE_TIME, AREA_ID, 
    ENGLISH_NAME, ABBREVIATION, INVOICE_TYPE, LEGAL_PERSON_NAME, MANUFACTURE_ADDRESS, 
    REGISTER_ADDRESS, BANK_ACCOUNT_NAME, BANK_ACCOUNT_NUMBER, PHONE_NUMBER, REGISTRATION_TYPE, 
121
    REMARK, VEHICLE_ROUTING_LOCATION, RATEPAYER, ADDRESS, FOUNDATION_DATE, REGISTRATION_DATE, 
neo's avatar
neo committed
122 123
    REGISTRATION_LOCATION, REGISTRATION_CAPITAL, BUSINESS_ALLOTTED_TIME_FROM, BUSINESS_ALLOTTED_TIME_TO, 
    LEGAL_CODE
124
  </sql>
125
  <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.OrganizationExample" resultMap="BaseResultMap">
126 127 128 129 130 131 132 133 134
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
neo's avatar
neo committed
135
    from ORGANIZATION
136 137 138 139 140 141 142 143 144 145 146 147 148 149
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
neo's avatar
neo committed
150 151
    from ORGANIZATION
    where ID = #{id,jdbcType=VARCHAR}
152 153 154 155 156 157
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
158 159
    delete from ORGANIZATION
    where ID = #{id,jdbcType=VARCHAR}
160
  </delete>
161
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.OrganizationExample">
162 163 164 165
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
166
    delete from ORGANIZATION
167 168 169 170
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
171
  <insert id="insert" parameterType="pwc.taxtech.atms.entity.Organization">
172 173 174 175
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
176 177 178 179 180 181 182 183
    insert into ORGANIZATION (ID, CLIENT_CODE, "NAME", 
      CODE, PARENT_ID, TAX_PAYER_NUMBER, 
      REGION_ID, STRUCTURE_ID, INDUSTRY_ID, 
      BUSINESS_UNIT_ID, IS_ACTIVE, P_LEVEL, 
      CREATE_TIME, UPDATE_TIME, AREA_ID, 
      ENGLISH_NAME, ABBREVIATION, INVOICE_TYPE, 
      LEGAL_PERSON_NAME, MANUFACTURE_ADDRESS, REGISTER_ADDRESS, 
      BANK_ACCOUNT_NAME, BANK_ACCOUNT_NUMBER, PHONE_NUMBER, 
184
      REGISTRATION_TYPE, REMARK, VEHICLE_ROUTING_LOCATION, 
neo's avatar
neo committed
185 186 187 188 189 190 191 192 193
      RATEPAYER, ADDRESS, FOUNDATION_DATE, 
      REGISTRATION_DATE, REGISTRATION_LOCATION, 
      REGISTRATION_CAPITAL, BUSINESS_ALLOTTED_TIME_FROM, 
      BUSINESS_ALLOTTED_TIME_TO, LEGAL_CODE)
    values (#{id,jdbcType=VARCHAR}, #{clientCode,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
      #{code,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR}, #{taxPayerNumber,jdbcType=VARCHAR}, 
      #{regionId,jdbcType=VARCHAR}, #{structureId,jdbcType=VARCHAR}, #{industryId,jdbcType=VARCHAR}, 
      #{businessUnitId,jdbcType=VARCHAR}, #{isActive,jdbcType=DECIMAL}, #{pLevel,jdbcType=DECIMAL}, 
      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{areaId,jdbcType=VARCHAR}, 
194 195 196
      #{englishName,jdbcType=VARCHAR}, #{abbreviation,jdbcType=VARCHAR}, #{invoiceType,jdbcType=VARCHAR}, 
      #{legalPersonName,jdbcType=VARCHAR}, #{manufactureAddress,jdbcType=VARCHAR}, #{registerAddress,jdbcType=VARCHAR}, 
      #{bankAccountName,jdbcType=VARCHAR}, #{bankAccountNumber,jdbcType=VARCHAR}, #{phoneNumber,jdbcType=VARCHAR}, 
197
      #{registrationType,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{vehicleRoutingLocation,jdbcType=VARCHAR}, 
neo's avatar
neo committed
198 199 200 201
      #{ratepayer,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{foundationDate,jdbcType=TIMESTAMP}, 
      #{registrationDate,jdbcType=TIMESTAMP}, #{registrationLocation,jdbcType=VARCHAR}, 
      #{registrationCapital,jdbcType=VARCHAR}, #{businessAllottedTimeFrom,jdbcType=TIMESTAMP}, 
      #{businessAllottedTimeTo,jdbcType=TIMESTAMP}, #{legalCode,jdbcType=VARCHAR})
202
  </insert>
203
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.Organization">
204 205 206 207
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
208
    insert into ORGANIZATION
209
    <trim prefix="(" suffix=")" suffixOverrides=",">
neo's avatar
neo committed
210
      <if test="id != null">
211 212 213
        ID,
      </if>
      <if test="clientCode != null">
neo's avatar
neo committed
214
        CLIENT_CODE,
215 216
      </if>
      <if test="name != null">
neo's avatar
neo committed
217
        "NAME",
218 219
      </if>
      <if test="code != null">
neo's avatar
neo committed
220
        CODE,
221
      </if>
neo's avatar
neo committed
222 223
      <if test="parentId != null">
        PARENT_ID,
224 225
      </if>
      <if test="taxPayerNumber != null">
neo's avatar
neo committed
226
        TAX_PAYER_NUMBER,
227
      </if>
neo's avatar
neo committed
228 229
      <if test="regionId != null">
        REGION_ID,
230
      </if>
neo's avatar
neo committed
231 232
      <if test="structureId != null">
        STRUCTURE_ID,
233
      </if>
neo's avatar
neo committed
234 235
      <if test="industryId != null">
        INDUSTRY_ID,
236
      </if>
neo's avatar
neo committed
237 238
      <if test="businessUnitId != null">
        BUSINESS_UNIT_ID,
239 240
      </if>
      <if test="isActive != null">
neo's avatar
neo committed
241
        IS_ACTIVE,
242 243
      </if>
      <if test="pLevel != null">
neo's avatar
neo committed
244
        P_LEVEL,
245 246
      </if>
      <if test="createTime != null">
neo's avatar
neo committed
247
        CREATE_TIME,
248 249
      </if>
      <if test="updateTime != null">
neo's avatar
neo committed
250
        UPDATE_TIME,
251
      </if>
neo's avatar
neo committed
252 253
      <if test="areaId != null">
        AREA_ID,
254 255
      </if>
      <if test="englishName != null">
neo's avatar
neo committed
256
        ENGLISH_NAME,
257 258
      </if>
      <if test="abbreviation != null">
neo's avatar
neo committed
259
        ABBREVIATION,
260 261
      </if>
      <if test="invoiceType != null">
neo's avatar
neo committed
262
        INVOICE_TYPE,
263 264
      </if>
      <if test="legalPersonName != null">
neo's avatar
neo committed
265
        LEGAL_PERSON_NAME,
266 267
      </if>
      <if test="manufactureAddress != null">
neo's avatar
neo committed
268
        MANUFACTURE_ADDRESS,
269 270
      </if>
      <if test="registerAddress != null">
neo's avatar
neo committed
271
        REGISTER_ADDRESS,
272 273
      </if>
      <if test="bankAccountName != null">
neo's avatar
neo committed
274
        BANK_ACCOUNT_NAME,
275 276
      </if>
      <if test="bankAccountNumber != null">
neo's avatar
neo committed
277
        BANK_ACCOUNT_NUMBER,
278 279
      </if>
      <if test="phoneNumber != null">
neo's avatar
neo committed
280
        PHONE_NUMBER,
281 282
      </if>
      <if test="registrationType != null">
neo's avatar
neo committed
283
        REGISTRATION_TYPE,
284 285
      </if>
      <if test="remark != null">
neo's avatar
neo committed
286
        REMARK,
287
      </if>
288
      <if test="vehicleRoutingLocation != null">
frank.xa.zhang's avatar
frank.xa.zhang committed
289
        VEHICLE_ROUTING_LOCATION,
290 291
      </if>
      <if test="ratepayer != null">
neo's avatar
neo committed
292
        RATEPAYER,
293 294
      </if>
      <if test="address != null">
neo's avatar
neo committed
295
        ADDRESS,
296 297
      </if>
      <if test="foundationDate != null">
neo's avatar
neo committed
298
        FOUNDATION_DATE,
299 300
      </if>
      <if test="registrationDate != null">
neo's avatar
neo committed
301
        REGISTRATION_DATE,
302 303
      </if>
      <if test="registrationLocation != null">
neo's avatar
neo committed
304
        REGISTRATION_LOCATION,
305 306
      </if>
      <if test="registrationCapital != null">
neo's avatar
neo committed
307
        REGISTRATION_CAPITAL,
308 309
      </if>
      <if test="businessAllottedTimeFrom != null">
neo's avatar
neo committed
310
        BUSINESS_ALLOTTED_TIME_FROM,
311 312
      </if>
      <if test="businessAllottedTimeTo != null">
neo's avatar
neo committed
313
        BUSINESS_ALLOTTED_TIME_TO,
314 315
      </if>
      <if test="legalCode != null">
neo's avatar
neo committed
316
        LEGAL_CODE,
317 318 319
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
neo's avatar
neo committed
320 321
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
322 323 324 325 326 327 328 329 330 331
      </if>
      <if test="clientCode != null">
        #{clientCode,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="code != null">
        #{code,jdbcType=VARCHAR},
      </if>
neo's avatar
neo committed
332 333
      <if test="parentId != null">
        #{parentId,jdbcType=VARCHAR},
334 335 336 337
      </if>
      <if test="taxPayerNumber != null">
        #{taxPayerNumber,jdbcType=VARCHAR},
      </if>
neo's avatar
neo committed
338 339
      <if test="regionId != null">
        #{regionId,jdbcType=VARCHAR},
340
      </if>
neo's avatar
neo committed
341 342
      <if test="structureId != null">
        #{structureId,jdbcType=VARCHAR},
343
      </if>
neo's avatar
neo committed
344 345
      <if test="industryId != null">
        #{industryId,jdbcType=VARCHAR},
346
      </if>
neo's avatar
neo committed
347 348
      <if test="businessUnitId != null">
        #{businessUnitId,jdbcType=VARCHAR},
349 350
      </if>
      <if test="isActive != null">
neo's avatar
neo committed
351
        #{isActive,jdbcType=DECIMAL},
352 353
      </if>
      <if test="pLevel != null">
neo's avatar
neo committed
354
        #{pLevel,jdbcType=DECIMAL},
355 356 357 358 359 360 361
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
neo's avatar
neo committed
362 363
      <if test="areaId != null">
        #{areaId,jdbcType=VARCHAR},
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380
      </if>
      <if test="englishName != null">
        #{englishName,jdbcType=VARCHAR},
      </if>
      <if test="abbreviation != null">
        #{abbreviation,jdbcType=VARCHAR},
      </if>
      <if test="invoiceType != null">
        #{invoiceType,jdbcType=VARCHAR},
      </if>
      <if test="legalPersonName != null">
        #{legalPersonName,jdbcType=VARCHAR},
      </if>
      <if test="manufactureAddress != null">
        #{manufactureAddress,jdbcType=VARCHAR},
      </if>
      <if test="registerAddress != null">
381
        #{registerAddress,jdbcType=VARCHAR},
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397
      </if>
      <if test="bankAccountName != null">
        #{bankAccountName,jdbcType=VARCHAR},
      </if>
      <if test="bankAccountNumber != null">
        #{bankAccountNumber,jdbcType=VARCHAR},
      </if>
      <if test="phoneNumber != null">
        #{phoneNumber,jdbcType=VARCHAR},
      </if>
      <if test="registrationType != null">
        #{registrationType,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
398 399
      <if test="vehicleRoutingLocation != null">
        #{vehicleRoutingLocation,jdbcType=VARCHAR},
400 401 402 403 404 405 406 407
      </if>
      <if test="ratepayer != null">
        #{ratepayer,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        #{address,jdbcType=VARCHAR},
      </if>
      <if test="foundationDate != null">
neo's avatar
neo committed
408
        #{foundationDate,jdbcType=TIMESTAMP},
409 410
      </if>
      <if test="registrationDate != null">
neo's avatar
neo committed
411
        #{registrationDate,jdbcType=TIMESTAMP},
412 413 414 415 416
      </if>
      <if test="registrationLocation != null">
        #{registrationLocation,jdbcType=VARCHAR},
      </if>
      <if test="registrationCapital != null">
417
        #{registrationCapital,jdbcType=VARCHAR},
418 419
      </if>
      <if test="businessAllottedTimeFrom != null">
neo's avatar
neo committed
420
        #{businessAllottedTimeFrom,jdbcType=TIMESTAMP},
421 422
      </if>
      <if test="businessAllottedTimeTo != null">
neo's avatar
neo committed
423
        #{businessAllottedTimeTo,jdbcType=TIMESTAMP},
424 425 426 427 428 429
      </if>
      <if test="legalCode != null">
        #{legalCode,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
430
  <select id="countByExample" parameterType="pwc.taxtech.atms.entity.OrganizationExample" resultType="java.lang.Long">
431 432 433 434
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
435
    select count(*) from ORGANIZATION
436 437 438 439 440 441 442 443 444
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
445
    update ORGANIZATION
446
    <set>
neo's avatar
neo committed
447 448
      <if test="record.id != null">
        ID = #{record.id,jdbcType=VARCHAR},
449 450
      </if>
      <if test="record.clientCode != null">
neo's avatar
neo committed
451
        CLIENT_CODE = #{record.clientCode,jdbcType=VARCHAR},
452 453
      </if>
      <if test="record.name != null">
neo's avatar
neo committed
454
        "NAME" = #{record.name,jdbcType=VARCHAR},
455 456
      </if>
      <if test="record.code != null">
neo's avatar
neo committed
457
        CODE = #{record.code,jdbcType=VARCHAR},
458
      </if>
neo's avatar
neo committed
459 460
      <if test="record.parentId != null">
        PARENT_ID = #{record.parentId,jdbcType=VARCHAR},
461 462
      </if>
      <if test="record.taxPayerNumber != null">
neo's avatar
neo committed
463
        TAX_PAYER_NUMBER = #{record.taxPayerNumber,jdbcType=VARCHAR},
464
      </if>
neo's avatar
neo committed
465 466
      <if test="record.regionId != null">
        REGION_ID = #{record.regionId,jdbcType=VARCHAR},
467
      </if>
neo's avatar
neo committed
468 469
      <if test="record.structureId != null">
        STRUCTURE_ID = #{record.structureId,jdbcType=VARCHAR},
470
      </if>
neo's avatar
neo committed
471 472
      <if test="record.industryId != null">
        INDUSTRY_ID = #{record.industryId,jdbcType=VARCHAR},
473
      </if>
neo's avatar
neo committed
474 475
      <if test="record.businessUnitId != null">
        BUSINESS_UNIT_ID = #{record.businessUnitId,jdbcType=VARCHAR},
476 477
      </if>
      <if test="record.isActive != null">
neo's avatar
neo committed
478
        IS_ACTIVE = #{record.isActive,jdbcType=DECIMAL},
479 480
      </if>
      <if test="record.pLevel != null">
neo's avatar
neo committed
481
        P_LEVEL = #{record.pLevel,jdbcType=DECIMAL},
482 483
      </if>
      <if test="record.createTime != null">
neo's avatar
neo committed
484
        CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
485 486
      </if>
      <if test="record.updateTime != null">
neo's avatar
neo committed
487
        UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
488
      </if>
neo's avatar
neo committed
489 490
      <if test="record.areaId != null">
        AREA_ID = #{record.areaId,jdbcType=VARCHAR},
491 492
      </if>
      <if test="record.englishName != null">
neo's avatar
neo committed
493
        ENGLISH_NAME = #{record.englishName,jdbcType=VARCHAR},
494 495
      </if>
      <if test="record.abbreviation != null">
neo's avatar
neo committed
496
        ABBREVIATION = #{record.abbreviation,jdbcType=VARCHAR},
497 498
      </if>
      <if test="record.invoiceType != null">
neo's avatar
neo committed
499
        INVOICE_TYPE = #{record.invoiceType,jdbcType=VARCHAR},
500 501
      </if>
      <if test="record.legalPersonName != null">
neo's avatar
neo committed
502
        LEGAL_PERSON_NAME = #{record.legalPersonName,jdbcType=VARCHAR},
503 504
      </if>
      <if test="record.manufactureAddress != null">
neo's avatar
neo committed
505
        MANUFACTURE_ADDRESS = #{record.manufactureAddress,jdbcType=VARCHAR},
506 507
      </if>
      <if test="record.registerAddress != null">
neo's avatar
neo committed
508
        REGISTER_ADDRESS = #{record.registerAddress,jdbcType=VARCHAR},
509 510
      </if>
      <if test="record.bankAccountName != null">
neo's avatar
neo committed
511
        BANK_ACCOUNT_NAME = #{record.bankAccountName,jdbcType=VARCHAR},
512 513
      </if>
      <if test="record.bankAccountNumber != null">
neo's avatar
neo committed
514
        BANK_ACCOUNT_NUMBER = #{record.bankAccountNumber,jdbcType=VARCHAR},
515 516
      </if>
      <if test="record.phoneNumber != null">
neo's avatar
neo committed
517
        PHONE_NUMBER = #{record.phoneNumber,jdbcType=VARCHAR},
518 519
      </if>
      <if test="record.registrationType != null">
neo's avatar
neo committed
520
        REGISTRATION_TYPE = #{record.registrationType,jdbcType=VARCHAR},
521 522
      </if>
      <if test="record.remark != null">
neo's avatar
neo committed
523
        REMARK = #{record.remark,jdbcType=VARCHAR},
524
      </if>
525 526
      <if test="record.vehicleRoutingLocation != null">
        VEHICLE_ROUTING_LOCATION = #{record.vehicleRoutingLocation,jdbcType=VARCHAR},
527 528
      </if>
      <if test="record.ratepayer != null">
neo's avatar
neo committed
529
        RATEPAYER = #{record.ratepayer,jdbcType=VARCHAR},
530 531
      </if>
      <if test="record.address != null">
neo's avatar
neo committed
532
        ADDRESS = #{record.address,jdbcType=VARCHAR},
533 534
      </if>
      <if test="record.foundationDate != null">
neo's avatar
neo committed
535
        FOUNDATION_DATE = #{record.foundationDate,jdbcType=TIMESTAMP},
536 537
      </if>
      <if test="record.registrationDate != null">
neo's avatar
neo committed
538
        REGISTRATION_DATE = #{record.registrationDate,jdbcType=TIMESTAMP},
539 540
      </if>
      <if test="record.registrationLocation != null">
neo's avatar
neo committed
541
        REGISTRATION_LOCATION = #{record.registrationLocation,jdbcType=VARCHAR},
542 543
      </if>
      <if test="record.registrationCapital != null">
neo's avatar
neo committed
544
        REGISTRATION_CAPITAL = #{record.registrationCapital,jdbcType=VARCHAR},
545 546
      </if>
      <if test="record.businessAllottedTimeFrom != null">
neo's avatar
neo committed
547
        BUSINESS_ALLOTTED_TIME_FROM = #{record.businessAllottedTimeFrom,jdbcType=TIMESTAMP},
548 549
      </if>
      <if test="record.businessAllottedTimeTo != null">
neo's avatar
neo committed
550
        BUSINESS_ALLOTTED_TIME_TO = #{record.businessAllottedTimeTo,jdbcType=TIMESTAMP},
551 552
      </if>
      <if test="record.legalCode != null">
neo's avatar
neo committed
553
        LEGAL_CODE = #{record.legalCode,jdbcType=VARCHAR},
554 555 556 557 558 559 560 561 562 563 564
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591
    update ORGANIZATION
    set ID = #{record.id,jdbcType=VARCHAR},
      CLIENT_CODE = #{record.clientCode,jdbcType=VARCHAR},
      "NAME" = #{record.name,jdbcType=VARCHAR},
      CODE = #{record.code,jdbcType=VARCHAR},
      PARENT_ID = #{record.parentId,jdbcType=VARCHAR},
      TAX_PAYER_NUMBER = #{record.taxPayerNumber,jdbcType=VARCHAR},
      REGION_ID = #{record.regionId,jdbcType=VARCHAR},
      STRUCTURE_ID = #{record.structureId,jdbcType=VARCHAR},
      INDUSTRY_ID = #{record.industryId,jdbcType=VARCHAR},
      BUSINESS_UNIT_ID = #{record.businessUnitId,jdbcType=VARCHAR},
      IS_ACTIVE = #{record.isActive,jdbcType=DECIMAL},
      P_LEVEL = #{record.pLevel,jdbcType=DECIMAL},
      CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
      UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
      AREA_ID = #{record.areaId,jdbcType=VARCHAR},
      ENGLISH_NAME = #{record.englishName,jdbcType=VARCHAR},
      ABBREVIATION = #{record.abbreviation,jdbcType=VARCHAR},
      INVOICE_TYPE = #{record.invoiceType,jdbcType=VARCHAR},
      LEGAL_PERSON_NAME = #{record.legalPersonName,jdbcType=VARCHAR},
      MANUFACTURE_ADDRESS = #{record.manufactureAddress,jdbcType=VARCHAR},
      REGISTER_ADDRESS = #{record.registerAddress,jdbcType=VARCHAR},
      BANK_ACCOUNT_NAME = #{record.bankAccountName,jdbcType=VARCHAR},
      BANK_ACCOUNT_NUMBER = #{record.bankAccountNumber,jdbcType=VARCHAR},
      PHONE_NUMBER = #{record.phoneNumber,jdbcType=VARCHAR},
      REGISTRATION_TYPE = #{record.registrationType,jdbcType=VARCHAR},
      REMARK = #{record.remark,jdbcType=VARCHAR},
592
      VEHICLE_ROUTING_LOCATION = #{record.vehicleRoutingLocation,jdbcType=VARCHAR},
neo's avatar
neo committed
593 594 595 596 597 598 599 600 601
      RATEPAYER = #{record.ratepayer,jdbcType=VARCHAR},
      ADDRESS = #{record.address,jdbcType=VARCHAR},
      FOUNDATION_DATE = #{record.foundationDate,jdbcType=TIMESTAMP},
      REGISTRATION_DATE = #{record.registrationDate,jdbcType=TIMESTAMP},
      REGISTRATION_LOCATION = #{record.registrationLocation,jdbcType=VARCHAR},
      REGISTRATION_CAPITAL = #{record.registrationCapital,jdbcType=VARCHAR},
      BUSINESS_ALLOTTED_TIME_FROM = #{record.businessAllottedTimeFrom,jdbcType=TIMESTAMP},
      BUSINESS_ALLOTTED_TIME_TO = #{record.businessAllottedTimeTo,jdbcType=TIMESTAMP},
      LEGAL_CODE = #{record.legalCode,jdbcType=VARCHAR}
602 603 604 605
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
606
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entity.Organization">
607 608 609 610
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
611
    update ORGANIZATION
612 613
    <set>
      <if test="clientCode != null">
neo's avatar
neo committed
614
        CLIENT_CODE = #{clientCode,jdbcType=VARCHAR},
615 616
      </if>
      <if test="name != null">
neo's avatar
neo committed
617
        "NAME" = #{name,jdbcType=VARCHAR},
618 619
      </if>
      <if test="code != null">
neo's avatar
neo committed
620
        CODE = #{code,jdbcType=VARCHAR},
621
      </if>
neo's avatar
neo committed
622 623
      <if test="parentId != null">
        PARENT_ID = #{parentId,jdbcType=VARCHAR},
624 625
      </if>
      <if test="taxPayerNumber != null">
neo's avatar
neo committed
626
        TAX_PAYER_NUMBER = #{taxPayerNumber,jdbcType=VARCHAR},
627
      </if>
neo's avatar
neo committed
628 629
      <if test="regionId != null">
        REGION_ID = #{regionId,jdbcType=VARCHAR},
630
      </if>
neo's avatar
neo committed
631 632
      <if test="structureId != null">
        STRUCTURE_ID = #{structureId,jdbcType=VARCHAR},
633
      </if>
neo's avatar
neo committed
634 635
      <if test="industryId != null">
        INDUSTRY_ID = #{industryId,jdbcType=VARCHAR},
636
      </if>
neo's avatar
neo committed
637 638
      <if test="businessUnitId != null">
        BUSINESS_UNIT_ID = #{businessUnitId,jdbcType=VARCHAR},
639 640
      </if>
      <if test="isActive != null">
neo's avatar
neo committed
641
        IS_ACTIVE = #{isActive,jdbcType=DECIMAL},
642 643
      </if>
      <if test="pLevel != null">
neo's avatar
neo committed
644
        P_LEVEL = #{pLevel,jdbcType=DECIMAL},
645 646
      </if>
      <if test="createTime != null">
neo's avatar
neo committed
647
        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
648 649
      </if>
      <if test="updateTime != null">
neo's avatar
neo committed
650
        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
651
      </if>
neo's avatar
neo committed
652 653
      <if test="areaId != null">
        AREA_ID = #{areaId,jdbcType=VARCHAR},
654 655
      </if>
      <if test="englishName != null">
neo's avatar
neo committed
656
        ENGLISH_NAME = #{englishName,jdbcType=VARCHAR},
657 658
      </if>
      <if test="abbreviation != null">
neo's avatar
neo committed
659
        ABBREVIATION = #{abbreviation,jdbcType=VARCHAR},
660 661
      </if>
      <if test="invoiceType != null">
neo's avatar
neo committed
662
        INVOICE_TYPE = #{invoiceType,jdbcType=VARCHAR},
663 664
      </if>
      <if test="legalPersonName != null">
neo's avatar
neo committed
665
        LEGAL_PERSON_NAME = #{legalPersonName,jdbcType=VARCHAR},
666 667
      </if>
      <if test="manufactureAddress != null">
neo's avatar
neo committed
668
        MANUFACTURE_ADDRESS = #{manufactureAddress,jdbcType=VARCHAR},
669 670
      </if>
      <if test="registerAddress != null">
neo's avatar
neo committed
671
        REGISTER_ADDRESS = #{registerAddress,jdbcType=VARCHAR},
672 673
      </if>
      <if test="bankAccountName != null">
neo's avatar
neo committed
674
        BANK_ACCOUNT_NAME = #{bankAccountName,jdbcType=VARCHAR},
675 676
      </if>
      <if test="bankAccountNumber != null">
neo's avatar
neo committed
677
        BANK_ACCOUNT_NUMBER = #{bankAccountNumber,jdbcType=VARCHAR},
678 679
      </if>
      <if test="phoneNumber != null">
neo's avatar
neo committed
680
        PHONE_NUMBER = #{phoneNumber,jdbcType=VARCHAR},
681 682
      </if>
      <if test="registrationType != null">
neo's avatar
neo committed
683
        REGISTRATION_TYPE = #{registrationType,jdbcType=VARCHAR},
684 685
      </if>
      <if test="remark != null">
neo's avatar
neo committed
686
        REMARK = #{remark,jdbcType=VARCHAR},
687
      </if>
688 689
      <if test="vehicleRoutingLocation != null">
        VEHICLE_ROUTING_LOCATION = #{vehicleRoutingLocation,jdbcType=VARCHAR},
690 691
      </if>
      <if test="ratepayer != null">
neo's avatar
neo committed
692
        RATEPAYER = #{ratepayer,jdbcType=VARCHAR},
693 694
      </if>
      <if test="address != null">
neo's avatar
neo committed
695
        ADDRESS = #{address,jdbcType=VARCHAR},
696 697
      </if>
      <if test="foundationDate != null">
neo's avatar
neo committed
698
        FOUNDATION_DATE = #{foundationDate,jdbcType=TIMESTAMP},
699 700
      </if>
      <if test="registrationDate != null">
neo's avatar
neo committed
701
        REGISTRATION_DATE = #{registrationDate,jdbcType=TIMESTAMP},
702 703
      </if>
      <if test="registrationLocation != null">
neo's avatar
neo committed
704
        REGISTRATION_LOCATION = #{registrationLocation,jdbcType=VARCHAR},
705 706
      </if>
      <if test="registrationCapital != null">
neo's avatar
neo committed
707
        REGISTRATION_CAPITAL = #{registrationCapital,jdbcType=VARCHAR},
708 709
      </if>
      <if test="businessAllottedTimeFrom != null">
neo's avatar
neo committed
710
        BUSINESS_ALLOTTED_TIME_FROM = #{businessAllottedTimeFrom,jdbcType=TIMESTAMP},
711 712
      </if>
      <if test="businessAllottedTimeTo != null">
neo's avatar
neo committed
713
        BUSINESS_ALLOTTED_TIME_TO = #{businessAllottedTimeTo,jdbcType=TIMESTAMP},
714 715
      </if>
      <if test="legalCode != null">
neo's avatar
neo committed
716
        LEGAL_CODE = #{legalCode,jdbcType=VARCHAR},
717 718
      </if>
    </set>
neo's avatar
neo committed
719
    where ID = #{id,jdbcType=VARCHAR}
720
  </update>
721
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.entity.Organization">
722 723 724 725
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751
    update ORGANIZATION
    set CLIENT_CODE = #{clientCode,jdbcType=VARCHAR},
      "NAME" = #{name,jdbcType=VARCHAR},
      CODE = #{code,jdbcType=VARCHAR},
      PARENT_ID = #{parentId,jdbcType=VARCHAR},
      TAX_PAYER_NUMBER = #{taxPayerNumber,jdbcType=VARCHAR},
      REGION_ID = #{regionId,jdbcType=VARCHAR},
      STRUCTURE_ID = #{structureId,jdbcType=VARCHAR},
      INDUSTRY_ID = #{industryId,jdbcType=VARCHAR},
      BUSINESS_UNIT_ID = #{businessUnitId,jdbcType=VARCHAR},
      IS_ACTIVE = #{isActive,jdbcType=DECIMAL},
      P_LEVEL = #{pLevel,jdbcType=DECIMAL},
      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
      AREA_ID = #{areaId,jdbcType=VARCHAR},
      ENGLISH_NAME = #{englishName,jdbcType=VARCHAR},
      ABBREVIATION = #{abbreviation,jdbcType=VARCHAR},
      INVOICE_TYPE = #{invoiceType,jdbcType=VARCHAR},
      LEGAL_PERSON_NAME = #{legalPersonName,jdbcType=VARCHAR},
      MANUFACTURE_ADDRESS = #{manufactureAddress,jdbcType=VARCHAR},
      REGISTER_ADDRESS = #{registerAddress,jdbcType=VARCHAR},
      BANK_ACCOUNT_NAME = #{bankAccountName,jdbcType=VARCHAR},
      BANK_ACCOUNT_NUMBER = #{bankAccountNumber,jdbcType=VARCHAR},
      PHONE_NUMBER = #{phoneNumber,jdbcType=VARCHAR},
      REGISTRATION_TYPE = #{registrationType,jdbcType=VARCHAR},
      REMARK = #{remark,jdbcType=VARCHAR},
752
      VEHICLE_ROUTING_LOCATION = #{vehicleRoutingLocation,jdbcType=VARCHAR},
neo's avatar
neo committed
753 754 755 756 757 758 759 760 761 762
      RATEPAYER = #{ratepayer,jdbcType=VARCHAR},
      ADDRESS = #{address,jdbcType=VARCHAR},
      FOUNDATION_DATE = #{foundationDate,jdbcType=TIMESTAMP},
      REGISTRATION_DATE = #{registrationDate,jdbcType=TIMESTAMP},
      REGISTRATION_LOCATION = #{registrationLocation,jdbcType=VARCHAR},
      REGISTRATION_CAPITAL = #{registrationCapital,jdbcType=VARCHAR},
      BUSINESS_ALLOTTED_TIME_FROM = #{businessAllottedTimeFrom,jdbcType=TIMESTAMP},
      BUSINESS_ALLOTTED_TIME_TO = #{businessAllottedTimeTo,jdbcType=TIMESTAMP},
      LEGAL_CODE = #{legalCode,jdbcType=VARCHAR}
    where ID = #{id,jdbcType=VARCHAR}
763
  </update>
764
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.OrganizationExample" resultMap="BaseResultMap">
765
    <!--
766 767
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
768
    -->
769 770 771 772 773
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
neo's avatar
neo committed
774
    from ORGANIZATION
775 776 777 778 779 780 781
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
782
</mapper>