|
@@ -0,0 +1,85 @@
|
|
|
+package com.qmth.paper.library.api;
|
|
|
+
|
|
|
+
|
|
|
+import com.qmth.boot.api.annotation.Aac;
|
|
|
+import com.qmth.boot.api.annotation.BOOL;
|
|
|
+import com.qmth.boot.api.constant.ApiConstant;
|
|
|
+import com.qmth.paper.library.business.bean.result.EditResult;
|
|
|
+import com.qmth.paper.library.business.service.PaperLibraryService;
|
|
|
+import com.qmth.paper.library.common.contant.SystemConstant;
|
|
|
+import com.qmth.paper.library.common.util.Result;
|
|
|
+import com.qmth.paper.library.common.util.ResultUtil;
|
|
|
+import io.swagger.annotations.*;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import javax.validation.constraints.Max;
|
|
|
+import javax.validation.constraints.Min;
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * 数据检查 前端控制器
|
|
|
+ * </p>
|
|
|
+ */
|
|
|
+@Api(tags = "数据检查Controller")
|
|
|
+@RestController
|
|
|
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/${prefix.url.paper}/paper_library")
|
|
|
+@Validated
|
|
|
+@Aac(strict = BOOL.FALSE, auth = BOOL.FALSE)
|
|
|
+public class PaperLibraryController {
|
|
|
+ @Resource
|
|
|
+ private PaperLibraryService paperLibraryService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "分页查询-未绑定")
|
|
|
+ @PostMapping("/page_unbind")
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
|
|
|
+ public Result pageUnbind(@ApiParam(value = "任务") @RequestParam(required = false) Long paperScanTaskId,
|
|
|
+ @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(paperLibraryService.pageUnbindData(paperScanTaskId, pageNumber, pageSize));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "分页查询-未绑定数量")
|
|
|
+ @PostMapping("/count_unbind")
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
|
|
|
+ public Result countUnbind(@ApiParam(value = "任务") @RequestParam(required = false) Long paperScanTaskId) {
|
|
|
+ return ResultUtil.ok(paperLibraryService.countUnbindData(paperScanTaskId));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "分页查询-已绑定")
|
|
|
+ @PostMapping("/page_bind")
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
|
|
|
+ public Result pageBind(@ApiParam(value = "任务") @RequestParam(required = false) Long paperScanTaskId,
|
|
|
+ @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(paperLibraryService.pageBindData(paperScanTaskId, pageNumber, pageSize));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "分页查询-已绑定数量")
|
|
|
+ @PostMapping("/count_bind")
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
|
|
|
+ public Result countBind(@ApiParam(value = "任务") @RequestParam(required = false) Long paperScanTaskId) {
|
|
|
+ return ResultUtil.ok(paperLibraryService.countBindData(paperScanTaskId));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "绑定")
|
|
|
+ @PostMapping("/bind")
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "绑定成功", response = EditResult.class)})
|
|
|
+ public Result save(@RequestParam Long paperLibraryId,
|
|
|
+ @RequestParam Long paperScanTaskDetailId) {
|
|
|
+ return ResultUtil.ok(paperLibraryService.bind(paperLibraryId, paperScanTaskDetailId));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "确定(下一张)")
|
|
|
+ @PostMapping("/next")
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "确定成功", response = Result.class)})
|
|
|
+ public Result next(@ApiParam(value = "主键") @RequestParam(required = false) Long id) {
|
|
|
+ // todo 20220930 取任务
|
|
|
+ return ResultUtil.ok();
|
|
|
+ }
|
|
|
+
|
|
|
+}
|