| | |
| | | <result column="apply_date" property="applyDate" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="status" property="status" /> |
| | | <result column="payment_status" property="paymentStatus" /> |
| | | <result column="payment_amount" property="paymentAmount" /> |
| | | </resultMap> |
| | | <select |
| | |
| | | resultType="com.ruoyi.account.bean.vo.purchase.AccountPaymentApplicationVo"> |
| | | select * from (select apa.*, |
| | | sm.supplier_name, |
| | | GROUP_CONCAT(sir.inbound_batches SEPARATOR ',') AS inboundBatches |
| | | GROUP_CONCAT(sir.inbound_batches SEPARATOR ',') AS inboundBatches, |
| | | IFNULL((SELECT SUM(app.payment_amount) FROM account_purchase_payment app WHERE app.account_payment_application_id = apa.id), 0) AS paidAmount |
| | | from account_payment_application apa |
| | | left join supplier_manage sm on apa.supplier_id = sm.id |
| | | left join stock_in_record sir on FIND_IN_SET(sir.id, apa.stock_in_record_ids) > 0 |
| | |
| | | <if test="req.status != null"> |
| | | AND A.status = #{req.status} |
| | | </if> |
| | | <if test="req.paymentStatus != null"> |
| | | AND A.payment_status = #{req.paymentStatus} |
| | | </if> |
| | | <if test="req.startDate != null and req.endDate != null"> |
| | | AND A.apply_date BETWEEN #{req.startDate} AND #{req.endDate} |
| | | </if> |