|
@@ -1,11 +1,8 @@
|
|
|
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.params.PaperScanTaskParam;
|
|
|
import com.qmth.paper.library.business.bean.result.EditResult;
|
|
|
-import com.qmth.paper.library.business.bean.result.SelectResult;
|
|
|
import com.qmth.paper.library.business.service.PaperLibraryCommonService;
|
|
|
import com.qmth.paper.library.business.service.PaperScanTaskService;
|
|
|
import com.qmth.paper.library.business.templete.execute.AsyncPaperScanTaskImportService;
|
|
@@ -54,7 +51,7 @@ public class PaperScanTaskController {
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
|
|
|
public Result findPaperScanTaskPage(@ApiParam(value = "课程名称") @RequestParam(required = false) String courseName,
|
|
|
@ApiParam(value = "任课教师") @RequestParam(required = false) String teacherName,
|
|
|
- @ApiParam(value = "进度阈值(小)", required = true) @RequestParam @Min(0) Integer smallerProgress,
|
|
|
+ @ApiParam(value = "进度阈值(小)", required = true) @RequestParam @Min(0) @Max(100) Integer smallerProgress,
|
|
|
@ApiParam(value = "进度阈值(大)", required = true) @RequestParam @Min(0) @Max(100) Integer largerProgress,
|
|
|
@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) {
|
|
@@ -76,7 +73,7 @@ public class PaperScanTaskController {
|
|
|
@ApiOperation(value = "扫描任务管理-批量删除(物理)")
|
|
|
@RequestMapping(value = "/delete_batch", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "删除成功", response = EditResult.class)})
|
|
|
- public Result deletePaperScanTask(@ApiParam(value = "选择的要删除的学生id集合", required = true) @RequestParam List<String> idList) {
|
|
|
+ public Result deletePaperScanTask(@ApiParam(value = "选择的要删除的扫描任务id集合", required = true) @RequestParam List<String> idList) {
|
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
paperScanTaskService.deletePaperScanTaskByIdList(idList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList()), sysUser);
|
|
|
return ResultUtil.ok();
|
|
@@ -86,11 +83,11 @@ public class PaperScanTaskController {
|
|
|
@RequestMapping(value = "/scan_task_import", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = EditResult.class)})
|
|
|
public Result paperScanTaskImportAsync(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file,
|
|
|
- @ApiParam(value = "档案id", required = true) @RequestParam Long paperArchivesId) throws Exception {
|
|
|
+ @ApiParam(value = "档案id", required = true) @RequestParam String paperArchivesId) throws Exception {
|
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
Map<String, Object> map = paperLibraryCommonService.saveTask(file, TaskTypeEnum.PAPER_SCAN_TASK_IMPORT);
|
|
|
map.put(SystemConstant.SYS_USER, sysUser);
|
|
|
- map.put("paperArchivesId", paperArchivesId);
|
|
|
+ map.put("paperArchivesId", SystemConstant.convertIdToLong(paperArchivesId));
|
|
|
asyncPaperScanTaskImportService.importTask(map);
|
|
|
TBTask tbTask = Objects.nonNull(map.get(SystemConstant.TASK)) ? (TBTask) map.get(SystemConstant.TASK) : null;
|
|
|
return Objects.nonNull(tbTask) ? ResultUtil.ok(tbTask.getId()) : ResultUtil.error("创建任务失败");
|
|
@@ -124,6 +121,15 @@ public class PaperScanTaskController {
|
|
|
return ResultUtil.ok();
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "扫描任务管理-解绑扫描员")
|
|
|
+ @RequestMapping(value = "/unbind_scanner", method = RequestMethod.POST)
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "解绑成功", response = EditResult.class)})
|
|
|
+ public Result unbindScanner(@ApiParam(value = "扫描任务id", required = true) @RequestParam String paperScanTaskId) {
|
|
|
+ SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
+ paperScanTaskService.unbindScanner(SystemConstant.convertIdToLong(paperScanTaskId), sysUser);
|
|
|
+ return ResultUtil.ok();
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "扫描任务管理-绑定进度详情")
|
|
|
@RequestMapping(value = "/bind_progress_detail", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "删除成功", response = EditResult.class)})
|