From 4cd516ce7b518561769e6af1791b6285a6b224a3 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期二, 11 二月 2025 14:01:23 +0800
Subject: [PATCH] 审核按钮直接通过主管部门控制

---
 business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java    |    2 ++
 business/src/main/java/com/ycl/service/impl/ProjectProcessServiceImpl.java |    4 +++-
 business/src/main/java/com/ycl/domain/vo/ProjectInfoVO.java                |    1 +
 3 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/business/src/main/java/com/ycl/domain/vo/ProjectInfoVO.java b/business/src/main/java/com/ycl/domain/vo/ProjectInfoVO.java
index dd484b4..b38f0b9 100644
--- a/business/src/main/java/com/ycl/domain/vo/ProjectInfoVO.java
+++ b/business/src/main/java/com/ycl/domain/vo/ProjectInfoVO.java
@@ -169,6 +169,7 @@
     private ProjectInvestmentFundingVO projectInvestmentFunding;
     private ProjectUnitRegistrationInfoVO projectUnitRegistrationInfo;
     private ProjectInvestmentPolicyComplianceVO projectInvestmentPolicyCompliance;
+    private Boolean auditRole;
 
     public static ProjectInfoVO getVoByEntity(@NonNull ProjectInfo entity, ProjectInfoVO vo) {
         if(vo == null) {
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 2eb6d63..4ca12a3 100644
--- a/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
+++ b/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
@@ -290,6 +290,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())));
         QueryWrapper<File> fileQueryWrapper = new QueryWrapper<>();
         fileQueryWrapper.eq("type", FileTypeEnum.PROJECT_INFO.getType());
         fileQueryWrapper.eq("bus_id", vo.getId());
diff --git a/business/src/main/java/com/ycl/service/impl/ProjectProcessServiceImpl.java b/business/src/main/java/com/ycl/service/impl/ProjectProcessServiceImpl.java
index dc66f44..6a3e6b7 100644
--- a/business/src/main/java/com/ycl/service/impl/ProjectProcessServiceImpl.java
+++ b/business/src/main/java/com/ycl/service/impl/ProjectProcessServiceImpl.java
@@ -146,6 +146,7 @@
                 .set(ProjectProcess::getProcessDefId, form.getProcessDefId())
                 .set(ProjectProcess::getProcessInsId, processInsId)
                 .update();
+
         return Result.ok("娴佺▼鍙樻洿鎴愬姛");
     }
 
@@ -188,7 +189,8 @@
         SysUser sysUser = SecurityUtils.getLoginUser().getUser();
         identityService.setAuthenticatedUserId(sysUser.getUserId().toString());
         variables.put(ProcessConstants.PROCESS_INITIATOR, sysUser.getUserId());
-
+        //娴嬭瘯瀹圭己
+        variables.put("miss",true);
         // 灏嗚椤圭洰鐨勭敵璇蜂汉锛堜笟涓绘柟锛変綔涓烘祦绋嬩腑鏌愪簺鐜妭鐨勫鐞嗕汉
         variables.put(ProcessConstants.DATA_LAUNCH, project.getCreateBy());
         ProcessInstance processInstance = runtimeService.startProcessInstanceById(processDefId, projectId + "", variables);

--
Gitblit v1.8.0