|
@@ -36,51 +36,51 @@ import io.swagger.annotations.ApiOperation;
|
|
@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/paper")
|
|
@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/paper")
|
|
@Aac(strict = BOOL.FALSE, auth = BOOL.TRUE)
|
|
@Aac(strict = BOOL.FALSE, auth = BOOL.TRUE)
|
|
public class PaperController extends BaseController {
|
|
public class PaperController extends BaseController {
|
|
-
|
|
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private PaperService paperService;
|
|
private PaperService paperService;
|
|
-
|
|
|
|
|
|
+
|
|
@PostMapping("import-course")
|
|
@PostMapping("import-course")
|
|
@ApiOperation(value = "导入科目")
|
|
@ApiOperation(value = "导入科目")
|
|
public ImportMsg importPaper(@RequestParam Long examId, @RequestParam MultipartFile file) {
|
|
public ImportMsg importPaper(@RequestParam Long examId, @RequestParam MultipartFile file) {
|
|
- List<String> failRecords=paperService.importPaper(examId,getAccessUser(),file);
|
|
|
|
|
|
+ List<String> failRecords = paperService.importPaper(examId, getAccessUser(), file);
|
|
ImportMsg msg = new ImportMsg();
|
|
ImportMsg msg = new ImportMsg();
|
|
msg.setHasError(CollectionUtils.isNotEmpty(failRecords));
|
|
msg.setHasError(CollectionUtils.isNotEmpty(failRecords));
|
|
msg.setErrMsg(failRecords);
|
|
msg.setErrMsg(failRecords);
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@PostMapping("import-struct-subject")
|
|
@PostMapping("import-struct-subject")
|
|
@ApiOperation(value = "导入主观题试卷结构")
|
|
@ApiOperation(value = "导入主观题试卷结构")
|
|
public ImportMsg importSubjectStruct(@RequestParam Long examId, @RequestParam MultipartFile file) {
|
|
public ImportMsg importSubjectStruct(@RequestParam Long examId, @RequestParam MultipartFile file) {
|
|
- List<String> failRecords=paperService.importPaper(examId,getAccessUser(),file);
|
|
|
|
|
|
+ List<String> failRecords = paperService.importPaper(examId, getAccessUser(), file);
|
|
ImportMsg msg = new ImportMsg();
|
|
ImportMsg msg = new ImportMsg();
|
|
msg.setHasError(CollectionUtils.isNotEmpty(failRecords));
|
|
msg.setHasError(CollectionUtils.isNotEmpty(failRecords));
|
|
msg.setErrMsg(failRecords);
|
|
msg.setErrMsg(failRecords);
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
|
|
@ApiOperation(value = "下载科目导入模板")
|
|
@ApiOperation(value = "下载科目导入模板")
|
|
@PostMapping("template-course")
|
|
@PostMapping("template-course")
|
|
public void getImportTemplate() {
|
|
public void getImportTemplate() {
|
|
exportFile("科目导入模板.xlsx", ResouceUtil.getStream("importtemplates/courseImport.xlsx"));
|
|
exportFile("科目导入模板.xlsx", ResouceUtil.getStream("importtemplates/courseImport.xlsx"));
|
|
}
|
|
}
|
|
|
|
+
|
|
@ApiOperation(value = "下载试卷结构导入模板")
|
|
@ApiOperation(value = "下载试卷结构导入模板")
|
|
@PostMapping("template-struct")
|
|
@PostMapping("template-struct")
|
|
public void getStructImportTemplate() {
|
|
public void getStructImportTemplate() {
|
|
exportFile("试卷结构导入模板.xlsx", ResouceUtil.getStream("importtemplates/structImport.xlsx"));
|
|
exportFile("试卷结构导入模板.xlsx", ResouceUtil.getStream("importtemplates/structImport.xlsx"));
|
|
}
|
|
}
|
|
|
|
+
|
|
@ApiOperation(value = "导出主观题")
|
|
@ApiOperation(value = "导出主观题")
|
|
@PostMapping("export-subjective")
|
|
@PostMapping("export-subjective")
|
|
public void exportSubjective(PaperQuery query, HttpServletResponse response) {
|
|
public void exportSubjective(PaperQuery query, HttpServletResponse response) {
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
|
|
@ApiOperation(value = "获取分页")
|
|
@ApiOperation(value = "获取分页")
|
|
@RequestMapping(value = "page", method = RequestMethod.POST)
|
|
@RequestMapping(value = "page", method = RequestMethod.POST)
|
|
public PageResult<PaperVo> page(PaperQuery query) {
|
|
public PageResult<PaperVo> page(PaperQuery query) {
|
|
- return null;
|
|
|
|
|
|
+ return paperService.page(query, getAccessUser());
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "获取列表")
|
|
@ApiOperation(value = "获取列表")
|
|
@@ -106,25 +106,25 @@ public class PaperController extends BaseController {
|
|
public PaperVo structSubmit(@RequestBody StructDomain domain) {
|
|
public PaperVo structSubmit(@RequestBody StructDomain domain) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@ApiOperation(value = "试卷结构暂存")
|
|
@ApiOperation(value = "试卷结构暂存")
|
|
@RequestMapping(value = "struct/save ", method = RequestMethod.POST)
|
|
@RequestMapping(value = "struct/save ", method = RequestMethod.POST)
|
|
public PaperVo structSave(@RequestBody StructDomain domain) {
|
|
public PaperVo structSave(@RequestBody StructDomain domain) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@ApiOperation(value = "获取分组列表")
|
|
@ApiOperation(value = "获取分组列表")
|
|
@RequestMapping(value = "group/list", method = RequestMethod.POST)
|
|
@RequestMapping(value = "group/list", method = RequestMethod.POST)
|
|
public List<GroupVo> groupList(@RequestParam Long paperId) {
|
|
public List<GroupVo> groupList(@RequestParam Long paperId) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@ApiOperation(value = "获取分组信息")
|
|
@ApiOperation(value = "获取分组信息")
|
|
@RequestMapping(value = "group/info", method = RequestMethod.POST)
|
|
@RequestMapping(value = "group/info", method = RequestMethod.POST)
|
|
- public GroupVo groupInfo(@RequestParam Long paperId,@RequestParam Integer groupNumber) {
|
|
|
|
|
|
+ public GroupVo groupInfo(@RequestParam Long paperId, @RequestParam Integer groupNumber) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@ApiOperation(value = "保存分组信息")
|
|
@ApiOperation(value = "保存分组信息")
|
|
@RequestMapping(value = "group/save", method = RequestMethod.POST)
|
|
@RequestMapping(value = "group/save", method = RequestMethod.POST)
|
|
public void groupInfo(@RequestBody PaperGroup domain) {
|
|
public void groupInfo(@RequestBody PaperGroup domain) {
|