fix: 修复AnalyticsService中currentMonth变量未定义的问题
This commit is contained in:
parent
505efce1c6
commit
62ce022272
@ -557,11 +557,13 @@ public class AnalyticsService {
|
||||
isAdmin = true;
|
||||
}
|
||||
|
||||
// 计算时间范围
|
||||
// 计算时间范围和当前月份
|
||||
LocalDateTime startTime;
|
||||
LocalDateTime endTime;
|
||||
String currentMonth; // 用于目标积分查询
|
||||
|
||||
if (month != null && !month.isEmpty()) {
|
||||
currentMonth = month;
|
||||
try {
|
||||
LocalDate monthDate = LocalDate.parse(month + "-01", DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
startTime = LocalDateTime.of(monthDate, LocalTime.MIN);
|
||||
@ -570,11 +572,13 @@ public class AnalyticsService {
|
||||
LocalDate now = LocalDate.now();
|
||||
startTime = LocalDateTime.of(now.withDayOfMonth(1), LocalTime.MIN);
|
||||
endTime = LocalDateTime.now();
|
||||
currentMonth = now.format(DateTimeFormatter.ofPattern("yyyy-MM"));
|
||||
}
|
||||
} else {
|
||||
LocalDate now = LocalDate.now();
|
||||
startTime = LocalDateTime.of(now.withDayOfMonth(1), LocalTime.MIN);
|
||||
endTime = LocalDateTime.now();
|
||||
currentMonth = now.format(DateTimeFormatter.ofPattern("yyyy-MM"));
|
||||
}
|
||||
|
||||
// 获取所有设计师(接单部门成员)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user