<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.ruoyi.sales.mapper.ShipmentApprovalMapper">
|
|
<select id="listPage" resultType="com.ruoyi.sales.pojo.ShipmentApproval">
|
SELECT sa.*,
|
slp.product_category, slp.specification_model, slp.unit, slp.quantity, slp.min_stock,
|
slp.tax_rate, slp.tax_inclusive_unit_price, slp.tax_inclusive_total_price, slp.tax_exclusive_total_price,
|
slp.invoice_type, slp.type,
|
si.shipping_car_number,
|
si.shipping_date,
|
T2.nick_name AS entry_person_name
|
FROM shipment_approval sa
|
LEFT JOIN shipping_info si ON sa.shipping_info_id = si.id
|
LEFT JOIN sales_ledger sl ON sa.sales_ledger_id = sl.id
|
LEFT JOIN sales_ledger_product slp ON sa.sales_ledger_product_id = slp.id and slp.type = 1
|
LEFT JOIN sys_user T2 ON sl.entry_person = T2.user_id
|
<where>
|
1=1
|
<if test="req.approveStatus != null and req.approveStatus != '' ">
|
AND sa.approve_status = #{req.approveStatus}
|
</if>
|
<if test="req.salesContractNo != null and req.salesContractNo != '' ">
|
AND sl.sales_contract_no LIKE CONCAT('%',#{req.salesContractNo},'%')
|
</if>
|
</where>
|
ORDER BY sa.id DESC
|
</select>
|
</mapper>
|