|
|
@@ -3,20 +3,30 @@
|
|
|
<mapper namespace="org.jeecg.modules.hlwpayaccount.mapper.HlwPayRecordMapper">
|
|
|
|
|
|
<select id="findNoPayList" resultType="org.jeecg.modules.hlwpayaccount.entity.HlwPayRecord">
|
|
|
- select * from hlw_pay_record
|
|
|
+ select a.* from hlw_pay_record a
|
|
|
+ LEFT JOIN hlw_payment p on a.payment_id = p.id
|
|
|
+ LEFT JOIN hlw_subcontractor s on p.subcontractor_id = s.id
|
|
|
<where>
|
|
|
- del_flag = '0'
|
|
|
- and (recsts is null OR (recsts != 'SY' and recsts != 'VD' and recsts != 'CL'
|
|
|
- and recsts != 'WF' and recsts != 'UF' and recsts != 'OF'))
|
|
|
+ a.del_flag = '0'
|
|
|
+ and (a.recsts is null OR (a.recsts != 'SY' and a.recsts != 'VD' and a.recsts != 'CL'
|
|
|
+ and a.recsts != 'WF' and a.recsts != 'UF' and a.recsts != 'OF'))
|
|
|
+ <if test="bankType != null">
|
|
|
+ and s.bank_type = #{bankType}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
<select id="findNoPayRsaList" resultType="org.jeecg.modules.hlwpayaccount.entity.HlwPayRecord">
|
|
|
- select * from hlw_pay_record
|
|
|
+ select a.* from hlw_pay_record a
|
|
|
+ LEFT JOIN hlw_payment p on a.payment_id = p.id
|
|
|
+ LEFT JOIN hlw_subcontractor s on p.subcontractor_id = s.id
|
|
|
<where>
|
|
|
- del_flag = '0'
|
|
|
- and (recsts is null OR (recsts != 'FIN' and recsts != 'SY' and recsts != 'VD' and recsts != 'CL'
|
|
|
- and recsts != 'WF' and recsts != 'UF' and recsts != 'OF'))
|
|
|
+ a.del_flag = '0'
|
|
|
+ and (a.recsts is null OR (a.recsts != 'FIN' and a.recsts != 'SY' and a.recsts != 'VD' and a.recsts != 'CL'
|
|
|
+ and a.recsts != 'WF' and a.recsts != 'UF' and a.recsts != 'OF'))
|
|
|
+ <if test="bankType != null">
|
|
|
+ and s.bank_type = #{bankType}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
@@ -45,11 +55,15 @@
|
|
|
hlw_pay_record a
|
|
|
left join hlw_payment p on p.id = a.payment_id
|
|
|
left join hlw_payment_detail pd on pd.payment_id = p.id and pd.status = 3
|
|
|
+ LEFT JOIN hlw_subcontractor s on p.subcontractor_id = s.id
|
|
|
<where>
|
|
|
pd.statement_url IS NULL
|
|
|
AND a.payment_detail_id IS NULL
|
|
|
AND p.is_statement = 1
|
|
|
AND TO_DAYS(NOW()) - TO_DAYS(a.create_time) >= 1
|
|
|
+ <if test="bankType != null">
|
|
|
+ and s.bank_type = #{bankType}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
GROUP BY a.id
|
|
|
</select>
|
|
|
@@ -60,12 +74,17 @@
|
|
|
a.*
|
|
|
FROM
|
|
|
hlw_pay_record a
|
|
|
+ left join hlw_payment p on p.id = a.payment_id
|
|
|
left join hlw_payment_detail pd on pd.id = a.payment_detail_id and pd.status = 3
|
|
|
+ LEFT JOIN hlw_subcontractor s on p.subcontractor_id = s.id
|
|
|
<where>
|
|
|
pd.statement_url IS NULL
|
|
|
AND a.payment_detail_id IS NOT NULL
|
|
|
AND pd.is_supplement_payment = 1
|
|
|
AND TO_DAYS(NOW()) - TO_DAYS(a.create_time) >= 1
|
|
|
+ <if test="bankType != null">
|
|
|
+ and s.bank_type = #{bankType}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
GROUP BY a.id
|
|
|
</select>
|