|
@@ -129,11 +129,8 @@ public class TSyncExamStudentScoreController {
|
|
@ApiResponses({@ApiResponse(code = 200, message = "常规信息", response = EditResult.class)})
|
|
@ApiResponses({@ApiResponse(code = 200, message = "常规信息", response = EditResult.class)})
|
|
@RequestMapping(value = "/score/download", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/score/download", method = RequestMethod.POST)
|
|
@Transactional
|
|
@Transactional
|
|
- public void download(@ApiParam(value = "学号", required = true) @RequestParam String studentCode) throws Exception {
|
|
|
|
- SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
|
- QueryWrapper<TSyncExamStudentScore> tSyncExamStudentScoreQueryWrapper = new QueryWrapper<>();
|
|
|
|
- tSyncExamStudentScoreQueryWrapper.lambda().eq(TSyncExamStudentScore::getSchoolId, sysUser.getSchoolId()).eq(TSyncExamStudentScore::getStudentCode, studentCode);
|
|
|
|
- TSyncExamStudentScore tSyncExamStudentScore = tSyncExamStudentScoreService.getOne(tSyncExamStudentScoreQueryWrapper);
|
|
|
|
|
|
+ public void download(@ApiParam(value = "主键", required = true) @RequestParam String id) throws Exception {
|
|
|
|
+ TSyncExamStudentScore tSyncExamStudentScore = tSyncExamStudentScoreService.getById(SystemConstant.convertIdToLong(id));
|
|
Optional.ofNullable(tSyncExamStudentScore).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未找到此考生信息"));
|
|
Optional.ofNullable(tSyncExamStudentScore).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未找到此考生信息"));
|
|
boolean update = Objects.isNull(tSyncExamStudentScore.getTrajectoryUrls()) ? true : false;
|
|
boolean update = Objects.isNull(tSyncExamStudentScore.getTrajectoryUrls()) ? true : false;
|
|
tSyncExamStudentScore = tSyncExamStudentScoreService.createImageTrajectory(tSyncExamStudentScore, ImageTrajectoryEnum.PREVIEW);
|
|
tSyncExamStudentScore = tSyncExamStudentScoreService.createImageTrajectory(tSyncExamStudentScore, ImageTrajectoryEnum.PREVIEW);
|