|
|
@@ -38,35 +38,30 @@
|
|
|
|
|
|
<!-- 通用条件列 -->
|
|
|
<sql id="Condition">
|
|
|
- <where>
|
|
|
- <if test="rpId != null and rpId != ''">
|
|
|
- AND rp_id = #{rpId}
|
|
|
- </if>
|
|
|
- <if test="accItemId != null and accItemId != ''">
|
|
|
- AND acc_item_id = #{accItemId}
|
|
|
- </if>
|
|
|
- <if test="amtReceivableHandle != null">
|
|
|
- AND amt_receivable_handle = #{amtReceivableHandle}
|
|
|
- </if>
|
|
|
- <if test="amtPayableHandle != null">
|
|
|
- AND amt_payable_handle = #{amtPayableHandle}
|
|
|
- </if>
|
|
|
- <if test="amtWaive != null">
|
|
|
- AND amt_waive = #{amtWaive}
|
|
|
- </if>
|
|
|
- <if test="accDate != null">
|
|
|
- AND acc_date = #{accDate}
|
|
|
- </if>
|
|
|
- <if test="remarks != null and remarks != ''">
|
|
|
- AND remarks = #{remarks}
|
|
|
- </if>
|
|
|
- <if test="flgValid != null">
|
|
|
- AND flg_valid = #{flgValid}
|
|
|
- </if>
|
|
|
- <if test="cpId != null">
|
|
|
- AND cp_id = #{cpId}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
+ <if test="rpId != null and rpId != ''">
|
|
|
+ AND t.rp_id = #{rpId}::uuid
|
|
|
+ </if>
|
|
|
+ <if test="accItemId != null and accItemId != ''">
|
|
|
+ AND t.acc_item_id = #{accItemId}
|
|
|
+ </if>
|
|
|
+ <if test="amtReceivableHandle != null">
|
|
|
+ AND t.amt_receivable_handle = #{amtReceivableHandle}
|
|
|
+ </if>
|
|
|
+ <if test="amtPayableHandle != null">
|
|
|
+ AND t.amt_payable_handle = #{amtPayableHandle}
|
|
|
+ </if>
|
|
|
+ <if test="amtWaive != null">
|
|
|
+ AND t.amt_waive = #{amtWaive}
|
|
|
+ </if>
|
|
|
+ <if test="accDate != null">
|
|
|
+ AND t.acc_date = #{accDate}
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null and remarks != ''">
|
|
|
+ AND t.remarks = #{remarks}
|
|
|
+ </if>
|
|
|
+ <if test="cpId != null">
|
|
|
+ AND t.cp_id = #{cpId}
|
|
|
+ </if>
|
|
|
</sql>
|
|
|
|
|
|
<sql id="idsForeach">
|
|
|
@@ -79,9 +74,21 @@
|
|
|
|
|
|
<!-- 查询表t_mac_rec_pay_handle_item,(条件查询+分页)列表 -->
|
|
|
<select id="selectByCond" resultMap="BaseResultMapResponse">
|
|
|
- SELECT
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
- FROM t_mac_rec_pay_handle_item
|
|
|
+ SELECT t.item_id,
|
|
|
+ t.rp_id,
|
|
|
+ t.acc_item_id,
|
|
|
+ t.amt_receivable_handle,
|
|
|
+ t.amt_payable_handle,
|
|
|
+ t.amt_waive,
|
|
|
+ t.acc_date,
|
|
|
+ t.remarks,
|
|
|
+ t.flg_valid,
|
|
|
+ t.cp_id,
|
|
|
+ tmai.biznis_no as "biznisNo",
|
|
|
+ tmai.amt_should as "amtShould"
|
|
|
+ FROM dkic_b.t_mac_rec_pay_handle_item as t
|
|
|
+ left join dkic_b.t_mac_account_item tmai on tmai.item_id = t.acc_item_id
|
|
|
+ where t.flg_valid
|
|
|
<include refid="Condition"/>
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
limit #{end} offset #{start}
|
|
|
@@ -92,7 +99,8 @@
|
|
|
<select id="countByCond" resultType="Long">
|
|
|
SELECT
|
|
|
count(1)
|
|
|
- FROM t_mac_rec_pay_handle_item
|
|
|
+ FROM dkic_b.t_mac_rec_pay_handle_item as t
|
|
|
+ where t.flg_valid
|
|
|
<include refid="Condition"/>
|
|
|
</select>
|
|
|
|
|
|
@@ -100,7 +108,7 @@
|
|
|
<select id="selectById" resultMap="BaseResultMapResponse">
|
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
|
- FROM t_mac_rec_pay_handle_item
|
|
|
+ FROM dkic_b.t_mac_rec_pay_handle_item
|
|
|
WHERE item_id = #{itemId}::uuid
|
|
|
</select>
|
|
|
|
|
|
@@ -108,7 +116,7 @@
|
|
|
<select id="selectByIdForUpdate" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
|
- FROM t_mac_rec_pay_handle_item
|
|
|
+ FROM dkic_b.t_mac_rec_pay_handle_item
|
|
|
WHERE item_id = #{id}::uuid
|
|
|
for update
|
|
|
</select>
|
|
|
@@ -117,13 +125,13 @@
|
|
|
<select id="selectByIdsForUpdate" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
|
- FROM t_mac_rec_pay_handle_item
|
|
|
+ FROM dkic_b.t_mac_rec_pay_handle_item
|
|
|
<include refid="idsForeach"/>
|
|
|
for update
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertBatch">
|
|
|
- insert into t_mac_rec_pay_handle_item
|
|
|
+ insert into dkic_b.t_mac_rec_pay_handle_item
|
|
|
(
|
|
|
<trim suffixOverrides=",">
|
|
|
rp_id,
|