From 2c5edea8df50d10892b514b33087f3b9d9e32db9 Mon Sep 17 00:00:00 2001 From: huaxia2002 Date: Wed, 2 Aug 2023 11:06:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9ElockedAuditList=E5=8E=BB?= =?UTF-8?q?=E9=99=A4=E4=BA=86sub=5Fround=E7=9A=84=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/controller/glcc/ApplyController.java | 30 +++++++++++++++++++ .../Impl/StudentApplyTaskServiceImpl.java | 12 +++++++- .../service/glcc/StudentApplyTaskService.java | 2 ++ 3 files changed, 43 insertions(+), 1 deletion(-) 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);