|
@ -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());
|
|
|
}
|
|
|
}
|
|
|
|