OrganizationMapper.xml 45.7 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.
    -->
gary's avatar
gary 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 35 36 37 38 39 40 41 42 43 44 45
    <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="BIT" property="isActive" />
    <result column="p_level" jdbcType="INTEGER" 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" />
    <result column="vehicle_routing_location" jdbcType="VARCHAR" property="vehicleRoutingLocation" />
    <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" />
    <result column="vehicleroutinglocation" jdbcType="VARCHAR" property="vehicleroutinglocation" />
gary's avatar
gary committed
46 47 48 49 50 51 52 53
    <result column="business_scope" jdbcType="VARCHAR" property="businessScope" />
    <result column="architecture_type" jdbcType="VARCHAR" property="architectureType" />
    <result column="num_of_branches" jdbcType="TINYINT" property="numOfBranches" />
    <result column="api_update_flag" jdbcType="BIT" property="apiUpdateFlag" />
    <result column="effec_time_of_general_taxpayers" jdbcType="TIMESTAMP" property="effecTimeOfGeneralTaxpayers" />
    <result column="registration_location_en" jdbcType="VARCHAR" property="registrationLocationEn" />
    <result column="paid_in_capital" jdbcType="VARCHAR" property="paidInCapital" />
    <result column="general_tax_payer_effective_time" jdbcType="TIMESTAMP" property="generalTaxPayerEffectiveTime" />
gary's avatar
gary committed
54 55 56 57 58
    <result column="oversea" jdbcType="BIT" property="oversea" />
    <result column="reg_status" jdbcType="VARCHAR" property="regStatus" />
    <result column="national_economic_industry" jdbcType="VARCHAR" property="nationalEconomicIndustry" />
    <result column="engage_national_prohibit_industry" jdbcType="BIT" property="engageNationalProhibitIndustry" />
    <result column="logout_time" jdbcType="TIMESTAMP" property="logoutTime" />
gary's avatar
gary committed
59
    <result column="enterprise_account_code" jdbcType="VARCHAR" property="enterpriseAccountCode" />
60 61 62 63
    <result column="enterprise_account_name" jdbcType="VARCHAR" property="enterpriseAccountName" />
    <result column="currency_code" jdbcType="VARCHAR" property="currencyCode" />
    <result column="legal_entity" jdbcType="VARCHAR" property="legalEntity" />
    <result column="ps_code" jdbcType="VARCHAR" property="psCode" />
gary's avatar
gary committed
64
    <result column="country" jdbcType="VARCHAR" property="country" />
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
  </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>
93
            </foreach>
94
          </trim>
95
        </if>
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
      </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>
128
        </if>
129 130 131 132 133 134 135 136
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
137 138 139
    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, 
gary's avatar
gary committed
140 141 142 143 144 145
    register_address, bank_account_name, bank_account_number, phone_number, registration_type, 
    remark, vehicle_routing_location, ratepayer, address, foundation_date, registration_date, 
    registration_location, registration_capital, business_allotted_time_from, business_allotted_time_to, 
    legal_code, vehicleroutinglocation, business_scope, architecture_type, num_of_branches, 
    api_update_flag, effec_time_of_general_taxpayers, registration_location_en, paid_in_capital, 
    general_tax_payer_effective_time, oversea, reg_status, national_economic_industry, 
146
    engage_national_prohibit_industry, logout_time, enterprise_account_code, enterprise_account_name, 
gary's avatar
gary committed
147
    currency_code, legal_entity, ps_code, country
148
  </sql>
149
  <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.OrganizationExample" resultMap="BaseResultMap">
150 151 152 153 154 155 156 157 158
    <!--
      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" />
gary's avatar
gary committed
159
    from organization
160 161 162 163 164 165 166 167 168 169 170 171 172 173
    <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" />
gary's avatar
gary committed
174 175
    from organization
    where id = #{id,jdbcType=VARCHAR}
176 177 178 179 180 181
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
182 183
    delete from organization
    where id = #{id,jdbcType=VARCHAR}
184
  </delete>
185
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.OrganizationExample">
186 187 188 189
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
190
    delete from organization
191 192 193 194
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
195
  <insert id="insert" parameterType="pwc.taxtech.atms.entity.Organization">
196 197 198 199
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
200 201 202 203 204 205
    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, 
gary's avatar
gary committed
206 207 208 209 210
      legal_person_name, manufacture_address, register_address, 
      bank_account_name, bank_account_number, phone_number, 
      registration_type, remark, vehicle_routing_location, 
      ratepayer, address, foundation_date, 
      registration_date, registration_location, 
gary's avatar
gary committed
211
      registration_capital, business_allotted_time_from, 
gary's avatar
gary committed
212
      business_allotted_time_to, legal_code, vehicleroutinglocation, 
gary's avatar
gary committed
213 214 215 216 217
      business_scope, architecture_type, num_of_branches, 
      api_update_flag, effec_time_of_general_taxpayers, 
      registration_location_en, paid_in_capital, 
      general_tax_payer_effective_time, oversea, reg_status, 
      national_economic_industry, engage_national_prohibit_industry, 
218
      logout_time, enterprise_account_code, enterprise_account_name, 
gary's avatar
gary committed
219 220
      currency_code, legal_entity, ps_code, 
      country)
gary's avatar
gary committed
221 222 223 224 225
    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=BIT}, #{pLevel,jdbcType=INTEGER}, 
      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{areaId,jdbcType=VARCHAR}, 
