| 
					
				 | 
			
			
				@ -11182,11 +11182,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param medicare 社保卡 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param createTime 创建时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param appointmentTime 预约时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param appointmentTimeStart 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param appointmentTimeEnd 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param page 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param pageSize 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param size 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop getNatAppointmentList(String realOrder, String name, String hospitalFlag, String mobile, String idcard, String payStatus, String medicare, String createTime, String appointmentTime, Integer page, Integer pageSize) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop getNatAppointmentList(String realOrder, String name, String hospitalFlag, String mobile, String idcard, String payStatus, String medicare, String createTimeStart, String createTimeEnd, String appointmentTimeStart, String appointmentTimeEnd, Integer isSuccess, Integer page, Integer pageSize) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = "select t.name as \"name\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "t.card_no as \"cardNo\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "t.card_type as \"cardType\"," + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -11206,7 +11209,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "t.appointment_time as \"appointmentTime\" " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " from base_nat_appointment t where 1=1 "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNotBlank(realOrder)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += " and t.real_order = '" + realOrder + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += " and t.real_order like '%" + realOrder + "%' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNotBlank(name)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += " and t.name like '%" + name + "%'"; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -11225,23 +11228,42 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNotBlank(medicare)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += " and t.medicare like '%" + medicare + "%' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNotBlank(appointmentTime)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNotBlank(hospitalFlag)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += " and t.hospital_flag ='" + hospitalFlag + "' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(isSuccess != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += " and t.is_success = " + isSuccess ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNotBlank(appointmentTimeStart)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql += " and t.appointment_time >= to_date('" + appointmentTimeStart + " 00:00:00', 'yyyy-mm-dd hh24:mi:ss')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                sql += " and t.appointment_time <= to_date('" + appointmentTime + " 23:59:59', 'yyyy-mm-dd hh24:mi:ss')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql += " and t.appointment_time >='" + appointmentTimeStart + " 00:00:00'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                sql += " and t.appointment_time <='" + appointmentTime + " 23:59:59'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNotBlank(appointmentTimeEnd)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql += " and t.appointment_time <= to_date('" + appointmentTimeEnd + " 23:59:59', 'yyyy-mm-dd hh24:mi:ss')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql += " and t.appointment_time <='" + appointmentTimeEnd + " 23:59:59' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNotBlank(createTimeStart)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql += " and t.appointment_time >= to_date('" + appointmentTime + " 00:00:00', 'yyyy-mm-dd hh24:mi:ss')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql += " and t.appointment_time <= to_date('" + appointmentTime + " 23:59:59', 'yyyy-mm-dd hh24:mi:ss')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql += " and t.create_time >= to_date('" + createTimeStart + " 00:00:00', 'yyyy-mm-dd hh24:mi:ss')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                sql+=" and t.create_time <= to_date('" + createTime + " 23:59:59', 'yyyy-mm-dd hh24:mi:ss')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql += " and t.appointment_time >='" + appointmentTime + " 00:00:00'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql += " and t.appointment_time <='" + appointmentTime + " 23:59:59'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql += " and t.create_time >='" + createTimeStart + " 00:00:00' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                sql+=" and t.create_time <='"+createTime+" 23:59:59'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNotBlank(createTime)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNotBlank(createTimeEnd)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql += " and t.create_time >= to_date('" + createTime + " 00:00:00', 'yyyy-mm-dd hh24:mi:ss')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql+=" and t.create_time <= to_date('" + createTime + " 23:59:59', 'yyyy-mm-dd hh24:mi:ss')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql+=" and t.create_time <= to_date('" + createTimeEnd + " 23:59:59', 'yyyy-mm-dd hh24:mi:ss')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql += " and t.create_time >='" + createTime + " 00:00:00'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql+=" and t.create_time <='"+createTime+" 23:59:59'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql+=" and t.create_time <='"+createTimeEnd+" 23:59:59'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 |