From 62e9b968c6f6a624b8d633c3c9551f1c814ea6e4 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期三, 01 四月 2026 16:31:23 +0800
Subject: [PATCH] 生产计划追踪进度2.0

---
 src/main/java/com/ruoyi/productionPlan/service/impl/ProductOrderPlanServiceImpl.java |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/main/java/com/ruoyi/productionPlan/service/impl/ProductOrderPlanServiceImpl.java b/src/main/java/com/ruoyi/productionPlan/service/impl/ProductOrderPlanServiceImpl.java
index 7325c59..92398f9 100644
--- a/src/main/java/com/ruoyi/productionPlan/service/impl/ProductOrderPlanServiceImpl.java
+++ b/src/main/java/com/ruoyi/productionPlan/service/impl/ProductOrderPlanServiceImpl.java
@@ -3,6 +3,7 @@
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.ruoyi.production.dto.ProductOrderDto;
+import com.ruoyi.production.dto.ProductionProductMainDto;
 import com.ruoyi.production.mapper.ProductOrderMapper;
 import com.ruoyi.production.mapper.ProductionOrderRouteMapper;
 import com.ruoyi.production.mapper.ProductionProductMainMapper;
@@ -46,12 +47,10 @@
     private ProductionProductMainMapper productionProductMainMapper;
 
     @Override
-    public TrackDto trackProgressByNo(String applyNo) {
+    public TrackDto trackProgressByNo(Long productionPlanId) {
         TrackDto trackDto = new TrackDto();
         //鐢熶骇璁″垝鏁版嵁
-        ProductionPlanDto planDto = new ProductionPlanDto();
-        planDto.setApplyNo(applyNo);
-        ProductionPlanDto productionPlanDto = productionPlanMapper.listPage(new Page(1, -1), planDto).getRecords().get(0);
+        ProductionPlanDto productionPlanDto=productionPlanMapper.selectProductionPlanDtoById(productionPlanId);
         trackDto.setProductionPlanDto(productionPlanDto);
         //鐢熶骇璁㈠崟鏁版嵁
         List<OrderDto> orderDtos = listByApplyNo(productionPlanDto);
@@ -73,10 +72,8 @@
             ProductOrderDto productOrderDto=productOrderMapper.getProductOrderDto(productOrderPlan.getProductOrderId());
             orderDto.setProductOrderDto(productOrderDto);
             //鎶ュ伐璇︽儏
-            List<ProductionProductMain> productionProductMains = productionProductMainMapper.selectList(Wrappers.<ProductionProductMain>lambdaQuery()
-                    .eq(ProductionProductMain::getProductOrderId, productOrderPlan.getProductOrderId())
-                    .orderByAsc(ProductionProductMain::getReportingTime));
-            orderDto.setProductionProductMains(productionProductMains);
+            List<ProductionProductMainDto> productionProductMainDtos = productionProductMainMapper.selectProductionProductMainDto(productOrderPlan.getProductOrderId());
+            orderDto.setProductionProductMainDtos(productionProductMainDtos);
             orderDtos.add(orderDto);
         });
         return orderDtos;

--
Gitblit v1.9.3