From b37eac632faf7f26b6f947d8b6792db8828fba6f Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期三, 26 二月 2025 21:57:47 +0800
Subject: [PATCH] 工程管理

---
 business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java |   34 ++++++++++++++++++++++------------
 1 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java b/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
index a7fb97f..0e0dd79 100644
--- a/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
+++ b/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
@@ -323,6 +323,9 @@
         if (query.getProjectEndTime() != null) {
             query.setProjectEndTime(DateUtils.getDayEnd(query.getProjectEndTime()));
         }
+        if (YesOrNo.YES.getCode().equals(query.getCenter())) {
+            query.setProjectPhase("6");
+        }
         // 寮傚父椤圭洰鏆傛椂杩斿洖绌�
         if (YesOrNo.YES.getCode().equals(query.getExe())) {
             return Result.ok().data(new ArrayList<>()).total(0);
@@ -352,8 +355,8 @@
             ProjectInfoVO.transform(vo);
             ProjectVO projectVO = new ProjectVO();
             copyToProjectVO(vo, projectVO);
-            List<Long> departmentList = vo.getCompetentDepartmentList();
-            projectVO.setAuditRole(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || (!CollectionUtils.isEmpty(departmentList) && departmentList.contains(SecurityUtils.getDeptId())));
+            String competentDepartment = vo.getCompetentDepartment();
+            projectVO.setAuditRole(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || (StringUtils.isNotEmpty(competentDepartment) && competentDepartment.equals(SecurityUtils.getDeptId() + "")));
             // 缈昏瘧椤圭洰闃舵
             String phase = ProjectCategoryEnum.getPhaseByProjectStatus(projectVO.getProjectPhase());
             projectVO.setProjectPhase(phase);
@@ -393,8 +396,8 @@
         ProjectInfo entity = baseMapper.getById(id);
         Assert.notNull(entity, "璁板綍涓嶅瓨鍦�");
         ProjectInfoVO vo = ProjectInfoVO.getVoByEntity(entity, null);
-        List<Long> departmentList = vo.getCompetentDepartmentList();
-        vo.setAuditRole(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || (!CollectionUtils.isEmpty(departmentList) && departmentList.contains(SecurityUtils.getDeptId())));
+        String competentDepartment = vo.getCompetentDepartment();
+        vo.setAuditRole(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || (StringUtils.isNotEmpty(competentDepartment) && competentDepartment.equals(SecurityUtils.getDeptId() + "")));
         QueryWrapper<File> fileQueryWrapper = new QueryWrapper<>();
         fileQueryWrapper.eq("type", FileTypeEnum.PROJECT_INFO.getType());
         fileQueryWrapper.eq("bus_id", vo.getId());
@@ -464,15 +467,22 @@
                 finish.add(item);
             }
 
-            if (ImportanceTypeEnum.PROVINCIAL_KEY.getType().equals(item.getImportanceType())) {
-                province.add(item);
-            } else if (ImportanceTypeEnum.SUINING_KEY.getType().equals(item.getImportanceType())) {
-                city.add(item);
-            } else if (ImportanceTypeEnum.SHEHONG_KEY.getType().equals(item.getImportanceType())) {
-                county.add(item);
-            } else // if  (ImportanceTypeEnum.NORMAL.getType().equals(item.getImportanceType()))
-            {
+            if (StringUtils.isBlank(item.getImportanceType())) {
                 normal.add(item);
+                // 浣跨敤contains锛屽洜涓洪噸鐐瑰垎绫诲彲澶氶�夛紝浣跨敤,鍒嗗壊瀛樺偍鐨�
+            } else {
+                if (item.getImportanceType().contains(ImportanceTypeEnum.PROVINCIAL_KEY.getType())) {
+                    province.add(item);
+                }
+                if (item.getImportanceType().contains(ImportanceTypeEnum.SUINING_KEY.getType())) {
+                    city.add(item);
+                }
+                if (item.getImportanceType().contains(ImportanceTypeEnum.SHEHONG_KEY.getType())) {
+                    county.add(item);
+                }
+                if (item.getImportanceType().contains(ImportanceTypeEnum.NORMAL.getType())) {
+                    normal.add(item);
+                }
             }
         });
         //鍗曚綅鍏堥粯璁や负鍏�

--
Gitblit v1.8.0