wangliang 3 éve
szülő
commit
d5bd3603fc

+ 2 - 5
distributed-print/src/main/java/com/qmth/distributed/print/api/TSyncExamStudentScoreController.java

@@ -129,11 +129,8 @@ public class TSyncExamStudentScoreController {
     @ApiResponses({@ApiResponse(code = 200, message = "常规信息", response = EditResult.class)})
     @RequestMapping(value = "/score/download", method = RequestMethod.POST)
     @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("未找到此考生信息"));
         boolean update = Objects.isNull(tSyncExamStudentScore.getTrajectoryUrls()) ? true : false;
         tSyncExamStudentScore = tSyncExamStudentScoreService.createImageTrajectory(tSyncExamStudentScore, ImageTrajectoryEnum.PREVIEW);