226
      #{englishName,jdbcType=VARCHAR}, #{abbreviation,jdbcType=VARCHAR}, #{invoiceType,jdbcType=VARCHAR}, 
gary's avatar
gary committed
227 228 229 230 231
      #{legalPersonName,jdbcType=VARCHAR}, #{manufactureAddress,jdbcType=VARCHAR}, #{registerAddress,jdbcType=VARCHAR}, 
      #{bankAccountName,jdbcType=VARCHAR}, #{bankAccountNumber,jdbcType=VARCHAR}, #{phoneNumber,jdbcType=VARCHAR}, 
      #{registrationType,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{vehicleRoutingLocation,jdbcType=VARCHAR}, 
      #{ratepayer,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{foundationDate,jdbcType=TIMESTAMP}, 
      #{registrationDate,jdbcType=TIMESTAMP}, #{registrationLocation,jdbcType=VARCHAR}, 
gary's avatar
gary committed
232
      #{registrationCapital,jdbcType=VARCHAR}, #{businessAllottedTimeFrom,jdbcType=TIMESTAMP}, 
gary's avatar
gary committed
233
      #{businessAllottedTimeTo,jdbcType=TIMESTAMP}, #{legalCode,jdbcType=VARCHAR}, #{vehicleroutinglocation,jdbcType=VARCHAR}, 
gary's avatar
gary committed
234 235 236 237 238
      #{businessScope,jdbcType=VARCHAR}, #{architectureType,jdbcType=VARCHAR}, #{numOfBranches,jdbcType=TINYINT}, 
      #{apiUpdateFlag,jdbcType=BIT}, #{effecTimeOfGeneralTaxpayers,jdbcType=TIMESTAMP}, 
      #{registrationLocationEn,jdbcType=VARCHAR}, #{paidInCapital,jdbcType=VARCHAR}, 
      #{generalTaxPayerEffectiveTime,jdbcType=TIMESTAMP}, #{oversea,jdbcType=BIT}, #{regStatus,jdbcType=VARCHAR}, 
      #{nationalEconomicIndustry,jdbcType=VARCHAR}, #{engageNationalProhibitIndustry,jdbcType=BIT}, 
239
      #{logoutTime,jdbcType=TIMESTAMP}, #{enterpriseAccountCode,jdbcType=VARCHAR}, #{enterpriseAccountName,jdbcType=VARCHAR}, 
gary's avatar
gary committed
240 241
      #{currencyCode,jdbcType=VARCHAR}, #{legalEntity,jdbcType=VARCHAR}, #{psCode,jdbcType=VARCHAR}, 
      #{country,jdbcType=VARCHAR})
242
  </insert>
243
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.Organization">
244 245 246 247
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
248
    insert into organization
249
    <trim prefix="(" suffix=")" suffixOverrides=",">
gary's avatar
gary committed
250 251
      <if test="id != null">
        id,
252 253
      </if>
      <if test="clientCode != null">
gary's avatar
gary committed
254
        client_code,
255 256
      </if>
      <if test="name != null">
gary's avatar
gary committed
257
        name,
258 259
      </if>
      <if test="code != null">
gary's avatar
gary committed
260
        code,
261
      </if>
gary's avatar
gary committed
262 263
      <if test="parentId != null">
        parent_id,
264 265
      </if>
      <if test="taxPayerNumber != null">
gary's avatar
gary committed
266
        tax_payer_number,
267
      </if>
gary's avatar
gary committed
268 269
      <if test="regionId != null">
        region_id,
270
      </if>
gary's avatar
gary committed
271 272
      <if test="structureId != null">
        structure_id,
273
      </if>
gary's avatar
gary committed
274 275
      <if test="industryId != null">
        industry_id,
276
      </if>
gary's avatar
gary committed
277 278
      <if test="businessUnitId != null">
        business_unit_id,
279 280
      </if>
      <if test="isActive != null">
gary's avatar
gary committed
281
        is_active,
282 283
      </if>
      <if test="pLevel != null">
gary's avatar
gary committed
284
        p_level,
285 286
      </if>
      <if test="createTime != null">
gary's avatar
gary committed
287
        create_time,
288 289
      </if>
      <if test="updateTime != null">
gary's avatar
gary committed
290
        update_time,
291
      </if>
gary's avatar
gary committed
292 293
      <if test="areaId != null">
        area_id,
294 295
      </if>
      <if test="englishName != null">
gary's avatar
gary committed
296
        english_name,
297 298
      </if>
      <if test="abbreviation != null">
gary's avatar
gary committed
299
        abbreviation,
300 301
      </if>
      <if test="invoiceType != null">
gary's avatar
gary committed
302
        invoice_type,
303 304
      </if>
      <if test="legalPersonName != null">
gary's avatar
gary committed
305
        legal_person_name,
306 307
      </if>
      <if test="manufactureAddress != null">
gary's avatar
gary committed
308
        manufacture_address,
309 310
      </if>
      <if test="registerAddress != null">
gary's avatar
gary committed
311
        register_address,
312 313
      </if>
      <if test="bankAccountName != null">
gary's avatar
gary committed
314
        bank_account_name,
315 316
      </if>
      <if test="bankAccountNumber != null">
gary's avatar
gary committed
317
        bank_account_number,
318 319
      </if>
      <if test="phoneNumber != null">
gary's avatar
gary committed
320
        phone_number,
321 322
      </if>
      <if test="registrationType != null">
