Quellcode durchsuchen

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

zhanghaoyu vor 7 Jahren
Ursprung
Commit
e723725511
13 geänderte Dateien mit 282 neuen und 14 gelöschten Zeilen
  1. 1 1
      common/common-entity/src/main/java/com/yihu/wlyy/entity/message/Message.java
  2. 2 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/specialist/ServiceItemService.java
  3. 2 1
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/job/specialist/EightSpecialistJob.java
  4. 65 0
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/service/specialist/SpecialistService.java
  5. 50 0
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/web/SpecialistController.java
  6. 7 5
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java
  7. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/PatientAimSportsDao.java
  8. 7 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/message/MessageService.java
  9. 63 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/rehabilitation/RehabilitationManageService.java
  10. 22 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/job/SpecialistRehabilitationJob.java
  11. 22 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/message/DoctorMessageController.java
  12. 20 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/specialist/rehabilitation/DoctorRehabilitationManageController.java
  13. 20 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/specialist/rehabilitation/PatientRehabilitationManageController.java

+ 1 - 1
common/common-entity/src/main/java/com/yihu/wlyy/entity/message/Message.java

@ -58,7 +58,7 @@ public class Message extends IdEntity {
	private String tzType;//体征类别
	private String tzCode;//体征code
	private Integer sex;//患者性别
	private String relationCode;//业务关联code,type=6时为咨询code,type=7、8、9时为续方code type = 10\11时为申诉和反馈ID 12.协同服务code,14和15是文章审核功能是(0未认证1已认证2未通过)16.专科医生申请签约消息
	private String relationCode;//业务关联code,type=6时为咨询code,type=7、8、9时为续方code type = 10\11时为申诉和反馈ID 12.协同服务code,14和15是文章审核功能是(0未认证1已认证2未通过)16.专科医生申请签约消息 301.为患者code 21.wlyy_specialist里的wlyy_rehabilitation_plan_detail的id
	private String prescriptionStatus;//type=6续方审核状态 0待审核,1审核通过,2审核失败,3居民取消|type=7续方状态 0待取药,1已取药
	public String getCode() {

+ 2 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/specialist/ServiceItemService.java

@ -244,6 +244,8 @@ public class ServiceItemService extends BaseService {
                Map<String, String> centerSite = new HashMap<>();
                centerSite.put("康复服务", "1");
                centerSite.put("健康服务", "2");
                System.out.print(data);
                String data1 = data;
                specialistServiceItemDO.setItemType(Integer.parseInt(centerSite.get(data)));
            }
        });

+ 2 - 1
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/job/specialist/EightSpecialistJob.java

