|  | @ -2220,26 +2220,60 @@ public class ImService {
 | 
	
		
			
				|  |  | 	 * @return
 | 
	
		
			
				|  |  | 	 */
 | 
	
		
			
				|  |  | 	public List<ConsultVO> doctorUpcomingList(String doctorCode, String type) {
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		String  sql = "SELECT " +
 | 
	
		
			
				|  |  | 				"a.id AS id," +
 | 
	
		
			
				|  |  | 				"a.type AS type," +
 | 
	
		
			
				|  |  | 				"a.title AS title," +
 | 
	
		
			
				|  |  | 				"a.symptoms AS symptoms," +
 | 
	
		
			
				|  |  | 				"a.czrq AS czrq," +
 | 
	
		
			
				|  |  | 				"b.status AS status," +
 | 
	
		
			
				|  |  | 				"b.evaluate AS evaluate," +
 | 
	
		
			
				|  |  | 				"d.name AS patientName," +
 | 
	
		
			
				|  |  | 				"d.id as patientId," +
 | 
	
		
			
				|  |  | 				"d.idcard as patientIdcard," +
 | 
	
		
			
				|  |  | 				"d.sex as patientsex," +
 | 
	
		
			
				|  |  | 				"d.photo AS patientphoto " +
 | 
	
		
			
				|  |  | 				"FROM wlyy_consult a," +
 | 
	
		
			
				|  |  | 				"wlyy_consult_team b," +
 | 
	
		
			
				|  |  | 				"base_patient d  " +
 | 
	
		
			
				|  |  | 				"WHERE a.id=b.consult " +
 | 
	
		
			
				|  |  | 				"AND b.patient=d.id AND b.doctor='"+doctorCode+"' AND b.type in ("+type+") and b.status = 0  " +
 | 
	
		
			
				|  |  | 				"ORDER BY a.czrq desc ";
 | 
	
		
			
				|  |  | 		String sql = "";
 | 
	
		
			
				|  |  | 		if("1,15".equals(type)) {
 | 
	
		
			
				|  |  | 			sql = "SELECT " +
 | 
	
		
			
				|  |  | 					"a.id AS id," +
 | 
	
		
			
				|  |  | 					"a.type AS type," +
 | 
	
		
			
				|  |  | 					"a.title AS title," +
 | 
	
		
			
				|  |  | 					"a.symptoms AS symptoms," +
 | 
	
		
			
				|  |  | 					"a.czrq AS czrq," +
 | 
	
		
			
				|  |  | 					"b.status AS status," +
 | 
	
		
			
				|  |  | 					"b.evaluate AS evaluate," +
 | 
	
		
			
				|  |  | 					"b.doctor AS doctorCode," +
 | 
	
		
			
				|  |  | 					"b.actual_sender AS generalDoctor," +
 | 
	
		
			
				|  |  | 					"d.name AS patientName," +
 | 
	
		
			
				|  |  | 					"d.id as patientId," +
 | 
	
		
			
				|  |  | 					"d.idcard as patientIdcard," +
 | 
	
		
			
				|  |  | 					"d.sex as patientsex," +
 | 
	
		
			
				|  |  | 					"d.photo AS patientphoto " +
 | 
	
		
			
				|  |  | 					"FROM wlyy_consult a," +
 | 
	
		
			
				|  |  | 					"wlyy_consult_team b," +
 | 
	
		
			
				|  |  | 					"base_patient d  " +
 | 
	
		
			
				|  |  | 					"WHERE a.id=b.consult " +
 | 
	
		
			
				|  |  | 					"AND b.patient=d.id AND b.doctor='" + doctorCode + "' AND b.type in (" + type + ") and b.status = 0  " +
 | 
	
		
			
				|  |  | 					"ORDER BY a.czrq desc ";
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 		if("9".equals(type) || "16".equals(type)|| "12".equals(type)){
 | 
	
		
			
				|  |  | 			sql = "SELECT " +
 | 
	
		
			
				|  |  | 					"op.description AS title," +
 | 
	
		
			
				|  |  | 					"op.description AS symptoms," +
 | 
	
		
			
				|  |  | 					"op.create_time AS czrq," +
 | 
	
		
			
				|  |  | 					"op.status AS status," +
 | 
	
		
			
				|  |  | 					"op.evaluate_status AS evaluate," +
 | 
	
		
			
				|  |  | 					"op.doctor AS doctorCode," +
 | 
	
		
			
				|  |  | 					"op.general_doctor AS generalDoctor," +
 | 
	
		
			
				|  |  | 					"patient.NAME AS patientName," +
 | 
	
		
			
				|  |  | 					"patient.id AS patientId," +
 | 
	
		
			
				|  |  | 					"patient.idcard AS patientIdcard," +
 | 
	
		
			
				|  |  | 					"patient.sex AS patientsex," +
 | 
	
		
			
				|  |  | 					"patient.photo AS patientphoto," +
 | 
	
		
			
				|  |  | 					"op.id AS outpatientid," +
 | 
	
		
			
				|  |  | 					"op.register_date AS registerDate," +
 | 
	
		
			
				|  |  | 					"op.status AS outpatientstatus " +
 | 
	
		
			
				|  |  | 					"FROM wlyy_outpatient op," +
 | 
	
		
			
				|  |  | 					"base_patient patient " +
 | 
	
		
			
				|  |  | 					"WHERE op.patient=patient.id " +
 | 
	
		
			
				|  |  | 					"AND op.doctor='"+doctorCode+"' " +
 | 
	
		
			
				|  |  | 					"AND op.status in ('0','1') ";
 | 
	
		
			
				|  |  | 			if("9".equals(type)){//图文复诊
 | 
	
		
			
				|  |  | 				sql =sql +"AND op.type=1 ";
 | 
	
		
			
				|  |  | 			}else if("16".equals(type)){
 | 
	
		
			
				|  |  | 				//视频复诊
 | 
	
		
			
				|  |  | 				sql =sql +"AND op.type=2 ";
 | 
	
		
			
				|  |  | 			}else{}
 | 
	
		
			
				|  |  | 			sql =sql +"ORDER BY op.create_time DESC";
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		List<ConsultVO> result = new ArrayList<>();
 | 
	
		
			
				|  |  | 		result = jdbcTemplate.query(sql, new BeanPropertyRowMapper(ConsultVO.class));
 |