liusheng
23 小时以前 459aa78c84cf552ebea6ef056d978c2531d71ac8
smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java
@@ -13,6 +13,7 @@
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.smartor.domain.*;
import com.smartor.domain.entity.ServiceSubtaskEntity;
import com.smartor.mapper.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
@@ -82,11 +83,13 @@
                    patArchive.setAgeUnit(map.get("ageUnit"));
                    patArchive.setAge2(ObjectUtils.isNotEmpty(map.get("age2")) ? Long.valueOf(map.get("age2")) : null);
                    patArchive.setAgeUnit2(map.get("ageUnit2"));
                    patMedOuthosp1.setAge(patArchive.getAge() + patArchive.getAgeUnit() + patArchive.getAge2() + patArchive.getAgeUnit2());
                    patMedOuthosp1.setSex(patArchive.getSex());
                    patMedOuthosp1.setTelcode(patArchive.getTelcode());
                    patMedOuthosp1.setIdcardno(patArchive.getIdcardno());
                }
                ServiceSubtaskVO serviceSubtaskVO = new ServiceSubtaskVO();
                ServiceSubtaskEntity serviceSubtaskVO = new ServiceSubtaskEntity();
                serviceSubtaskVO.setPatid(patMedOuthosp1.getPatid());
                List<Long> sendstates = new ArrayList<>();
                sendstates.add(1L);
@@ -301,7 +304,7 @@
        //先判断一下,是否需要校验
        if (check) {
            //在新增之前,先通过患者ID,sendstate=2查询一下,在所有长期任务中,是不是还有该患者待执行的任务,有的话,比较之前的endtime是否小于当前的endtaime,如果之前的小于现在的,则直接将之前的停掉(原因再入院)
            ServiceSubtaskVO subtask = new ServiceSubtaskVO();
            ServiceSubtaskEntity subtask = new ServiceSubtaskEntity();
            subtask.setPatid(patArchive.getId());
            subtask.setSendstate(2L);
            subtask.setTaskid(taskid);