|  |  | @ -161,23 +161,27 @@ public class AccessServiceImpl implements AccessService { | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         if (switchScopes.contains(OperationScopeConstant.SCOPE_IN_GRID)) { | 
			
		
	
		
			
				
					|  |  |  |             if (CollectionUtils.isEmpty(gridIds)) { | 
			
		
	
		
			
				
					|  |  |  |             if (gridIds == null) { | 
			
		
	
		
			
				
					|  |  |  |                 String error = String.format("DataFilter:拼接SQL语句出错:需要in grid权限,但是代码中没有获取到gridIds"); | 
			
		
	
		
			
				
					|  |  |  |                 logger.error(error); | 
			
		
	
		
			
				
					|  |  |  |                 throw new RenException(error); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |             if (gridIds.size() != 0) { | 
			
		
	
		
			
				
					|  |  |  |                 genInGrid(sb, gridIds, tableAlias); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         if (switchScopes.contains(OperationScopeConstant.SCOPE_IN_DEPARTMENT)) { | 
			
		
	
		
			
				
					|  |  |  |             if (CollectionUtils.isEmpty(departmentIds)) { | 
			
		
	
		
			
				
					|  |  |  |             if (departmentIds == null) { | 
			
		
	
		
			
				
					|  |  |  |                 String error = String.format("DataFilter:拼接SQL语句出错:需要in department权限,但是代码中没有获取到, departmentIds"); | 
			
		
	
		
			
				
					|  |  |  |                 logger.error(error); | 
			
		
	
		
			
				
					|  |  |  |                 throw new RenException(error); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |             if (departmentIds.size() != 0) { | 
			
		
	
		
			
				
					|  |  |  |                 genDepartmentFilterSql(sb, departmentIds, tableAlias); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |      * sql:我发起的 | 
			
		
	
	
		
			
				
					|  |  | @ -221,6 +225,21 @@ public class AccessServiceImpl implements AccessService { | 
			
		
	
		
			
				
					|  |  |  |         hasConditions.set(true); | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |      * sql语句拼接FALSE | 
			
		
	
		
			
				
					|  |  |  |      * @param sb | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     private void genFalseCondition(StringBuilder sb) { | 
			
		
	
		
			
				
					|  |  |  |         if (hasConditions.get()) { | 
			
		
	
		
			
				
					|  |  |  |             // 之前没有条件
 | 
			
		
	
		
			
				
					|  |  |  |             sb.append(" OR "); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         sb.append(" FALSE "); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         hasConditions.set(true); | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |      * 生成部门过滤sql | 
			
		
	
		
			
				
					|  |  |  |      * | 
			
		
	
	
		
			
				
					|  |  | 
 |