From 686bd303ddc68db338fe352c38392194217168a5 Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期二, 11 三月 2025 15:27:59 +0800
Subject: [PATCH] 修改业务逻辑增加项目编码

---
 expert-system/src/main/java/com/gkhy/system/service/impl/ProjectManagementServiceImpl.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/expert-system/src/main/java/com/gkhy/system/service/impl/ProjectManagementServiceImpl.java b/expert-system/src/main/java/com/gkhy/system/service/impl/ProjectManagementServiceImpl.java
index f404659..0cc440c 100644
--- a/expert-system/src/main/java/com/gkhy/system/service/impl/ProjectManagementServiceImpl.java
+++ b/expert-system/src/main/java/com/gkhy/system/service/impl/ProjectManagementServiceImpl.java
@@ -8,6 +8,7 @@
 import com.gkhy.common.utils.DateUtils;
 import com.gkhy.common.utils.SecurityUtils;
 import com.gkhy.common.utils.StringUtils;
+import com.gkhy.common.utils.uuid.RandomStringGenerator;
 import com.gkhy.system.domain.*;
 import com.gkhy.system.domain.vo.request.*;
 import com.gkhy.system.domain.vo.response.*;
@@ -65,7 +66,7 @@
      */
     @Override
     public List<ProjectManagement> selectProjectManagementList(ProjectManagement projectManagement) {
-        if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())){
+        if (!SecurityUtils.isAdmin(SecurityUtils.getUserId()) && SecurityUtils.getUserId() != 130L){
            projectManagement.setDeptId(SecurityUtils.getDeptId());
         }
         return projectManagementMapper.selectProjectManagementList(projectManagement);
@@ -93,6 +94,7 @@
            // projectManagementMapper.updateProjectManagement(projectManagementSave);
             updateById(projectManagementSave);
         }else {
+            projectManagementSave.setProjectCode(RandomStringGenerator.generateRandomString(10));
             projectManagementSave.setStep(1L);
             projectManagementSave.setCreateBy(SecurityUtils.getUsername());
             projectManagementSave.setCreateTime(DateUtils.getNowDate());

--
Gitblit v1.9.2