|  | @@ -15,11 +15,14 @@ public interface SheetCreatedDao extends BaseMapper<CaseFrontsheetDisdiag> {
 | 
	
		
			
				|  |  |      @Select("select role_id from dj_user_role with(nolock) where user_code=#{code}")
 | 
	
		
			
				|  |  |      List<Integer> selectUserRoles(@Param("code") String code);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    @Select("SELECT DISTINCT " +
 | 
	
		
			
				|  |  | -            "name=(SELECT rtrim(name) FROM zd_unit_code WHERE code=a.dept), " +
 | 
	
		
			
				|  |  | -            "code=rtrim(a.dept) FROM zd_dept_all a, a_employee_mi b " +
 | 
	
		
			
				|  |  | -            "WHERE b.code= #{code} " +
 | 
	
		
			
				|  |  | -            "AND (b.dept_code=a.small_dept or b.dept_code=a.dept)")
 | 
	
		
			
				|  |  | +    @Select("select distinct " +
 | 
	
		
			
				|  |  | +            "name=(select rtrim(name) FROM zd_unit_code WHERE code=a.dept), " +
 | 
	
		
			
				|  |  | +            "code=rtrim(a.dept) from zd_dept_all a, a_employee_mi b " +
 | 
	
		
			
				|  |  | +            "where b.code= #{code} " +
 | 
	
		
			
				|  |  | +            "and (b.dept_code=a.small_dept or b.dept_code=a.dept) " +
 | 
	
		
			
				|  |  | +            "union " +
 | 
	
		
			
				|  |  | +            "select name=(select rtrim(d.name) from zd_unit_code d where d.code=dept_code), " +
 | 
	
		
			
				|  |  | +            "dept_code as code from zy_part_time_dept where code=#{code} and dept_code like '8%'")
 | 
	
		
			
				|  |  |      List<CodeName> getUserWards(@Param("code") String code);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Select("select rtrim(dept_code) code, rtrim(dept_name) name from zy_adtward with(nolock) " +
 |