gary's avatar
gary committed
323
        registration_type,
324 325
      </if>
      <if test="remark != null">
gary's avatar
gary committed
326
        remark,
327
      </if>
gary's avatar
gary committed
328 329
      <if test="vehicleRoutingLocation != null">
        vehicle_routing_location,
330 331
      </if>
      <if test="ratepayer != null">
gary's avatar
gary committed
332
        ratepayer,
333 334
      </if>
      <if test="address != null">
gary's avatar
gary committed
335
        address,
336 337
      </if>
      <if test="foundationDate != null">
gary's avatar
gary committed
338
        foundation_date,
339 340
      </if>
      <if test="registrationDate != null">
gary's avatar
gary committed
341
        registration_date,
342 343
      </if>
      <if test="registrationLocation != null">
gary's avatar
gary committed
344
        registration_location,
345 346
      </if>
      <if test="registrationCapital != null">
gary's avatar
gary committed
347
        registration_capital,
348 349
      </if>
      <if test="businessAllottedTimeFrom != null">
gary's avatar
gary committed
350
        business_allotted_time_from,
351 352
      </if>
      <if test="businessAllottedTimeTo != null">
gary's avatar
gary committed
353
        business_allotted_time_to,
354 355
      </if>
      <if test="legalCode != null">
gary's avatar
gary committed
356 357 358 359
        legal_code,
      </if>
      <if test="vehicleroutinglocation != null">
        vehicleroutinglocation,
360
      </if>
gary's avatar
gary committed
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384
      <if test="businessScope != null">
        business_scope,
      </if>
      <if test="architectureType != null">
        architecture_type,
      </if>
      <if test="numOfBranches != null">
        num_of_branches,
      </if>
      <if test="apiUpdateFlag != null">
        api_update_flag,
      </if>
      <if test="effecTimeOfGeneralTaxpayers != null">
        effec_time_of_general_taxpayers,
      </if>
      <if test="registrationLocationEn != null">
        registration_location_en,
      </if>
      <if test="paidInCapital != null">
        paid_in_capital,
      </if>
      <if test="generalTaxPayerEffectiveTime != null">
        general_tax_payer_effective_time,
      </if>
gary's avatar
gary committed
385 386 387 388 389 390 391 392 393 394 395 396 397 398
      <if test="oversea != null">
        oversea,
      </if>
      <if test="regStatus != null">
        reg_status,
      </if>
      <if test="nationalEconomicIndustry != null">
        national_economic_industry,
      </if>
      <if test="engageNationalProhibitIndustry != null">
        engage_national_prohibit_industry,
      </if>
      <if test="logoutTime != null">
        logout_time,
gary's avatar
gary committed
399
      </if>
gary's avatar
gary committed
400 401 402
      <if test="enterpriseAccountCode != null">
        enterprise_account_code,
      </if>
403 404 405 406 407 408 409 410 411 412 413 414
      <if test="enterpriseAccountName != null">
        enterprise_account_name,
      </if>
      <if test="currencyCode != null">
        currency_code,
      </if>
      <if test="legalEntity != null">
        legal_entity,
      </if>
      <if test="psCode != null">
        ps_code,
      </if>
gary's avatar
gary committed
415 416 417
      <if test="country != null">
        country,
      </if>
418 419
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
gary's avatar
gary committed
420 421
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
422 423 424 425 426 427 428 429 430 431
      </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>
gary's avatar
gary committed
432 433
      <if test="parentId != null">
        #{parentId,jdbcType=VARCHAR},
434 435 436 437
      </if>
      <if test="taxPayerNumber != null">
        #{taxPayerNumber,jdbcType=VARCHAR},
      </if>
gary's avatar
gary committed
438 439
      <if test="regionId != null">
        #{regionId,jdbcType=VARCHAR},
440
      </if>
gary's avatar
gary committed
441 442
      <if test="structureId != null">
        #{structureId,jdbcType=VARCHAR},
443
      </if>
gary's avatar
gary committed
444 445
      <if test="industryId != null">
        #{industryId,jdbcType=VARCHAR},
446
      </if>
gary's avatar
gary committed
447 448
      <if test="businessUnitId != null">
        #{businessUnitId,jdbcType=VARCHAR},
449 450
      </if>
      <if test="isActive != null">
gary's avatar
gary committed
451
        #{isActive,jdbcType=BIT},
452 453
      </if>
      <if test="pLevel != null">
gary's avatar
gary committed
454
        #{pLevel,jdbcType=INTEGER},
455 456 457 458 459 460 461
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
gary's avatar
gary committed
462 463
      <if test="areaId != null">
        #{areaId,jdbcType=VARCHAR},
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480
      </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">
481
        #{registerAddress,jdbcType=VARCHAR},
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497
      </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>
gary's avatar
gary committed
498 499
      <if test="vehicleRoutingLocation != null">
        #{vehicleRoutingLocation,jdbcType=VARCHAR},
500 501 502 503 504 505 506 507
      </if>
      <if test="ratepayer != null">
        #{ratepayer,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        #{address,jdbcType=VARCHAR},
      </if>
      <if test="foundationDate != null">
gary's avatar
gary committed
508
        #{foundationDate,jdbcType=TIMESTAMP},
509 510
      </if>
      <if test="registrationDate != null">
gary's avatar
gary committed
511
        #{registrationDate,jdbcType=TIMESTAMP},
