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" /> + + + - - - + + + +