|
@@ -17,6 +17,8 @@ import com.xjrsoft.module.attendance.vo.ClassStatisticsVo;
|
|
import com.xjrsoft.module.attendance.vo.StudentStatisticsPageVo;
|
|
import com.xjrsoft.module.attendance.vo.StudentStatisticsPageVo;
|
|
import com.xjrsoft.module.base.entity.BaseClass;
|
|
import com.xjrsoft.module.base.entity.BaseClass;
|
|
import com.xjrsoft.module.base.service.IBaseClassService;
|
|
import com.xjrsoft.module.base.service.IBaseClassService;
|
|
|
|
+import com.xjrsoft.module.holiday.entity.HolidayDate;
|
|
|
|
+import com.xjrsoft.module.holiday.service.IHolidayDateService;
|
|
import com.xjrsoft.module.organization.entity.User;
|
|
import com.xjrsoft.module.organization.entity.User;
|
|
import com.xjrsoft.module.organization.service.IUserService;
|
|
import com.xjrsoft.module.organization.service.IUserService;
|
|
import com.xjrsoft.module.outint.entity.StudentOutInRecord;
|
|
import com.xjrsoft.module.outint.entity.StudentOutInRecord;
|
|
@@ -65,6 +67,7 @@ public class StudentStatisticsController {
|
|
private final IStudentOutInRecordService studentOutInRecordService;
|
|
private final IStudentOutInRecordService studentOutInRecordService;
|
|
private final IStudentLeaveService studentLeaveService;
|
|
private final IStudentLeaveService studentLeaveService;
|
|
private final IBaseClassService classService;
|
|
private final IBaseClassService classService;
|
|
|
|
+ private final IHolidayDateService holidayDateService;
|
|
|
|
|
|
@GetMapping(value = "/class-statistics")
|
|
@GetMapping(value = "/class-statistics")
|
|
@ApiOperation(value="班级考勤统计")
|
|
@ApiOperation(value="班级考勤统计")
|
|
@@ -78,6 +81,15 @@ public class StudentStatisticsController {
|
|
if(dto.getDate() != null && !"".equals(dto.getDate())){
|
|
if(dto.getDate() != null && !"".equals(dto.getDate())){
|
|
DateTimeFormatter formatter = DateTimeFormatter.ISO_DATE;
|
|
DateTimeFormatter formatter = DateTimeFormatter.ISO_DATE;
|
|
LocalDate queryDate = LocalDate.parse(dto.getDate(), formatter);
|
|
LocalDate queryDate = LocalDate.parse(dto.getDate(), formatter);
|
|
|
|
+
|
|
|
|
+ HolidayDate holidayDate = holidayDateService.getOne(
|
|
|
|
+ new QueryWrapper<HolidayDate>().lambda()
|
|
|
|
+ .eq(HolidayDate::getDate, queryDate)
|
|
|
|
+ );
|
|
|
|
+ if(holidayDate != null && holidayDate.getWay() != null && holidayDate.getWay() != 0){
|
|
|
|
+ return RT.ok(ConventPage.getPageOutput(attendancePage, ClassStatisticsVo.class));
|
|
|
|
+ }
|
|
|
|
+
|
|
LocalDateTime startTime, endTime;
|
|
LocalDateTime startTime, endTime;
|
|
|
|
|
|
|
|
|
|
@@ -94,8 +106,6 @@ public class StudentStatisticsController {
|
|
startTime = queryDate.atTime(0, 0, 0);
|
|
startTime = queryDate.atTime(0, 0, 0);
|
|
endTime = queryDate.atTime(23, 59, 59);
|
|
endTime = queryDate.atTime(23, 59, 59);
|
|
}
|
|
}
|
|
- LocalDateTime lastSundayStart = startTime.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)).plusDays(-1);
|
|
|
|
- LocalDateTime lastSundayEnd = endTime.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)).plusDays(-1);
|
|
|
|
|
|
|
|
//查询每个班的走读生实到人数
|
|
//查询每个班的走读生实到人数
|
|
Map<Long, List<StudentOutInRecordVo>> notStayMap = studentOutInRecordService.getList(startTime, endTime, classIds);
|
|
Map<Long, List<StudentOutInRecordVo>> notStayMap = studentOutInRecordService.getList(startTime, endTime, classIds);
|
|
@@ -237,6 +247,7 @@ public class StudentStatisticsController {
|
|
LocalDateTime startTime = LocalDate.parse(dto.getStartTime(), formatter).atTime(0, 0, 0);
|
|
LocalDateTime startTime = LocalDate.parse(dto.getStartTime(), formatter).atTime(0, 0, 0);
|
|
LocalDateTime endTime = LocalDate.parse(dto.getEndTime(), formatter).atTime(23, 59, 59);
|
|
LocalDateTime endTime = LocalDate.parse(dto.getEndTime(), formatter).atTime(23, 59, 59);
|
|
|
|
|
|
|
|
+
|
|
//查询每个班的走读生实到人数
|
|
//查询每个班的走读生实到人数
|
|
Map<Long, List<StudentOutInRecordVo>> notStayMap = studentOutInRecordService.getNotStayList(startTime, endTime, classIds);
|
|
Map<Long, List<StudentOutInRecordVo>> notStayMap = studentOutInRecordService.getNotStayList(startTime, endTime, classIds);
|
|
//查询住校生的实到情况
|
|
//查询住校生的实到情况
|