浏览代码

数据检查

xiaof 2 年之前
父节点
当前提交
4be7c34dc0
共有 14 个文件被更改,包括 409 次插入2 次删除
  1. 56 0
      paper-library-business/src/main/java/com/qmth/paper/library/business/bean/result/PaperLibraryResult.java
  2. 49 0
      paper-library-business/src/main/java/com/qmth/paper/library/business/bean/result/SelectResult.java
  3. 13 0
      paper-library-business/src/main/java/com/qmth/paper/library/business/entity/PaperLibrary.java
  4. 5 0
      paper-library-business/src/main/java/com/qmth/paper/library/business/mapper/PaperArchivesMapper.java
  5. 11 0
      paper-library-business/src/main/java/com/qmth/paper/library/business/mapper/PaperLibraryMapper.java
  6. 5 0
      paper-library-business/src/main/java/com/qmth/paper/library/business/service/PaperArchivesService.java
  7. 11 0
      paper-library-business/src/main/java/com/qmth/paper/library/business/service/PaperLibraryService.java
  8. 10 1
      paper-library-business/src/main/java/com/qmth/paper/library/business/service/impl/PaperArchivesServiceImpl.java
  9. 48 0
      paper-library-business/src/main/java/com/qmth/paper/library/business/service/impl/PaperLibraryServiceImpl.java
  10. 15 0
      paper-library-business/src/main/resources/mapper/PaperArchivesMapper.xml
  11. 92 0
      paper-library-business/src/main/resources/mapper/PaperLibraryMapper.xml
  12. 1 1
      paper-library/src/main/java/com/qmth/paper/library/api/BasicSemesterController.java
  13. 8 0
      paper-library/src/main/java/com/qmth/paper/library/api/PaperArchivesController.java
  14. 85 0
      paper-library/src/main/java/com/qmth/paper/library/api/PaperLibraryController.java

+ 56 - 0
paper-library-business/src/main/java/com/qmth/paper/library/business/bean/result/PaperLibraryResult.java

@@ -0,0 +1,56 @@
+package com.qmth.paper.library.business.bean.result;
+
+import com.qmth.paper.library.business.entity.PaperLibrary;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * 数据检查
+ */
+public class PaperLibraryResult extends PaperLibrary implements Serializable {
+
+    @ApiModelProperty(value = "学生姓名")
+    private String studentName;
+
+    @ApiModelProperty(value = "学号")
+    private String studentCode;
+
+    @ApiModelProperty(value = "课程")
+    private String courseName;
+
+    @ApiModelProperty(value = "绑定图片数量")
+    private int bindCount;
+
+    public String getStudentName() {
+        return studentName;
+    }
+
+    public void setStudentName(String studentName) {
+        this.studentName = studentName;
+    }
+
+    public String getStudentCode() {
+        return studentCode;
+    }
+
+    public void setStudentCode(String studentCode) {
+        this.studentCode = studentCode;
+    }
+
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
+
+    public int getBindCount() {
+        return bindCount;
+    }
+
+    public void setBindCount(int bindCount) {
+        this.bindCount = bindCount;
+    }
+}

+ 49 - 0
paper-library-business/src/main/java/com/qmth/paper/library/business/bean/result/SelectResult.java

