From 9f3689ea26fd2158ffafd31a7932b1e685b0252b Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期三, 11 二月 2026 11:59:46 +0800
Subject: [PATCH] fix: 一个合同中多个产品时,来票登记已来票金额、待来票金额统计有误

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

diff --git a/src/main/resources/mapper/production/ProductProcessRouteItemMapper.xml b/src/main/resources/mapper/production/ProductProcessRouteItemMapper.xml
index 13f0ad7..302a0fb 100644
--- a/src/main/resources/mapper/production/ProductProcessRouteItemMapper.xml
+++ b/src/main/resources/mapper/production/ProductProcessRouteItemMapper.xml
@@ -15,11 +15,13 @@
                pp.name as process_name,
                pm.model,
                pm.unit,
-               p.product_name
+               p.product_name,
+               case when pwo.complete_quantity>0 then true else false end as is_complete
         from product_process_route_item ppri
                  left join product_model pm on ppri.product_model_id = pm.id
                  left join product p on pm.product_id = p.id
                  left join product_process pp on pp.id = ppri.process_id
+                 left join product_work_order pwo on pwo.product_process_route_item_id = ppri.id
         where ppri.product_order_id = #{orderId}
         order by ppri.drag_sort
     </select>

--
Gitblit v1.9.3