@ -34,6 +34,7 @@ public class EightSpecialistJob implements Job {
    @Autowired
    private HttpClientUtil httpClientUtil;
    private String dailyJobSendMessage = "/specialist/job/dailyJobSendMessage";//康复管理-每天推送项目进展
    private String dailyJobReserve = "/specialist/job/dailyJobReserve";//康复管理-10天、7天、5天、当天康复服务预约复诊通知
    @Transactional
@ -52,7 +53,7 @@ public class EightSpecialistJob implements Job {
            param.put("endTime", endTime);
            param.put("type", 23);
            HttpResponse response = HttpUtils.doPost(serverUrl + dailyJobSendMessage, param);
            HttpUtils.doPost(serverUrl + dailyJobReserve,  new HashedMap());
        }catch (Exception e){
            //保存日志
            quartzJobLog.setJobEndTime(new Date());

+ 65 - 0
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/service/specialist/SpecialistService.java

@ -0,0 +1,65 @@
package com.yihu.wlyy.service.specialist;
import com.yihu.wlyy.event.ApplicationEvent;
import com.yihu.wlyy.job.QuartzHelper;
import com.yihu.wlyy.job.specialist.EightSpecialistJob;
import com.yihu.wlyy.job.specialist.SixteenSpecialistJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
/**
 * Created by 刘文彬 on 2018/9/13.
 */
@Service
public class SpecialistService {
    private Logger logger = LoggerFactory.getLogger(SpecialistService.class);
    @Autowired
    QuartzHelper quartzHelper;
    public void starJob(Integer type) throws Exception{
        if(type==1){
            //康复计划每天8点发送服务执行进展
            if (!quartzHelper.isExistJob(EightSpecialistJob.jobKey)) {
                quartzHelper.addJob(EightSpecialistJob.class, EightSpecialistJob.jobCron, EightSpecialistJob.jobKey, new HashMap<String, Object>());
                logger.info("NoticeJob  job success");
            } else {
                logger.info("NoticeJob  job exist");
            }
        }else if(type==2){
            //康复计划每天16点发送服务执行进展
            if (!quartzHelper.isExistJob(SixteenSpecialistJob.jobKey)) {
                quartzHelper.addJob(SixteenSpecialistJob.class, SixteenSpecialistJob.jobCron, SixteenSpecialistJob.jobKey, new HashMap<String, Object>());
                logger.info("NoticeJob  job success");
            } else {
                logger.info("NoticeJob  job exist");
            }
        }
    }
    /**
     *
     * @param type 1、8点推送,2、16点推送
     * @throws Exception
     */
    public void stopJob(Integer type) throws Exception{
        switch (type){
            case 1:{
                if(quartzHelper.isExistJob(EightSpecialistJob.jobKey)){
                    quartzHelper.removeJob(EightSpecialistJob.jobKey);
                }break;}
            case 2:{
                if(quartzHelper.isExistJob(SixteenSpecialistJob.jobKey)){
                    quartzHelper.removeJob(EightSpecialistJob.jobKey);
                }
                break;}
        }
    }
}

+ 50 - 0
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/web/SpecialistController.java

@ -0,0 +1,50 @@
package com.yihu.wlyy.web;
import com.yihu.wlyy.service.specialist.SpecialistService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by 刘文彬 on 2018/9/13.
 */
@RestController
@RequestMapping(value = "/job/specialist", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "后台-任务控制每天8点、16点推送康复计划进展")
public class SpecialistController extends BaseController{
    @Autowired
    private SpecialistService specialistService;
    @RequestMapping(value = "starJob", method = RequestMethod.GET)
    @ApiOperation(value = "启动每天8点、16点推送康复计划进展")
    public String starJob(@ApiParam(name = "type", value = "(1、8点推送,2、16点推送)",required = true)
                          @RequestParam(value = "type", required = true)Integer type){
        try{
            specialistService.starJob(type);
            return success("启动成功!");
        }catch (Exception e){
            error(e);
            return invalidUserException(e, -1, "启动失败:" + e.getMessage());
        }
    }
    @RequestMapping(value = "stopJob", method = RequestMethod.GET)
    @ApiOperation(value = "关闭每天8点、16点推送康复计划进展")
    public String stopJob(@ApiParam(name = "type", value = "(1、8点推送,2、16点推送)",required = true)
                          @RequestParam(value = "type", required = true)Integer type){
        try{
            specialistService.stopJob(type);
            return success("关闭成功!");
        }catch (Exception e){
            error(e);
            return invalidUserException(e, -1, "关闭失败:" + e.getMessage());
        }
    }
}

+ 7 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java

@ -60,13 +60,13 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query("update Message a set a.read = 0 where a.receiver = ?1 and a.sender=?2 and a.tzType=?3")
    int updateHealthIndexMessageByPatient(String doctor, String patient, String type);
    @Query("select a from Message a where a.read= 1 and a.receiver = ?1 and a.type not in (1,2,6,7,12,101,14,15,16,17,18,19,20,21,22) order by a.czrq desc")
    @Query("select a from Message a where a.read= 1 and a.receiver = ?1 and a.type not in (1,2,6,7,12,101,14,15,16,17,18,19,20,21,22,23) order by a.czrq desc")
    List<Message> getSystemMessageUnread(String doctor);
    @Query("select a from Message a where a.receiver = ?1 and a.prescriptionStatus=?2 and a.type in (6,7) order by a.createTime desc")
    List<Message> getSysTemMessageByPrescription(String doctor, String prescriptionStatus);
    @Query("select a from Message a where a.receiver = ?1 and a.type not in (1,2,6,7,12,101,14,15,301,16,17,18) and (a.del = '1' or a.del is null) ")
    @Query("select a from Message a where a.receiver = ?1 and a.type not in (1,2,6,7,12,101,14,15,301,16,17,18,19,20,21,22,23) and (a.del = '1' or a.del is null) ")
    List<Message> getSystemMessage(String doctor, Pageable pageRequest);
    @Query("select a from Message a where a.receiver = ?1 and a.type=?2 and a.prescriptionStatus='0' ")
@ -87,7 +87,9 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Modifying
    int setMessageReaded(String doctor, Integer type);
    @Query("update Message a set a.read = 0,a.over = '0' where a.receiver = ?1 and a.id = ?2")
    @Modifying
    int setMessageReadedById(String doctor, Long id);
    @Query("update Message a set a.read = 0,a.over = '0' where a.receiver = ?1 and a.type not in (1,2,6,7)")
    @Modifying
@ -144,8 +146,8 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query("select a from Message a where a.read= ?2 and a.receiver = ?1 and a.state = 1 and a.over = ?3 and a.type in (16,20,22,23) order by a.czrq desc")
    List<Message> getSpecialistUntreated(String receiver,Integer read,String over,Pageable pageable);
    @Query("select a from Message a where a.read= ?2 and a.receiver = ?1 and a.state = 1 and a.over = ?3 and a.type in (16,19,20,21,22,23) order by a.czrq desc")
    List<Message> getSpecialistMessages(String receiver,Integer read,String over,Pageable pageable);
    @Query("select a from Message a where  a.receiver = ?1 and a.state = 1 and a.over = ?2 and a.type in (16,19,20,21,22,23) order by a.czrq desc")
    List<Message> getSpecialistMessages(String receiver,String over,Pageable pageable);
    @Query("select a from Message a where a.read= ?2 and a.receiver = ?1 and a.state = 1 and a.over = ?3 and a.type in (17) order by a.czrq desc")
    List<Message> getTransferMessage(String receiver,Integer read,String over,Pageable pageable);

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/PatientAimSportsDao.java

@ -17,7 +17,7 @@ public interface PatientAimSportsDao extends
    @Query("from PatientAimSports p where p.code=?1")
    PatientAimSports findByCode(String code);
    @Query("from PatientAimSports p where p.patientcode =?1")
    @Query("from PatientAimSports p where p.patientcode =?1 and p.bmiMax is not null and p.bmiMin is not null")
    PatientAimSports getPatientAimSportsByPatientCode(String patientCode);
}

+ 7 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/message/MessageService.java

@ -602,6 +602,11 @@ public class MessageService extends BaseService {
        }
    }
    public void setMessageReadedById(String doctor, Long id) {
        messageDao.setMessageReadedById(doctor, id);
    }
    /**
     * 家医设置专科消息一键已读
@ -952,11 +957,11 @@ public class MessageService extends BaseService {
    public List<Message> getSpecialistMessages(Message message, Integer page, Integer size) throws Exception{
        // 排序
        Sort sort = new Sort(Sort.Direction.DESC, "read","over","createTime");
        Sort sort = new Sort(Sort.Direction.DESC,"over","createTime");
        // 分页信息
        Pageable pageRequest = new PageRequest(page - 1, size, sort);
        return messageDao.getSpecialistMessages(message.getReceiver(),message.getRead(),message.getOver(),pageRequest);
        return messageDao.getSpecialistMessages(message.getReceiver(),message.getOver(),pageRequest);
    }
    /**

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

@ -12,6 +12,7 @@ import com.yihu.wlyy.repository.wechat.WechatTemplateConfigDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.specialist.SpecialistEvaluateSevice;
import com.yihu.wlyy.task.PushMsgTask;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.IdCardUtil;
import com.yihu.wlyy.util.http.HttpResponse;
import com.yihu.wlyy.util.http.HttpUtils;
@ -75,11 +76,13 @@ public class RehabilitationManageService extends BaseService {
    private String serviceDoctorList = "/svr-specialist/serviceDoctorList";//康复管理-医生端居民详情服务医生列表
    private String appCalendarPlanDetailList = "/svr-specialist/appCalendarPlanDetailList";//康复管理-app端、微信端计划的服务项目列表
    private String dailyJob = "/svr-specialist/dailyJob";//每日康复服务通知
    private String dailyJobReserve = "/svr-specialist/dailyJobReserve";//10天、7天、5天、当天康复服务预约复诊通知
    private String saveRehabilitationOperateRecord ="/svr-specialist/saveRehabilitationOperateRecord";//新增operateRecodr
    private String updateNoteAndImageRehabilitationOperate ="/svr-specialist/updateNoteAndImageRehabilitationOperate";//康复计划完成时更新服务完成笔记和图片接口;
    private String updatePlanDetailStatusById = "/svr-specialist/updatePlanDetailStatusById";//康复管理-更新康复计划服务项目状态
    private String planSchedule = "/svr-specialist/planSchedule";//康复管理-计划总进度
    private String planListByPatient = "/svr-specialist/planListByPatient";//康复管理-根据居民获取康复计划
    private String patientCount = "/svr-specialist/patientCount";//康复管理-医生已计划数,已完成计划数(居民数)
    /************************************************************* end ************************************************************************/
    /**
@ -488,6 +491,18 @@ public class RehabilitationManageService extends BaseService {
        throw new Exception("请求微服务失败!");
    }
    public JSONArray dailyJobReserve(String startTime, String endTime) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("startTime", startTime);
        param.put("endTime", endTime);
        HttpResponse response = HttpUtils.doGet(specialistUrl + dailyJobReserve, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")==200){
            return result.getJSONArray("obj");
        }
        throw new Exception("请求微服务失败!");
    }
    public JSONObject saveRehabilitationOperateRecord(String dataJson) throws Exception{
        Map<String, Object> param = new HashedMap();
@ -518,11 +533,20 @@ public class RehabilitationManageService extends BaseService {
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status") == 200){
            JSONObject object = result.getJSONObject("obj");
            //保存wlyy_message
            String hospotal = object.getString("hospital");
            String patient = object.getString("patient_code");
            String doctor = object.getString("doctor_code");
            Message message = new Message();
            message.setType(21);
            message.setSender(patient);
            message.setReceiver(doctor);
            message.setRelationCode(planDetailId);
            specialistEvaluateSevice.sendMessage(message,hospotal,patient,null);
            //发送微信模板消息
            int evaluation = object.getInt("evaluation");
            if (evaluation == 1){
                String serviceItemId = object.getString("service_item_id");
                String doctor = object.getString("doctor_code");
                String patient = object.getString("patient_code");
                String title = object.getString("title");
                Patient p = patientDao.findByCode(patient);
                String patientName = p.getName();
@ -649,4 +673,41 @@ public class RehabilitationManageService extends BaseService {
        }
        throw new Exception("请求微服务失败!");
    }
    public JSONObject patientCount(String doctorCode) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("doctorCode", doctorCode);
        HttpResponse response = HttpUtils.doGet(specialistUrl + patientCount, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")==200){
            return result.getJSONObject("obj");
        }
        throw new Exception("请求微服务失败!");
    }
    public void dailyJobReserve(Integer num,Integer type) throws Exception{
        Long time = num*24*60*60*1000L;
        String startTime = DateUtil.dateToStrShort(new Date(new Date().getTime()+time))+" "+"00:00:00";
        String endTime = DateUtil.dateToStrShort(new Date(new Date().getTime()+time))+" "+"23:59:59";
        JSONArray jsonArray
                = dailyJobReserve(startTime,endTime);
        JSONObject jsonObject = null;
        String doctor = "";
        String patient ="";
        String hospital ="";
        String planDetailIds = null;
        for(int i=0;i<jsonArray.length();i++){
            jsonObject = jsonArray.getJSONObject(i);
            doctor = jsonObject.get("doctor")+"";//执行的医生(接收的医生)
            patient = jsonObject.get("patient")+"";//执行的居民
            hospital = jsonObject.get("hospital")+"";//医院
            planDetailIds = jsonObject.get("planDetailIds")+"";
            Message message1 = new Message();
//            message1.setSender(patient);
            message1.setType(type);
            message1.setReceiver(doctor);
            message1.setRelationCode(planDetailIds);
            specialistEvaluateSevice.sendMessage(message1,hospital,patient,num);
        }
    }
}

+ 22 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/job/SpecialistRehabilitationJob.java

@ -43,4 +43,26 @@ public class SpecialistRehabilitationJob extends BaseController {
            return error(-1, "发送失败");
        }
    }
    @RequestMapping(value = "/dailyJobReserve", method = RequestMethod.POST)
    @ApiOperation("康复管理-10天、7天、5天、当天(0)康复服务预约复诊通知")
    @ObserverRequired
    public String dailyJobReserve(@ApiParam(name = "num", value = "10天、7天、5天、当天康复服务预约复诊通知", required = false)
                      @RequestParam(value = "num", required = false)Integer num){
        try {
            if(num!=null){
                rehabilitationManageService.dailyJobReserve(num,20);
            }else{
                Integer[] days = {10,7,5,0};
                for(Integer one : days){
                    rehabilitationManageService.dailyJobReserve(one,20);
                }
            }
            return write(200, "发送成功");
        } catch (Exception e) {
            error(e);
            return error(-1, "发送失败");
        }
    }
}

+ 22 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/message/DoctorMessageController.java

@ -421,6 +421,28 @@ public class DoctorMessageController extends BaseController {
        }
    }
    /**
     * 设置某条消息已读
     * @param id
     * @return
     */
    @RequestMapping(value = "setMessageReadedById")
    @ResponseBody
    @ApiOperation("设置某条消息已读")
    @ObserverRequired
    public String setMessageReadedById(@RequestParam @ApiParam(value = "消息id") Long id) {
        try {
            messageService.setMessageReadedById(getUID(), id);
            return write(200, "设置成功");
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, "设置失败");
        }
    }
    @RequestMapping(value = "getMessageNoticeSetting",method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("获取消息设置")

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

@ -93,7 +93,7 @@ public class DoctorRehabilitationManageController extends BaseController {
                                     @RequestParam(value = "executeEndTime", required = true)String executeEndTime,
                                     @ApiParam(name = "planId", value = "计划id", required = true)
                                     @RequestParam(value = "planId", required = true)String planId,
                                     @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、健康教育,3、复诊,4、随访)", required = false)
                                     @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、健康教育,3、健康指导,4、随访,5、复诊)", required = false)
                                     @RequestParam(value = "searchTask", required = false)Integer searchTask,
                                     @ApiParam(name = "doctorCode", value = "医生code(专科医生、家庭医生)", required = false)
                                     @RequestParam(value = "doctorCode", required = false)String doctorCode,