512 513 514 515 516
      </if>
      <if test="registrationLocation != null">
        #{registrationLocation,jdbcType=VARCHAR},
      </if>
      <if test="registrationCapital != null">
517
        #{registrationCapital,jdbcType=VARCHAR},
518 519
      </if>
      <if test="businessAllottedTimeFrom != null">
gary's avatar
gary committed
520
        #{businessAllottedTimeFrom,jdbcType=TIMESTAMP},
521 522
      </if>
      <if test="businessAllottedTimeTo != null">
gary's avatar
gary committed
523
        #{businessAllottedTimeTo,jdbcType=TIMESTAMP},
524 525 526 527
      </if>
      <if test="legalCode != null">
        #{legalCode,jdbcType=VARCHAR},
      </if>
gary's avatar
gary committed
528 529 530
      <if test="vehicleroutinglocation != null">
        #{vehicleroutinglocation,jdbcType=VARCHAR},
      </if>
gary's avatar
gary committed
531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554
      <if test="businessScope != null">
        #{businessScope,jdbcType=VARCHAR},
      </if>
      <if test="architectureType != null">
        #{architectureType,jdbcType=VARCHAR},
      </if>
      <if test="numOfBranches != null">
        #{numOfBranches,jdbcType=TINYINT},
      </if>
      <if test="apiUpdateFlag != null">
        #{apiUpdateFlag,jdbcType=BIT},
      </if>
      <if test="effecTimeOfGeneralTaxpayers != null">
        #{effecTimeOfGeneralTaxpayers,jdbcType=TIMESTAMP},
      </if>
      <if test="registrationLocationEn != null">
        #{registrationLocationEn,jdbcType=VARCHAR},
      </if>
      <if test="paidInCapital != null">
        #{paidInCapital,jdbcType=VARCHAR},
      </if>
      <if test="generalTaxPayerEffectiveTime != null">
        #{generalTaxPayerEffectiveTime,jdbcType=TIMESTAMP},
      </if>
gary's avatar
gary committed
555 556 557 558 559 560 561 562 563 564 565 566 567 568
      <if test="oversea != null">
        #{oversea,jdbcType=BIT},
      </if>
      <if test="regStatus != null">
        #{regStatus,jdbcType=VARCHAR},
      </if>
      <if test="nationalEconomicIndustry != null">
        #{nationalEconomicIndustry,jdbcType=VARCHAR},
      </if>
      <if test="engageNationalProhibitIndustry != null">
        #{engageNationalProhibitIndustry,jdbcType=BIT},
      </if>
      <if test="logoutTime != null">
        #{logoutTime,jdbcType=TIMESTAMP},
gary's avatar
gary committed
569
      </if>
gary's avatar
gary committed
570 571 572
      <if test="enterpriseAccountCode != null">
        #{enterpriseAccountCode,jdbcType=VARCHAR},
      </if>
573 574 575 576 577 578 579 580 581 582 583 584
      <if test="enterpriseAccountName != null">
        #{enterpriseAccountName,jdbcType=VARCHAR},
      </if>
      <if test="currencyCode != null">
        #{currencyCode,jdbcType=VARCHAR},
      </if>
      <if test="legalEntity != null">
        #{legalEntity,jdbcType=VARCHAR},
      </if>
      <if test="psCode != null">
        #{psCode,jdbcType=VARCHAR},
      </if>
gary's avatar
gary committed
585 586 587
      <if test="country != null">
        #{country,jdbcType=VARCHAR},
      </if>
588 589
    </trim>
  </insert>
590
  <select id="countByExample" parameterType="pwc.taxtech.atms.entity.OrganizationExample" resultType="java.lang.Long">
591 592 593 594
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
595
    select count(*) from organization
596 597 598 599 600 601 602 603 604
    <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.
    -->
gary's avatar
gary committed
605
    update organization
606
    <set>
gary's avatar
gary committed
607 608
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
609 610
      </if>
      <if test="record.clientCode != null">
gary's avatar
gary committed
611
        client_code = #{record.clientCode,jdbcType=VARCHAR},
612 613
      </if>
      <if test="record.name != null">
gary's avatar
gary committed
614
        name = #{record.name,jdbcType=VARCHAR},
615 616
      </if>
      <if test="record.code != null">
gary's avatar
gary committed
617
        code = #{record.code,jdbcType=VARCHAR},
618
      </if>
gary's avatar
gary committed
619 620
      <if test="record.parentId != null">
        parent_id = #{record.parentId,jdbcType=VARCHAR},
621 622
      </if>
      <if test="record.taxPayerNumber != null">
gary's avatar
gary committed
623
        tax_payer_number = #{record.taxPayerNumber,jdbcType=VARCHAR},
624
      </if>
gary's avatar
gary committed
625 626
      <if test="record.regionId != null">
        region_id = #{record.regionId,jdbcType=VARCHAR},
627
      </if>
gary's avatar
gary committed
628 629
      <if test="record.structureId != null">
        structure_id = #{record.structureId,jdbcType=VARCHAR},
630
      </if>
gary's avatar
gary committed
631 632
      <if test="record.industryId != null">
        industry_id = #{record.industryId,jdbcType=VARCHAR},
633
      </if>
gary's avatar
gary committed
634 635
      <if test="record.businessUnitId != null">
        business_unit_id = #{record.businessUnitId,jdbcType=VARCHAR},
636 637
      </if>
      <if test="record.isActive != null">
