| 
					
				 | 
			
			
				@ -1755,12 +1755,12 @@ public class ImService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"op.general_doctor as \"generalDoctor\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"op.icd10_name as \"icd10Name\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"d.photo AS \"patientphoto\" " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"FROM wlyy_consult a," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"wlyy_consult_team b," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"base_patient d, " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"wlyy_outpatient op " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"FROM wlyy_consult_team b," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"base_patient d," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"wlyy_consult a   " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"left join wlyy_outpatient op on  a.relation_code = op.id " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"WHERE a.id=b.consult " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"AND b.patient=d.id AND b.doctor='"+doctor+"' AND a.relation_code = op.id "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"AND b.patient=d.id AND b.doctor='"+doctor+"' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1827,12 +1827,12 @@ public class ImService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						String  sql = "SELECT " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								" COUNT(1) AS \"total\" " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								"FROM wlyy_consult a," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								"wlyy_consult_team b," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								"FROM wlyy_consult_team b," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								"base_patient d," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								"wlyy_outpatient op " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								"wlyy_consult a  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								"left join wlyy_outpatient op on  a.relation_code = op.id " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								"WHERE a.id=b.consult " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								"AND b.patient=d.id AND b.doctor='"+doctor+"' AND a.relation_code = op.id  "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								"AND b.patient=d.id AND b.doctor='"+doctor+"'   "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						List<ConsultVO> result = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						if(!StringUtils.isEmpty(title)){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -2467,6 +2467,7 @@ public class ImService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
						if("9".equals(type) || "16".equals(type)|| "12".equals(type)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
							sql = "SELECT " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"op.description AS \"title\","+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"op.description AS \"title\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"op.description AS \"symptoms\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									"op.create_time AS \"czrq\"," + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -2497,11 +2498,19 @@ public class ImService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
							}else if("16".equals(type)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								//视频复诊 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								sql =sql +"AND op.type=2 AND op.outpatient_type=1 "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								sql =sql + " AND  op.register_date >= '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								if("xm_ykyy_wx".equals(wxId)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									sql +=" and op.register_date >= to_date('"+DateUtil.dateToStrShort(new Date())+" 00:00:00','YYYY-MM-DD HH24:MI:SS')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								}else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									sql +=" AND  op.register_date >= '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
							}else if("12".equals(type)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								//视频复诊 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								sql =sql +"AND op.outpatient_type=2"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								sql =sql + " AND  op.register_date >= '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								if("xm_ykyy_wx".equals(wxId)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									sql +=" and op.register_date >= to_date('"+DateUtil.dateToStrShort(new Date())+" 00:00:00','YYYY-MM-DD HH24:MI:SS')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								}else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
									sql +=" AND  op.register_date >= '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
								} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
							}else{} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
							sql =sql +" ORDER BY op.create_time DESC"; 
			 |