| | |
| | | and pr.created_at <= date_format(#{c.createdAtEnd},'%Y-%m-%d hh:mm:ss') |
| | | </if> |
| | | </select> |
| | | <select id="selectProductRecordListByPuechaserId" resultType="com.ruoyi.purchase.dto.ProductRecordDto"> |
| | | SELECT |
| | | P1.id, |
| | | P1.product_category, |
| | | P1.specification_model, |
| | | P1.unit, |
| | | P1.quantity, |
| | | P1.tax_rate, |
| | | P1.tax_inclusive_unit_price, |
| | | P1.tax_inclusive_total_price, |
| | | P1.tax_exclusive_total_price, |
| | | P2.supplier_name, |
| | | p2.supplier_id |
| | | from product_record P1 |
| | | left join purchase_ledger P2 on P1.purchase_ledger_id = P2.id |
| | | where p2.purchase_contract_number = #{purchaseContractNumber} and P1.type = 2 |
| | | </select> |
| | | <select id="selectProductRecordById" resultType="com.ruoyi.purchase.dto.ProductRecordDto"> |
| | | SELECT |
| | | P1.id, |
| | | P1.product_category, |
| | | P1.specification_model, |
| | | P1.unit, |
| | | P1.quantity, |
| | | P1.tax_rate, |
| | | P1.tax_inclusive_unit_price, |
| | | P1.tax_inclusive_total_price, |
| | | P1.tax_exclusive_total_price, |
| | | P2.supplier_name, |
| | | p2.supplier_id |
| | | from product_record P1 |
| | | left join purchase_ledger P2 on P1.purchase_ledger_id = P2.id |
| | | where P1.id = #{id} and P1.type = 2 |
| | | </select> |
| | | </mapper> |