| | |
| | | package com.mindskip.xzs.controller.admin; |
| | | |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.mindskip.xzs.base.BaseApiController; |
| | |
| | | import com.mindskip.xzs.domain.ExamPaperAnswer; |
| | | import com.mindskip.xzs.domain.User; |
| | | import com.mindskip.xzs.domain.UserDepartment; |
| | | import com.mindskip.xzs.domain.vo.ScoreTemplatesCountVO; |
| | | import com.mindskip.xzs.repository.DepartmentMapper; |
| | | import com.mindskip.xzs.repository.ExamPaperAnswerMapper; |
| | | import com.mindskip.xzs.repository.UserDepartmentMapper; |
| | | import com.mindskip.xzs.repository.UserMapper; |
| | | import com.mindskip.xzs.service.*; |
| | | import com.mindskip.xzs.utility.minio.DateUtils; |
| | | import com.mindskip.xzs.viewmodel.admin.paper.ExamPaperGradePageRequestVM; |
| | | import com.mindskip.xzs.viewmodel.admin.paper.ExamPaperGradeQuery; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | @RestController("AdminExamPaperGradeController") |
| | | @RequestMapping(value = "/api/admin/examPaperGrade") |
| | |
| | | |
| | | @RequestMapping(value = "/page", method = RequestMethod.POST) |
| | | public RestResponse<PageInfo<ExamPaperAnswer>> pageJudgeList(@RequestBody ExamPaperGradeQuery query) { |
| | | // 查出用户(并做数据权限) |
| | | User currentUser = webContext.getCurrentUser(); |
| | | if (Objects.nonNull(currentUser)) { |
| | | // 如果是部门管理员,需要做数据权限 |
| | | if ("1".equals(currentUser.getDeptAdmin())) { |
| | | query.setDeptId(departmentMapper.selectByAdminId(currentUser.getId())); |
| | | } |
| | | } |
| | | // 如果是部门管理员,需要做数据权限 |
| | | query.setDeptId(ObjectUtils.isNotEmpty(query.getDeptId()) ? query.getDeptId() : getAdminDeptIds()); |
| | | query.setFullTime(); |
| | | // 查询 |
| | | PageInfo<ExamPaperAnswer> info = PageHelper.startPage(query.getPageIndex(), query.getPageSize()).doSelectPageInfo(() -> |