From 6033b6a1283bdf402a9c34a2b7c4bb2f22ad3836 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Sat, 31 Aug 2024 17:12:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=A2=84=E8=AD=A6=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=A2=84=E7=AE=97=E5=B9=B4=E5=BA=A6=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java index 14c4e19..dc102a1 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java @@ -812,9 +812,10 @@ public class WorkbenchManage { queryWrapper.exists(unitStripSql); } if (req.getProjectYear() != null) { - LocalDate startDate = LocalDate.of(req.getProjectYear(), 1, 1); - LocalDate endDate = LocalDate.now().plusDays(1); - queryWrapper.between(ProjectEarlyWarning::getCreateOn, startDate, endDate); + String projectYearSql = String.format("select 1 from nd_project np where " + + "np.project_code = nd_project_early_warning.project_code " + + " and np.newest = 1 and np.project_year = %d", req.getProjectYear()); + queryWrapper.exists(projectYearSql); } List records = projectEarlyWarningService.list(queryWrapper);