|
@@ -21,7 +21,10 @@ import cn.com.qmth.stmms.biz.mark.service.RejectTypeService;
|
|
|
import cn.com.qmth.stmms.common.annotation.Logging;
|
|
|
import cn.com.qmth.stmms.common.domain.ApiUser;
|
|
|
import cn.com.qmth.stmms.common.enums.LogType;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
+@Api(tags = "打回卷卷分类管理")
|
|
|
@Controller("adminRejectTypeController")
|
|
|
@RequestMapping("/api/admin/exam/reject/type")
|
|
|
public class RejectTypeController extends BaseApiController {
|
|
@@ -34,6 +37,7 @@ public class RejectTypeController extends BaseApiController {
|
|
|
@Autowired
|
|
|
private ProblemHistoryService historyService;
|
|
|
|
|
|
+ @ApiOperation(value = "查询")
|
|
|
@Logging(menu = "查询打回卷分类", type = LogType.QUERY)
|
|
|
@RequestMapping(value = "list", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
@@ -41,6 +45,7 @@ public class RejectTypeController extends BaseApiController {
|
|
|
return rejectTypeService.findByExamId(examId);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "新增")
|
|
|
@Logging(menu = "新增打回卷分类", type = LogType.ADD)
|
|
|
@RequestMapping(value = "save", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
@@ -60,12 +65,14 @@ public class RejectTypeController extends BaseApiController {
|
|
|
problem = rejectTypeService.save(problem);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "查询信息")
|
|
|
@RequestMapping(value = "find", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public RejectType find(@PathVariable Integer id) {
|
|
|
return rejectTypeService.findById(id);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "修改")
|
|
|
@Logging(menu = "编辑打回卷分类", type = LogType.UPDATE)
|
|
|
@RequestMapping(value = "update", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
@@ -78,13 +85,14 @@ public class RejectTypeController extends BaseApiController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "删除")
|
|
|
@Logging(menu = "删除打回卷分类", type = LogType.DELETE)
|
|
|
@RequestMapping(value = "delete", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public void delete(@RequestParam Integer id) {
|
|
|
int examId = getSessionExamId();
|
|
|
long historyCount = historyService.countByExamIdAndProblemId(examId, id);// TODO
|
|
|
- // 修改校验
|
|
|
+ // 修改校验,待打回卷修改完后处理这段代码
|
|
|
if (historyCount > 0) {
|
|
|
throw new StatusException("该打回卷类型已被使用,不可删除");
|
|
|
} else {
|