From 141dd8dbbb5c876d6b37a23beafe73c0d624934a Mon Sep 17 00:00:00 2001 From: wyb <1977763549@qq.com> Date: Wed, 19 Apr 2023 11:54:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E6=9D=9F=E6=97=B6=E9=97=B4=E4=B8=BA?= =?UTF-8?q?=E5=87=BA=E9=99=A2=E6=97=B6=E9=97=B4=EF=BC=8C=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E6=B7=BB=E5=8A=A0m=E5=BC=80=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../docus/server/report/job/ReportJob.java | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/docus/server/report/job/ReportJob.java b/src/main/java/com/docus/server/report/job/ReportJob.java index 64b49d5..5b51b51 100644 --- a/src/main/java/com/docus/server/report/job/ReportJob.java +++ b/src/main/java/com/docus/server/report/job/ReportJob.java @@ -237,16 +237,20 @@ public class ReportJob { boolean isPage = true; String orgCode = "4560886379"; Date admissDate = tBasic.getAdmissDate(); - if (admissDate == null) { + Date disDate = tBasic.getDisDate(); + if (admissDate == null || disDate==null) { throw new BaseException("patientId:" + tBasic.getPatientId() + "的入院时间为空"); } - Instant instant = admissDate.toInstant(); ZoneId zoneId = ZoneId.systemDefault(); - LocalDate admissLocalDate = instant.atZone(zoneId).toLocalDate(); - LocalDate endTimeLocalDate = admissLocalDate.plusDays(1); + Instant adminssDateInstant = admissDate.toInstant(); + Instant disDateInstant = disDate.toInstant(); + sdRyReportPatientId="m"+sdRyReportPatientId; + // 开始时间去入院前三天 + LocalDate admissLocalDate = adminssDateInstant.atZone(zoneId).toLocalDate(); LocalDate startTimeLocalDate = admissLocalDate.plusDays(-3); - String startTime = startTimeLocalDate + " 00:00:00"; - String endTime = endTimeLocalDate + " 00:00:00"; + LocalDate disLocalDate = disDateInstant.atZone(zoneId).toLocalDate(); + String startTime = startTimeLocalDate.toString() + " 00:00:00"; + String endTime = disLocalDate.toString() + " 23:59:59"; HashMap map = new HashMap<>(7); map.put("isPage", isPage); @@ -469,16 +473,20 @@ public class ReportJob { boolean isPage = true; String orgCode = "4560886379"; Date admissDate = tBasic.getAdmissDate(); - if (admissDate == null) { + Date disDate = tBasic.getDisDate(); + if (admissDate == null || disDate==null) { throw new BaseException("patientId:" + tBasic.getPatientId() + "的入院时间为空"); } - Instant instant = admissDate.toInstant(); ZoneId zoneId = ZoneId.systemDefault(); - LocalDate admissLocalDate = instant.atZone(zoneId).toLocalDate(); - LocalDate endTimeLocalDate = admissLocalDate.plusDays(1); + Instant adminssDateInstant = admissDate.toInstant(); + Instant disDateInstant = disDate.toInstant(); + sdRyReportPatientId="m"+sdRyReportPatientId; + // 开始时间去入院前三天 + LocalDate admissLocalDate = adminssDateInstant.atZone(zoneId).toLocalDate(); LocalDate startTimeLocalDate = admissLocalDate.plusDays(-3); - String startTime = startTimeLocalDate + " 00:00:00"; - String endTime = endTimeLocalDate + " 00:00:00"; + LocalDate disLocalDate = disDateInstant.atZone(zoneId).toLocalDate(); + String startTime = startTimeLocalDate.toString() + " 00:00:00"; + String endTime = disLocalDate.toString() + " 23:59:59"; HashMap map = new HashMap<>(7); map.put("isPage", isPage);