buhuazhen
2 天以前 99c61e2e4c5aabe594ff8a463a45f3a6b5cb9add
src/main/resources/mapper/sales/ShipmentApprovalMapper.xml
@@ -3,14 +3,22 @@
<mapper namespace="com.ruoyi.sales.mapper.ShipmentApprovalMapper">
    <select id="listPage" resultType="com.ruoyi.sales.pojo.ShipmentApproval">
        SELECT *,
        SELECT sa.*,
        si.shipping_car_number,
        sl.sales_contract_no,
        sl.customer_name,
        slp.product_category,
        slp.specification_model,
        slp.quantity,
        slp.unit,
        sd.dept_name as approveDeptName,
        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
                 LEFT JOIN sys_dept sd ON sa.approve_dept_id = sd.dept_id
        <where>
            1=1
            <if test="req.approveStatus != null and req.approveStatus != '' ">
@@ -20,5 +28,6 @@
                AND  sl.sales_contract_no LIKE CONCAT('%',#{req.salesContractNo},'%')
            </if>
        </where>
        ORDER BY sa.id DESC
    </select>
</mapper>