| | |
| | | |
| | | @Autowired |
| | | private PatArchiveMapper patArchiveMapper; |
| | | @Autowired |
| | | private ServiceTaskmedicalMapper serviceTaskmedicalMapper; |
| | | |
| | | |
| | | /** |
| | |
| | | PatMedOuthospQueryReq patMedOuthospQueryReq = DtoConversionUtils.sourceToTarget(patMedOuthosp, PatMedOuthospQueryReq.class); |
| | | patMedOuthospQueryReq.setBeginAdmitdate(patMedOuthosp.getBeginTime()); |
| | | patMedOuthospQueryReq.setEndAdmitdate(patMedOuthosp.getEndTime()); |
| | | if(!CollectionUtils.isEmpty(patMedOuthosp.getDeptcodes())) { |
| | | String result = String.join(",", patMedOuthosp.getDeptcodes()); |
| | | if (!CollectionUtils.isEmpty(patMedOuthosp.getDeptcodes())) { |
| | | String result = String.join(",", patMedOuthosp.getDeptcodes()); |
| | | patMedOuthospQueryReq.setDeptcode(result); |
| | | } |
| | | |
| | |
| | | PatMedOuthospQueryReq req = new PatMedOuthospQueryReq(); |
| | | String deptcodes = CollectionUtils.isEmpty(patMedReq.getDeptcodeList()) ? null : String.join(",", patMedReq.getDeptcodeList()); |
| | | req.setBeginAdmitdate(patMedReq.getStartDate()); |
| | | req.setEndAdmitdate(DateUtils.addDays(patMedReq.getEndDate(),1)); |
| | | req.setEndAdmitdate(DateUtils.addDays(patMedReq.getEndDate(), 1)); |
| | | req.setDeptcode(deptcodes); |
| | | req.setOrgid(patMedReq.getOrgid()); |
| | | // req.setCampusid(patMedReq.getCampusid()); |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer followUpAgainByPatMedOuthosp(PatMedOuthosp patMedOuthosp,Date adminDate, Integer visitTimeNum){ |
| | | public Integer followUpAgainByPatMedOuthosp(PatMedOuthosp patMedOuthosp, Date adminDate, Integer visitTimeNum) { |
| | | int hoursToAdd = visitTimeNum * 24; |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(adminDate); |
| | |
| | | serviceSubtaskEntity0.setDeptcode(deptcode); |
| | | serviceSubtaskEntity0.setSort(0); |
| | | List<ServiceSubtask> serviceSubtaskList0 = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtaskEntity0); |
| | | if(!CollectionUtils.isEmpty(serviceSubtaskList0)){ |
| | | if (!CollectionUtils.isEmpty(serviceSubtaskList0)) { |
| | | ServiceSubtask serviceSubtask0 = serviceSubtaskList0.get(0); |
| | | serviceSubtask0.setSendstate(6L); |
| | | serviceSubtask0.setUpdateTime(new Date()); |
| | |
| | | serviceSubtask1.setVisitTime(newDate); |
| | | serviceSubtask1.setLongSendTime(newDate); |
| | | i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask1); |
| | | }else { |
| | | } else { |
| | | //查看已完成的任务 |
| | | // ServiceSubtaskEntity serviceSubtaskEntity = new ServiceSubtaskEntity(); |
| | | // serviceSubtaskEntity0.setOrgid(patMedOuthosp.getOrgid()); |