提交 53173a42 authored 作者: 000516's avatar 000516

质检报告权限添加

上级 078d55d5
...@@ -6,6 +6,7 @@ package com.sfa.operation.controller.zzhao.query; ...@@ -6,6 +6,7 @@ package com.sfa.operation.controller.zzhao.query;
* @describe : * @describe :
*/ */
import com.sfa.common.core.constant.RoleConstants;
import com.sfa.common.core.enums.ECode; import com.sfa.common.core.enums.ECode;
import com.sfa.common.core.exception.CheckedException; import com.sfa.common.core.exception.CheckedException;
import com.sfa.common.core.web.domain.PageInfo; import com.sfa.common.core.web.domain.PageInfo;
...@@ -42,12 +43,12 @@ public class ZzProQualityQueryController { ...@@ -42,12 +43,12 @@ public class ZzProQualityQueryController {
if (CollectionUtils.isEmpty(roles)) { if (CollectionUtils.isEmpty(roles)) {
throw new CheckedException(ECode.ROLE_ERROR); throw new CheckedException(ECode.ROLE_ERROR);
} }
Optional<SysRole> first = roles.stream().filter(role -> "cpzjgc".equals(role.getRoleKey())).findFirst(); Optional<SysRole> first = roles.stream().filter(role -> RoleConstants.PRODUCT_QUALITY_CHECK.equals(role.getRoleKey())).findFirst();
if (first.isPresent()){ if (first.isPresent()){
SysRole sysRole = first.get(); SysRole sysRole = first.get();
String dataScope = sysRole.getDataScope(); String dataScope = sysRole.getDataScope();
// 判断数据范围 // 判断数据范围
if ("3".equals(dataScope)){ if (RoleConstants.DATA_SCOPE_DEPT.equals(dataScope)){
Long deptId = sysUser.getDeptId(); Long deptId = sysUser.getDeptId();
vo.setDeptId(deptId); vo.setDeptId(deptId);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论