|
|
|
@ -144,15 +144,15 @@ public class TestWithoutSpring {
|
|
|
|
|
@Test
|
|
|
|
|
public void testLocalDateTime() {
|
|
|
|
|
List<School.Semester> semesters = Arrays.asList(
|
|
|
|
|
new School.Semester("1", "上学期", 1, 2, 1),
|
|
|
|
|
new School.Semester("3", "下学期", 0, 8, 1),
|
|
|
|
|
new School.Semester("4", "下学期", 0, 11, 1),
|
|
|
|
|
new School.Semester("2", "下学期", 0, 5, 1)
|
|
|
|
|
new School.Semester("1", "上学期", 0, 2, 1), // 2024-3 , 正确: 2023-3
|
|
|
|
|
new School.Semester("3", "下学期", 1, 8, 1)
|
|
|
|
|
// new School.Semester("4", "下学期", 0, 11, 1),
|
|
|
|
|
// new School.Semester("2", "下学期", 0, 5, 1)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
LocalDate currentDate = LocalDate.of(2024, 11, 1);
|
|
|
|
|
// LocalDate currentDate = LocalDate.of(2024, 11, 1);
|
|
|
|
|
|
|
|
|
|
String id = SchoolDateUtil.calculateAcademicYearId(semesters, currentDate);
|
|
|
|
|
String id = SchoolDateUtil.calculateAcademicYearId(semesters, LocalDate.now());
|
|
|
|
|
System.out.println(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|