陈昶聿
19 小时以前 23a360048166f7055a8579162e29a0c9f8de03ff
smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
@@ -536,7 +536,6 @@
        return calendar.getTime();
    }
    //todo
    //将患者放到subtask中
    private void writeInSubTask(Long taskid, Boolean check, PatMedInhosp patMedInhosp1, PatArchive patArchive, Integer type, String config) {
        String longTaskReason = patMedInhosp1.getLongTaskReason();
@@ -564,9 +563,9 @@
                patMedInhospMapper.updatePatMedInhosp(patMedInhosp1);
                return;
            }
        }else {
            serviceTask = serviceTasks.get(0);
        }
        if (Objects.isNull(patMedInhosp1.getEndtime())) {
            return;
        }
@@ -584,7 +583,7 @@
        Integer i = 0;
        //先判断一下,是否需要校验
        if (check && serviceSubtask.getTaskSituation() != 6) {
        if (check && (Objects.isNull(serviceSubtask.getTaskSituation()) || serviceSubtask.getTaskSituation() != 6)) {
            //在新增之前,先通过患者ID,sendstate=2查询一下,在所有长期任务中,是不是还有该患者待执行的任务,有的话,比较之前的endtime是否小于当前的endtaime,如果之前的小于现在的,则直接将之前的停掉(原因再入院)
            ServiceSubtaskVO subtask = new ServiceSubtaskVO();
            subtask.setPatid(patArchive.getId());
@@ -878,7 +877,8 @@
                    }
                }
                //将患入的入院数据设置为已处理
                patMedInhospMapper.updatePatMedInhosp(patMedInhosp1);
                //更新状态值 patMedInhosp1.setDeptcheckFlag("0");
                //patMedInhospMapper.updatePatMedInhosp(patMedInhosp1);
            } catch (Exception e) {
                log.error("入院数据信息出异常了:{},{}", patMedInhosp1, e.getMessage());
            }