|  | @ -2389,7 +2389,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |                 "WHERE " +
 | 
	
		
			
				|  |  |                 "room.patient_id=patient.id " +
 | 
	
		
			
				|  |  |                 "AND room.outpatient_id=outpatient.id " +
 | 
	
		
			
				|  |  |                 "AND outpatient.dept='"+dept+"' "+
 | 
	
		
			
				|  |  |                 "AND outpatient.status = 0 ";
 | 
	
		
			
				|  |  |         //视频复诊,协同门诊 医生抢单
 | 
	
		
			
				|  |  |         if(type == 2 ){
 | 
	
	
		
			
				|  | @ -2407,10 +2406,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |         
 | 
	
		
			
				|  |  |         //协同门诊
 | 
	
		
			
				|  |  |         if(3 == type){
 | 
	
		
			
				|  |  |             sql += "AND room.reservation_type=2 ";
 | 
	
		
			
				|  |  |             sql += " AND room.reservation_type=2 ";
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             //在线复诊
 | 
	
		
			
				|  |  |             sql += "AND room.reservation_type=1 AND room.consult_type="+type ;
 | 
	
		
			
				|  |  |             sql += " AND room.reservation_type=1 AND room.consult_type="+type ;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         
 | 
	
		
			
				|  |  |         if(StringUtils.isNoneBlank(dept)){
 | 
	
		
			
				|  |  |             sql += " AND outpatient.dept='"+dept+"' ";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         
 | 
	
		
			
				|  |  |         
 |