@@ -0,0 +1,49 @@
+package com.qmth.paper.library.business.bean.result;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * 新增/更新返回值
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class SelectResult implements Serializable {
+
+    @JsonSerialize(using = ToStringSerializer.class)
+    @ApiModelProperty(value = "id")
+    private Long id;
+
+    @ApiModelProperty(value = "code")
+    private String code;
+
+    @ApiModelProperty(value = "name")
+    private String name;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

+ 13 - 0
paper-library-business/src/main/java/com/qmth/paper/library/business/entity/PaperLibrary.java

@@ -59,6 +59,11 @@ public class PaperLibrary extends BaseEntity implements Serializable {
     @TableField("path")
     private String path;
 
+    @ApiModelProperty(value = "数据检验员id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    @TableField("user_id")
+    private Long userId;
+
     @ApiModelProperty(value = "扫描任务表id")
     @JsonSerialize(using = ToStringSerializer.class)
     @TableField("paper_scan_task_id")
@@ -132,6 +137,14 @@ public class PaperLibrary extends BaseEntity implements Serializable {
         this.path = path;
     }
 
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
     public Long getPaperScanTaskId() {
         return paperScanTaskId;
     }

+ 5 - 0
paper-library-business/src/main/java/com/qmth/paper/library/business/mapper/PaperArchivesMapper.java

@@ -4,9 +4,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.qmth.paper.library.business.bean.result.PaperArchivesResult;
+import com.qmth.paper.library.business.bean.result.SelectResult;
 import com.qmth.paper.library.business.entity.PaperArchives;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 /**
  * <p>
  * 档案管理表 Mapper 接口
@@ -17,4 +20,6 @@ public interface PaperArchivesMapper extends BaseMapper<PaperArchives> {
     IPage<PaperArchivesResult> pageData(@Param("page") Page<PaperArchivesResult> page, @Param("semesterId") Long semesterId, @Param("managerOrgId") Long managerOrgId, @Param("archivesTypeId") Long archivesTypeId, @Param("archivesName") String archivesName);
 
     PaperArchives selectByArchivesName(@Param("schoolId") Long schoolId, @Param("archivesName") String archivesName);
+
+    List<SelectResult> queryManagerOrgs(@Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId);
 }

+ 11 - 0
paper-library-business/src/main/java/com/qmth/paper/library/business/mapper/PaperLibraryMapper.java

@@ -1,7 +1,11 @@
 package com.qmth.paper.library.business.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.qmth.paper.library.business.bean.result.PaperLibraryResult;
 import com.qmth.paper.library.business.entity.PaperLibrary;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * <p>
@@ -10,4 +14,11 @@ import com.qmth.paper.library.business.entity.PaperLibrary;
  */
 public interface PaperLibraryMapper extends BaseMapper<PaperLibrary> {
 
+    IPage<PaperLibraryResult> pageUnbindData(@Param("page") Page<PaperLibraryResult> page, @Param("paperScanTaskId") Long paperScanTaskId);
+
+    int countUnbindData(@Param("paperScanTaskId") Long paperScanTaskId);
+
+    IPage<PaperLibraryResult> pageBindData(@Param("page") Page<PaperLibraryResult> page, @Param("paperScanTaskId") Long paperScanTaskId);
+
+    int countBindData(Long paperScanTaskId);
 }

+ 5 - 0
paper-library-business/src/main/java/com/qmth/paper/library/business/service/PaperArchivesService.java

@@ -3,8 +3,11 @@ package com.qmth.paper.library.business.service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.paper.library.business.bean.result.PaperArchivesResult;
+import com.qmth.paper.library.business.bean.result.SelectResult;
 import com.qmth.paper.library.business.entity.PaperArchives;
 
+import java.util.List;
+
 /**
  * <p>
  * 档案管理表 服务类
@@ -17,4 +20,6 @@ public interface PaperArchivesService extends IService<PaperArchives> {
     boolean saveData(PaperArchives paperArchives);
 
     boolean delete(Long id);
+
+    List<SelectResult> queryManagerOrgs(Long semesterId);
 }

+ 11 - 0
paper-library-business/src/main/java/com/qmth/paper/library/business/service/PaperLibraryService.java

@@ -1,6 +1,8 @@
 package com.qmth.paper.library.business.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.qmth.paper.library.business.bean.result.PaperLibraryResult;
 import com.qmth.paper.library.business.entity.PaperLibrary;
 
 /**
@@ -10,4 +12,13 @@ import com.qmth.paper.library.business.entity.PaperLibrary;
  */
 public interface PaperLibraryService extends IService<PaperLibrary> {
 
+    IPage<PaperLibraryResult> pageUnbindData(Long paperScanTaskId, Integer pageNumber, Integer pageSize);
+
+    int countUnbindData(Long paperScanTaskId);
+
+    IPage<PaperLibraryResult> pageBindData(Long paperScanTaskId, Integer pageNumber, Integer pageSize);
+
+    boolean bind(Long paperLibraryId, Long paperScanTaskDetailId);
+
+    int countBindData(Long paperScanTaskId);
 }

+ 10 - 1
paper-library-business/src/main/java/com/qmth/paper/library/business/service/impl/PaperArchivesServiceImpl.java

@@ -1,9 +1,11 @@
 package com.qmth.paper.library.business.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.paper.library.business.bean.result.PaperArchivesResult;
+import com.qmth.paper.library.business.bean.result.SelectResult;
 import com.qmth.paper.library.business.entity.PaperArchives;
 import com.qmth.paper.library.business.entity.PaperScanTask;
 import com.qmth.paper.library.business.mapper.PaperArchivesMapper;
@@ -38,7 +40,6 @@ public class PaperArchivesServiceImpl extends ServiceImpl<PaperArchivesMapper, P
     public boolean saveData(PaperArchives paperArchives) {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
-        // todo 生成档案编号
 
         PaperArchives archives = this.baseMapper.selectByArchivesName(schoolId, paperArchives.getArchivesName());
         if (archives != null) {
@@ -46,6 +47,8 @@ public class PaperArchivesServiceImpl extends ServiceImpl<PaperArchivesMapper, P
         }
         paperArchives.setId(SystemConstant.getDbUuid());
         paperArchives.setSchoolId(schoolId);
+        // 档案编号(时间戳)
+        paperArchives.setArchivesCode(String.valueOf(System.currentTimeMillis()));
         paperArchives.setCreateId(sysUser.getId());
         paperArchives.setCreateTime(System.currentTimeMillis());
         return this.save(paperArchives);
@@ -65,4 +68,10 @@ public class PaperArchivesServiceImpl extends ServiceImpl<PaperArchivesMapper, P
         return this.removeById(id);
     }
 
+    @Override
+    public List<SelectResult> queryManagerOrgs(Long semesterId) {
+        Long schoolId = SystemConstant.convertIdToLong(String.valueOf(ServletUtil.getRequestHeaderSchoolId()));
+        return this.baseMapper.queryManagerOrgs(schoolId, semesterId);
+    }
+
 }

+ 48 - 0
paper-library-business/src/main/java/com/qmth/paper/library/business/service/impl/PaperLibraryServiceImpl.java

@@ -1,11 +1,22 @@
 package com.qmth.paper.library.business.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.paper.library.business.bean.result.PaperLibraryResult;
 import com.qmth.paper.library.business.entity.PaperLibrary;
+import com.qmth.paper.library.business.entity.PaperScanTaskDetail;
 import com.qmth.paper.library.business.mapper.PaperLibraryMapper;
 import com.qmth.paper.library.business.service.PaperLibraryService;
+import com.qmth.paper.library.business.service.PaperScanTaskDetailService;
+import com.qmth.paper.library.common.entity.SysUser;
+import com.qmth.paper.library.common.enums.ExceptionResultEnum;
+import com.qmth.paper.library.common.util.ServletUtil;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+
 /**
  * <p>
  * 图片库 服务实现类
@@ -14,4 +25,41 @@ import org.springframework.stereotype.Service;
 @Service
 public class PaperLibraryServiceImpl extends ServiceImpl<PaperLibraryMapper, PaperLibrary> implements PaperLibraryService {
 
+    @Resource
+    PaperScanTaskDetailService paperScanTaskDetailService;
+
+    @Override
+    public IPage<PaperLibraryResult> pageUnbindData(Long paperScanTaskId, Integer pageNumber, Integer pageSize) {
+        return this.baseMapper.pageUnbindData(new Page<>(pageNumber, pageSize), paperScanTaskId);
+    }
+
+    @Override
+    public int countUnbindData(Long paperScanTaskId) {
+        return this.baseMapper.countUnbindData(paperScanTaskId);
+    }
+
+    @Override
+    public IPage<PaperLibraryResult> pageBindData(Long paperScanTaskId, Integer pageNumber, Integer pageSize) {
+        return this.baseMapper.pageBindData(new Page<>(pageNumber, pageSize), paperScanTaskId);
+    }
+
+    @Override
+    public int countBindData(Long paperScanTaskId) {
+        return this.baseMapper.countBindData(paperScanTaskId);
+    }
+
+    @Override
+    public boolean bind(Long paperLibraryId, Long paperScanTaskDetailId) {
+        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+
+        PaperScanTaskDetail paperScanTaskDetail = paperScanTaskDetailService.getById(paperScanTaskDetailId);
+        if (paperScanTaskDetail == null) {
+            throw ExceptionResultEnum.ERROR.exception("绑定对象有误,任务下无该考生,请刷新数据再试");
+        }
+        UpdateWrapper<PaperLibrary> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.lambda().set(PaperLibrary::getPaperScanTaskDetailId, paperScanTaskDetailId)
+                .eq(PaperLibrary::getId, paperLibraryId);
+        return this.update(updateWrapper);
+    }
+
 }

+ 15 - 0
paper-library-business/src/main/resources/mapper/PaperArchivesMapper.xml

@@ -73,4 +73,19 @@
             and archives_name = #{archivesName}
         </where>
     </select>
+    <select id="queryManagerOrgs" resultType="com.qmth.paper.library.business.bean.result.SelectResult">
+        SELECT
+            pa.manager_id id, so.name
+        FROM
+            paper_archives pa
+                LEFT JOIN
+            sys_org so ON pa.school_id = so.school_id
+                AND pa.manager_org_id = so.id
+        <where>
+            and pa.school_id = #{schoolId}
+            <if test="semesterId != null">
+                and pa.semester_id = #{semesterId}
+            </if>
+        </where>
+    </select>
 </mapper>

+ 92 - 0
paper-library-business/src/main/resources/mapper/PaperLibraryMapper.xml

@@ -1,4 +1,96 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.qmth.paper.library.business.mapper.PaperLibraryMapper">
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.qmth.paper.library.business.entity.PaperLibrary">
+        <result column="id" property="id"/>
+        <result column="school_id" property="schoolId"/>
+        <result column="org_id" property="orgId"/>
+        <result column="name" property="name"/>
+        <result column="type" property="type"/>
+        <result column="size" property="size"/>
+        <result column="md5" property="md5"/>
+        <result column="path" property="path"/>
+        <result column="paper_scan_task_id" property="paperScanTaskId"/>
+        <result column="paper_scan_task_detail_id" property="paperScanTaskDetailId"/>
+        <result column="sequence" property="sequence"/>
+        <result column="create_id" property="createId"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_id" property="updateId"/>
+        <result column="update_time" property="updateTime"/>
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        select id, school_id, org_id, `name`,`type`, `size`, `md5`, `path`, paper_scan_task_id,paper_scan_task_detail_id, sequence,create_id, create_time, update_id, update_time from paper_library
+    </sql>
+
+    <select id="pageUnbindData" resultMap="BaseResultMap">
+        <include refid="Base_Column_List"></include>
+        <where>
+            paper_scan_task_detail_id is null
+            <if test="paperScanTaskId != null">
+                and paper_scan_task_id = #{paperScanTaskId}
+            </if>
+        </where>
+    </select>
+    <select id="countUnbindData" resultType="java.lang.Integer">
+        select count(1) from paper_library
+        <where>
+            paper_scan_task_detail_id is null
+            <if test="paperScanTaskId != null">
+                and paper_scan_task_id = #{paperScanTaskId}
+            </if>
+        </where>
+    </select>
+    <select id="pageBindData" resultType="com.qmth.paper.library.business.bean.result.PaperLibraryResult">
+        SELECT
+            pstd.paper_scan_task_id paperScanTaskId,
+            bs.student_name studentName,
+            bs.student_code studentCode,
+            pst.course_name courseName,
+            pst.create_time createTime,
+            pl.bind_count bindCount
+        FROM
+            (SELECT
+                 school_id, paper_scan_task_detail_id, COUNT(1) bind_count
+             FROM
+                 paper_library
+             WHERE
+                 paper_scan_task_detail_id IS NOT NULL) pl
+                JOIN
+            paper_scan_task_detail pstd ON pl.school_id = pstd.school_id
+                AND pl.paper_scan_task_detail_id = pstd.id
+                LEFT JOIN
+            paper_scan_task pst ON pstd.school_id = pst.school_id
+                AND pstd.paper_scan_task_id = pst.id
+                LEFT JOIN
+            basic_student bs ON pstd.school_id = bs.school_id
+                AND pstd.student_id = bs.id
+        <where>
+            <if test="paperScanTaskId != null">
+                and pstd.paper_scan_task_id = #{paperScanTaskId}
+            </if>
+        </where>
+    </select>
+    <select id="countBindData" resultType="java.lang.Integer">
+        SELECT
+            COUNT(1)
+        FROM
+            (SELECT
+                 school_id, paper_scan_task_detail_id, COUNT(1) bind_count
+             FROM
+                 paper_library
+             WHERE
+                 paper_scan_task_detail_id IS NOT NULL
+             GROUP BY school_id , paper_scan_task_detail_id) pl
+                JOIN
+            paper_scan_task_detail pstd ON pl.school_id = pstd.school_id
+                AND pl.paper_scan_task_detail_id = pstd.id
+        <where>
+            <if test="paperScanTaskId != null">
+                and pstd.paper_scan_task_id = #{paperScanTaskId}
+            </if>
+        </where>
+    </select>
 </mapper>

+ 1 - 1
paper-library/src/main/java/com/qmth/paper/library/api/BasicSemesterController.java

@@ -34,7 +34,7 @@ public class BasicSemesterController {
     private BasicSemesterService basicSemesterService;
 
     @ApiOperation(value = "学期管理-查询")
-    @RequestMapping(value = "/query", method = RequestMethod.POST)
+    @RequestMapping(value = "/page", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
     public Result findBasicSemesterList(@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) {

+ 8 - 0
paper-library/src/main/java/com/qmth/paper/library/api/PaperArchivesController.java

@@ -10,6 +10,7 @@ import com.qmth.paper.library.business.service.PaperArchivesService;
 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 com.qmth.paper.library.common.util.ServletUtil;
 import io.swagger.annotations.*;
 import org.springframework.validation.BindingResult;
 import org.springframework.validation.annotation.Validated;
@@ -64,4 +65,11 @@ public class PaperArchivesController {
         return ResultUtil.ok(paperArchivesService.delete(id));
     }
 
+    @ApiOperation(value = "档案管理部门查询")
+    @PostMapping("/query_manager_orgs")
+    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
+    public Result queryManagerOrgs(@RequestParam(value = "semesterId", required = false) Long semesterId) {
+        return ResultUtil.ok(paperArchivesService.queryManagerOrgs(semesterId));
+    }
+
 }

+ 85 - 0
paper-library/src/main/java/com/qmth/paper/library/api/PaperLibraryController.java

@@ -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();
+    }
+
+}