Browse Source

【漳州万利达MES】[导航栏搜索方法调整,不可以查到浏览权限为0的导航]

caosy 5 years ago
parent
commit
fd739c091e
1 changed files with 11 additions and 12 deletions
  1. 11 12
      src/com/uas/mes/common/dao/impl/SysnavigationDaoImpl.java

+ 11 - 12
src/com/uas/mes/common/dao/impl/SysnavigationDaoImpl.java

@@ -1,15 +1,5 @@
 package com.uas.mes.common.dao.impl;
 
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.springframework.cache.annotation.Cacheable;
-import org.springframework.dao.EmptyResultDataAccessException;
-import org.springframework.jdbc.core.BeanPropertyRowMapper;
-import org.springframework.stereotype.Repository;
-
 import com.uas.mes.common.dao.SysnavigationDao;
 import com.uas.mes.common.data.BaseDao;
 import com.uas.mes.common.data.JSONTree;
@@ -17,6 +7,15 @@ import com.uas.mes.common.entity.Employee;
 import com.uas.mes.common.entity.EmpsJobs;
 import com.uas.mes.common.entity.SysNavigation;
 import com.uas.mes.common.support.SystemSession;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.dao.EmptyResultDataAccessException;
+import org.springframework.jdbc.core.BeanPropertyRowMapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
 
 @Repository("sysnavigationDao")
 public class SysnavigationDaoImpl extends BaseDao implements SysnavigationDao {
@@ -120,9 +119,9 @@ public class SysnavigationDaoImpl extends BaseDao implements SysnavigationDao {
 				where = "sn_using=1 and case when sn_isleaf='T' then nvl(sn_url,' ') else 'T' end <> ' '";
 			}
 			if (!"admin".equals(employee.getEm_type())) {
-				where += " and (case when sn_isleaf='T' then nvl(sn_caller,' ') else 'T' end = ' ' or case when sn_isleaf='F' then to_char(sn_id) else sn_caller end in(select distinct pp_caller from positionpower where pp_joid=";
+				where += " and (case when sn_isleaf='T' then nvl(sn_caller,' ') else 'T' end = ' ' or case when sn_isleaf='F' then to_char(sn_id) else sn_caller end in(select distinct pp_caller from positionpower where pp_see <> 0 and pp_joid=";
 				where += employee.getEm_defaulthsid() + ")";
-				where += " or case when sn_isleaf='F' then to_char(sn_id) else sn_caller end in(select distinct pp_caller from personalpower where pp_emid=";
+				where += " or case when sn_isleaf='F' then to_char(sn_id) else sn_caller end in(select distinct pp_caller from personalpower where pp_see <> 0 and pp_emid=";
 				where += employee.getEm_id() + "))";
 			}
 			if (search.contains("&&")) {