From 5bfb610ee8c54eeac67913792f68d324b5323e13 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 13 Jan 2026 18:09:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BB=9F=E4=B8=80=E5=BB=B6=E8=AF=AF?= =?UTF-8?q?=E6=89=A3=E5=88=86=E8=AE=A1=E7=AE=97=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E5=8F=AA=E8=AE=A1=E7=AE=97=E6=8C=87=E5=AE=9A=E6=9C=88=E4=BB=BD?= =?UTF-8?q?=E5=86=85=E5=AE=8C=E6=88=90=E7=9A=84=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/designhub/service/AnalyticsService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/com/designhub/service/AnalyticsService.java b/backend/src/main/java/com/designhub/service/AnalyticsService.java index 2fb04b4..68c10fc 100644 --- a/backend/src/main/java/com/designhub/service/AnalyticsService.java +++ b/backend/src/main/java/com/designhub/service/AnalyticsService.java @@ -668,7 +668,10 @@ public class AnalyticsService { BigDecimal deductionRate = getDeductionRate(designer.getDeptId(), currentMonth); for (Task task : designerTasks) { - if ("completed".equals(task.getStatus())) { + // 只计算在指定月份内完成的任务(与getDesignerDeductionDetails保持一致) + if ("completed".equals(task.getStatus()) && task.getActualEndTime() != null + && !task.getActualEndTime().isBefore(startTime) + && !task.getActualEndTime().isAfter(endTime)) { // 计算任务积分 BigDecimal taskScore = BigDecimal.ZERO; if (task.getScoreReward() != null && task.getScoreReward().compareTo(BigDecimal.ZERO) > 0) {