From 2dd645b5346f510d1207346347f1fa70a204d9d3 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 05 十一月 2026 16:11:34 +0800
Subject: [PATCH] 1. 完成项目管理全流程优化,补充阶段推进、汇报统计及生命周期记录。 2. 完成业务与项目数据关联,支持查看项目进度、详情及相关附件。 3. 完成采购审批流程接入,支持配置审批人员及采购业务审批。 4. 精简用户、角色、部门、菜单和字典,完善操作日志及附件下载。

---
 src/main/java/com/ruoyi/projectManagement/service/impl/InfoServiceImpl.java |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/ruoyi/projectManagement/service/impl/InfoServiceImpl.java b/src/main/java/com/ruoyi/projectManagement/service/impl/InfoServiceImpl.java
index 8bcfc2b..4ce6009 100644
--- a/src/main/java/com/ruoyi/projectManagement/service/impl/InfoServiceImpl.java
+++ b/src/main/java/com/ruoyi/projectManagement/service/impl/InfoServiceImpl.java
@@ -4,6 +4,7 @@
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.common.enums.IsDeleteEnum;
 import com.ruoyi.common.enums.SaleEnum;
+import com.ruoyi.common.exception.ServiceException;
 import com.ruoyi.projectManagement.dto.ContractInfoDto;
 import com.ruoyi.projectManagement.dto.SaveInfoDto;
 import com.ruoyi.projectManagement.dto.ShippingAddressDto;
@@ -24,6 +25,7 @@
 import lombok.SneakyThrows;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.Assert;
 
 import java.util.List;
 import java.util.concurrent.CompletableFuture;
@@ -81,9 +83,17 @@
     @Override
     @Transactional
     public void deleteInfo(Long id) {
+        Info current = infoMapper.selectById(id);
+        if (current == null || Integer.valueOf(IsDeleteEnum.DELETED.getCode()).equals(current.getIsDelete())) {
+            throw new ServiceException("椤圭洰涓嶅瓨鍦�");
+        }
+        if (!"鏈紑濮�".equals(current.getCurrentPhase())) {
+            throw new ServiceException("椤圭洰宸插紑濮嬶紝涓嶈兘鍒犻櫎");
+        }
         LambdaUpdateWrapper<Info> updateWrapper = new LambdaUpdateWrapper<Info>();
         updateWrapper.eq(Info::getId, id);
         updateWrapper.set(Info::getIsDelete, IsDeleteEnum.DELETED.getCode());
+        infoMapper.update(null, updateWrapper);
 
         // 瀵瑰簲闄勮〃淇℃伅鏄惁鍒犻櫎寰呯‘瀹氾紙鍥犱负鍚庣画鍙兘浼氳繘琛屽紩鐢ㄦ墍浠ュ厛涓嶅垹闄�
     }
@@ -103,15 +113,15 @@
         CompletableFuture<SaveInfoDto> infoFuture = CompletableFuture.supplyAsync(() -> infoHandleService.getInfoById(id));
         CompletableFuture<ContractInfoDto> contractFuture = CompletableFuture.supplyAsync(() -> contractInfoHandleService.getByInfoId(id));
         CompletableFuture<ShippingAddressDto> shippingFuture = CompletableFuture.supplyAsync(() -> shippingAddressHandleService.getByInfoId(id));
+        // 鍟嗗搧
         CompletableFuture<List<SalesLedgerProduct>> listCompletableFuture = CompletableFuture.supplyAsync(() -> salesLedgerService.getSalesLedgerProductListByRelateId(id,SaleEnum.MANAGEMENT));
 
         // 涓嬬骇椤圭洰淇℃伅
         CompletableFuture<List<SaveInfoDto>> subordinateInfoListFuture = CompletableFuture.supplyAsync(() -> infoHandleService.getSubordinateInfo(id));
 
-        // 鍟嗗搧
 
         // 绛夊緟鎵�鏈夊紓姝ュ畬鎴�
-        CompletableFuture.allOf(infoFuture, contractFuture, shippingFuture).join();
+        CompletableFuture.allOf(infoFuture, contractFuture, shippingFuture,listCompletableFuture,subordinateInfoListFuture).join();
 
         SaveInfoDto info = infoFuture.get();
         ContractInfoDto contract = contractFuture.get();

--
Gitblit v1.9.3