From 97f4a9b9621eca21da79df727121f5fac12cc42a Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期一, 22 一月 2024 10:01:41 +0800
Subject: [PATCH] app单兵端发起查看指挥端位置及车辆位置提交
---
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java
index 74ce1bd..87bcc07 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java
@@ -107,10 +107,10 @@
role.getRoleId()));
} else if (DATA_SCOPE_DEPT.equals(dataScope)) {
sqlString.append(StringUtils.format(" OR {}.dept_id = {} ", deptAlias, user.getDeptId()));
- } else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope)) {//" OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or '{}'= any(string_to_array(ancestors,',') ))",
+ } else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope)) {
sqlString.append(StringUtils.format(
- " OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE CAST ( {} AS VARCHAR ) = ANY ( string_to_array( ancestors, ',' )))",
- deptAlias, user.getDeptId()));
+ " OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or CAST ( {} AS VARCHAR ) = ANY ( string_to_array( ancestors, ',' )))",
+ deptAlias, user.getDeptId(),user.getDeptId()));
} else if (DATA_SCOPE_SELF.equals(dataScope)) {
if (StringUtils.isNotBlank(userAlias)) {
sqlString.append(StringUtils.format(" OR {}.user_id = '{}' ", userAlias, user.getUserId()));
--
Gitblit v1.9.3