浏览代码

代码修改

LAPTOP-KB9HII50\70708 1 年之前
父节点
当前提交
6e66d496fe
共有 1 个文件被更改,包括 11 次插入9 次删除
  1. 11 9
      business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

+ 11 - 9
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -1807,7 +1807,7 @@ public class ImService {
        //判断是否是在线复诊
        if (cons.getRelationCode() != null) {
            WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.getOne(cons.getRelationCode());
            WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(cons.getRelationCode()).orElse(null);
            if (wlyyOutpatientDO != null && wlyyOutpatientDO.getId() != null) {
                if (wlyyOutpatientDO.getStatus().equalsIgnoreCase("0")) {
                    wlyyOutpatientDO.setStatus("-1");
@ -1817,15 +1817,17 @@ public class ImService {
                outpatientDao.save(wlyyOutpatientDO);
                //结束康复执行计划
                ServiceItemPlanDO serviceItemPlanDO = serviceItemPlanDao.findById(wlyyOutpatientDO.getPlanId()).orElse(null);
                if(serviceItemPlanDO!=null){
                    if(!org.springframework.util.StringUtils.isEmpty(serviceItemPlanDO.getRelationCode())){
                        throw new RuntimeException("该计划已发起过咨询,请选择其他计划发起!");
                if(org.apache.commons.lang3.StringUtils.isNotBlank(wlyyOutpatientDO.getPlanId())){
                    ServiceItemPlanDO serviceItemPlanDO = serviceItemPlanDao.findById(wlyyOutpatientDO.getPlanId()).orElse(null);
                    if(serviceItemPlanDO!=null){
                        if(!org.springframework.util.StringUtils.isEmpty(serviceItemPlanDO.getRelationCode())){
                            throw new RuntimeException("该计划已发起过咨询,请选择其他计划发起!");
                        }
                        serviceItemPlanDO.setStatus("1");
                        serviceItemPlanDO.setCompleteTime(DateUtil.getStringDate());
                        serviceItemPlanDao.save(serviceItemPlanDO);
                        updPlanStatus(serviceItemPlanDO.getPlanId(),serviceItemPlanDO.getPlanDetailId());
                    }
                    serviceItemPlanDO.setStatus("1");
                    serviceItemPlanDO.setCompleteTime(DateUtil.getStringDate());
                    serviceItemPlanDao.save(serviceItemPlanDO);
                    updPlanStatus(serviceItemPlanDO.getPlanId(),serviceItemPlanDO.getPlanDetailId());
                }
            }