From bf84fec7d8dd5e7fbcc93030b8d83da7ec0ece91 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 03 四月 2026 15:39:36 +0800
Subject: [PATCH] yys
---
src/main/resources/mapper/sales/ShippingInfoMapper.xml | 42 ++++++++++++++++++++++++++++++++++++++----
1 files changed, 38 insertions(+), 4 deletions(-)
diff --git a/src/main/resources/mapper/sales/ShippingInfoMapper.xml b/src/main/resources/mapper/sales/ShippingInfoMapper.xml
index 54c2608..067dda6 100644
--- a/src/main/resources/mapper/sales/ShippingInfoMapper.xml
+++ b/src/main/resources/mapper/sales/ShippingInfoMapper.xml
@@ -21,7 +21,9 @@
sl.sales_contract_no,
sl.customer_name,
s.shipping_total AS shipping_total,
- slp.id as salesLedgerProductId
+ slp.id as salesLedgerProductId,
+ slp.product_category,
+ slp.specification_model
FROM shipping_info s
LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id
LEFT JOIN sales_ledger_product slp ON s.sales_ledger_product_id = slp.id and slp.type = 1
@@ -31,6 +33,9 @@
</if>
<if test="req.shippingCarNumber != null and req.shippingCarNumber != ''">
AND s.shipping_car_number LIKE CONCAT('%',#{req.shippingCarNumber},'%')
+ </if>
+ <if test="req.customerName != null and req.customerName != ''">
+ AND sl.customer_name LIKE CONCAT('%',#{req.customerName},'%')
</if>
<if test="req.shippingNo != null and req.shippingNo != ''">
AND s.shipping_no LIKE CONCAT('%',#{req.shippingNo},'%')
@@ -60,7 +65,7 @@
select *,sid.id as id from shipping_info_detail sid
left join shipping_info si on si.id = sid.shipping_info_id
left join sales_ledger sl on si.sales_ledger_id = sl.id
- where (si.status = '宸插彂璐�' or si.status = '鍙戣揣涓�') and sl.customer_name = #{customerName}
+ where (si.status = '宸插彂璐�' or si.status = '鍙戣揣涓�') and (sid.status is null or sid.status != '宸查��璐�') and sl.customer_name = #{customerName}
</select>
<select id="getReturnManagementDtoById" resultType="com.ruoyi.sales.dto.SalesLedgerProductDto">
SELECT
@@ -77,8 +82,12 @@
FROM return_sale_product rsp
left join return_management rm on rm.id = rsp.return_management_id
left join shipping_info_detail si on si.id = rm.shipping_id
- WHERE 1=1
- GROUP BY return_sale_ledger_product_id
+ <where>
+ <if test="shippingId != null">
+ si.id = #{shippingId}
+ </if>
+ </where>
+ GROUP BY si.id
) rs ON rs.return_sale_ledger_product_id = slp.id
<where>
<if test="shippingId != null">
@@ -86,4 +95,29 @@
</if>
</where>
</select>
+ <select id="getDateil" resultType="com.ruoyi.sales.dto.ShippingInfoDto" parameterType="java.lang.Long">
+ SELECT
+ s.id,
+ s.sales_ledger_id,
+ s.shipping_date,
+ s.shipping_car_number,
+ s.express_number,
+ s.express_company,
+ s.shipping_no,
+ s.type,
+ s.status,
+ s.create_time,
+ s.update_time,
+ s.create_user,
+ s.update_user,
+ s.tenant_id,
+ sl.sales_contract_no,
+ sl.customer_name,
+ s.shipping_total AS shipping_total,
+ slp.id as salesLedgerProductId
+ FROM shipping_info s
+ LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id
+ LEFT JOIN sales_ledger_product slp ON s.sales_ledger_product_id = slp.id and slp.type = 1
+ WHERE s.id = #{id}
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3