|
@@ -10,7 +10,6 @@ import com.xjrsoft.common.model.result.RT;
|
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
|
import com.xjrsoft.module.attendance.dto.TeacherDetailsDto;
|
|
|
-import com.xjrsoft.module.attendance.vo.ClassStatisticsVo;
|
|
|
import com.xjrsoft.module.attendance.vo.TeacherStatisticsPageVo;
|
|
|
import com.xjrsoft.module.holiday.entity.HolidayDate;
|
|
|
import com.xjrsoft.module.holiday.service.IHolidayDateService;
|
|
@@ -21,7 +20,9 @@ import com.xjrsoft.module.organization.service.IUserService;
|
|
|
import com.xjrsoft.module.outint.entity.TeacherOutInRecord;
|
|
|
import com.xjrsoft.module.outint.service.ITeacherOutInRecordService;
|
|
|
import com.xjrsoft.module.teacher.entity.BaseTeacher;
|
|
|
+import com.xjrsoft.module.teacher.entity.WfHeadTeacherLeave;
|
|
|
import com.xjrsoft.module.teacher.entity.WfTeacherleave;
|
|
|
+import com.xjrsoft.module.teacher.service.IWfHeadTeacherLeaveService;
|
|
|
import com.xjrsoft.module.teacher.service.IWfTeacherleaveService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -55,6 +56,7 @@ public class TeacherStatisticsController {
|
|
|
private final ITeacherOutInRecordService teacherOutInRecordService;
|
|
|
private final IWfTeacherleaveService wfTeacherleaveService;
|
|
|
private final IHolidayDateService holidayDateService;
|
|
|
+ private final IWfHeadTeacherLeaveService headTeacherLeaveService;
|
|
|
|
|
|
|
|
|
@GetMapping(value = "/teacher-details")
|
|
@@ -101,6 +103,8 @@ public class TeacherStatisticsController {
|
|
|
|
|
|
//查询当前时间段存在请假的教师
|
|
|
Map<Long, WfTeacherleave> leaveList = wfTeacherleaveService.getLeaveList(startTime, endTime);
|
|
|
+
|
|
|
+ Map<Long, WfHeadTeacherLeave> teacherLeaveMap = headTeacherLeaveService.getLeaveList(startTime, endTime);
|
|
|
//查询进入记录
|
|
|
List<TeacherOutInRecord> outInRecords = teacherOutInRecordService.list(
|
|
|
new QueryWrapper<TeacherOutInRecord>().lambda()
|
|
@@ -119,14 +123,19 @@ public class TeacherStatisticsController {
|
|
|
WfTeacherleave studentLeave = leaveList.get(record.getUserId());
|
|
|
if(studentLeave != null){
|
|
|
record.setStatus(studentLeave.getLeaveType());
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ WfHeadTeacherLeave teacherLeave = teacherLeaveMap.get(record.getUserId());
|
|
|
+ if(teacherLeave != null){
|
|
|
+ record.setStatus(teacherLeave.getLeaveReason());
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ TeacherOutInRecord outInRecord = outInMap.get(record.getUserId());
|
|
|
+ if(outInRecord != null){
|
|
|
+ record.setRecordTime(outInRecord.getRecordTime());
|
|
|
+ record.setStatus(outInRecord.getAttendanceStatus());
|
|
|
}else{
|
|
|
- TeacherOutInRecord outInRecord = outInMap.get(record.getUserId());
|
|
|
- if(outInRecord != null){
|
|
|
- record.setRecordTime(outInRecord.getRecordTime());
|
|
|
- record.setStatus(outInRecord.getAttendanceStatus());
|
|
|
- }else{
|
|
|
- record.setStatus("缺勤");
|
|
|
- }
|
|
|
+ record.setStatus("缺勤");
|
|
|
}
|
|
|
}
|
|
|
}
|