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