gary's avatar
gary committed
638
        is_active = #{record.isActive,jdbcType=BIT},
639 640
      </if>
      <if test="record.pLevel != null">
gary's avatar
gary committed
641
        p_level = #{record.pLevel,jdbcType=INTEGER},
642 643
      </if>
      <if test="record.createTime != null">
gary's avatar
gary committed
644
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
645 646
      </if>
      <if test="record.updateTime != null">
gary's avatar
gary committed
647
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
648
      </if>
gary's avatar
gary committed
649 650
      <if test="record.areaId != null">
        area_id = #{record.areaId,jdbcType=VARCHAR},
651 652
      </if>
      <if test="record.englishName != null">
gary's avatar
gary committed
653
        english_name = #{record.englishName,jdbcType=VARCHAR},
654 655
      </if>
      <if test="record.abbreviation != null">
gary's avatar
gary committed
656
        abbreviation = #{record.abbreviation,jdbcType=VARCHAR},
657 658
      </if>
      <if test="record.invoiceType != null">
gary's avatar
gary committed
659
        invoice_type = #{record.invoiceType,jdbcType=VARCHAR},
660 661
      </if>
      <if test="record.legalPersonName != null">
gary's avatar
gary committed
662
        legal_person_name = #{record.legalPersonName,jdbcType=VARCHAR},
663 664
      </if>
      <if test="record.manufactureAddress != null">
gary's avatar
gary committed
665
        manufacture_address = #{record.manufactureAddress,jdbcType=VARCHAR},
666 667
      </if>
      <if test="record.registerAddress != null">
gary's avatar
gary committed
668
        register_address = #{record.registerAddress,jdbcType=VARCHAR},
669 670
      </if>
      <if test="record.bankAccountName != null">
gary's avatar
gary committed
671
        bank_account_name = #{record.bankAccountName,jdbcType=VARCHAR},
672 673
      </if>
      <if test="record.bankAccountNumber != null">
gary's avatar
gary committed
674
        bank_account_number = #{record.bankAccountNumber,jdbcType=VARCHAR},
675 676
      </if>
      <if test="record.phoneNumber != null">
gary's avatar
gary committed
677
        phone_number = #{record.phoneNumber,jdbcType=VARCHAR},
678 679
      </if>
      <if test="record.registrationType != null">
gary's avatar
gary committed
680
        registration_type = #{record.registrationType,jdbcType=VARCHAR},
681 682
      </if>
      <if test="record.remark != null">
gary's avatar
gary committed
683
        remark = #{record.remark,jdbcType=VARCHAR},
684
      </if>
gary's avatar
gary committed
685 686
      <if test="record.vehicleRoutingLocation != null">
        vehicle_routing_location = #{record.vehicleRoutingLocation,jdbcType=VARCHAR},
687 688
      </if>
      <if test="record.ratepayer != null">
gary's avatar
gary committed
689
        ratepayer = #{record.ratepayer,jdbcType=VARCHAR},
690 691
      </if>
      <if test="record.address != null">
gary's avatar
gary committed
692
        address = #{record.address,jdbcType=VARCHAR},
693 694
      </if>
      <if test="record.foundationDate != null">
gary's avatar
gary committed
695
        foundation_date = #{record.foundationDate,jdbcType=TIMESTAMP},
696 697
      </if>
      <if test="record.registrationDate != null">
gary's avatar
gary committed
698
        registration_date = #{record.registrationDate,jdbcType=TIMESTAMP},
699 700
      </if>
      <if test="record.registrationLocation != null">
gary's avatar
gary committed
701
        registration_location = #{record.registrationLocation,jdbcType=VARCHAR},
702 703
      </if>
      <if test="record.registrationCapital != null">
gary's avatar
gary committed
704
        registration_capital = #{record.registrationCapital,jdbcType=VARCHAR},
705 706
      </if>
      <if test="record.businessAllottedTimeFrom != null">
gary's avatar
gary committed
707
        business_allotted_time_from = #{record.businessAllottedTimeFrom,jdbcType=TIMESTAMP},
708 709
      </if>
      <if test="record.businessAllottedTimeTo != null">
gary's avatar
gary committed
710
        business_allotted_time_to = #{record.businessAllottedTimeTo,jdbcType=TIMESTAMP},
711 712
      </if>
      <if test="record.legalCode != null">
gary's avatar
gary committed
713 714 715 716
        legal_code = #{record.legalCode,jdbcType=VARCHAR},
      </if>
      <if test="record.vehicleroutinglocation != null">
        vehicleroutinglocation = #{record.vehicleroutinglocation,jdbcType=VARCHAR},
717
      </if>
gary's avatar
gary committed
718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741
      <if test="record.businessScope != null">
        business_scope = #{record.businessScope,jdbcType=VARCHAR},
      </if>
      <if test="record.architectureType != null">
        architecture_type = #{record.architectureType,jdbcType=VARCHAR},
      </if>
      <if test="record.numOfBranches != null">
        num_of_branches = #{record.numOfBranches,jdbcType=TINYINT},
      </if>
      <if test="record.apiUpdateFlag != null">
        api_update_flag = #{record.apiUpdateFlag,jdbcType=BIT},
      </if>
      <if test="record.effecTimeOfGeneralTaxpayers != null">
        effec_time_of_general_taxpayers = #{record.effecTimeOfGeneralTaxpayers,jdbcType=TIMESTAMP},
      </if>
      <if test="record.registrationLocationEn != null">
        registration_location_en = #{record.registrationLocationEn,jdbcType=VARCHAR},
      </if>
      <if test="record.paidInCapital != null">
        paid_in_capital = #{record.paidInCapital,jdbcType=VARCHAR},
      </if>
      <if test="record.generalTaxPayerEffectiveTime != null">
        general_tax_payer_effective_time = #{record.generalTaxPayerEffectiveTime,jdbcType=TIMESTAMP},
      </if>
