Bläddra i källkod

Merge branch '2.0' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into 2.0

LAPTOP-KB9HII50\70708 1 år sedan
förälder
incheckning
57032caba8

+ 12 - 12
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/PatientRehabilitationManageController.java

@ -59,7 +59,7 @@ public class PatientRehabilitationManageController extends EnvelopRestEndpoint {
    @RequestMapping(value = "selectPlanByPatient", method = RequestMethod.GET)
    @ApiOperation("康复管理-根据居民code查找康复计划")
    public String calendarPlanDetailItems(@ApiParam(name = "patient", value = "居民code", required = false)
    public String selectPlanByPatient(@ApiParam(name = "patient", value = "居民code", required = false)
                                          @RequestParam(value = "patient", required = false) String patient,
                                          @ApiParam(name = "status", value = "任务状态(0未完成,1已完成,2已预约)", required = false)
                                          @RequestParam(value = "status", required = false) Integer status) {
@ -304,17 +304,17 @@ public class PatientRehabilitationManageController extends EnvelopRestEndpoint {
//        }
//    }
//    @RequestMapping(value = "serviceDoctorList", method = RequestMethod.GET)
//    @ApiOperation("康复管理-微信端居民服务医生列表")
//    public String serviceDoctorList() {
//        try {
//            String loginUserCode = getUID();
//            JSONArray result = rehabilitationManageService.serviceDoctorList(loginUserCode);
//            return write(200, "获取成功!", "data", result);
//        } catch (Exception e) {
//            return error(-1, "请求失败");
//        }
//    }
    @RequestMapping(value = "serviceDoctorList", method = RequestMethod.GET)
    @ApiOperation("康复管理-微信端居民服务医生列表")
    public String serviceDoctorList() {
        try {
            String loginUserCode = getUID();
            JSONArray result = rehabilitationManageService.serviceDoctorList(loginUserCode);
            return write(200, "获取成功!", "data", result);
        } catch (Exception e) {
            return error(-1, "请求失败");
        }
    }
    /**

+ 20 - 19
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/RehabilitationManageController.java

@ -14,7 +14,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -252,24 +251,26 @@ public class RehabilitationManageController {
        }
    }
    @GetMapping(value = SpecialistMapping.rehabilitation.serviceDoctorList)
    @ApiOperation(value = "康复管理-医生端居民详情服务医生列表")
    public Envelop serviceDoctorList(
            @ApiParam(name = "patientCode", value = "居民code", required = true) @RequestParam(value = "patientCode", required = true) String patientCode,
            @ApiParam(name = "healthDoctor", value = "健管师医生code", required = false) @RequestParam(value = "healthDoctor", required = false) String healthDoctor,
            @ApiParam(name = "healthDoctorName", value = "健管师医生名称", required = false) @RequestParam(value = "healthDoctorName", required = false) String healthDoctorName,
            @ApiParam(name = "generalDoctor", value = "全科医生code", required = false) @RequestParam(value = "generalDoctor", required = false) String generalDoctor,
            @ApiParam(name = "generalDoctorName", value = "全科医生名称", required = false) @RequestParam(value = "generalDoctorName", required = false) String generalDoctorName
    ) {
        try {
            return rehabilitationManageService.serviceDoctorList(patientCode, healthDoctor, healthDoctorName, generalDoctor, generalDoctorName);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
        }
    }
    /**
     * 2.0方法
     */
//    @GetMapping(value = SpecialistMapping.rehabilitation.serviceDoctorList)
//    @ApiOperation(value = "康复管理-医生端居民详情服务医生列表")
//    public Envelop serviceDoctorList(
//            @ApiParam(name = "patientCode", value = "居民code", required = true) @RequestParam(value = "patientCode", required = true) String patientCode,
//            @ApiParam(name = "healthDoctor", value = "健管师医生code", required = false) @RequestParam(value = "healthDoctor", required = false) String healthDoctor,
//            @ApiParam(name = "healthDoctorName", value = "健管师医生名称", required = false) @RequestParam(value = "healthDoctorName", required = false) String healthDoctorName,
//            @ApiParam(name = "generalDoctor", value = "全科医生code", required = false) @RequestParam(value = "generalDoctor", required = false) String generalDoctor,
//            @ApiParam(name = "generalDoctorName", value = "全科医生名称", required = false) @RequestParam(value = "generalDoctorName", required = false) String generalDoctorName
//    ) {
//        try {
//            return rehabilitationManageService.serviceDoctorList(patientCode, healthDoctor, healthDoctorName, generalDoctor, generalDoctorName);
//        } catch (Exception e) {
//            e.printStackTrace();
//
//            return Envelop.getError(e.getMessage());
//        }
//    }
    @GetMapping(value = SpecialistMapping.rehabilitation.appCalendarPlanDetailList)
    @ApiOperation(value = "康复管理-app端、微信端计划的服务项目列表")
    public ObjEnvelop appCalendarPlanDetailList(

+ 48 - 5
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/service/RehabilitationManageService.java

@ -1325,14 +1325,57 @@ public class RehabilitationManageService {
    /**
     * app端居民详情服务医生列表
     * 康复管理-app端、居民端-服务医生列表
     *
     * @param patientCode
     * @param healthDoctor
     * @param healthDoctorName
     * @param generalDoctor
     * @param generalDoctorName
     * @return
     * @throws Exception
     */
    public JSONArray serviceDoctorList(String patientCode) throws Exception {
        Map<String, Object> param = new HashedMap();
//        List<SignFamily> list = signFamilyDao.findByPatientAndExpensesStatusAndStatus(patientCode, "1", 1);
        List<SignFamily> list = null;//后面改掉
        String healthDoctor = null;
        String healthDoctorName = null;
        String generalDoctor = null;
        String generalDoctorName = null;
        if (list.size() > 0) {
            SignFamily signFamily = list.get(0);
            healthDoctor = signFamily.getDoctorHealth();
            healthDoctorName = signFamily.getDoctorHealthName();
            generalDoctor = signFamily.getDoctor();
            generalDoctorName = signFamily.getDoctorName();
        }
        param.put("patientCode", patientCode);
        param.put("healthDoctor", healthDoctor);
        param.put("healthDoctorName", healthDoctorName);
        param.put("generalDoctor", generalDoctor);
        param.put("generalDoctorName", generalDoctorName);
        ObjEnvelop objEnvelop = serviceDoctorList(patientCode, healthDoctor, healthDoctorName, generalDoctor, generalDoctorName);
        org.json.JSONObject result = new org.json.JSONObject(objEnvelop);
        if (result.getInt("status") == 200) {
            JSONArray jsonArray = result.getJSONArray("obj");
            String doctorCode = "";
            BaseDoctorDO doctor = null;
            for (int i = 0; i < jsonArray.length(); i++) {
                doctorCode = jsonArray.getJSONObject(i).get("doctorCode") + "";
                doctor = doctorDao.findById(doctorCode).orElse(null);
                jsonArray.getJSONObject(i).put("doctorPhoto", doctor != null ? doctor.getPhoto() : "");
                jsonArray.getJSONObject(i).put("doctorMobile", doctor != null ? doctor.getMobile() : "");
                jsonArray.getJSONObject(i).put("doctorLevel", doctor != null ? doctor.getLevel() : "");
                jsonArray.getJSONObject(i).put("doctorName", doctor != null ? doctor.getName() : "");
                jsonArray.getJSONObject(i).put("doctorSex", doctor != null ? doctor.getSex() : "");
//                jsonArray.getJSONObject(i).put("doctorHospitalName", doctor != null ? doctor.getHospitalName() : "");
                jsonArray.getJSONObject(i).put("doctorIdcard", doctor != null ? doctor.getIdcard() : "");
            }
            return jsonArray;
        }
        throw new Exception("请求微服务失败!");
    }
    /**
     * app端居民详情服务医生列表
     */
    public ObjEnvelop serviceDoctorList(String patientCode, String healthDoctor, String healthDoctorName, String generalDoctor, String generalDoctorName) {
        //服务医生