提交 1d8cc48d authored 作者: 000516's avatar 000516

质检报告权限添加

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