Explorar o código

Merge branch 'dev' of liuwenbin/patient-co-management into dev

huangwenjie %!s(int64=7) %!d(string=hai) anos
pai
achega
5cee6ce595

+ 7 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/rehabilitation/RehabilitationManageService.java

@ -139,17 +139,19 @@ public class RehabilitationManageService extends BaseService {
     * @return
     * @throws Exception
     */
    public JSONObject findRehabilitationPlanDetailList(String doctorCode,String patientCode) throws Exception{
    public JSONArray findRehabilitationPlanDetailList(String doctorCode,String patientCode) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("doctorCode", doctorCode);
        param.put("patientCode", patientCode);
        HttpResponse response = HttpUtils.doGet(specialistUrl + findRehabilitationPlanDetailList, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")==200){
            JSONObject jsonObject = result.getJSONObject("obj");
            Patient p = patientDao.findByCode(patientCode);
            jsonObject.put("patientPhoto",p.getPhoto());
            return jsonObject;
            JSONArray jsonArray = result.getJSONArray("obj");
            for(int i=0;i<jsonArray.length();i++){
                Patient p = patientDao.findByCode(patientCode);
                jsonArray.getJSONObject(i).put("patientPhoto",p.getPhoto());
            }
            return jsonArray;
        }
        throw new Exception("请求微服务失败!");
    }

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/specialist/rehabilitation/DoctorRehabilitationManageController.java

@ -76,7 +76,7 @@ public class DoctorRehabilitationManageController extends BaseController {
            if(!StringUtils.isNotEmpty(doctorCode)){
                doctorCode = getRepUID();
            }
            JSONObject result = rehabilitationManageService.findRehabilitationPlanDetailList(doctorCode,patientCode);
            JSONArray result = rehabilitationManageService.findRehabilitationPlanDetailList(doctorCode,patientCode);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
            error(e);