|
|
@@ -17,6 +17,7 @@ import com.xjrsoft.module.outint.service.IStudentOutInRecordService;
|
|
|
import com.xjrsoft.module.outint.service.ITeacherOutInRecordService;
|
|
|
import com.xjrsoft.module.student.entity.BaseStudent;
|
|
|
import com.xjrsoft.module.student.entity.StudentLeave;
|
|
|
+import com.xjrsoft.module.student.service.IStudentLeaveService;
|
|
|
import com.xjrsoft.module.teacher.entity.BaseTeacher;
|
|
|
import com.xjrsoft.module.teacher.entity.XjrUser;
|
|
|
import com.xjrsoft.module.teacher.service.IWfTeacherleaveService;
|
|
|
@@ -54,6 +55,7 @@ public class StatisticsController {
|
|
|
private final IStudentOutInRecordService studentOutInRecordService;
|
|
|
private final IAttendanceRuleCategoryService ruleCategoryService;
|
|
|
private final IWfTeacherleaveService wfTeacherleaveService;
|
|
|
+ private final IStudentLeaveService studentLeaveService;
|
|
|
|
|
|
@GetMapping(value = "/teacher-statistics")
|
|
|
@ApiOperation(value="教职工考勤统计")
|
|
|
@@ -91,6 +93,9 @@ public class StatisticsController {
|
|
|
|
|
|
//查询教师请假人数
|
|
|
Long leaveCount = wfTeacherleaveService.getLeaveCount(startTime, endTime);
|
|
|
+ if(leaveCount == null){
|
|
|
+ leaveCount = 0L;
|
|
|
+ }
|
|
|
statisticsVo.setLeaveCount(leaveCount);
|
|
|
|
|
|
//查询每个人当天的考勤规则
|
|
|
@@ -123,7 +128,7 @@ public class StatisticsController {
|
|
|
|
|
|
|
|
|
@GetMapping(value = "/student-statistics")
|
|
|
- @ApiOperation(value="教职工考勤统计")
|
|
|
+ @ApiOperation(value="学生考勤统计")
|
|
|
@SaCheckPermission("statistics:detail")
|
|
|
public RT<TeacherStatisticsVo> studentStatistics(@Valid AttendanceStatisticDto dto){
|
|
|
TeacherStatisticsVo statisticsVo = new TeacherStatisticsVo();
|
|
|
@@ -156,11 +161,14 @@ public class StatisticsController {
|
|
|
statisticsVo.setActualCount(Long.valueOf(outInRecords.size()));
|
|
|
|
|
|
//查询教师请假人数
|
|
|
- Long leaveCount = wfTeacherleaveService.getLeaveCount(startTime, endTime);
|
|
|
+ Long leaveCount = studentLeaveService.getLeaveCount(startTime, endTime);
|
|
|
+ if(leaveCount == null){
|
|
|
+ leaveCount = 0L;
|
|
|
+ }
|
|
|
statisticsVo.setLeaveCount(leaveCount);
|
|
|
|
|
|
//查询每个人当天的考勤规则
|
|
|
- Map<Long, AttendanceRuleDetailsUserVo> allTeacherTodyRule = ruleCategoryService.getAllTeacherTodyRule(queryDate.getDayOfWeek().name());
|
|
|
+ Map<Long, AttendanceRuleDetailsUserVo> allTeacherTodyRule = ruleCategoryService.getAllStudentTodyRule(queryDate.getDayOfWeek().name());
|
|
|
//通过考勤规则和实到人数信息,计算迟到的
|
|
|
Long lateCount = 0L;
|
|
|
for (StudentOutInRecord outInRecord : outInRecords) {
|