gary's avatar
gary committed
742 743 744 745 746 747 748 749 750 751 752 753 754 755
      <if test="record.oversea != null">
        oversea = #{record.oversea,jdbcType=BIT},
      </if>
      <if test="record.regStatus != null">
        reg_status = #{record.regStatus,jdbcType=VARCHAR},
      </if>
      <if test="record.nationalEconomicIndustry != null">
        national_economic_industry = #{record.nationalEconomicIndustry,jdbcType=VARCHAR},
      </if>
      <if test="record.engageNationalProhibitIndustry != null">
        engage_national_prohibit_industry = #{record.engageNationalProhibitIndustry,jdbcType=BIT},
      </if>
      <if test="record.logoutTime != null">
        logout_time = #{record.logoutTime,jdbcType=TIMESTAMP},
gary's avatar
gary committed
756
      </if>
gary's avatar
gary committed
757 758 759
      <if test="record.enterpriseAccountCode != null">
        enterprise_account_code = #{record.enterpriseAccountCode,jdbcType=VARCHAR},
      </if>
760 761 762 763 764 765 766 767 768 769 770 771
      <if test="record.enterpriseAccountName != null">
        enterprise_account_name = #{record.enterpriseAccountName,jdbcType=VARCHAR},
      </if>
      <if test="record.currencyCode != null">
        currency_code = #{record.currencyCode,jdbcType=VARCHAR},
      </if>
      <if test="record.legalEntity != null">
        legal_entity = #{record.legalEntity,jdbcType=VARCHAR},
      </if>
      <if test="record.psCode != null">
        ps_code = #{record.psCode,jdbcType=VARCHAR},
      </if>
gary's avatar
gary committed
772 773 774
      <if test="record.country != null">
        country = #{record.country,jdbcType=VARCHAR},
      </if>
775 776 777 778 779 780 781 782 783 784
    </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.
    -->
gary's avatar
gary committed
785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821
    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=BIT},
      p_level = #{record.pLevel,jdbcType=INTEGER},
      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},
      vehicle_routing_location = #{record.vehicleRoutingLocation,jdbcType=VARCHAR},
      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},
gary's avatar
gary committed
822 823 824 825 826 827 828 829
      vehicleroutinglocation = #{record.vehicleroutinglocation,jdbcType=VARCHAR},
      business_scope = #{record.businessScope,jdbcType=VARCHAR},
      architecture_type = #{record.architectureType,jdbcType=VARCHAR},
      num_of_branches = #{record.numOfBranches,jdbcType=TINYINT},
      api_update_flag = #{record.apiUpdateFlag,jdbcType=BIT},
      effec_time_of_general_taxpayers = #{record.effecTimeOfGeneralTaxpayers,jdbcType=TIMESTAMP},
      registration_location_en = #{record.registrationLocationEn,jdbcType=VARCHAR},
      paid_in_capital = #{record.paidInCapital,jdbcType=VARCHAR},
gary's avatar
gary committed
830
      general_tax_payer_effective_time = #{record.generalTaxPayerEffectiveTime,jdbcType=TIMESTAMP},
gary's avatar
gary committed
831 832 833 834
      oversea = #{record.oversea,jdbcType=BIT},
      reg_status = #{record.regStatus,jdbcType=VARCHAR},
      national_economic_industry = #{record.nationalEconomicIndustry,jdbcType=VARCHAR},
      engage_national_prohibit_industry = #{record.engageNationalProhibitIndustry,jdbcType=BIT},
gary's avatar
gary committed
835
      logout_time = #{record.logoutTime,jdbcType=TIMESTAMP},
836 837 838 839
      enterprise_account_code = #{record.enterpriseAccountCode,jdbcType=VARCHAR},
      enterprise_account_name = #{record.enterpriseAccountName,jdbcType=VARCHAR},
      currency_code = #{record.currencyCode,jdbcType=VARCHAR},
      legal_entity = #{record.legalEntity,jdbcType=VARCHAR},
gary's avatar
gary committed
840 841
      ps_code = #{record.psCode,jdbcType=VARCHAR},
      country = #{record.country,jdbcType=VARCHAR}
842 843 844 845
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
846
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entity.Organization">
847 848 849 850
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
851
    update organization
852 853
    <set>
      <if test="clientCode != null">
gary's avatar
gary committed
854
        client_code = #{clientCode,jdbcType=VARCHAR},
855 856
      </if>
      <if test="name != null">
gary's avatar
gary committed
857
        name = #{name,jdbcType=VARCHAR},
858 859
      </if>
      <if test="code != null">
gary's avatar
gary committed
860
        code = #{code,jdbcType=VARCHAR},
861
      </if>
gary's avatar
gary committed
862 863
      <if test="parentId != null">
        parent_id = #{parentId,jdbcType=VARCHAR},
864 865
      </if>
      <if test="taxPayerNumber != null">
gary's avatar
gary committed
866
        tax_payer_number = #{taxPayerNumber,jdbcType=VARCHAR},
