From 97cd53a574602b3eb4320a6e63105f604eb03f85 Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: 星期三, 17 十二月 2025 09:02:12 +0800
Subject: [PATCH] 修改新增

---
 multi-system/src/main/java/com/gkhy/exam/system/service/impl/CatalogueServiceImpl.java |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 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..fa6ab6a 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,7 +16,10 @@
 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.ProcessInspectionService;
+import com.gkhy.exam.system.service.ProjectDocumentService;
 import com.gkhy.exam.system.service.SysCompanyService;
+import org.apache.poi.ss.formula.functions.T;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -24,7 +27,9 @@
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 
 @Service
@@ -38,6 +43,11 @@
     private CompanyIndustryTemplateMapper companyIndustryTemplateMapper;
     @Autowired
     private ProductItemMapper productItemMapper;
+    @Autowired
+    private ProjectDocumentService projectDocumentService;
+
+    @Autowired
+    private ProcessInspectionService processInspectionService;
 
     /**
      * 目录管理
@@ -262,6 +272,39 @@
         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);
+    }
+
+    @Override
+    public CommonResult selectCatalogueDocumentListAll(CatalogueReq catalogueReq) {
+        Map<String, Object> parm = new HashMap<>();
+        parm.put("company_id",catalogueReq.getCompanyId());
+        parm.put("item_id",catalogueReq.getItemId());
+        parm.put("del_flag",1);
+        List<ProjectDocument> projectDocuments = projectDocumentService.listByMap(parm);
+        parm.put("del_flag",0);
+        List<ProcessInspection> processInspections = processInspectionService.listByMap(parm);
+
+        Map<String, Object> resultMap = new HashMap<>();
+        resultMap.put("paojectDocuments",projectDocuments);
+        resultMap.put("processInspections",processInspections);
+
+        return CommonResult.success(resultMap);
+    }
+
     private void saveCatalogue(List<CatalogueVo> children,Catalogue catalogue) {
         for (CatalogueVo child : children) {
             Catalogue catalogue1 = new Catalogue();

--
Gitblit v1.9.2