| 
															
																@ -1,6 +1,7 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																package com.yihu.wlyy.web.doctor.health; 
															 | 
															
															 | 
															
																package com.yihu.wlyy.web.doctor.health; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import io.swagger.annotations.Api; 
															 | 
															
															 | 
															
																import io.swagger.annotations.Api; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																import org.apache.commons.lang3.StringUtils; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.json.JSONArray; 
															 | 
															
															 | 
															
																import org.json.JSONArray; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.json.JSONObject; 
															 | 
															
															 | 
															
																import org.json.JSONObject; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.springframework.beans.factory.annotation.Autowired; 
															 | 
															
															 | 
															
																import org.springframework.beans.factory.annotation.Autowired; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -9,6 +10,7 @@ import org.springframework.http.MediaType; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.springframework.stereotype.Controller; 
															 | 
															
															 | 
															
																import org.springframework.stereotype.Controller; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.springframework.web.bind.annotation.RequestMapping; 
															 | 
															
															 | 
															
																import org.springframework.web.bind.annotation.RequestMapping; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.springframework.web.bind.annotation.RequestMethod; 
															 | 
															
															 | 
															
																import org.springframework.web.bind.annotation.RequestMethod; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																import org.springframework.web.bind.annotation.RequestParam; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.springframework.web.bind.annotation.ResponseBody; 
															 | 
															
															 | 
															
																import org.springframework.web.bind.annotation.ResponseBody; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.wlyy.entity.patient.PatientHealthRecordDiet; 
															 | 
															
															 | 
															
																import com.yihu.wlyy.entity.patient.PatientHealthRecordDiet; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -103,10 +105,15 @@ public class DoctorHealthRecordController extends BaseController { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																	 */ 
															 | 
															
															 | 
															
																	 */ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																	@RequestMapping(value = "list_medication") 
															 | 
															
															 | 
															
																	@RequestMapping(value = "list_medication") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																	@ResponseBody 
															 | 
															
															 | 
															
																	@ResponseBody 
															 | 
														
													
												
													
														
															| 
															 | 
															
																	public String medication(String patient, String start,String end,int page, int pagesize) { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																	public String medication(String patient, @RequestParam(required = false) String start,@RequestParam(required = false) String end,@RequestParam(required = false) int page,@RequestParam(required = false) String sortDate, int pagesize) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																		try { 
															 | 
															
															 | 
															
																		try { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																			//Page<PatientHealthRecordMedication> data = patientHealthRecordService.findMedicationByPatient(patient, DateUtil.strToDateLong(sortDate), pagesize); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																			Page<PatientHealthRecordMedication> data = patientHealthRecordService.findMedicalByPatientPage(patient, start,end, page, pagesize); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																			Page<PatientHealthRecordMedication> data = null; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																			if(!StringUtils.isEmpty(sortDate)) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																				data = patientHealthRecordService.findMedicationByPatient(patient, DateUtil.strToDateLong(sortDate), pagesize); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																			} else { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																				data = patientHealthRecordService.findMedicalByPatientPage(patient, start, end, page, pagesize); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																			} 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																			if (data != null) { 
															 | 
															
															 | 
															
																			if (data != null) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																				JSONArray array = new JSONArray(); 
															 | 
															
															 | 
															
																				JSONArray array = new JSONArray(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																				for (PatientHealthRecordMedication record : data) { 
															 | 
															
															 | 
															
																				for (PatientHealthRecordMedication record : data) { 
															 |