| | |
| | | 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 com.smartor.service.IPatMedInhospService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | //先判断一下,是否需要校验 |
| | | if (check && (Objects.isNull(serviceSubtask.getTaskSituation()) || serviceSubtask.getTaskSituation() != 6)) { |
| | | //在新增之前,先通过患者ID,sendstate=2查询一下,在所有长期任务中,是不是还有该患者待执行的任务,有的话,比较之前的endtime是否小于当前的endtaime,如果之前的小于现在的,则直接将之前的停掉(原因再入院) |
| | | ServiceSubtaskVO subtask = new ServiceSubtaskVO(); |
| | | ServiceSubtaskEntity subtask = new ServiceSubtaskEntity(); |
| | | subtask.setPatid(patArchive.getId()); |
| | | subtask.setSendstate(2L); |
| | | subtask.setTaskid(taskid); |
| | |
| | | serviceSubtask.setLongSendTime(newDate); |
| | | serviceSubtask.setVisitTime(newDate); |
| | | |
| | | if (patMedInhosp1.getFudate() != null) serviceSubtask.setVisitTime(patMedInhosp1.getFudate()); |
| | | // if (patMedInhosp1.getFudate() != null && !patMedInhosp1.getOrgid().equals("47255004333112711A1001")) serviceSubtask.setVisitTime(patMedInhosp1.getFudate()); |
| | | //如果是通知的话,需要提前几天将通过短信发出去(具体几天,这个可以配置在sys_conf表中) |
| | | if ("3".equals(serviceTask.getType())) { |
| | | serviceSubtask.setVisitTime(minusDay(newDate, StringUtils.isNotEmpty(config) ? Integer.parseInt(config) : 0)); |
| | |
| | | for (PatMedInhosp patMedInhosp1 : patMedInhospList) { |
| | | try { |
| | | //获取当前入院患者的待执行的出院子任务随访信息 |
| | | ServiceSubtaskVO subtask = new ServiceSubtaskVO(); |
| | | ServiceSubtaskEntity subtask = new ServiceSubtaskEntity(); |
| | | subtask.setPatid(patMedInhosp1.getPatid()); |
| | | subtask.setSendstate(2L); |
| | | List<ServiceSubtask> selectServiceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(subtask); |