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);