From 4d537968ac6efb3a5e3d0f8ea5071d5254eb63c3 Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期二, 29 七月 2025 14:37:17 +0800 Subject: [PATCH] 代码提交 --- smartor/src/main/java/com/smartor/service/impl/HNGatherPatArchiveServiceImpl.java | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/smartor/src/main/java/com/smartor/service/impl/HNGatherPatArchiveServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/HNGatherPatArchiveServiceImpl.java index 2cb62f0..934a87a 100644 --- a/smartor/src/main/java/com/smartor/service/impl/HNGatherPatArchiveServiceImpl.java +++ b/smartor/src/main/java/com/smartor/service/impl/HNGatherPatArchiveServiceImpl.java @@ -14,6 +14,9 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.stereotype.Service; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.ZoneId; import java.util.*; /** @@ -106,6 +109,30 @@ return 0; } + @Override + public Boolean hnDataGather(HnDataGatherVO hnDataGatherVO) { + + LocalDate startDate = hnDataGatherVO.getStartOutHospTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate endDate = hnDataGatherVO.getEndOutHospTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + + Integer po = null; + // 寰幆澶勭悊姣忎竴澶� + for (LocalDate currentDate = startDate; !currentDate.isAfter(endDate); currentDate = currentDate.plusDays(1)) { + PatMedInhosp dailyCondition = new PatMedInhosp(); + LocalDateTime dayStart = currentDate.atStartOfDay(); + LocalDateTime dayEnd = currentDate.atTime(23, 59, 59); + dailyCondition.setStartOutHospTime(Date.from(dayStart.atZone(ZoneId.systemDefault()).toInstant())); + dailyCondition.setEndOutHospTime(Date.from(dayEnd.atZone(ZoneId.systemDefault()).toInstant())); + Integer pi = selectPatMedInhospList(dailyCondition); + + PatMedOuthosp patMedOuthosp = new PatMedOuthosp(); + patMedOuthosp.setBeginTime(Date.from(dayStart.atZone(ZoneId.systemDefault()).toInstant())); + patMedOuthosp.setEndTime(Date.from(dayEnd.atZone(ZoneId.systemDefault()).toInstant())); + po = selectPatMedOuthospList(patMedOuthosp); + } + return true; + } + @Override public Integer selectPatMedOuthospList(PatMedOuthosp patMedOuthosp) { -- Gitblit v1.9.3