VoucherMapper.xml 22.6 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.vat.dao.VoucherMapper">
4 5 6 7 8
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.Voucher">
    <!--
      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="VOUCHER_ID" jdbcType="VARCHAR" property="voucherId" />
    <result column="VID" jdbcType="VARCHAR" property="vid" />
    <result column="DATE" jdbcType="TIMESTAMP" property="date" />
    <result column="GROUP" jdbcType="VARCHAR" property="group" />
    <result column="PERIOD" jdbcType="DECIMAL" property="period" />
    <result column="CUSTOMER_CODE" jdbcType="VARCHAR" property="customerCode" />
    <result column="CUSTOMER_NAME" jdbcType="VARCHAR" property="customerName" />
    <result column="SUMMARY" jdbcType="VARCHAR" property="summary" />
    <result column="ACCT_CODE" jdbcType="VARCHAR" property="acctCode" />
    <result column="DEBIT" jdbcType="DECIMAL" property="debit" />
    <result column="CREDIT" jdbcType="DECIMAL" property="credit" />
    <result column="ATTACH" jdbcType="DECIMAL" property="attach" />
    <result column="ITEM_ID" jdbcType="VARCHAR" property="itemId" />
    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
    <result column="IMPORT_TYPE" jdbcType="DECIMAL" property="importType" />
    <result column="CREATOR_ID" jdbcType="VARCHAR" property="creatorId" />
    <result column="MONTH_ID" jdbcType="DECIMAL" property="monthId" />
    <result column="ORIGINAL_PERIOD" jdbcType="DECIMAL" property="originalPeriod" />
    <result column="STATUS" jdbcType="DECIMAL" property="status" />
    <result column="PART_BILLED_PERIOD" jdbcType="DECIMAL" property="partBilledPeriod" />
    <result column="BILLED_PERIOD" jdbcType="DECIMAL" property="billedPeriod" />
    <result column="STD_CODE" jdbcType="VARCHAR" property="stdCode" />
    <result column="MAPPING_REASON" jdbcType="VARCHAR" property="mappingReason" />
    <result column="MAPPING_USER" jdbcType="VARCHAR" property="mappingUser" />
    <result column="MAPPING_TIME" jdbcType="TIMESTAMP" property="mappingTime" />
    <result column="REMAP_ID" jdbcType="VARCHAR" property="remapId" />
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
  </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>
63
            </foreach>
64
          </trim>
65
        </if>
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
      </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>
98
        </if>
99 100 101 102 103 104 105 106
      </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
107 108 109 110
    VOUCHER_ID, VID, "DATE", "GROUP", PERIOD, CUSTOMER_CODE, CUSTOMER_NAME, SUMMARY, 
    ACCT_CODE, DEBIT, CREDIT, ATTACH, ITEM_ID, CREATE_TIME, IMPORT_TYPE, CREATOR_ID, 
    MONTH_ID, ORIGINAL_PERIOD, "STATUS", PART_BILLED_PERIOD, BILLED_PERIOD, STD_CODE, 
    MAPPING_REASON, MAPPING_USER, MAPPING_TIME, REMAP_ID
111 112 113 114 115 116 117 118 119 120 121
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.VoucherExample" resultMap="BaseResultMap">
    <!--
      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
122
    from VOUCHER
123 124 125 126 127 128 129 130 131 132 133 134 135 136
    <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
137 138
    from VOUCHER
    where VOUCHER_ID = #{voucherId,jdbcType=VARCHAR}
139 140 141 142 143 144
  </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
145 146
    delete from VOUCHER
    where VOUCHER_ID = #{voucherId,jdbcType=VARCHAR}
147 148 149 150 151 152
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.VoucherExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
153
    delete from VOUCHER
