|
@ -20,6 +20,7 @@ import io.swagger.annotations.ApiParam;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.http.NameValuePair;
|
|
|
import org.apache.http.message.BasicNameValuePair;
|
|
|
import org.json.JSONArray;
|
|
|
import org.json.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.MediaType;
|
|
@ -29,6 +30,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import java.lang.reflect.Field;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
@ -515,9 +517,21 @@ public class BookingController extends WeixinBaseController {
|
|
|
try {
|
|
|
List<PatientReservation> list = patientReservationService.getReservationByDoctor(doctor, pageIndex, pageSize);
|
|
|
//遍历更新预约状态
|
|
|
JSONArray array = new JSONArray();
|
|
|
for (PatientReservation item : list) {
|
|
|
String type = item.getType();
|
|
|
String code = item.getCode();
|
|
|
JSONObject object = new JSONObject();
|
|
|
Class pClass = (Class) item.getClass();
|
|
|
for(Field field : pClass.getDeclaredFields()){
|
|
|
field.setAccessible(true);
|
|
|
object.put(field.getName(),field.get(item));
|
|
|
}
|
|
|
Patient patient = patientService.findByCode(item.getPatient());
|
|
|
if(patient!=null){
|
|
|
object.put("photo",patient.getPhoto());
|
|
|
}
|
|
|
array.put(object);
|
|
|
if (type.equals("0")) { //医护网接口
|
|
|
|
|
|
} else if (type.equals("1")) //厦门市民健康预约接口
|
|
@ -530,7 +544,7 @@ public class BookingController extends WeixinBaseController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return write(200, "获取患者预约信息列表成功!", "data", list);
|
|
|
return write(200, "获取患者预约信息列表成功!", "data", array);
|
|
|
} catch (Exception e) {
|
|
|
return error(-1, e.getMessage());
|
|
|
}
|