|
@@ -2,11 +2,23 @@ package com.qmth.distributed.print.api;
|
|
|
|
|
|
|
|
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
|
|
+import com.qmth.distributed.print.business.bean.params.GenericExamCardModelFourParams;
|
|
|
|
+import com.qmth.distributed.print.business.bean.params.GenericExamCardParams;
|
|
|
|
+import com.qmth.distributed.print.business.bean.result.EditResult;
|
|
|
|
+import com.qmth.distributed.print.business.service.ExamCardModelFourService;
|
|
|
|
+import com.qmth.teachcloud.common.annotation.OperationLogDetail;
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
-import io.swagger.annotations.Api;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
+import com.qmth.teachcloud.common.enums.log.OperationTypeEnum;
|
|
|
|
+import com.qmth.teachcloud.common.util.Result;
|
|
|
|
+import com.qmth.teachcloud.common.util.ResultUtil;
|
|
|
|
+import io.swagger.annotations.*;
|
|
|
|
+import org.springframework.validation.BindingResult;
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
|
+import javax.validation.Valid;
|
|
|
|
+import javax.validation.constraints.Max;
|
|
|
|
+import javax.validation.constraints.Min;
|
|
|
|
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
@@ -16,9 +28,65 @@ import org.springframework.web.bind.annotation.RestController;
|
|
* @author wangliang
|
|
* @author wangliang
|
|
* @since 2025-03-06
|
|
* @since 2025-03-06
|
|
*/
|
|
*/
|
|
-@Api(tags = "版本管理Controller")
|
|
|
|
|
|
+@Api(tags = "模式4题卡Controller")
|
|
@RestController
|
|
@RestController
|
|
-@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_VERSION)
|
|
|
|
|
|
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_EXAM + "/model_4/card")
|
|
public class ExamCardModelFourController {
|
|
public class ExamCardModelFourController {
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ ExamCardModelFourService examCardModelFourService;
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "分页查询")
|
|
|
|
+ @RequestMapping(value = "/page", method = RequestMethod.POST)
|
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "新增", response = EditResult.class)})
|
|
|
|
+ public Result page(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
|
|
|
|
+ @ApiParam(value = "考试ID") @RequestParam(required = false) Long examId,
|
|
|
|
+ @ApiParam(value = "课程代码") @RequestParam(required = false) Long courseId,
|
|
|
|
+ @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
|
|
|
|
+ @ApiParam(value = "开课学院ID") @RequestParam(required = false) String collegeId,
|
|
|
|
+ @ApiParam(value = "题卡名称模糊查询") @RequestParam(required = false) String title,
|
|
|
|
+ @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
|
|
|
|
+ @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
|
|
|
|
+ return ResultUtil.ok();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "根据ID获取题卡详情")
|
|
|
|
+ @RequestMapping(value = "/get_one", method = RequestMethod.POST)
|
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "根据ID获取题卡详情", response = EditResult.class)})
|
|
|
|
+ public Result getOne(@ApiParam(value = "题卡id", required = true) @RequestParam(value = "cardId") Long cardId) {
|
|
|
|
+ return ResultUtil.ok(true);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "新增/修改")
|
|
|
|
+ @RequestMapping(value = "/save_generic", method = RequestMethod.POST)
|
|
|
|
+ @OperationLogDetail(operationType = OperationTypeEnum.SAVE, detail = "新增/修改操作,题卡ID:{{params.id}}、题卡标题:{{params.title}}")
|
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "新增/修改", response = EditResult.class)})
|
|
|
|
+ public Result saveGeneric(@ApiParam(value = "题卡信息", required = true) @Valid @RequestBody GenericExamCardModelFourParams params, BindingResult bindingResult) throws Exception {
|
|
|
|
+ if (bindingResult.hasErrors()) {
|
|
|
|
+ return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
|
|
|
|
+ }
|
|
|
|
+ return ResultUtil.ok();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "删除")
|
|
|
|
+ @RequestMapping(value = "/delete_generic", method = RequestMethod.POST)
|
|
|
|
+ @OperationLogDetail(operationType = OperationTypeEnum.DELETE, detail = "删除操作,题卡ID:{{id}}")
|
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "删除", response = EditResult.class)})
|
|
|
|
+ public Result save(@ApiParam(value = "主键", required = true) @RequestParam Long id) {
|
|
|
|
+ return ResultUtil.ok();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "题卡转图片")
|
|
|
|
+ @RequestMapping(value = "/convert_image", method = RequestMethod.POST)
|
|
|
|
+ @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "生成图片操作,题卡ID:{{id}}")
|
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "删除", response = EditResult.class)})
|
|
|
|
+ public Result convertImage(@ApiParam(value = "题卡转图片", required = true) @RequestParam(value = "id") Long id) {
|
|
|
|
+ return ResultUtil.ok();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "导出题卡文件")
|
|
|
|
+ @RequestMapping(value = "/download_card", method = RequestMethod.POST)
|
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "导出题卡文件", response = EditResult.class)})
|
|
|
|
+ public void downloadCard(@ApiParam(value = "主键", required = true) @RequestParam(value = "id") Long id) {
|
|
|
|
+ }
|
|
}
|
|
}
|