| 
					
				 | 
			
			
				@@ -12,11 +12,15 @@ public interface QualityVerificationDao extends BaseMapper<FrontsheetQualityVeri 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Select("select user_code from dj_user_role where role_id=66") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     List<String> selectAuditors(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Select("select distinct pat_no,times,pat_name,pat_gender,doctor_code,doctor_name, " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "max(application_time) as applicationTime from t_frontsheet_quality_verification " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Select("select * from ( " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "select distinct pat_no,times,pat_name,pat_gender,doctor_code,doctor_name, " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "max(application_time) as applicationTime, " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "approved=(select count(1) from t_frontsheet_quality_verification d where d.pat_no=a.pat_no and d.times=a.times and d.audit_state='APPROVED') " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "from t_frontsheet_quality_verification a " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "where audit_state='REJECTED' and application_time>=#{start} and application_time<=#{end} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "${statement} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "group by pat_no, times, pat_name, pat_gender, doctor_code, doctor_name") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "group by pat_no, times, pat_name, pat_gender, doctor_code, doctor_name" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ") t where t.approved=0") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     List<FrontsheetQualityVerification> selectRejectedRecords(String start, String end, String statement); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |