CustBalanceStdManualMapper.xml 16.2 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.CustBalanceStdManualMapper">
4 5 6 7 8
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.CustBalanceStdManual">
    <!--
      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
    <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_BAL" jdbcType="DECIMAL" property="begBal" />
    <result column="BEG_DEBIT_BAL" jdbcType="DECIMAL" property="begDebitBal" />
    <result column="BEG_CREDIT_BAL" jdbcType="DECIMAL" property="begCreditBal" />
    <result column="DEBIT_BAL" jdbcType="DECIMAL" property="debitBal" />
    <result column="CREDIT_BAL" jdbcType="DECIMAL" property="creditBal" />
    <result column="YEAR_DEBIT_BAL" jdbcType="DECIMAL" property="yearDebitBal" />
    <result column="YEAR_CREDIT_BAL" jdbcType="DECIMAL" property="yearCreditBal" />
    <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" />
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
  </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>
51
            </foreach>
52
          </trim>
53
        </if>
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
      </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>
86
        </if>
87 88 89 90 91 92 93 94
      </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
95 96
    BALANCE_ID, PERIOD_ID, ACCT_CODE, CUSTOMER_CODE, BEG_BAL, BEG_DEBIT_BAL, BEG_CREDIT_BAL, 
    DEBIT_BAL, CREDIT_BAL, YEAR_DEBIT_BAL, YEAR_CREDIT_BAL, END_BAL, END_DEBIT_BAL, END_CREDIT_BAL
97 98 99 100 101 102 103 104 105 106 107
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.CustBalanceStdManualExample" 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
108
    from CUST_BALANCE_STD_MANUAL
109 110 111 112 113 114 115 116 117 118 119 120 121 122
    <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
123 124
    from CUST_BALANCE_STD_MANUAL
    where BALANCE_ID = #{balanceId,jdbcType=VARCHAR}
125 126 127 128 129 130
  </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
131 132
    delete from CUST_BALANCE_STD_MANUAL
    where BALANCE_ID = #{balanceId,jdbcType=VARCHAR}
133 134 135 136 137 138
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.CustBalanceStdManualExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
139
    delete from CUST_BALANCE_STD_MANUAL
