From 9a9a5ffb923489fddfbad2af2ff91866bf433ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Fri, 13 Sep 2024 00:16:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/common/enums/SysRoleEnum.java | 7 ++++ .../com/ruoyi/common/utils/SecurityUtils.java | 8 +++++ .../QuartzProjectAttendanceDataMapper.xml | 6 ++-- .../QuartzProjectAttendanceUserMapper.xml | 4 +-- .../mapper/flowable/FlowBusinessKeyMapper.xml | 10 +++--- .../views/device/towerProjectConfig/index.vue | 23 ++++++++++--- .../src/views/project/materialSeal/index.vue | 12 +++---- .../projectMaterialSealDrawer.vue | 16 ++++----- .../web/controller/ProjectController.java | 33 ++++++++++++------- .../BaseWorkingCommitteeController.java | 2 +- .../SurProjectWorkingCommitteeController.java | 4 +-- .../mapper/project/ProjectViewMapper.xml | 2 +- 12 files changed, 84 insertions(+), 43 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/enums/SysRoleEnum.java b/ruoyi-common/src/main/java/com/ruoyi/common/enums/SysRoleEnum.java index 58ce878f..6899f32b 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/enums/SysRoleEnum.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/enums/SysRoleEnum.java @@ -1,5 +1,7 @@ package com.ruoyi.common.enums; +import com.ruoyi.common.core.text.Convert; + public enum SysRoleEnum { ADMIN("1", "admin"), @@ -28,6 +30,11 @@ public enum SysRoleEnum { return code; } + public Long getLongCode() + { + return Convert.toLong(code); + } + public String getInfo() { return info; diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/SecurityUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/SecurityUtils.java index 03b05693..a22ff2a6 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/SecurityUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/SecurityUtils.java @@ -146,6 +146,14 @@ public class SecurityUtils return userId != null && 1L == userId; } + /** + * 获取当前用户权限最大的角色 + * @return role + */ + public Long getUserFirstRole(){ + return getLoginUser().getUser().getRoles().stream().mapToLong(r->r.getRoleId()).min().getAsLong(); + } + public static boolean isUserB() { long roleId=getRoleId(); return 5==roleId || 6==roleId || 7==roleId || 99==roleId || 15==roleId || 16==roleId || 17==roleId; diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/QuartzProjectAttendanceDataMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/QuartzProjectAttendanceDataMapper.xml index e1303b4a..69f97d92 100644 --- a/ruoyi-quartz/src/main/resources/mapper/quartz/QuartzProjectAttendanceDataMapper.xml +++ b/ruoyi-quartz/src/main/resources/mapper/quartz/QuartzProjectAttendanceDataMapper.xml @@ -401,7 +401,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from sur_project_attendance_user u, sur_project_attendance_cfg c,view_sur_project_attendance_group g, sur_project sp where u.cfgid=c.id and u.companyId=g.companyId and u.state=#{id} and c.project_id = sp.id - and sp.isDel=0 and sp.progressVisible=0 + and sp.isDel=0 and g.companyTypeId in (0,1,2,3,4,5,6,8) and c.project_id=#{projectId} @@ -453,7 +453,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select * from vw_flow_comment where procInstId = #{procInstId} order by startTime DESC + select * from vw_flow_comment where procInstId = #{procInstId} order by startTime DESC, IF(ISNULL(endTime),0,1) @@ -518,7 +518,7 @@ left join sur_project sp on a.businesskey=sp.id where a.procDefKey='flow_fbzzsp_fbszzsp' AND (A.finishTime is null OR (A.finishTime is not null and A.taskComType =1)) - and sp.progressVisible=0 and sp.isDel=0 + and sp.isDel=0 and a.businessDeptId=#{deptId} and a.businessKey=#{projectId} @@ -531,6 +531,7 @@ group by d.dict_value,d.dict_label ) y on x.dict_value=y.dict_value + \ No newline at end of file diff --git a/ruoyi-ui/src/views/device/towerProjectConfig/index.vue b/ruoyi-ui/src/views/device/towerProjectConfig/index.vue index 4e065f84..decd4be8 100644 --- a/ruoyi-ui/src/views/device/towerProjectConfig/index.vue +++ b/ruoyi-ui/src/views/device/towerProjectConfig/index.vue @@ -24,6 +24,14 @@ @keyup.enter.native="handleQuery" /> + + + - - - + + + +