| 
															
																@ -378,17 +378,17 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String sql = "SELECT p.id,p.register_no, p.status, p.dept, p.dept_name,patient.name as paName,d.name as docName\n" + 
															 | 
															
															 | 
															
																        String sql = "SELECT p.id,p.register_no, p.status, p.dept, p.dept_name,patient.name as paName,d.name as docName\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "     , patient.sex, patient.idcard, patient.mobile, dic.req_fee,reg.date\n" + 
															 | 
															
															 | 
															
																                "     , patient.sex, patient.idcard, patient.mobile, dic.req_fee,reg.date\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "FROM wlyy_outpatient p\n" + 
															 | 
															
															 | 
															
																                "FROM wlyy_outpatient p\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "\tLeft JOIN wlyy_patient_register reg on reg.register_no = p.register_no\n" + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "\tLeft JOIN base_doctor d ON p.doctor = d.id\n" + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "\tLeft JOIN wlyy_charge_dict dic ON d.charge_type = dic.charge_type \n" + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "\tLeft JOIN base_patient patient on patient.id = p.patient\n" + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                "\t JOIN wlyy_patient_register reg on reg.register_no = p.register_no\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                "\t JOIN base_doctor d ON p.doctor = d.id\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                "\t JOIN wlyy_charge_dict dic ON d.charge_type = dic.charge_type \n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                "\t JOIN base_patient patient on patient.id = p.patient\n" + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "WHERE dic.dept_type_code = p.win_no\n" ; 
															 | 
															
															 | 
															
																                "WHERE dic.dept_type_code = p.win_no\n" ; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if(StringUtils.isNotBlank(startDate)){ 
															 | 
															
															 | 
															
																        if(StringUtils.isNotBlank(startDate)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            sql =  sql + "  and reg.date >=  '" + startDate + "' "; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            sql =  sql + "  and reg.create_time >=  '" + startDate + "' "; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        } 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if(StringUtils.isNotBlank(endDate)){ 
															 | 
															
															 | 
															
																        if(StringUtils.isNotBlank(endDate)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            sql =  sql +  "  and reg.date < '" + endDate + "' "; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																            sql =  sql +  "  and reg.create_time < '" + endDate + "' "; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        } 
															 | 
															
															 | 
															
																        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if(StringUtils.isNotBlank(keyId)){ 
															 | 
															
															 | 
															
																        if(StringUtils.isNotBlank(keyId)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            sql =  sql +  "  and  p.id = '" + keyId + "' "; 
															 | 
															
															 | 
															
																            sql =  sql +  "  and  p.id = '" + keyId + "' "; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -468,13 +468,13 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " i.create_time, " + 
															 | 
															
															 | 
															
																                " i.create_time, " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " p.`name`, " + 
															 | 
															
															 | 
															
																                " p.`name`, " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " p.idcard, " + 
															 | 
															
															 | 
															
																                " p.idcard, " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " d.doctorIdCard," + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                " d.idcard AS doctorIdCard," + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " p.mobile " + 
															 | 
															
															 | 
															
																                " p.mobile " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "FROM " + 
															 | 
															
															 | 
															
																                "FROM " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " wlyy_inspection i " + 
															 | 
															
															 | 
															
																                " wlyy_inspection i " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " JOIN wlyy_outpatient o ON o.id = i.outpatient_id  " + 
															 | 
															
															 | 
															
																                " JOIN wlyy_outpatient o ON o.id = i.outpatient_id  " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " JOIN base_patient p ON p.id = o.patient " + 
															 | 
															
															 | 
															
																                " JOIN base_patient p ON p.id = o.patient " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " JOIN base_doctor d ON p.id = o.doctor " + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                " JOIN base_doctor d ON d.id = o.doctor " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "WHERE " + 
															 | 
															
															 | 
															
																                "WHERE " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " i.create_time >='"+startDate+"' " + 
															 | 
															
															 | 
															
																                " i.create_time >='"+startDate+"' " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " and i.create_time <='"+endDate+"'" + 
															 | 
															
															 | 
															
																                " and i.create_time <='"+endDate+"'" + 
															 |