From baf37be9299fcd43f6ad5252f8df93080d13c446 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期五, 18 九月 2026 20:32:59 +0800
Subject: [PATCH] fix: 优化销售管理数据删除逻辑,按类型区分销售和采购产品,避免误删数据
---
src/main/resources/mapper/stock/StockInventoryMapper.xml | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/stock/StockInventoryMapper.xml b/src/main/resources/mapper/stock/StockInventoryMapper.xml
index 3dd2089..2681163 100644
--- a/src/main/resources/mapper/stock/StockInventoryMapper.xml
+++ b/src/main/resources/mapper/stock/StockInventoryMapper.xml
@@ -222,7 +222,7 @@
unit,
product_name,
product_id
- order by combined.id desc
+ order by MAX(combined.create_time) desc
</select>
<select id="listStockInventoryExportData" resultType="com.ruoyi.stock.execl.StockInventoryExportData">
@@ -537,6 +537,7 @@
left join product p on pm.product_id = p.id
where si.product_model_id = #{productModelId}
and si.qualitity > IFNULL(sd.qualitity, 0)
+ order by si.create_time asc
</select>
<select id="getBatchNoQty" resultType="com.ruoyi.stock.dto.StockInventoryDto">
--
Gitblit v1.9.3