154 155 156 157 158 159 160 161 162
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.Voucher">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
163 164 165 166 167 168 169 170 171 172 173
    insert into VOUCHER (VOUCHER_ID, VID, "DATE", 
      "GROUP", PERIOD, CUSTOMER_CODE, 
      CUSTOMER_NAME, SUMMARY, ACCT_CODE, 
      DEBIT, CREDIT, ATTACH, 
      ITEM_ID, CREATE_TIME, IMPORT_TYPE, 
      CREATOR_ID, MONTH_ID, ORIGINAL_PERIOD, 
      "STATUS", PART_BILLED_PERIOD, BILLED_PERIOD, 
      STD_CODE, MAPPING_REASON, MAPPING_USER, 
      MAPPING_TIME, REMAP_ID)
    values (#{voucherId,jdbcType=VARCHAR}, #{vid,jdbcType=VARCHAR}, #{date,jdbcType=TIMESTAMP}, 
      #{group,jdbcType=VARCHAR}, #{period,jdbcType=DECIMAL}, #{customerCode,jdbcType=VARCHAR}, 
174
      #{customerName,jdbcType=VARCHAR}, #{summary,jdbcType=VARCHAR}, #{acctCode,jdbcType=VARCHAR}, 
neo's avatar
neo committed
175 176 177 178
      #{debit,jdbcType=DECIMAL}, #{credit,jdbcType=DECIMAL}, #{attach,jdbcType=DECIMAL}, 
      #{itemId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{importType,jdbcType=DECIMAL}, 
      #{creatorId,jdbcType=VARCHAR}, #{monthId,jdbcType=DECIMAL}, #{originalPeriod,jdbcType=DECIMAL}, 
      #{status,jdbcType=DECIMAL}, #{partBilledPeriod,jdbcType=DECIMAL}, #{billedPeriod,jdbcType=DECIMAL}, 
179 180 181 182 183 184 185 186
      #{stdCode,jdbcType=VARCHAR}, #{mappingReason,jdbcType=VARCHAR}, #{mappingUser,jdbcType=VARCHAR}, 
      #{mappingTime,jdbcType=TIMESTAMP}, #{remapId,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.Voucher">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
187
    insert into VOUCHER
188
    <trim prefix="(" suffix=")" suffixOverrides=",">
neo's avatar
neo committed
189 190
      <if test="voucherId != null">
        VOUCHER_ID,
191
      </if>
neo's avatar
neo committed
192
      <if test="vid != null">
193 194 195
        VID,
      </if>
      <if test="date != null">
neo's avatar
neo committed
196
        "DATE",
197 198
      </if>
      <if test="group != null">
neo's avatar
neo committed
199
        "GROUP",
200 201
      </if>
      <if test="period != null">
neo's avatar
neo committed
202
        PERIOD,
203 204
      </if>
      <if test="customerCode != null">
neo's avatar
neo committed
205
        CUSTOMER_CODE,
206 207
      </if>
      <if test="customerName != null">
neo's avatar
neo committed
208
        CUSTOMER_NAME,
209 210
      </if>
      <if test="summary != null">
neo's avatar
neo committed
211
        SUMMARY,
212 213
      </if>
      <if test="acctCode != null">
neo's avatar
neo committed
214
        ACCT_CODE,
215 216
      </if>
      <if test="debit != null">
neo's avatar
neo committed
217
        DEBIT,
218 219
      </if>
      <if test="credit != null">
neo's avatar
neo committed
220
        CREDIT,
221 222
      </if>
      <if test="attach != null">
neo's avatar
neo committed
223
        ATTACH,
224
      </if>
neo's avatar
neo committed
225 226
      <if test="itemId != null">
        ITEM_ID,
227 228
      </if>
      <if test="createTime != null">
neo's avatar
neo committed
229
        CREATE_TIME,
230 231
      </if>
      <if test="importType != null">
neo's avatar
neo committed
232
        IMPORT_TYPE,
233
      </if>
neo's avatar
neo committed
234 235
      <if test="creatorId != null">
        CREATOR_ID,
236
      </if>
neo's avatar
neo committed
237 238
      <if test="monthId != null">
        MONTH_ID,
239 240
      </if>
      <if test="originalPeriod != null">
neo's avatar
neo committed
241
        ORIGINAL_PERIOD,
242 243
      </if>
      <if test="status != null">
neo's avatar
neo committed
244
        "STATUS",
245 246
      </if>
      <if test="partBilledPeriod != null">
neo's avatar
neo committed
247
        PART_BILLED_PERIOD,
248 249
      </if>
      <if test="billedPeriod != null">
neo's avatar
neo committed
250
        BILLED_PERIOD,
251 252
      </if>
      <if test="stdCode != null">
neo's avatar
neo committed
253
        STD_CODE,
254 255
      </if>
      <if test="mappingReason != null">
neo's avatar
neo committed
256
        MAPPING_REASON,
257 258
      </if>
      <if test="mappingUser != null">
neo's avatar
neo committed
259
        MAPPING_USER,
260 261
      </if>
      <if test="mappingTime != null">
neo's avatar
neo committed
262
        MAPPING_TIME,
263 264
      </if>
      <if test="remapId != null">
neo's avatar
neo committed
265
        REMAP_ID,
266 267 268
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
neo's avatar
neo committed
269 270
      <if test="voucherId != null">
        #{voucherId,jdbcType=VARCHAR},
271
      </if>
neo's avatar
neo committed
272 273
      <if test="vid != null">
        #{vid,jdbcType=VARCHAR},
274 275
      </if>
      <if test="date != null">
neo's avatar
neo committed
276
        #{date,jdbcType=TIMESTAMP},
277 278 279 280 281
      </if>
      <if test="group != null">
        #{group,jdbcType=VARCHAR},
      </if>
      <if test="period != null">
neo's avatar
neo committed
282
        #{period,jdbcType=DECIMAL},
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302
      </if>
      <if test="customerCode != null">
        #{customerCode,jdbcType=VARCHAR},
      </if>
      <if test="customerName != null">
        #{customerName,jdbcType=VARCHAR},
      </if>
      <if test="summary != null">
        #{summary,jdbcType=VARCHAR},
      </if>
      <if test="acctCode != null">
        #{acctCode,jdbcType=VARCHAR},
      </if>
      <if test="debit != null">
        #{debit,jdbcType=DECIMAL},
      </if>
      <if test="credit != null">
        #{credit,jdbcType=DECIMAL},
      </if>
      <if test="attach != null">
neo's avatar
neo committed
303
        #{attach,jdbcType=DECIMAL},
304
      </if>
neo's avatar
neo committed
305 306
      <if test="itemId != null">
        #{itemId,jdbcType=VARCHAR},
307 308 309 310 311
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="importType != null">
neo's avatar
neo committed
312
        #{importType,jdbcType=DECIMAL},
313
      </if>
neo's avatar
neo committed
314 315
      <if test="creatorId != null">
        #{creatorId,jdbcType=VARCHAR},
316
      </if>
neo's avatar
neo committed
317 318
      <if test="monthId != null">
        #{monthId,jdbcType=DECIMAL},
319 320
      </if>
      <if test="originalPeriod != null">
neo's avatar
neo committed
321
        #{originalPeriod,jdbcType=DECIMAL},
322 323
      </if>
      <if test="status != null">
neo's avatar
neo committed
324
        #{status,jdbcType=DECIMAL},
325 326
      </if>
      <if test="partBilledPeriod != null">
neo's avatar
neo committed
327
        #{partBilledPeriod,jdbcType=DECIMAL},
328 329
      </if>
      <if test="billedPeriod != null">
neo's avatar
neo committed
330
        #{billedPeriod,jdbcType=DECIMAL},
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353
      </if>
      <if test="stdCode != null">
        #{stdCode,jdbcType=VARCHAR},
      </if>
      <if test="mappingReason != null">
        #{mappingReason,jdbcType=VARCHAR},
      </if>
      <if test="mappingUser != null">
        #{mappingUser,jdbcType=VARCHAR},
      </if>
      <if test="mappingTime != null">
        #{mappingTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remapId != null">
        #{remapId,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.VoucherExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
354
    select count(*) from VOUCHER
355 356 357 358 359 360 361 362 363
    <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
364
    update VOUCHER
365
    <set>
neo's avatar
neo committed
366 367
      <if test="record.voucherId != null">
        VOUCHER_ID = #{record.voucherId,jdbcType=VARCHAR},
368
      </if>
neo's avatar
neo committed
369 370
      <if test="record.vid != null">
        VID = #{record.vid,jdbcType=VARCHAR},
371 372
      </if>
      <if test="record.date != null">
neo's avatar
neo committed
373
        "DATE" = #{record.date,jdbcType=TIMESTAMP},
374 375
      </if>
      <if test="record.group != null">
neo's avatar
neo committed
376
        "GROUP" = #{record.group,jdbcType=VARCHAR},
377 378
      </if>
      <if test="record.period != null">
neo's avatar
neo committed
379
        PERIOD = #{record.period,jdbcType=DECIMAL},
380 381
      </if>
      <if test="record.customerCode != null">
neo's avatar
neo committed
382
        CUSTOMER_CODE = #{record.customerCode,jdbcType=VARCHAR},
383 384
      </if>
      <if test="record.customerName != null">
neo's avatar
neo committed
385
        CUSTOMER_NAME = #{record.customerName,jdbcType=VARCHAR},
386 387
      </if>
      <if test="record.summary != null">
neo's avatar
neo committed
388
        SUMMARY = #{record.summary,jdbcType=VARCHAR},
389 390
      </if>
      <if test="record.acctCode != null">
neo's avatar
neo committed
391
        ACCT_CODE = #{record.acctCode,jdbcType=VARCHAR},
392 393
      </if>
      <if test="record.debit != null">
neo's avatar
neo committed
394
        DEBIT = #{record.debit,jdbcType=DECIMAL},
395 396
      </if>
      <if test="record.credit != null">
neo's avatar
neo committed
397
        CREDIT = #{record.credit,jdbcType=DECIMAL},
398 399
      </if>
      <if test="record.attach != null">
neo's avatar
neo committed
400
        ATTACH = #{record.attach,jdbcType=DECIMAL},
401
      </if>
neo's avatar
neo committed
402 403
      <if test="record.itemId != null">
        ITEM_ID = #{record.itemId,jdbcType=VARCHAR},
404 405
      </if>
      <if test="record.createTime != null">
neo's avatar
neo committed
406
        CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
407 408
      </if>
      <if test="record.importType != null">
neo's avatar
neo committed
409
        IMPORT_TYPE = #{record.importType,jdbcType=DECIMAL},
410
      </if>
neo's avatar
neo committed
411 412
      <if test="record.creatorId != null">
        CREATOR_ID = #{record.creatorId,jdbcType=VARCHAR},
413
      </if>
neo's avatar
neo committed
414 415
      <if test="record.monthId != null">
        MONTH_ID = #{record.monthId,jdbcType=DECIMAL},
416 417
      </if>
      <if test="record.originalPeriod != null">
neo's avatar
neo committed
418
        ORIGINAL_PERIOD = #{record.originalPeriod,jdbcType=DECIMAL},
419 420
      </if>
      <if test="record.status != null">
neo's avatar
neo committed
421
        "STATUS" = #{record.status,jdbcType=DECIMAL},
422 423
      </if>
      <if test="record.partBilledPeriod != null">
neo's avatar
neo committed
424
        PART_BILLED_PERIOD = #{record.partBilledPeriod,jdbcType=DECIMAL},
425 426
      </if>
      <if test="record.billedPeriod != null">
neo's avatar
neo committed
427
        BILLED_PERIOD = #{record.billedPeriod,jdbcType=DECIMAL},
428 429
      </if>
      <if test="record.stdCode != null">
neo's avatar
neo committed
430
        STD_CODE = #{record.stdCode,jdbcType=VARCHAR},
431 432
      </if>
      <if test="record.mappingReason != null">
neo's avatar
neo committed
433
        MAPPING_REASON = #{record.mappingReason,jdbcType=VARCHAR},
434 435
      </if>
      <if test="record.mappingUser != null">
neo's avatar
neo committed
436
        MAPPING_USER = #{record.mappingUser,jdbcType=VARCHAR},
437 438
      </if>
      <if test="record.mappingTime != null">
neo's avatar
neo committed
439
        MAPPING_TIME = #{record.mappingTime,jdbcType=TIMESTAMP},
440 441
      </if>
      <if test="record.remapId != null">
neo's avatar
neo committed
442
        REMAP_ID = #{record.remapId,jdbcType=VARCHAR},
443 444 445 446 447 448 449 450 451 452 453
      </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
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480
    update VOUCHER
    set VOUCHER_ID = #{record.voucherId,jdbcType=VARCHAR},
      VID = #{record.vid,jdbcType=VARCHAR},
      "DATE" = #{record.date,jdbcType=TIMESTAMP},
      "GROUP" = #{record.group,jdbcType=VARCHAR},
      PERIOD = #{record.period,jdbcType=DECIMAL},
      CUSTOMER_CODE = #{record.customerCode,jdbcType=VARCHAR},
      CUSTOMER_NAME = #{record.customerName,jdbcType=VARCHAR},
      SUMMARY = #{record.summary,jdbcType=VARCHAR},
      ACCT_CODE = #{record.acctCode,jdbcType=VARCHAR},
      DEBIT = #{record.debit,jdbcType=DECIMAL},
      CREDIT = #{record.credit,jdbcType=DECIMAL},
      ATTACH = #{record.attach,jdbcType=DECIMAL},
      ITEM_ID = #{record.itemId,jdbcType=VARCHAR},
      CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
      IMPORT_TYPE = #{record.importType,jdbcType=DECIMAL},
      CREATOR_ID = #{record.creatorId,jdbcType=VARCHAR},
      MONTH_ID = #{record.monthId,jdbcType=DECIMAL},
      ORIGINAL_PERIOD = #{record.originalPeriod,jdbcType=DECIMAL},
      "STATUS" = #{record.status,jdbcType=DECIMAL},
      PART_BILLED_PERIOD = #{record.partBilledPeriod,jdbcType=DECIMAL},
      BILLED_PERIOD = #{record.billedPeriod,jdbcType=DECIMAL},
      STD_CODE = #{record.stdCode,jdbcType=VARCHAR},
      MAPPING_REASON = #{record.mappingReason,jdbcType=VARCHAR},
      MAPPING_USER = #{record.mappingUser,jdbcType=VARCHAR},
      MAPPING_TIME = #{record.mappingTime,jdbcType=TIMESTAMP},
      REMAP_ID = #{record.remapId,jdbcType=VARCHAR}
481 482 483 484 485 486 487 488 489
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.Voucher">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
490
    update VOUCHER
491
    <set>
neo's avatar
neo committed
492 493
      <if test="vid != null">
        VID = #{vid,jdbcType=VARCHAR},
494 495
      </if>
      <if test="date != null">
neo's avatar
neo committed
496
        "DATE" = #{date,jdbcType=TIMESTAMP},
497 498
      </if>
      <if test="group != null">
neo's avatar
neo committed
499
        "GROUP" = #{group,jdbcType=VARCHAR},
500 501
      </if>
      <if test="period != null">
neo's avatar
neo committed
502
        PERIOD = #{period,jdbcType=DECIMAL},
503 504
      </if>
      <if test="customerCode != null">
neo's avatar
neo committed
505
        CUSTOMER_CODE = #{customerCode,jdbcType=VARCHAR},
506 507
      </if>
      <if test="customerName != null">
neo's avatar
neo committed
508
        CUSTOMER_NAME = #{customerName,jdbcType=VARCHAR},
509 510
      </if>
      <if test="summary != null">
neo's avatar
neo committed
511
        SUMMARY = #{summary,jdbcType=VARCHAR},
512 513
      </if>
      <if test="acctCode != null">
neo's avatar
neo committed
514
        ACCT_CODE = #{acctCode,jdbcType=VARCHAR},
515 516
      </if>
      <if test="debit != null">
neo's avatar
neo committed
517
        DEBIT = #{debit,jdbcType=DECIMAL},
518 519
      </if>
      <if test="credit != null">
neo's avatar
neo committed
520
        CREDIT = #{credit,jdbcType=DECIMAL},
521 522
      </if>
      <if test="attach != null">
neo's avatar
neo committed
523
        ATTACH = #{attach,jdbcType=DECIMAL},
524
      </if>
neo's avatar
neo committed
525 526
      <if test="itemId != null">
        ITEM_ID = #{itemId,jdbcType=VARCHAR},
527 528
      </if>
      <if test="createTime != null">
neo's avatar
neo committed
529
        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
530 531
      </if>
      <if test="importType != null">
neo's avatar
neo committed
532
        IMPORT_TYPE = #{importType,jdbcType=DECIMAL},
533
      </if>
neo's avatar
neo committed
534 535
      <if test="creatorId != null">
        CREATOR_ID = #{creatorId,jdbcType=VARCHAR},
536
      </if>
neo's avatar
neo committed
537 538
      <if test="monthId != null">
        MONTH_ID = #{monthId,jdbcType=DECIMAL},
539 540
      </if>
      <if test="originalPeriod != null">
neo's avatar
neo committed
541
        ORIGINAL_PERIOD = #{originalPeriod,jdbcType=DECIMAL},
542 543
      </if>
      <if test="status != null">
neo's avatar
neo committed
544
        "STATUS" = #{status,jdbcType=DECIMAL},
545 546
      </if>
      <if test="partBilledPeriod != null">
neo's avatar
neo committed
547
        PART_BILLED_PERIOD = #{partBilledPeriod,jdbcType=DECIMAL},
548 549
      </if>
      <if test="billedPeriod != null">
neo's avatar
neo committed
550
        BILLED_PERIOD = #{billedPeriod,jdbcType=DECIMAL},
551 552
      </if>
      <if test="stdCode != null">
neo's avatar
neo committed
553
        STD_CODE = #{stdCode,jdbcType=VARCHAR},
554 555
      </if>
      <if test="mappingReason != null">
neo's avatar
neo committed
556
        MAPPING_REASON = #{mappingReason,jdbcType=VARCHAR},
557 558
      </if>
      <if test="mappingUser != null">
neo's avatar
neo committed
559
        MAPPING_USER = #{mappingUser,jdbcType=VARCHAR},
560 561
      </if>
      <if test="mappingTime != null">
neo's avatar
neo committed
562
        MAPPING_TIME = #{mappingTime,jdbcType=TIMESTAMP},
563 564
      </if>
      <if test="remapId != null">
neo's avatar
neo committed
565
        REMAP_ID = #{remapId,jdbcType=VARCHAR},
566 567
      </if>
    </set>
neo's avatar
neo committed
568
    where VOUCHER_ID = #{voucherId,jdbcType=VARCHAR}
569 570 571 572 573 574
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.Voucher">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601
    update VOUCHER
    set VID = #{vid,jdbcType=VARCHAR},
      "DATE" = #{date,jdbcType=TIMESTAMP},
      "GROUP" = #{group,jdbcType=VARCHAR},
      PERIOD = #{period,jdbcType=DECIMAL},
      CUSTOMER_CODE = #{customerCode,jdbcType=VARCHAR},
      CUSTOMER_NAME = #{customerName,jdbcType=VARCHAR},
      SUMMARY = #{summary,jdbcType=VARCHAR},
      ACCT_CODE = #{acctCode,jdbcType=VARCHAR},
      DEBIT = #{debit,jdbcType=DECIMAL},
      CREDIT = #{credit,jdbcType=DECIMAL},
      ATTACH = #{attach,jdbcType=DECIMAL},
      ITEM_ID = #{itemId,jdbcType=VARCHAR},
      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      IMPORT_TYPE = #{importType,jdbcType=DECIMAL},
      CREATOR_ID = #{creatorId,jdbcType=VARCHAR},
      MONTH_ID = #{monthId,jdbcType=DECIMAL},
      ORIGINAL_PERIOD = #{originalPeriod,jdbcType=DECIMAL},
      "STATUS" = #{status,jdbcType=DECIMAL},
      PART_BILLED_PERIOD = #{partBilledPeriod,jdbcType=DECIMAL},
      BILLED_PERIOD = #{billedPeriod,jdbcType=DECIMAL},
      STD_CODE = #{stdCode,jdbcType=VARCHAR},
      MAPPING_REASON = #{mappingReason,jdbcType=VARCHAR},
      MAPPING_USER = #{mappingUser,jdbcType=VARCHAR},
      MAPPING_TIME = #{mappingTime,jdbcType=TIMESTAMP},
      REMAP_ID = #{remapId,jdbcType=VARCHAR}
    where VOUCHER_ID = #{voucherId,jdbcType=VARCHAR}
602 603 604 605 606 607 608 609 610 611 612
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.VoucherExample" resultMap="BaseResultMap">
    <!--
      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
613
    from VOUCHER
614 615 616 617 618 619 620
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
621
</mapper>