From c84eda8bde1d1b34aefc90ff1ded0bbe8cae396f Mon Sep 17 00:00:00 2001 From: WendyYang Date: Thu, 21 Mar 2024 16:09:53 +0800 Subject: [PATCH] =?UTF-8?q?DecimalUtil=E4=BC=98=E5=8C=96?= 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 | 5 +++++ 1 file changed, 5 insertions(+) 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 510854a..04853d7 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 @@ -56,6 +56,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; import java.math.BigDecimal; +import java.time.LocalDate; import java.time.LocalDateTime; import java.time.temporal.ChronoUnit; import java.util.*; @@ -358,8 +359,12 @@ public class WorkbenchManage { if (unitId == null) { unitId = LoginUserUtil.loginUserDetail().getMhUnitId(); } + if (projectYear == null) { + projectYear = LocalDate.now().getYear(); + } LambdaQueryWrapper query = Wrappers.lambdaQuery(Project.class) .select(Project::getReviewAmount, Project::getApprovalAmount, Project::getId) + .eq(Project::getProjectYear, projectYear) .eq(Project::getNewest, Boolean.TRUE); List viewUnitIds = mhUnitCache.getChildrenIdsRecursion(unitId); viewUnitIds.add(unitId);