|  | @@ -21,8 +21,11 @@ public interface BaseNoticeMapper extends BaseMapper<BaseNotice> {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Select("select b.* from " +
 | 
	
		
			
				|  |  |              " base_notice b left join pm_audit_dept_ref r " +
 | 
	
		
			
				|  |  | -            " on b.demand_id = r.ref_id   " +
 | 
	
		
			
				|  |  | -            " where (#{userId} = 1  or  (r.dept_id = #{deptId} and  r.ref_type = 2) )    " +
 | 
	
		
			
				|  |  | +            " on b.demand_id = r.ref_id  " +
 | 
	
		
			
				|  |  | +            "  left join pm_demand p on  b.demand_id = p.demand_id " +
 | 
	
		
			
				|  |  | +            " where ( #{userId} = 1 " +
 | 
	
		
			
				|  |  | +            " or if(#{roleFlay},(r.dept_id = #{deptId} and  r.ref_type = 1), p.purchase_dept_id = #{deptId}  ) " +
 | 
	
		
			
				|  |  | +            " )" +
 | 
	
		
			
				|  |  |              " and (#{noticeName} is null  or   b.name like concat('%',#{noticeName},'%'))  " +
 | 
	
		
			
				|  |  |              " and (#{type} is null  or   b.type = #{type})  " +
 | 
	
		
			
				|  |  |              " and (#{startTime} is null  or   to_days(b.release_time) >= to_days(#{startTime}) ) " +
 |