|
|
@@ -11,8 +11,12 @@ import com.xjrsoft.module.attendance.vo.AttendanceRuleDetailsUserVo;
|
|
|
import com.xjrsoft.module.attendance.vo.TeacherStatisticsVo;
|
|
|
import com.xjrsoft.module.concat.service.IXjrUserService;
|
|
|
import com.xjrsoft.module.organization.entity.UserDeptRelation;
|
|
|
+import com.xjrsoft.module.outint.entity.StudentOutInRecord;
|
|
|
import com.xjrsoft.module.outint.entity.TeacherOutInRecord;
|
|
|
+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.teacher.entity.BaseTeacher;
|
|
|
import com.xjrsoft.module.teacher.entity.XjrUser;
|
|
|
import com.xjrsoft.module.teacher.service.IWfTeacherleaveService;
|
|
|
@@ -47,6 +51,7 @@ public class StatisticsController {
|
|
|
|
|
|
private final IXjrUserService xjrUserService;
|
|
|
private final ITeacherOutInRecordService teacherOutInRecordService;
|
|
|
+ private final IStudentOutInRecordService studentOutInRecordService;
|
|
|
private final IAttendanceRuleCategoryService ruleCategoryService;
|
|
|
private final IWfTeacherleaveService wfTeacherleaveService;
|
|
|
|
|
|
@@ -125,8 +130,7 @@ public class StatisticsController {
|
|
|
//查询总人数
|
|
|
MPJLambdaWrapper<XjrUser> queryWrapper = MPJWrappers.<XjrUser>lambdaJoin()
|
|
|
.disableSubLogicDel()
|
|
|
- .innerJoin(BaseTeacher.class,BaseTeacher::getUserId,XjrUser::getId)
|
|
|
- .innerJoin(UserDeptRelation.class, UserDeptRelation::getUserId, XjrUser::getId);
|
|
|
+ .innerJoin(BaseStudent.class, BaseStudent::getUserId, XjrUser::getId);
|
|
|
long allCount = xjrUserService.count(queryWrapper);
|
|
|
statisticsVo.setAllCount(allCount);
|
|
|
if(dto.getDate() != null && !"".equals(dto.getDate())){
|
|
|
@@ -144,9 +148,9 @@ public class StatisticsController {
|
|
|
endTime = queryDate.atTime(23, 59, 59);
|
|
|
}
|
|
|
|
|
|
- List<TeacherOutInRecord> outInRecords = teacherOutInRecordService.list(
|
|
|
- new QueryWrapper<TeacherOutInRecord>().lambda()
|
|
|
- .between(TeacherOutInRecord::getRecordTime, startTime, endTime)
|
|
|
+ List<StudentOutInRecord> outInRecords = studentOutInRecordService.list(
|
|
|
+ new QueryWrapper<StudentOutInRecord>().lambda()
|
|
|
+ .between(StudentOutInRecord::getRecordTime, startTime, endTime)
|
|
|
);
|
|
|
//实到人数
|
|
|
statisticsVo.setActualCount(Long.valueOf(outInRecords.size()));
|
|
|
@@ -159,7 +163,7 @@ public class StatisticsController {
|
|
|
Map<Long, AttendanceRuleDetailsUserVo> allTeacherTodyRule = ruleCategoryService.getAllTeacherTodyRule(queryDate.getDayOfWeek().name());
|
|
|
//通过考勤规则和实到人数信息,计算迟到的
|
|
|
Long lateCount = 0L;
|
|
|
- for (TeacherOutInRecord outInRecord : outInRecords) {
|
|
|
+ for (StudentOutInRecord outInRecord : outInRecords) {
|
|
|
AttendanceRuleDetailsUserVo ruleDetails = allTeacherTodyRule.get(outInRecord.getUserId());
|
|
|
if(dto.getTimePeriod() == 1 && outInRecord.getRecordTime().toLocalTime().compareTo(ruleDetails.getAmStartTime()) > 0){
|
|
|
lateCount ++;
|