Browse Source

代码修改

LAPTOP-KB9HII50\70708 1 year ago
parent
commit
b230f1d707

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/base/servicePackage/ServiceItemPlanDO.java

@ -16,7 +16,7 @@ import javax.persistence.Transient;
public class ServiceItemPlanDO extends UuidIdentityEntityWithCreateTime {
    private String patient;//居民id
    private String status;//状态0未完成 1已完成
    private String status;//状态0未完成 1已完成 2待补录
    private String planTime;//计划时间
    private String completeTime;//完成时间
    private String doctor;//医生id

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

@ -43,6 +43,22 @@ public class RehabilitationManageController extends EnvelopRestEndpoint {
    @Autowired
    private RehabilitationGuidanceService rehabilitationGuidanceService;
    @PostMapping(value = "updItemPlanStatus")
    @ApiOperation("电话关怀,状态更新成待补录")
    public Envelop updItemPlanStatus(
            @ApiParam(name = "id", value = "执行计划id", required = true)
            @RequestParam(value = "id", required = true) String id) {
        try {
            rehabilitationManageService.updItemPlanStatus(id,getUID());
            return Envelop.getSuccess("操作成功");
        }catch (ServiceException se){
            return Envelop.getError(se.getMessage());
        }catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError("操作失败");
        }
    }
    @PostMapping(value = "completePlan")
    @ApiOperation("确认完成服务,填写服务笔记")
    public Envelop completePlan(

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

@ -1389,6 +1389,21 @@ public class RehabilitationManageService {
        return detailDOList;
    }
    //电话关怀,状态更新成待补录
    public void updItemPlanStatus(String id,String doctor){
        ServiceItemPlanDO planDO = serviceItemPlanDao.findById(id).orElse(null);
        if(!planDO.getDoctor().equals(doctor)){
            throw new ServiceException("不是您的任务,无法操作");
        }
        if("1".equals(planDO.getStatus())){
            throw new ServiceException("任务已完成,请勿重复操作");
        }
        if("0".equals(planDO.getStatus())){
            planDO.setStatus("2");
            serviceItemPlanDao.save(planDO);
        }
    }
    //确认完成服务,填写服务笔记
    public ServiceItemPlanDO completePlan(String id,String content,String appendixs,String doctor){
        ServiceItemPlanDO planDO = serviceItemPlanDao.findById(id).orElse(null);