From e275e91030a13f5627e21e7e44d308cee78fb31c Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 28 十一月 2025 11:04:40 +0800
Subject: [PATCH] 原材料报检:同一批次号不是第一次报检,企业微信通知格式调整 原材料下单:待下单的订单批次号重复的高亮显示

---
 inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsProductServiceImpl.java |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsProductServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsProductServiceImpl.java
index 63619a2..397c0c5 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsProductServiceImpl.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsProductServiceImpl.java
@@ -16,6 +16,7 @@
 import com.ruoyi.inspect.pojo.InsProduct;
 import com.ruoyi.inspect.pojo.InsSample;
 import com.ruoyi.inspect.service.InsProductService;
+import com.ruoyi.performance.pojo.AuxiliaryOutputWorkingHours;
 import lombok.AllArgsConstructor;
 import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
@@ -134,7 +135,8 @@
             product.setTemplate(null);
             product.setStyle(null);
             return product;
-        }).collect(Collectors.toList());
+        }).sorted((o1, o2) -> (o1.getSort() == null ? 0 : o1.getSort())
+                - (o2.getSort() == null ? 0 : o2.getSort())).collect(Collectors.toList());
         return insProducts;
     }
 
@@ -213,6 +215,20 @@
         return false;
     }
 
+    @Override
+    public List<InsProduct> getRevocationInsProductList(Integer orderId) {
+        InsOrder insOrder = insOrderMapper.selectById(orderId);
+        if(Objects.isNull(insOrder)){
+            throw new RuntimeException("鏈壘鍒拌璁㈠崟");
+        }
+        String revocationInsProductIds = insOrder.getRevocationInsProductIds();
+        List<Integer> ids = new ArrayList<>();
+        if(StringUtils.isNotBlank(revocationInsProductIds)){
+            ids = Arrays.asList(revocationInsProductIds.split(",")).stream().map(Integer::parseInt).collect(Collectors.toList());
+        }
+        return baseMapper.getRevocationInsProductList(ids);
+    }
+
 
 }
 

--
Gitblit v1.9.3