diff --git a/share-api/src/main/java/com/xjy/ai/api/controller/glcc/ApplyController.java b/share-api/src/main/java/com/xjy/ai/api/controller/glcc/ApplyController.java index e838df2..77ce6ef 100644 --- a/share-api/src/main/java/com/xjy/ai/api/controller/glcc/ApplyController.java +++ b/share-api/src/main/java/com/xjy/ai/api/controller/glcc/ApplyController.java @@ -314,6 +314,36 @@ public class ApplyController { }).collect(Collectors.toList()); return DataPacketUtil.ok(page.getTotal(), voList); } + @ApiOperation("审核课题列表(筛选锁定)") + @GetMapping("/lockedAuditList") + @GuestAccess + public ResponseEntity lockedAuditList(HttpServletRequest request, Integer userId, + @ApiParam("是否通过 0不通过 1通过") @RequestParam(defaultValue = "-1")Integer pass, + @RequestParam(defaultValue = "1",required = false) Integer round) { + User user = null; + if (userId != null) { + user = userService.getUserById(userId); + } else { + UserVo currentUser = userService.getCurrentUser(request); + user = userService.getUserByLogin(currentUser.getLogin()); + } + Page page = applyTaskService.pageAuditList(1, 100, user.getMail(), round); + List voList = Optional.ofNullable(page.getRecords()).orElse(Collections.emptyList()).stream().map((item) -> { + RegistrationTaskVo vo = BeanCopyUtils.beanPropertiesCopy(item, RegistrationTaskVo.class); + GlccRegistrationInformation registrationInformation = applyService.getById(item.getRegId()); + GlccRegistrationStudentTask registrationStudentTask = studentApplyTaskService.getRegistrationStudentTaskByPassStatusAndTaskIdWithoutSubRound(pass, item.getId(), round); + if(registrationStudentTask != null) { + GlccRegistrationStudent glccRegistrationStudent = studentApplyService.getById(registrationStudentTask.getStudentRegId()); + vo.setPass(registrationStudentTask == null ? null : registrationStudentTask.getPassStatus()); + vo.setStudentName(glccRegistrationStudent == null ? "" : glccRegistrationStudent.getStudentName()); + vo.setCanSubmitFinalExaminationMaterial(mediumTermExamineMaterialService.canSubmitFinalExaminationMaterial(registrationStudentTask.getStudentRegId(), round)); + } + vo.setProjectName(registrationInformation == null ? "" : registrationInformation.getProjectName()); + vo.setProjectType(registrationInformation == null ? "" : registrationInformation.getProjectType()); + return vo; + }).collect(Collectors.toList()); + return DataPacketUtil.ok(page.getTotal(), voList); + } @ApiOperation("查看课题信息") @GetMapping("/task/{id}") diff --git a/share-model/src/main/java/com/xjy/ai/model/service/glcc/Impl/StudentApplyTaskServiceImpl.java b/share-model/src/main/java/com/xjy/ai/model/service/glcc/Impl/StudentApplyTaskServiceImpl.java index d77c953..fe1d612 100644 --- a/share-model/src/main/java/com/xjy/ai/model/service/glcc/Impl/StudentApplyTaskServiceImpl.java +++ b/share-model/src/main/java/com/xjy/ai/model/service/glcc/Impl/StudentApplyTaskServiceImpl.java @@ -110,6 +110,17 @@ public class StudentApplyTaskServiceImpl extends ServiceImpl 0; } + @Override + public GlccRegistrationStudentTask getRegistrationStudentTaskByPassStatusAndTaskIdWithoutSubRound(Integer pass, Integer id, Integer round) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("task_id", id); + queryWrapper.eq("round", round); + //queryWrapper.eq("sub_round" ,1); + if (pass != -1) {queryWrapper.eq("locked", pass);} + queryWrapper.last("limit 1"); + return getOne(queryWrapper); + } + @Override public GlccRegistrationStudentTask getRegistrationStudentTaskByPassStatusAndTaskId(Integer pass, Integer id, Integer round) { QueryWrapper queryWrapper = new QueryWrapper<>(); @@ -120,7 +131,6 @@ public class StudentApplyTaskServiceImpl extends ServiceImpl findStuByTaskId(Integer taskId) { QueryWrapper wrapper = new QueryWrapper<>(); diff --git a/share-model/src/main/java/com/xjy/ai/model/service/glcc/StudentApplyTaskService.java b/share-model/src/main/java/com/xjy/ai/model/service/glcc/StudentApplyTaskService.java index 49361b6..996447a 100644 --- a/share-model/src/main/java/com/xjy/ai/model/service/glcc/StudentApplyTaskService.java +++ b/share-model/src/main/java/com/xjy/ai/model/service/glcc/StudentApplyTaskService.java @@ -29,6 +29,8 @@ public interface StudentApplyTaskService extends IService findStuByTaskId(Integer taskId); List findByCheckPass(Integer subRound, Integer round, List taskIds);