140 141 142 143 144 145 146 147 148
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.CustBalanceStdManual">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
149 150 151 152 153 154
    insert into CUST_BALANCE_STD_MANUAL (BALANCE_ID, PERIOD_ID, ACCT_CODE, 
      CUSTOMER_CODE, BEG_BAL, BEG_DEBIT_BAL, 
      BEG_CREDIT_BAL, DEBIT_BAL, CREDIT_BAL, 
      YEAR_DEBIT_BAL, YEAR_CREDIT_BAL, END_BAL, 
      END_DEBIT_BAL, END_CREDIT_BAL)
    values (#{balanceId,jdbcType=VARCHAR}, #{periodId,jdbcType=DECIMAL}, #{acctCode,jdbcType=VARCHAR}, 
155 156 157 158 159 160 161 162 163 164
      #{customerCode,jdbcType=VARCHAR}, #{begBal,jdbcType=DECIMAL}, #{begDebitBal,jdbcType=DECIMAL}, 
      #{begCreditBal,jdbcType=DECIMAL}, #{debitBal,jdbcType=DECIMAL}, #{creditBal,jdbcType=DECIMAL}, 
      #{yearDebitBal,jdbcType=DECIMAL}, #{yearCreditBal,jdbcType=DECIMAL}, #{endBal,jdbcType=DECIMAL}, 
      #{endDebitBal,jdbcType=DECIMAL}, #{endCreditBal,jdbcType=DECIMAL})
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.CustBalanceStdManual">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
165
    insert into CUST_BALANCE_STD_MANUAL
166
    <trim prefix="(" suffix=")" suffixOverrides=",">
neo's avatar
neo committed
167 168
      <if test="balanceId != null">
        BALANCE_ID,
169
      </if>
neo's avatar
neo committed
170 171
      <if test="periodId != null">
        PERIOD_ID,
172 173
      </if>
      <if test="acctCode != null">
neo's avatar
neo committed
174
        ACCT_CODE,
175 176
      </if>
      <if test="customerCode != null">
neo's avatar
neo committed
177
        CUSTOMER_CODE,
178 179
      </if>
      <if test="begBal != null">
neo's avatar
neo committed
180
        BEG_BAL,
181 182
      </if>
      <if test="begDebitBal != null">
neo's avatar
neo committed
183
        BEG_DEBIT_BAL,
184 185
      </if>
      <if test="begCreditBal != null">
neo's avatar
neo committed
186
        BEG_CREDIT_BAL,
187 188
      </if>
      <if test="debitBal != null">
neo's avatar
neo committed
189
        DEBIT_BAL,
190 191
      </if>
      <if test="creditBal != null">
neo's avatar
neo committed
192
        CREDIT_BAL,
193 194
      </if>
      <if test="yearDebitBal != null">
neo's avatar
neo committed
195
        YEAR_DEBIT_BAL,
196 197
      </if>
      <if test="yearCreditBal != null">
neo's avatar
neo committed
198
        YEAR_CREDIT_BAL,
199 200
      </if>
      <if test="endBal != null">
neo's avatar
neo committed
201
        END_BAL,
202 203
      </if>
      <if test="endDebitBal != null">
neo's avatar
neo committed
204
        END_DEBIT_BAL,
205 206
      </if>
      <if test="endCreditBal != null">
neo's avatar
neo committed
207
        END_CREDIT_BAL,
208 209 210
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
neo's avatar
neo committed
211 212
      <if test="balanceId != null">
        #{balanceId,jdbcType=VARCHAR},
213
      </if>
neo's avatar
neo committed
214 215
      <if test="periodId != null">
        #{periodId,jdbcType=DECIMAL},
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
      </if>
      <if test="acctCode != null">
        #{acctCode,jdbcType=VARCHAR},
      </if>
      <if test="customerCode != null">
        #{customerCode,jdbcType=VARCHAR},
      </if>
      <if test="begBal != null">
        #{begBal,jdbcType=DECIMAL},
      </if>
      <if test="begDebitBal != null">
        #{begDebitBal,jdbcType=DECIMAL},
      </if>
      <if test="begCreditBal != null">
        #{begCreditBal,jdbcType=DECIMAL},
      </if>
      <if test="debitBal != null">
        #{debitBal,jdbcType=DECIMAL},
      </if>
      <if test="creditBal != null">
        #{creditBal,jdbcType=DECIMAL},
      </if>
      <if test="yearDebitBal != null">
        #{yearDebitBal,jdbcType=DECIMAL},
      </if>
      <if test="yearCreditBal != null">
        #{yearCreditBal,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>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.CustBalanceStdManualExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
260
    select count(*) from CUST_BALANCE_STD_MANUAL
261 262 263 264 265 266 267 268 269
    <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
270
    update CUST_BALANCE_STD_MANUAL
271
    <set>
neo's avatar
neo committed
272 273
      <if test="record.balanceId != null">
        BALANCE_ID = #{record.balanceId,jdbcType=VARCHAR},
274
      </if>
neo's avatar
neo committed
275 276
      <if test="record.periodId != null">
        PERIOD_ID = #{record.periodId,jdbcType=DECIMAL},
277 278
      </if>
      <if test="record.acctCode != null">
neo's avatar
neo committed
279
        ACCT_CODE = #{record.acctCode,jdbcType=VARCHAR},
280 281
      </if>
      <if test="record.customerCode != null">
neo's avatar
neo committed
282
        CUSTOMER_CODE = #{record.customerCode,jdbcType=VARCHAR},
283 284
      </if>
      <if test="record.begBal != null">
neo's avatar
neo committed
285
        BEG_BAL = #{record.begBal,jdbcType=DECIMAL},
286 287
      </if>
      <if test="record.begDebitBal != null">
neo's avatar
neo committed
288
        BEG_DEBIT_BAL = #{record.begDebitBal,jdbcType=DECIMAL},
289 290
      </if>
      <if test="record.begCreditBal != null">
neo's avatar
neo committed
291
        BEG_CREDIT_BAL = #{record.begCreditBal,jdbcType=DECIMAL},
292 293
      </if>
      <if test="record.debitBal != null">
neo's avatar
neo committed
294
        DEBIT_BAL = #{record.debitBal,jdbcType=DECIMAL},
295 296
      </if>
      <if test="record.creditBal != null">
neo's avatar
neo committed
297
        CREDIT_BAL = #{record.creditBal,jdbcType=DECIMAL},
298 299
      </if>
      <if test="record.yearDebitBal != null">
neo's avatar
neo committed
300
        YEAR_DEBIT_BAL = #{record.yearDebitBal,jdbcType=DECIMAL},
301 302
      </if>
      <if test="record.yearCreditBal != null">
neo's avatar
neo committed
303
        YEAR_CREDIT_BAL = #{record.yearCreditBal,jdbcType=DECIMAL},
304 305
      </if>
      <if test="record.endBal != null">
neo's avatar
neo committed
306
        END_BAL = #{record.endBal,jdbcType=DECIMAL},
307 308
      </if>
      <if test="record.endDebitBal != null">
neo's avatar
neo committed
309
        END_DEBIT_BAL = #{record.endDebitBal,jdbcType=DECIMAL},
310 311
      </if>
      <if test="record.endCreditBal != null">
neo's avatar
neo committed
312
        END_CREDIT_BAL = #{record.endCreditBal,jdbcType=DECIMAL},
313 314 315 316 317 318 319 320 321 322 323
      </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
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338
    update CUST_BALANCE_STD_MANUAL
    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_BAL = #{record.begBal,jdbcType=DECIMAL},
      BEG_DEBIT_BAL = #{record.begDebitBal,jdbcType=DECIMAL},
      BEG_CREDIT_BAL = #{record.begCreditBal,jdbcType=DECIMAL},
      DEBIT_BAL = #{record.debitBal,jdbcType=DECIMAL},
      CREDIT_BAL = #{record.creditBal,jdbcType=DECIMAL},
      YEAR_DEBIT_BAL = #{record.yearDebitBal,jdbcType=DECIMAL},
      YEAR_CREDIT_BAL = #{record.yearCreditBal,jdbcType=DECIMAL},
      END_BAL = #{record.endBal,jdbcType=DECIMAL},
      END_DEBIT_BAL = #{record.endDebitBal,jdbcType=DECIMAL},
      END_CREDIT_BAL = #{record.endCreditBal,jdbcType=DECIMAL}
339 340 341 342 343 344 345 346 347
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.CustBalanceStdManual">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
348
    update CUST_BALANCE_STD_MANUAL
349
    <set>
neo's avatar
neo committed
350 351
      <if test="periodId != null">
        PERIOD_ID = #{periodId,jdbcType=DECIMAL},
352 353
      </if>
      <if test="acctCode != null">
neo's avatar
neo committed
354
        ACCT_CODE = #{acctCode,jdbcType=VARCHAR},
355 356
      </if>
      <if test="customerCode != null">
neo's avatar
neo committed
357
        CUSTOMER_CODE = #{customerCode,jdbcType=VARCHAR},
358 359
      </if>
      <if test="begBal != null">
neo's avatar
neo committed
360
        BEG_BAL = #{begBal,jdbcType=DECIMAL},
361 362
      </if>
      <if test="begDebitBal != null">
neo's avatar
neo committed
363
        BEG_DEBIT_BAL = #{begDebitBal,jdbcType=DECIMAL},
364 365
      </if>
      <if test="begCreditBal != null">
neo's avatar
neo committed
366
        BEG_CREDIT_BAL = #{begCreditBal,jdbcType=DECIMAL},
367 368
      </if>
      <if test="debitBal != null">
neo's avatar
neo committed
369
        DEBIT_BAL = #{debitBal,jdbcType=DECIMAL},
370 371
      </if>
      <if test="creditBal != null">
neo's avatar
neo committed
372
        CREDIT_BAL = #{creditBal,jdbcType=DECIMAL},
373 374
      </if>
      <if test="yearDebitBal != null">
neo's avatar
neo committed
375
        YEAR_DEBIT_BAL = #{yearDebitBal,jdbcType=DECIMAL},
376 377
      </if>
      <if test="yearCreditBal != null">
neo's avatar
neo committed
378
        YEAR_CREDIT_BAL = #{yearCreditBal,jdbcType=DECIMAL},
379 380
      </if>
      <if test="endBal != null">
neo's avatar
neo committed
381
        END_BAL = #{endBal,jdbcType=DECIMAL},
382 383
      </if>
      <if test="endDebitBal != null">
neo's avatar
neo committed
384
        END_DEBIT_BAL = #{endDebitBal,jdbcType=DECIMAL},
385 386
      </if>
      <if test="endCreditBal != null">
neo's avatar
neo committed
387
        END_CREDIT_BAL = #{endCreditBal,jdbcType=DECIMAL},
388 389
      </if>
    </set>
neo's avatar
neo committed
390
    where BALANCE_ID = #{balanceId,jdbcType=VARCHAR}
391 392 393 394 395 396
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.CustBalanceStdManual">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
397 398 399 400 401 402 403 404 405 406 407 408 409 410 411
    update CUST_BALANCE_STD_MANUAL
    set PERIOD_ID = #{periodId,jdbcType=DECIMAL},
      ACCT_CODE = #{acctCode,jdbcType=VARCHAR},
      CUSTOMER_CODE = #{customerCode,jdbcType=VARCHAR},
      BEG_BAL = #{begBal,jdbcType=DECIMAL},
      BEG_DEBIT_BAL = #{begDebitBal,jdbcType=DECIMAL},
      BEG_CREDIT_BAL = #{begCreditBal,jdbcType=DECIMAL},
      DEBIT_BAL = #{debitBal,jdbcType=DECIMAL},
      CREDIT_BAL = #{creditBal,jdbcType=DECIMAL},
      YEAR_DEBIT_BAL = #{yearDebitBal,jdbcType=DECIMAL},
      YEAR_CREDIT_BAL = #{yearCreditBal,jdbcType=DECIMAL},
      END_BAL = #{endBal,jdbcType=DECIMAL},
      END_DEBIT_BAL = #{endDebitBal,jdbcType=DECIMAL},
      END_CREDIT_BAL = #{endCreditBal,jdbcType=DECIMAL}
    where BALANCE_ID = #{balanceId,jdbcType=VARCHAR}
412 413 414 415 416 417 418 419 420 421 422
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.CustBalanceStdManualExample" 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
423
    from CUST_BALANCE_STD_MANUAL
424 425 426 427 428 429 430
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
431
</mapper>