|
@@ -80,7 +80,7 @@ public class TSyncExamStudentScoreController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "成绩导出")
|
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "成绩查询信息", response = TSyncExamStudentScoreResult.class)})
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "同步信息", response = TBTask.class)})
|
|
|
@RequestMapping(value = "/score/export", method = RequestMethod.POST)
|
|
|
public Result export(@ApiParam(value = "学期id", required = true) @RequestParam String semesterId,
|
|
|
@ApiParam(value = "学院id", required = true) @RequestParam String orgId,
|
|
@@ -103,12 +103,39 @@ public class TSyncExamStudentScoreController {
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "同步异步任务信息", response = TBSyncTask.class)})
|
|
|
@RequestMapping(value = "/score/sync", method = RequestMethod.POST)
|
|
|
public Result sync(@ApiParam(value = "考试id", required = true) @RequestParam String examId,
|
|
|
- @ApiParam(value = "考试编码", required = false) @RequestParam(required = false) String examCode) {
|
|
|
- Map<String, Object> map = printCommonService.savePush(PushTypeEnum.USER_PUSH);
|
|
|
+ @ApiParam(value = "考试编码", required = false) @RequestParam(required = false) String examCode) {
|
|
|
+ Map<String, Object> map = printCommonService.savePush(PushTypeEnum.SCORE_PUSH);
|
|
|
map.computeIfAbsent("examId", v -> SystemConstant.convertIdToInteger(examId));
|
|
|
map.computeIfAbsent("examCode", v -> examCode);
|
|
|
asyncScorePushService.pushTask(map);
|
|
|
TBSyncTask tbSyncTask = Objects.nonNull(map.get(SystemConstant.TB_SYNC_TASK)) ? (TBSyncTask) map.get(SystemConstant.TB_SYNC_TASK) : null;
|
|
|
return Objects.nonNull(tbSyncTask) ? ResultUtil.ok(tbSyncTask.getId()) : ResultUtil.error("创建同步推送任务失败");
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "成绩动态轨迹图下载")
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "常规信息", response = Result.class)})
|
|
|
+ @RequestMapping(value = "/score/download", method = RequestMethod.POST)
|
|
|
+ public Result download(@ApiParam(value = "考试id", required = true) @RequestParam String examStudentId) {
|
|
|
+ return ResultUtil.ok(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "成绩动态轨迹图一键下载")
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "同步信息", response = TBTask.class)})
|
|
|
+ @RequestMapping(value = "/score/batch_download", method = RequestMethod.POST)
|
|
|
+ public Result batchDownload(@ApiParam(value = "学期id", required = true) @RequestParam String semesterId,
|
|
|
+ @ApiParam(value = "学院id", required = true) @RequestParam String orgId,
|
|
|
+ @ApiParam(value = "专业id", required = false) @RequestParam(required = false) String majorId,
|
|
|
+ @ApiParam(value = "班级id", required = false) @RequestParam(required = false) String clazzId,
|
|
|
+ @ApiParam(value = "课程编码", required = false) @RequestParam(required = false) String courseCode) {
|
|
|
+ Map<String, Object> map = printCommonService.saveTask(TaskTypeEnum.SCORE_DOWNLOAD);
|
|
|
+ map.computeIfAbsent("semesterId", v -> SystemConstant.convertIdToLong(semesterId));
|
|
|
+ map.computeIfAbsent("orgId", v -> SystemConstant.convertIdToLong(orgId));
|
|
|
+ map.computeIfAbsent("majorId", v -> SystemConstant.convertIdToLong(majorId));
|
|
|
+ map.computeIfAbsent("clazzId", v -> SystemConstant.convertIdToLong(clazzId));
|
|
|
+ map.computeIfAbsent("courseCode", v -> courseCode);
|
|
|
+ map.computeIfAbsent(SystemConstant.OSS, v -> dictionaryConfig.sysDomain().isOss());
|
|
|
+// asyncScoreExportService.exportTask(map);
|
|
|
+ TBTask tbTask = Objects.nonNull(map.get(SystemConstant.TASK)) ? (TBTask) map.get(SystemConstant.TASK) : null;
|
|
|
+ return Objects.nonNull(tbTask) ? ResultUtil.ok(tbTask.getId()) : ResultUtil.error("创建任务失败");
|
|
|
+ }
|
|
|
}
|