From 5035c404359e536bcdaa2668318ecd3b38c72584 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期六, 25 四月 2026 14:24:08 +0800
Subject: [PATCH] feat(productionPrintOrderExcel):  excel编写

---
 src/main/resources/mapper/production/ProductWorkOrderMapper.xml |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/main/resources/mapper/production/ProductWorkOrderMapper.xml b/src/main/resources/mapper/production/ProductWorkOrderMapper.xml
index 5849d88..6bb7fc6 100644
--- a/src/main/resources/mapper/production/ProductWorkOrderMapper.xml
+++ b/src/main/resources/mapper/production/ProductWorkOrderMapper.xml
@@ -92,12 +92,9 @@
             actual_start_time &gt;= #{startDate}
             AND actual_start_time &lt;= #{endDate}
     </select>
-    <select id="selectMax" resultType="com.ruoyi.production.pojo.ProductWorkOrder">
-        SELECT SUBSTRING(work_order_no, 3) as work_order_no
+    <select id="selectMax" resultType="java.lang.Integer">
+        SELECT count(1)
         FROM product_work_order
-        WHERE SUBSTRING(work_order_no, 3) like concat(#{datePrefix},'%')
-        order by work_order_no  desc
-        limit 1
-        ;
+        WHERE SUBSTRING(work_order_no, 3) like concat('%',#{datePrefix},'%')
     </select>
 </mapper>

--
Gitblit v1.9.3