Bladeren bron

中止康复计划时增加中止原因

zhangdan 6 jaren geleden
bovenliggende
commit
14862ba2b5

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

@ -268,9 +268,15 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
    public MixEnvelop 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,
                                              @RequestParam(value = "planId", required = true)String planId,
                                              @ApiParam(name = "status", value = "状态", required = true)
                                              @ApiParam(name = "status", value = "状态", required = true)
                                              @RequestParam(value = "status", required = true)Integer status){
                                              @RequestParam(value = "status", required = true)Integer status,
                                              @ApiParam(name = "abortReason", value = "中止原因", required = true)
                                              @RequestParam(value = "abortReason", required = false)String abortReason){
        try {
        try {
            return rehabilitationPlanService.updatePlanStatusById(status,planId);
            if(StringUtils.isEmpty(abortReason)){
                return rehabilitationPlanService.updatePlanStatusById(status,planId);
            }else {
                return rehabilitationPlanService.abortPlanById(planId,abortReason);
            }
        }catch (Exception e){
        }catch (Exception e){
            e.printStackTrace();
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            tracer.getCurrentSpan().logEvent(e.getMessage());
@ -300,7 +306,7 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
        }
        }
    }
    }
    @PostMapping(value = SpecialistMapping.rehabilitation.abortPlanById)
    /*@PostMapping(value = SpecialistMapping.rehabilitation.abortPlanById)
    @ApiOperation(value = "康复管理-中止康复计划填写中止原因")
    @ApiOperation(value = "康复管理-中止康复计划填写中止原因")
    public Envelop abortPlanById(@ApiParam(name = "planId", value = "康复计划id", required = true)
    public Envelop abortPlanById(@ApiParam(name = "planId", value = "康复计划id", required = true)
                                           @RequestParam(value = "planId", required = true)String planId,
                                           @RequestParam(value = "planId", required = true)String planId,
@ -313,5 +319,5 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
            tracer.getCurrentSpan().logEvent(e.getMessage());
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return Envelop.getError(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
        }
    }
    }*/
}
}

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

@ -400,15 +400,15 @@ public class RehabilitationPlanService extends BaseJpaService<RehabilitationPlan
        return MixEnvelop.getError("更新失败!");
        return MixEnvelop.getError("更新失败!");
    }
    }
    public Envelop abortPlanById(String planId,String abortReason){
    public MixEnvelop abortPlanById(String planId,String abortReason){
        PatientRehabilitationPlanDO patientRehabilitationPlanDO=patientRehabilitationPlanDao.findById(planId);
        PatientRehabilitationPlanDO patientRehabilitationPlanDO=patientRehabilitationPlanDao.findById(planId);
        if(null!=patientRehabilitationPlanDO){
        if(null!=patientRehabilitationPlanDO){
            patientRehabilitationPlanDO.setAbortReason(abortReason);
            patientRehabilitationPlanDO.setAbortReason(abortReason);
            patientRehabilitationPlanDO.setAbortTime(new Date());
            patientRehabilitationPlanDO.setAbortTime(new Date());
            patientRehabilitationPlanDO.setStatus(0);
            patientRehabilitationPlanDO.setStatus(0);
            patientRehabilitationPlanDao.save(patientRehabilitationPlanDO);
            patientRehabilitationPlanDao.save(patientRehabilitationPlanDO);
            return Envelop.getSuccess(SpecialistMapping.api_success);
            return MixEnvelop.getSuccess(SpecialistMapping.api_success);
        }
        }
        return Envelop.getError("更新失败!");
        return MixEnvelop.getError("更新失败!");
    }
    }
}
}