|
|
@@ -1,6 +1,7 @@
|
|
|
package com.xjrsoft.module.attendance.controller;
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.github.yulichang.toolkit.MPJWrappers;
|
|
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
@@ -16,6 +17,7 @@ import com.xjrsoft.module.outint.service.IStudentOutInRecordService;
|
|
|
import com.xjrsoft.module.outint.service.ITeacherOutInRecordService;
|
|
|
import com.xjrsoft.module.personnel.service.IReservationSchoolService;
|
|
|
import com.xjrsoft.module.student.entity.BaseStudent;
|
|
|
+import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
|
|
|
import com.xjrsoft.module.student.service.IStudentLeaveService;
|
|
|
import com.xjrsoft.module.teacher.entity.BaseTeacher;
|
|
|
import com.xjrsoft.module.teacher.entity.XjrUser;
|
|
|
@@ -63,6 +65,7 @@ public class StatisticsController {
|
|
|
//查询总人数
|
|
|
MPJLambdaWrapper<XjrUser> queryWrapper = MPJWrappers.<XjrUser>lambdaJoin()
|
|
|
.disableSubLogicDel()
|
|
|
+ .eq(ObjectUtil.isNotNull(dto.getDeptId()), UserDeptRelation::getDeptId, dto.getDeptId())
|
|
|
.innerJoin(BaseTeacher.class,BaseTeacher::getUserId,XjrUser::getId)
|
|
|
.innerJoin(UserDeptRelation.class, UserDeptRelation::getUserId, XjrUser::getId);
|
|
|
long allCount = xjrUserService.count(queryWrapper);
|
|
|
@@ -126,6 +129,10 @@ public class StatisticsController {
|
|
|
//查询总人数
|
|
|
MPJLambdaWrapper<XjrUser> queryWrapper = MPJWrappers.<XjrUser>lambdaJoin()
|
|
|
.disableSubLogicDel()
|
|
|
+ .distinct()
|
|
|
+ .eq(ObjectUtil.isNotNull(dto.getGradeId()), BaseStudentSchoolRoll::getGradeId, dto.getGradeId())
|
|
|
+ .eq(ObjectUtil.isNotNull(dto.getClassId()), BaseStudentSchoolRoll::getClassId, dto.getClassId())
|
|
|
+ .innerJoin(BaseStudentSchoolRoll.class, BaseStudentSchoolRoll::getUserId, XjrUser::getId)
|
|
|
.innerJoin(BaseStudent.class, BaseStudent::getUserId, XjrUser::getId);
|
|
|
long allCount = xjrUserService.count(queryWrapper);
|
|
|
statisticsVo.setAllCount(allCount);
|