From e2c5b3a68bf3da47f5c1adf217ca96c7ec9a0076 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 29 一月 2026 15:17:29 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_New' into dev_New

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

diff --git a/src/main/resources/mapper/production/ProductOrderMapper.xml b/src/main/resources/mapper/production/ProductOrderMapper.xml
index b47d5cf..70ce815 100644
--- a/src/main/resources/mapper/production/ProductOrderMapper.xml
+++ b/src/main/resources/mapper/production/ProductOrderMapper.xml
@@ -21,7 +21,8 @@
         slp.specification_model,
         ppr.process_route_code,
         pb.bom_no,
-        ROUND(po.complete_quantity / po.quantity * 100, 2) AS completionStatus
+        ROUND(po.complete_quantity / po.quantity * 100, 2) AS completionStatus,
+        DATEDIFF(sl.delivery_date, CURDATE()) AS delivery_days_diff
         from product_order po
         left join sales_ledger sl on po.sales_ledger_id = sl.id
         left join sales_ledger_product slp on po.product_model_id = slp.id
@@ -43,6 +44,9 @@
             <if test="c.specificationModel != null and c.specificationModel != ''">
                 and slp.specification_model like concat('%',#{c.specificationModel},'%')
             </if>
+            <if test="c.startTime != null and c.endTime != null">
+                and po.create_time between #{c.startTime} and #{c.endTime}
+            </if>
         </where>
     </select>
     <select id="productMainByOrderId" resultType="com.ruoyi.production.dto.ProductOrderDto">

--
Gitblit v1.9.3