|
@@ -77,7 +77,6 @@ public class StudentStatisticsController {
|
|
|
private final IStudentLeaveService studentLeaveService;
|
|
|
private final IBaseClassService classService;
|
|
|
private final IHolidayDateService holidayDateService;
|
|
|
- private final IAttendanceRuleCategoryService ruleCategoryService;
|
|
|
private final IBaseClassService baseClassService;
|
|
|
@GetMapping(value = "/class-statistics")
|
|
|
@ApiOperation(value="班级考勤统计")
|
|
@@ -293,6 +292,16 @@ public class StudentStatisticsController {
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ISO_DATE;
|
|
|
LocalDateTime startTime = LocalDate.parse(dto.getStartTime(), formatter).atTime(0, 0, 0);
|
|
|
LocalDateTime endTime = LocalDate.parse(dto.getEndTime(), formatter).atTime(23, 59, 59);
|
|
|
+ //如果查询天数只有一天
|
|
|
+ if(startTime.toLocalDate().isEqual(endTime.toLocalDate())){
|
|
|
+ HolidayDate holidayDate = holidayDateService.getOne(
|
|
|
+ new QueryWrapper<HolidayDate>().lambda()
|
|
|
+ .eq(HolidayDate::getDate, endTime.toLocalDate())
|
|
|
+ );
|
|
|
+ if(holidayDate != null && holidayDate.getWay() != null && holidayDate.getWay() != 0){
|
|
|
+ return RT.ok(ConventPage.getPageOutput(attendancePage, ClassStatisticsVo.class));
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
//查询每个班的走读生实到人数
|
|
@@ -393,7 +402,7 @@ public class StudentStatisticsController {
|
|
|
|
|
|
Integer lateCount = 0;
|
|
|
for (StudentOutInRecordVo outInRecord : notStayMap.get(record.getId())) {
|
|
|
- if(outInRecord.getStatus() == 1){
|
|
|
+ if(outInRecord.getStatus() == OutInStatusEnum.enter.getCode()){
|
|
|
continue;
|
|
|
}
|
|
|
if("迟到".equals(outInRecord.getAttendanceStatus())){
|
|
@@ -401,7 +410,7 @@ public class StudentStatisticsController {
|
|
|
}
|
|
|
}
|
|
|
for (StudentOutInRecordVo outInRecord : stayMap.get(record.getId())) {
|
|
|
- if(outInRecord.getStatus() == 1){
|
|
|
+ if(outInRecord.getStatus() == OutInStatusEnum.enter.getCode()){
|
|
|
continue;
|
|
|
}
|
|
|
if("迟到".equals(outInRecord.getAttendanceStatus())){
|