From 03a3edee9ff27fa9bb4b32dcda08e279c7c094c8 Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期五, 28 十一月 2025 17:30:11 +0800
Subject: [PATCH] 功能修改

---
 multi-system/src/main/java/com/gkhy/exam/system/service/impl/CatalogueServiceImpl.java |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CatalogueServiceImpl.java b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CatalogueServiceImpl.java
index 8579fe1..8d6b0a7 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CatalogueServiceImpl.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CatalogueServiceImpl.java
@@ -16,6 +16,7 @@
 import com.gkhy.exam.system.mapper.ProductItemMapper;
 import com.gkhy.exam.system.mapper.SysCompanyMapper;
 import com.gkhy.exam.system.service.CatalogueService;
+import com.gkhy.exam.system.service.ProjectDocumentService;
 import com.gkhy.exam.system.service.SysCompanyService;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -38,6 +39,8 @@
     private CompanyIndustryTemplateMapper companyIndustryTemplateMapper;
     @Autowired
     private ProductItemMapper productItemMapper;
+    @Autowired
+    private ProjectDocumentService projectDocumentService;
 
     /**
      * 目录管理
@@ -262,6 +265,22 @@
         return CommonResult.success();
     }
 
+    @Override
+    public CommonResult selectCatalogueDocumentList(CatalogueReq catalogueReq) {
+        List<CatalogueVo> catalogueVos = catalogueMapper.selectCatalogueList(catalogueReq);
+        for (CatalogueVo catalogueVo : catalogueVos) {
+            List<ProjectDocument> projectDocuments = projectDocumentService.selectList(catalogueVo.getCompanyId(), catalogueReq.getItemId(), catalogueVo.getId(),catalogueReq.getType());
+            catalogueVo.setProjectDocuments(projectDocuments);
+        }
+
+        List<CatalogueVo> collect = catalogueVos.stream().filter(catalogueVo -> catalogueVo.getParentId() == 0).collect(Collectors.toList());
+        for (CatalogueVo catalogueVo : collect) {
+            List<CatalogueVo> getchildren = getchildren(catalogueVo, catalogueVos);
+            catalogueVo.setChildren(getchildren);
+        }
+        return CommonResult.success(collect);
+    }
+
     private void saveCatalogue(List<CatalogueVo> children,Catalogue catalogue) {
         for (CatalogueVo child : children) {
             Catalogue catalogue1 = new Catalogue();

--
Gitblit v1.9.2