|
@@ -1,24 +1,14 @@
|
|
|
package cn.com.qmth.scancentral.controller.scan;
|
|
|
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
-
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import com.qmth.boot.api.annotation.Aac;
|
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
|
-import com.qmth.boot.api.utils.RequestUtil;
|
|
|
|
|
|
import cn.com.qmth.scancentral.bean.BatchCreateDomain;
|
|
|
-import cn.com.qmth.scancentral.bean.MismatchToggleDomain;
|
|
|
import cn.com.qmth.scancentral.bean.User;
|
|
|
import cn.com.qmth.scancentral.bean.answersave.AnswerDomain;
|
|
|
import cn.com.qmth.scancentral.controller.BaseController;
|
|
@@ -26,13 +16,10 @@ import cn.com.qmth.scancentral.service.AdapteFileService;
|
|
|
import cn.com.qmth.scancentral.service.AnswerCardService;
|
|
|
import cn.com.qmth.scancentral.service.BatchService;
|
|
|
import cn.com.qmth.scancentral.service.PaperService;
|
|
|
-import cn.com.qmth.scancentral.vo.AnswerCardVo;
|
|
|
import cn.com.qmth.scancentral.vo.BatchFinishVo;
|
|
|
import cn.com.qmth.scancentral.vo.BatchVerifyVo;
|
|
|
-import cn.com.qmth.scancentral.vo.MismatchToggleVo;
|
|
|
import cn.com.qmth.scancentral.vo.SheetUploadVo;
|
|
|
import cn.com.qmth.scancentral.vo.SliceUploadVo;
|
|
|
-import cn.com.qmth.scancentral.vo.UriVo;
|
|
|
import cn.com.qmth.scancentral.vo.batch.AnswerSaveVo;
|
|
|
import cn.com.qmth.scancentral.vo.batch.BatchCreateVo;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -40,9 +27,9 @@ import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
@RestController
|
|
|
@Api(tags = "扫描功能-答题卡接口")
|
|
|
-@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/scan/answer")
|
|
|
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/scan/batch")
|
|
|
@Aac(strict = false, auth = true)
|
|
|
-public class AnswerController extends BaseController {
|
|
|
+public class ScanBatchController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private AnswerCardService answerCardService;
|
|
@@ -56,38 +43,24 @@ public class AnswerController extends BaseController {
|
|
|
@Autowired
|
|
|
private AdapteFileService adapteFileService;
|
|
|
|
|
|
- @ApiOperation(value = "答题卡卡格式列表")
|
|
|
- @RequestMapping(value = "/card/list", method = RequestMethod.POST)
|
|
|
- public List<AnswerCardVo> cardList(HttpServletRequest request, @RequestParam Long examId) {
|
|
|
- return answerCardService.listByExamIdForScanner(examId, getAccessUser(), RequestUtil.getIpAddress(request));
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation(value = "答题卡适配卡格式上传")
|
|
|
- @RequestMapping(value = "/card/adapte/upload", method = RequestMethod.POST)
|
|
|
- public UriVo adapteUpload(HttpServletRequest request, @RequestParam Long examId, @RequestParam Integer cardNumber,
|
|
|
- @RequestParam MultipartFile file, @RequestParam String md5, @RequestParam Integer dpi) {
|
|
|
- return adapteFileService.save(RequestUtil.getIpAddress(request), getAccessUser().getRole(), examId, cardNumber,
|
|
|
- md5, dpi, file);
|
|
|
- }
|
|
|
-
|
|
|
@ApiOperation(value = "答题卡扫描批次创建")
|
|
|
- @RequestMapping(value = "/batch/create", method = RequestMethod.POST)
|
|
|
+ @RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
|
public BatchCreateVo batchCreate(@Validated @RequestBody BatchCreateDomain domain) {
|
|
|
return batchService.batchCreate(domain, getAccessUser());
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "答题卡扫描结果保存")
|
|
|
- @RequestMapping(value = "/batch/save", method = RequestMethod.POST)
|
|
|
+ @RequestMapping(value = "/save", method = RequestMethod.POST)
|
|
|
public AnswerSaveVo batchSave(@Validated @RequestBody AnswerDomain domain) {
|
|
|
User user = getAccessUser();
|
|
|
return batchService.batchSave(domain, user);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "答题卡扫描历史标记/取消异常")
|
|
|
- @RequestMapping(value = "/mismatch/toggle", method = RequestMethod.POST)
|
|
|
- public MismatchToggleVo mismatchToggle(@Validated MismatchToggleDomain domain) {
|
|
|
- return paperService.mismatchToggle(domain);
|
|
|
- }
|
|
|
+// @ApiOperation(value = "答题卡扫描历史标记/取消异常")
|
|
|
+// @RequestMapping(value = "/mismatch/toggle", method = RequestMethod.POST)
|
|
|
+// public MismatchToggleVo mismatchToggle(@Validated MismatchToggleDomain domain) {
|
|
|
+// return paperService.mismatchToggle(domain);
|
|
|
+// }
|
|
|
|
|
|
@ApiOperation(value = "答题卡扫描原图上传")
|
|
|
@RequestMapping(value = "/sheet/upload", method = RequestMethod.POST)
|
|
@@ -106,13 +79,13 @@ public class AnswerController extends BaseController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "答题卡扫描批次提交审核/查询审核结果")
|
|
|
- @RequestMapping(value = "/batch/verify", method = RequestMethod.POST)
|
|
|
+ @RequestMapping(value = "/verify", method = RequestMethod.POST)
|
|
|
public BatchVerifyVo batchVerify(@RequestParam Long id) {
|
|
|
return batchService.batchVerify(id);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "答题卡扫描批次完成")
|
|
|
- @RequestMapping(value = "/batch/finish", method = RequestMethod.POST)
|
|
|
+ @RequestMapping(value = "/finish", method = RequestMethod.POST)
|
|
|
public BatchFinishVo batchFinish(@RequestParam Long id) {
|
|
|
return batchService.batchFinish(id);
|
|
|
}
|