| 
															
																@ -11201,11 +11201,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     * @param medicare 社保卡 
															 | 
															
															 | 
															
																     * @param medicare 社保卡 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     * @param createTime 创建时间 
															 | 
															
															 | 
															
																     * @param createTime 创建时间 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     * @param appointmentTime 预约时间 
															 | 
															
															 | 
															
																     * @param appointmentTime 预约时间 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																     * @param appointmentTimeStart 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																     * @param appointmentTimeEnd 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     * @param page 
															 | 
															
															 | 
															
																     * @param page 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     * @param pageSize 
															 | 
															
															 | 
															
																     * @param pageSize 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																     * @param size 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     * @return 
															 | 
															
															 | 
															
																     * @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\"," + 
															 | 
															
															 | 
															
																        String sql = "select t.name as \"name\"," + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "t.card_no as \"cardNo\"," + 
															 | 
															
															 | 
															
																                "t.card_no as \"cardNo\"," + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "t.card_type as \"cardType\"," + 
															 | 
															
															 | 
															
																                "t.card_type as \"cardType\"," + 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -11225,7 +11228,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "t.appointment_time as \"appointmentTime\" " + 
															 | 
															
															 | 
															
																                "t.appointment_time as \"appointmentTime\" " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " from base_nat_appointment t where 1=1 "; 
															 | 
															
															 | 
															
																                " from base_nat_appointment t where 1=1 "; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if (StringUtils.isNotBlank(realOrder)) { 
															 | 
															
															 | 
															
																        if (StringUtils.isNotBlank(realOrder)) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            sql += " and t.real_order = '" + realOrder + "' "; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            sql += " and t.real_order like '%" + realOrder + "%' "; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        } 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if (StringUtils.isNotBlank(name)) { 
															 | 
															
															 | 
															
																        if (StringUtils.isNotBlank(name)) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            sql += " and t.name like '%" + name + "%'"; 
															 | 
															
															 | 
															
																            sql += " and t.name like '%" + name + "%'"; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -11244,23 +11247,42 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if (StringUtils.isNotBlank(medicare)) { 
															 | 
															
															 | 
															
																        if (StringUtils.isNotBlank(medicare)) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            sql += " and t.medicare like '%" + 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)) { 
															 | 
															
															 | 
															
																            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 { 
															 | 
															
															 | 
															
																            } 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)) { 
															 | 
															
															 | 
															
																            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 { 
															 | 
															
															 | 
															
																            } 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'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            } 
															 | 
															
															 | 
															
																            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        } 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 |