From 034f720f0bbc7f253c15613c28d994d7abf401eb Mon Sep 17 00:00:00 2001
From: tuqin <tuqin@tuqin.cn>
Date: 星期四, 24 九月 2026 10:53:33 +0800
Subject: [PATCH] feat: 现场需求后端改动
---
src/main/resources/mapper/sales/SalesLedgerProductMapper.xml | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml b/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
index 21959c1..d81b9fb 100644
--- a/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
+++ b/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
@@ -241,7 +241,19 @@
AND slp.product_category = #{req.productCategory}
</if>
GROUP BY slp.product_category, slp.specification_model, sl.supplier_name
- ORDER BY slp.product_category
+ <!-- 鎺掑簭锛氭敮鎸佹寜褰曞叆鏃ユ湡锛堣仛鍚堝垪锛夋帓搴忥紝鐧藉悕鍗曢槻姝㈡敞鍏ワ紱榛樿鎸変骇鍝佸ぇ绫� -->
+ <choose>
+ <when test="req.orderByColumn == 'entryDate'">
+ ORDER BY MAX(sl.entry_date)
+ <choose>
+ <when test="req.isAsc == 'asc'">ASC</when>
+ <otherwise>DESC</otherwise>
+ </choose>
+ </when>
+ <otherwise>
+ ORDER BY slp.product_category ASC
+ </otherwise>
+ </choose>
</select>
<select id="selectProductBomStructure" resultType="com.ruoyi.sales.dto.LossProductModelDto">
select
--
Gitblit v1.9.3