867
      </if>
gary's avatar
gary committed
868 869
      <if test="regionId != null">
        region_id = #{regionId,jdbcType=VARCHAR},
870
      </if>
gary's avatar
gary committed
871 872
      <if test="structureId != null">
        structure_id = #{structureId,jdbcType=VARCHAR},
873
      </if>
gary's avatar
gary committed
874 875
      <if test="industryId != null">
        industry_id = #{industryId,jdbcType=VARCHAR},
876
      </if>
gary's avatar
gary committed
877 878
      <if test="businessUnitId != null">
        business_unit_id = #{businessUnitId,jdbcType=VARCHAR},
879 880
      </if>
      <if test="isActive != null">
gary's avatar
gary committed
881
        is_active = #{isActive,jdbcType=BIT},
882 883
      </if>
      <if test="pLevel != null">
gary's avatar
gary committed
884
        p_level = #{pLevel,jdbcType=INTEGER},
885 886
      </if>
      <if test="createTime != null">
gary's avatar
gary committed
887
        create_time = #{createTime,jdbcType=TIMESTAMP},
888 889
      </if>
      <if test="updateTime != null">
gary's avatar
gary committed
890
        update_time = #{updateTime,jdbcType=TIMESTAMP},
891
      </if>
gary's avatar
gary committed
892 893
      <if test="areaId != null">
        area_id = #{areaId,jdbcType=VARCHAR},
894 895
      </if>
      <if test="englishName != null">
gary's avatar
gary committed
896
        english_name = #{englishName,jdbcType=VARCHAR},
897 898
      </if>
      <if test="abbreviation != null">
gary's avatar
gary committed
899
        abbreviation = #{abbreviation,jdbcType=VARCHAR},
900 901
      </if>
      <if test="invoiceType != null">
gary's avatar
gary committed
902
        invoice_type = #{invoiceType,jdbcType=VARCHAR},
903 904
      </if>
      <if test="legalPersonName != null">
gary's avatar
gary committed
905
        legal_person_name = #{legalPersonName,jdbcType=VARCHAR},
906 907
      </if>
      <if test="manufactureAddress != null">
gary's avatar
gary committed
908
        manufacture_address = #{manufactureAddress,jdbcType=VARCHAR},
909 910
      </if>
      <if test="registerAddress != null">
gary's avatar
gary committed
911
        register_address = #{registerAddress,jdbcType=VARCHAR},
912 913
      </if>
      <if test="bankAccountName != null">
gary's avatar
gary committed
914
        bank_account_name = #{bankAccountName,jdbcType=VARCHAR},
915 916
      </if>
      <if test="bankAccountNumber != null">
gary's avatar
gary committed
917
        bank_account_number = #{bankAccountNumber,jdbcType=VARCHAR},
918 919
      </if>
      <if test="phoneNumber != null">
gary's avatar
gary committed
920
        phone_number = #{phoneNumber,jdbcType=VARCHAR},
921 922
      </if>
      <if test="registrationType != null">
gary's avatar
gary committed
923
        registration_type = #{registrationType,jdbcType=VARCHAR},
924 925
      </if>
      <if test="remark != null">
gary's avatar
gary committed
926
        remark = #{remark,jdbcType=VARCHAR},
927
      </if>
gary's avatar
gary committed
928 929
      <if test="vehicleRoutingLocation != null">
        vehicle_routing_location = #{vehicleRoutingLocation,jdbcType=VARCHAR},
930 931
      </if>
      <if test="ratepayer != null">
gary's avatar
gary committed
932
        ratepayer = #{ratepayer,jdbcType=VARCHAR},
933 934
      </if>
      <if test="address != null">
gary's avatar
gary committed
935
        address = #{address,jdbcType=VARCHAR},
936 937
      </if>
      <if test="foundationDate != null">
gary's avatar
gary committed
938
        foundation_date = #{foundationDate,jdbcType=TIMESTAMP},
939 940
      </if>
      <if test="registrationDate != null">
gary's avatar
gary committed
941
        registration_date = #{registrationDate,jdbcType=TIMESTAMP},
942 943
      </if>
      <if test="registrationLocation != null">
gary's avatar
gary committed
944
        registration_location = #{registrationLocation,jdbcType=VARCHAR},
945 946
      </if>
      <if test="registrationCapital != null">
gary's avatar
gary committed
947
        registration_capital = #{registrationCapital,jdbcType=VARCHAR},
948 949
      </if>
      <if test="businessAllottedTimeFrom != null">
gary's avatar
gary committed
950
        business_allotted_time_from = #{businessAllottedTimeFrom,jdbcType=TIMESTAMP},
951 952
      </if>
      <if test="businessAllottedTimeTo != null">
gary's avatar
gary committed
953
        business_allotted_time_to = #{businessAllottedTimeTo,jdbcType=TIMESTAMP},
954 955
      </if>
      <if test="legalCode != null">
gary's avatar
gary committed
956 957 958 959
        legal_code = #{legalCode,jdbcType=VARCHAR},
      </if>
      <if test="vehicleroutinglocation != null">
        vehicleroutinglocation = #{vehicleroutinglocation,jdbcType=VARCHAR},
960
      </if>
