新增lockedAuditList去除了sub_round的筛选条件

This commit is contained in:
huaxia2002 2023-08-02 11:06:31 +08:00
parent 8ef25f9d2c
commit 2c5edea8df
3 changed files with 43 additions and 1 deletions

View File

@ -314,6 +314,36 @@ public class ApplyController {
}).collect(Collectors.toList());
return DataPacketUtil.ok(page.getTotal(), voList);
}
@ApiOperation("审核课题列表(筛选锁定)")
@GetMapping("/lockedAuditList")
@GuestAccess
public ResponseEntity<ResponseData> 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<GlccRegistrationTask> page = applyTaskService.pageAuditList(1, 100, user.getMail(), round);
List<RegistrationTaskVo> 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}")

View File

@ -110,6 +110,17 @@ public class StudentApplyTaskServiceImpl extends ServiceImpl<GlccRegistrationStu
return flag > 0;
}
@Override
public GlccRegistrationStudentTask getRegistrationStudentTaskByPassStatusAndTaskIdWithoutSubRound(Integer pass, Integer id, Integer round) {
QueryWrapper<GlccRegistrationStudentTask> 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<GlccRegistrationStudentTask> queryWrapper = new QueryWrapper<>();
@ -120,7 +131,6 @@ public class StudentApplyTaskServiceImpl extends ServiceImpl<GlccRegistrationStu
queryWrapper.last("limit 1");
return getOne(queryWrapper);
}
@Override
public List<GlccRegistrationStudentTask> findStuByTaskId(Integer taskId) {
QueryWrapper<GlccRegistrationStudentTask> wrapper = new QueryWrapper<>();

View File

@ -29,6 +29,8 @@ public interface StudentApplyTaskService extends IService<GlccRegistrationStuden
GlccRegistrationStudentTask getRegistrationStudentTaskByPassStatusAndTaskId(Integer pass, Integer id, Integer round);
GlccRegistrationStudentTask getRegistrationStudentTaskByPassStatusAndTaskIdWithoutSubRound(Integer pass, Integer id, Integer round);
List<GlccRegistrationStudentTask> findStuByTaskId(Integer taskId);
List<GlccRegistrationStudentTask> findByCheckPass(Integer subRound, Integer round, List<Integer> taskIds);