|
@@ -125,11 +125,11 @@ public class PermissionAspect implements Interceptor {
|
|
|
if (null != user) {
|
|
|
organizationId = user.getUnitId();
|
|
|
if (null != dept) {
|
|
|
- if ("LSBM".equals(dept.getDataKey())) {
|
|
|
- scope = 3;
|
|
|
- } else {
|
|
|
- scope = dept.getScope();
|
|
|
- }
|
|
|
+// if ("LSBM".equals(dept.getDataKey())) {
|
|
|
+// scope = 3;
|
|
|
+// } else {
|
|
|
+ scope = dept.getScope();
|
|
|
+// }
|
|
|
}
|
|
|
List<PostUser> postUserList = getUserPostList(user.getId());
|
|
|
post = getSysPost(postUserList);
|
|
@@ -173,7 +173,7 @@ public class PermissionAspect implements Interceptor {
|
|
|
if (classNames == null) {
|
|
|
//扫描指定包路径下所有包含指定注解的类
|
|
|
Set<Class<?>> classSet = ClassUtil.scanPackageByAnnotation(packagePath, DataPermission.class);
|
|
|
- if (classSet == null && classSet.size() == 0) {
|
|
|
+ if (classSet == null || classSet.isEmpty()) {
|
|
|
classNames = new ArrayList<>();
|
|
|
} else {
|
|
|
//取得类全名
|
|
@@ -198,6 +198,12 @@ public class PermissionAspect implements Interceptor {
|
|
|
//方法是否含有DataPermission注解,如果含有注解则将数据结果过滤
|
|
|
if (method.isAnnotationPresent(DataPermission.class)) {
|
|
|
dataPermission = method.getAnnotation(DataPermission.class);
|
|
|
+ if ("selectEvaluationInfoList".equals(method.getName())) {
|
|
|
+ if (!user.getUnitName().contains("本部")) {
|
|
|
+ CacheContext.childCompanyId.put(user.getId(), user.getUnitId());
|
|
|
+ return invocation.proceed();
|
|
|
+ }
|
|
|
+ }
|
|
|
if (dataPermission != null) {
|
|
|
methodNames.put(newId + "-" + method.getName(), dataPermission.isPermission());
|
|
|
methodNames.put(newId + "-" + method.getName() + "type", dataPermission.type());
|
|
@@ -229,7 +235,7 @@ public class PermissionAspect implements Interceptor {
|
|
|
boolean bktype = null != methodNames.get(newId + "-" + newName + "bktype") ? methodNames.get(newId + "-" + newName + "bktype") : false;
|
|
|
|
|
|
|
|
|
- System.out.println("==========type=" + type + ";zbtype" + zbtype + ";bktype" + bktype);
|
|
|
+ System.out.println("==========type=" + type + ";zbtype=" + zbtype + ";bktype=" + bktype);
|
|
|
if (null != post && post.getKeyValue().equals("JCDW")) {
|
|
|
System.out.println("==========post.getKeyValue()=" + post.getKeyValue());
|
|
|
if (type) {
|
|
@@ -280,10 +286,6 @@ public class PermissionAspect implements Interceptor {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (scope.equals(DATA_SCOPE_CUSTOM)) {
|
|
|
- CacheContext.childCompanyId.put(user.getId(), user.getUnitId());
|
|
|
- return invocation.proceed();
|
|
|
- }
|
|
|
return invocation.proceed();
|
|
|
}
|
|
|
|
|
@@ -387,11 +389,11 @@ public class PermissionAspect implements Interceptor {
|
|
|
public DataDictionary getSysDept(MyuserResDTO user) {
|
|
|
if (user != null && CacheContext.ddSuperKeyMap.containsKey(DEPT_MARK)) {
|
|
|
if (!user.getUnitName().contains("本部")) {
|
|
|
- return CacheContext.ddMap.get("LSBM");
|
|
|
- }
|
|
|
+ return CacheContext.ddMap.get("61140");
|
|
|
+ }else {
|
|
|
Optional<DataDictionary> any = CacheContext.ddSuperKeyMap.get(DEPT_MARK).stream().filter(t -> t.getKeyName().equals(user.getDeptName())).findAny();
|
|
|
return any.isPresent() ? any.get() : CacheContext.ddMap.get("LSBM");//如果没有匹配上部门,赋予零时部门权限
|
|
|
- }
|
|
|
+ }}
|
|
|
return null;
|
|
|
}
|
|
|
|