fix: 统一延误扣分计算逻辑,只计算指定月份内完成的任务

This commit is contained in:
Your Name 2026-01-13 18:09:14 +08:00
parent 4ee87abe73
commit 5bfb610ee8

View File

@ -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) {