Browse Source

发送康复计划到im返回需要数据

zhangdan 6 years ago
parent
commit
738f2a95e4

+ 2 - 2
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/rehabilitation/RehabilitationPlanController.java

@ -265,7 +265,7 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
    @PostMapping(value = SpecialistMapping.rehabilitation.updatePlanStatusById)
    @ApiOperation(value = "康复管理-更新康复计划状态")
    public Envelop updatePlanStatusById(@ApiParam(name = "planId", value = "康复计划id", required = true)
    public MixEnvelop updatePlanStatusById(@ApiParam(name = "planId", value = "康复计划id", required = true)
                                              @RequestParam(value = "planId", required = true)String planId,
                                              @ApiParam(name = "status", value = "状态", required = true)
                                              @RequestParam(value = "status", required = true)Integer status){
@ -274,7 +274,7 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }

+ 8 - 0
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationManageService.java

@ -574,6 +574,7 @@ public class RehabilitationManageService {
    public ObjEnvelop serviceItem(String planDetailId,String doctorCode) throws Exception{
        String sql = "select i.title,i.content,i.type as itemType,i.reserve,d.id,d.execute_time,d.hospital_name,d.status,d.type,d.expense,d.doctor as executeDoctor, " +
                " d.doctor_name as executeDoctorName,p.patient ,p.name as patientName,p.create_user as createDoctor,p.create_user_name as createDoctorName, p.status as planStatus" +
                " p.disease,p.disease_name as diseaseName,p.title as planTitle"+
                " from wlyy_specialist.wlyy_rehabilitation_plan_detail d " +
                " LEFT JOIN wlyy_specialist.wlyy_hospital_service_item h on d.hospital_service_item_id = h.id "+
                " LEFT JOIN wlyy_specialist.wlyy_service_item i on i.id = h.service_item_id " +
@ -1156,8 +1157,15 @@ public class RehabilitationManageService {
        Map<String,Object> resultMap = new HashMap<>();
        Integer allCount = rehabilitationDetailDao.findAllByPlanId(planId);//计划总服务项目数
        Integer finishedCount = rehabilitationDetailDao.findByStatusAndPlanId(1,planId);
        PatientRehabilitationPlanDO p =patientRehabilitationPlanDao.findById(planId);
        resultMap.put("allCount",allCount);
        resultMap.put("finishedCount",finishedCount);
        if (p!=null){
            resultMap.put("disease",p.getDisease());
            resultMap.put("diseaseName",p.getDiseaseName());
            resultMap.put("createUser",p.getCreateUser());
            resultMap.put("planTitle",p.getTitle());
        }
//        resultMap.put("healthyCondition",healthyCondition);
        return ObjEnvelop.getSuccess(SpecialistMapping.api_success,resultMap);
    }

+ 3 - 3
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationPlanService.java

@ -392,11 +392,11 @@ public class RehabilitationPlanService extends BaseJpaService<RehabilitationPlan
     * @param planId
     * @return
     */
    public Envelop updatePlanStatusById(Integer status, String planId) throws Exception{
    public MixEnvelop updatePlanStatusById(Integer status, String planId) throws Exception{
        if(patientRehabilitationPlanDao.updateStatusById(status,planId)>0){
            return Envelop.getSuccess(SpecialistMapping.api_success);
            return MixEnvelop.getSuccess(SpecialistMapping.api_success,patientRehabilitationPlanDao.findById(planId));
        }
        return Envelop.getError("更新失败!");
        return MixEnvelop.getError("更新失败!");
    }
}