From 27a90e70749f5a569eda2c225d7b319b3c2d77a5 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 15 十二月 2025 11:41:03 +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