|
@@ -3,10 +3,13 @@ package com.ym.mec.web.controller.education;
|
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.biz.dal.dao.EmployeeDao;
|
|
|
+import com.ym.mec.biz.dal.dao.TeacherDao;
|
|
|
import com.ym.mec.biz.dal.entity.Employee;
|
|
|
+import com.ym.mec.biz.dal.entity.Teacher;
|
|
|
import com.ym.mec.biz.dal.page.StudentManageQueryInfo;
|
|
|
import com.ym.mec.biz.dal.page.StudentQueryInfo;
|
|
|
import com.ym.mec.biz.service.StudentManageService;
|
|
|
+import com.ym.mec.biz.service.TeacherService;
|
|
|
import com.ym.mec.common.page.QueryInfo;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
@@ -24,6 +27,7 @@ import com.ym.mec.common.controller.BaseController;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
/**
|
|
|
* @Author Joburgess
|
|
@@ -42,6 +46,8 @@ public class EduStudentStudentController extends BaseController {
|
|
|
private SysUserFeignService sysUserFeignService;
|
|
|
@Autowired
|
|
|
private EmployeeDao employeeDao;
|
|
|
+ @Autowired
|
|
|
+ private TeacherService teacherService;
|
|
|
|
|
|
@ApiOperation(value = "获取某节课学生签到列表")
|
|
|
@GetMapping("eduStudentAttendance/findStudentAttendance")
|
|
@@ -74,6 +80,18 @@ public class EduStudentStudentController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
return failed("用户信息获取失败");
|
|
|
}
|
|
|
+ if(Objects.nonNull(queryInfo.getTeacherId())){
|
|
|
+ Teacher teacher = teacherService.get(queryInfo.getTeacherId());
|
|
|
+ if(Objects.isNull(teacher)){
|
|
|
+ return failed("教师信息不存在");
|
|
|
+ }
|
|
|
+ if(Objects.nonNull(teacher.getOrganId())){
|
|
|
+ queryInfo.setOrganId(teacher.getOrganId().toString());
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotBlank(teacher.getFlowOrganRange())){
|
|
|
+ queryInfo.setOrganId(queryInfo.getOrganId()+","+teacher.getFlowOrganRange());
|
|
|
+ }
|
|
|
+ }
|
|
|
Employee employee = employeeDao.get(sysUser.getId());
|
|
|
if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
queryInfo.setOrganId(employee.getOrganIdList());
|