|
|
@@ -109,8 +109,8 @@
|
|
|
case when hpd.id is not null then true else false end as "isPayment"
|
|
|
FROM hlw_subcontractor a
|
|
|
inner join hlw_application_subcontractor has on has.subcontractor_id=a.id
|
|
|
- left join hlw_user_subcontractor hs on hs.subcontractor_id=a.id
|
|
|
left join hlw_user hu on hu.user_code=#{userCode}
|
|
|
+ left join hlw_user_subcontractor hs on hs.subcontractor_id=a.id and hu.id=hs.user_id
|
|
|
left join hlw_payment hp on hp.subcontractor_id=a.id and hp.application_id = #{applicationId}
|
|
|
left join hlw_payment_detail hpd on hpd.idcard_number=hu.idcard_number and hp.id=hpd.payment_id
|
|
|
WHERE has.application_id = #{applicationId}
|