From 22b57a30be7f73e13585ae4bd4925f0c66846ba9 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 11 六月 2026 14:52:57 +0800
Subject: [PATCH] feat(production): 优化工单查询接口按订单维度分组并新增订单明细查询
---
src/main/java/com/ruoyi/sales/service/impl/ShippingInfoServiceImpl.java | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/ruoyi/sales/service/impl/ShippingInfoServiceImpl.java b/src/main/java/com/ruoyi/sales/service/impl/ShippingInfoServiceImpl.java
index 8d16029..0a84bf9 100644
--- a/src/main/java/com/ruoyi/sales/service/impl/ShippingInfoServiceImpl.java
+++ b/src/main/java/com/ruoyi/sales/service/impl/ShippingInfoServiceImpl.java
@@ -26,6 +26,7 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@@ -89,10 +90,14 @@
}
@Override
+ @Transactional(rollbackFor = Exception.class)
public boolean delete(List<Long> ids) {
List<ShippingInfo> shippingInfos = shippingInfoMapper.selectList(new LambdaQueryWrapper<ShippingInfo>()
.in(ShippingInfo::getId, ids));
if (CollectionUtils.isEmpty(shippingInfos)) return false;
+ // 鍙湁寰呭鏍哥姸鎬佹墠鑳藉垹闄�
+ boolean allPending = shippingInfos.stream().allMatch(s -> "寰呭鏍�".equals(s.getStatus()));
+ if (!allPending) throw new RuntimeException("鍙湁寰呭鏍哥姸鎬佹墠鑳藉垹闄�");
// 鍒犻櫎闄勪欢
commonFileService.deleteByBusinessIds(ids, FileNameType.SHIP.getValue());
// 鍒犻櫎鍙戣揣瀹℃壒
--
Gitblit v1.9.3