gary's avatar
gary committed
961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984
      <if test="businessScope != null">
        business_scope = #{businessScope,jdbcType=VARCHAR},
      </if>
      <if test="architectureType != null">
        architecture_type = #{architectureType,jdbcType=VARCHAR},
      </if>
      <if test="numOfBranches != null">
        num_of_branches = #{numOfBranches,jdbcType=TINYINT},
      </if>
      <if test="apiUpdateFlag != null">
        api_update_flag = #{apiUpdateFlag,jdbcType=BIT},
      </if>
      <if test="effecTimeOfGeneralTaxpayers != null">
        effec_time_of_general_taxpayers = #{effecTimeOfGeneralTaxpayers,jdbcType=TIMESTAMP},
      </if>
      <if test="registrationLocationEn != null">
        registration_location_en = #{registrationLocationEn,jdbcType=VARCHAR},
      </if>
      <if test="paidInCapital != null">
        paid_in_capital = #{paidInCapital,jdbcType=VARCHAR},
      </if>
      <if test="generalTaxPayerEffectiveTime != null">
        general_tax_payer_effective_time = #{generalTaxPayerEffectiveTime,jdbcType=TIMESTAMP},
      </if>
gary's avatar
gary committed
985 986 987 988 989 990 991 992 993 994 995 996 997 998
      <if test="oversea != null">
        oversea = #{oversea,jdbcType=BIT},
      </if>
      <if test="regStatus != null">
        reg_status = #{regStatus,jdbcType=VARCHAR},
      </if>
      <if test="nationalEconomicIndustry != null">
        national_economic_industry = #{nationalEconomicIndustry,jdbcType=VARCHAR},
      </if>
      <if test="engageNationalProhibitIndustry != null">
        engage_national_prohibit_industry = #{engageNationalProhibitIndustry,jdbcType=BIT},
      </if>
      <if test="logoutTime != null">
        logout_time = #{logoutTime,jdbcType=TIMESTAMP},
gary's avatar
gary committed
999
      </if>
gary's avatar
gary committed
1000 1001 1002
      <if test="enterpriseAccountCode != null">
        enterprise_account_code = #{enterpriseAccountCode,jdbcType=VARCHAR},
      </if>
1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014
      <if test="enterpriseAccountName != null">
        enterprise_account_name = #{enterpriseAccountName,jdbcType=VARCHAR},
      </if>
      <if test="currencyCode != null">
        currency_code = #{currencyCode,jdbcType=VARCHAR},
      </if>
      <if test="legalEntity != null">
        legal_entity = #{legalEntity,jdbcType=VARCHAR},
      </if>
      <if test="psCode != null">
        ps_code = #{psCode,jdbcType=VARCHAR},
      </if>
gary's avatar
gary committed
1015 1016 1017
      <if test="country != null">
        country = #{country,jdbcType=VARCHAR},
      </if>
1018
    </set>
gary's avatar
gary committed
1019
    where id = #{id,jdbcType=VARCHAR}
1020
  </update>
1021
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.entity.Organization">
1022 1023 1024 1025
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061
    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=BIT},
      p_level = #{pLevel,jdbcType=INTEGER},
      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},
      vehicle_routing_location = #{vehicleRoutingLocation,jdbcType=VARCHAR},
      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},
gary's avatar
gary committed
1062 1063 1064 1065 1066 1067 1068 1069
      vehicleroutinglocation = #{vehicleroutinglocation,jdbcType=VARCHAR},
      business_scope = #{businessScope,jdbcType=VARCHAR},
      architecture_type = #{architectureType,jdbcType=VARCHAR},
      num_of_branches = #{numOfBranches,jdbcType=TINYINT},
      api_update_flag = #{apiUpdateFlag,jdbcType=BIT},
      effec_time_of_general_taxpayers = #{effecTimeOfGeneralTaxpayers,jdbcType=TIMESTAMP},
      registration_location_en = #{registrationLocationEn,jdbcType=VARCHAR},
      paid_in_capital = #{paidInCapital,jdbcType=VARCHAR},
gary's avatar
gary committed
1070
      general_tax_payer_effective_time = #{generalTaxPayerEffectiveTime,jdbcType=TIMESTAMP},
gary's avatar
gary committed
1071 1072 1073 1074
      oversea = #{oversea,jdbcType=BIT},
      reg_status = #{regStatus,jdbcType=VARCHAR},
      national_economic_industry = #{nationalEconomicIndustry,jdbcType=VARCHAR},
      engage_national_prohibit_industry = #{engageNationalProhibitIndustry,jdbcType=BIT},
gary's avatar
gary committed
1075
      logout_time = #{logoutTime,jdbcType=TIMESTAMP},
1076 1077 1078 1079
      enterprise_account_code = #{enterpriseAccountCode,jdbcType=VARCHAR},
      enterprise_account_name = #{enterpriseAccountName,jdbcType=VARCHAR},
      currency_code = #{currencyCode,jdbcType=VARCHAR},
      legal_entity = #{legalEntity,jdbcType=VARCHAR},
gary's avatar
gary committed
1080 1081
      ps_code = #{psCode,jdbcType=VARCHAR},
      country = #{country,jdbcType=VARCHAR}
gary's avatar
gary committed
1082
    where id = #{id,jdbcType=VARCHAR}
1083
  </update>
1084
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.OrganizationExample" resultMap="BaseResultMap">
1085
    <!--
1086 1087
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
1088
    -->
1089 1090 1091 1092 1093
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
gary's avatar
gary committed
1094
    from organization
1095 1096 1097 1098 1099 1100 1101
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
1102
</mapper>