@ -120,7 +120,7 @@ public class DoctorRehabilitationManageController extends BaseController {
                                     @RequestParam(value = "executeEndTime", required = true)String executeEndTime,
                                     @ApiParam(name = "planId", value = "计划id", required = true)
                                     @RequestParam(value = "planId", required = true)String planId,
                                     @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、健康教育,3、复诊,4、随访)", required = false)
                                     @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、健康教育,3、健康指导,4、随访,5、复诊)", required = false)
                                     @RequestParam(value = "searchTask", required = false)Integer searchTask,
                                     @ApiParam(name = "doctorCode", value = "医生code(专科医生、家庭医生)", required = false)
                                     @RequestParam(value = "doctorCode", required = false)String doctorCode,
@ -416,4 +416,22 @@ public class DoctorRehabilitationManageController extends BaseController {
            return error(-1, "请求失败");
        }
    }
    @RequestMapping(value = "patientCount", method = RequestMethod.GET)
    @ApiOperation("医生已计划数,已完成计划数(居民数)")
    @ObserverRequired
    public String patientCount(@ApiParam(name = "doctorCode", value = "医生code", required = false)
                                                   @RequestParam(value = "doctorCode", required = false)String doctorCode){
        try {
            if(!StringUtils.isNotEmpty(doctorCode)){
                doctorCode = getRepUID();
            }
            JSONObject result = rehabilitationManageService.patientCount(doctorCode);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
}

+ 20 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/specialist/rehabilitation/PatientRehabilitationManageController.java

@ -202,4 +202,24 @@ public class PatientRehabilitationManageController extends BaseController {
            return error(-1, "请求失败");
        }
    }
    @RequestMapping(value = "planSchedule", method = RequestMethod.GET)
    @ApiOperation("康复管理-计划总进度")
    @ObserverRequired
    public String planSchedule(@ApiParam(name = "planId", value = "计划id", required = true)
                               @RequestParam(value = "planId", required = true)String planId,
                               @ApiParam(name = "patientCode", value = "居民code", required = false)
                               @RequestParam(value = "patientCode", required = false)String patientCode){
        try {
            if(!StringUtils.isNotEmpty(patientCode)){
                patientCode = getRepUID();
            }
            JSONObject result = rehabilitationManageService.planSchedule(planId,patientCode);
            return write(200, "获取成功!", "data", result);
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
}