|  | @ -3401,19 +3401,20 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |      */
 |  |      */
 | 
												
													
														
															|  |     public Long getWaitVideoCount(String doctor,String type,String outpatient_type) {
 |  |     public Long getWaitVideoCount(String doctor,String type,String outpatient_type) {
 | 
												
													
														
															|  |         String sql ="SELECT " +
 |  |         String sql ="SELECT " +
 | 
												
													
														
															|  |                 "count(room.outpatient_id) AS total " +
 |  | 
 | 
												
													
														
															|  | 
 |  |                 "count(outpatient.id) AS total " +
 | 
												
													
														
															|  |                 "FROM " +
 |  |                 "FROM " +
 | 
												
													
														
															|  |                 "wlyy_outpatient outpatient," +
 |  |                 "wlyy_outpatient outpatient," +
 | 
												
													
														
															|  |                 "base_patient patient " +
 |  |                 "base_patient patient " +
 | 
												
													
														
															|  |                 "WHERE " +
 |  |                 "WHERE " +
 | 
												
													
														
															|  |                 "room.patient_id=patient.id " +
 |  | 
 | 
												
													
														
															|  |                 "AND room.outpatient_id=outpatient.id " +
 |  | 
 | 
												
													
														
															|  | 
 |  |                 "outpatient.patient=patient.id " +
 | 
												
													
														
															|  |                 "AND outpatient.status in (0,1) " +
 |  |                 "AND outpatient.status in (0,1) " +
 | 
												
													
														
															|  |                 "AND outpatient.doctor='"+doctor+"' " +
 |  |                 "AND outpatient.doctor='"+doctor+"' " +
 | 
												
													
														
															|  |                 "AND outpatient.register_date is not null AND  room.register_date >= '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' " +
 |  | 
 | 
												
													
														
															|  |                 "AND outpatient.outpatient_type= '"+outpatient_type+"' ";
 |  |                 "AND outpatient.outpatient_type= '"+outpatient_type+"' ";
 | 
												
													
														
															|  |         if("1".equals(outpatient_type)){
 |  | 
 | 
												
													
														
															|  | 
 |  |         if("1".equals(outpatient_type)){//复诊
 | 
												
													
														
															|  |             sql =  sql + " AND outpatient.type= '"+type+"' ";
 |  |             sql =  sql + " AND outpatient.type= '"+type+"' ";
 | 
												
													
														
															|  | 
 |  |             if("2".equals(type)){//视频复诊才需要判断时间,
 | 
												
													
														
															|  | 
 |  |                 sql =  sql + " AND outpatient.register_date is not null AND  outpatient.register_date >= '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' ";
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |     
 |  |     
 | 
												
													
														
															|  |         List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(sql);
 |  |         List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(sql);
 |