소스 검색

图片管理

haogh 11 달 전
부모
커밋
6b9a5d5847

+ 201 - 0
paper-library-business/src/main/java/com/qmth/paper/library/business/bean/result/PictureManageDetailResult.java

@@ -0,0 +1,201 @@
+package com.qmth.paper.library.business.bean.result;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+public class PictureManageDetailResult implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "考试ID")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long examId;
+
+    @ApiModelProperty(value = "考生ID")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long studentId;
+
+    @ApiModelProperty(value = "学号")
+    private String studentCode;
+
+    @ApiModelProperty(value = "姓名")
+    private String studentName;
+
+    @ApiModelProperty(value = "学期")
+    private String semesterName;
+
+    @ApiModelProperty(value = "考试")
+    private String examName;
+
+    @ApiModelProperty(value = "扫描批次号")
+    private String batchNo;
+
+    @ApiModelProperty(value = "课程代码")
+    private String courseCode;
+
+    @ApiModelProperty(value = "课程名称")
+    private String courseName;
+
+    @ApiModelProperty(value = "任课老师")
+    private String teacher;
+
+    @ApiModelProperty(value = "教学班")
+    private String teachClass;
+
+    @ApiModelProperty(value = "学院")
+    private String collegeName;
+
+    @ApiModelProperty(value = "专业")
+    private String majorName;
+
+    @ApiModelProperty(value = "班级")
+    private String className;
+
+    @ApiModelProperty(value = "分数")
+    private Double score;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty(value = "绑定图片数量")
+    private int bindCount;
+
+    public Long getExamId() {
+        return examId;
+    }
+
+    public void setExamId(Long examId) {
+        this.examId = examId;
+    }
+
+    public Long getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Long studentId) {
+        this.studentId = studentId;
+    }
+
+    public String getStudentCode() {
+        return studentCode;
+    }
+
+    public void setStudentCode(String studentCode) {
+        this.studentCode = studentCode;
+    }
+
+    public String getStudentName() {
+        return studentName;
+    }
+
+    public void setStudentName(String studentName) {
+        this.studentName = studentName;
+    }
+
+    public String getSemesterName() {
+        return semesterName;
+    }
+
+    public void setSemesterName(String semesterName) {
+        this.semesterName = semesterName;
+    }
+
+    public String getExamName() {
+        return examName;
+    }
+
+    public void setExamName(String examName) {
+        this.examName = examName;
+    }
+
+    public String getBatchNo() {
+        return batchNo;
+    }
+
+    public void setBatchNo(String batchNo) {
+        this.batchNo = batchNo;
+    }
+
+    public String getCourseCode() {
+        return courseCode;
+    }
+
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
+    }
+
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
+
+    public String getTeacher() {
+        return teacher;
+    }
+
+    public void setTeacher(String teacher) {
+        this.teacher = teacher;
+    }
+
+    public String getTeachClass() {
+        return teachClass;
+    }
+
+    public void setTeachClass(String teachClass) {
+        this.teachClass = teachClass;
+    }
+
+    public String getCollegeName() {
+        return collegeName;
+    }
+
+    public void setCollegeName(String collegeName) {
+        this.collegeName = collegeName;
+    }
+
+    public String getMajorName() {
+        return majorName;
+    }
+
+    public void setMajorName(String majorName) {
+        this.majorName = majorName;
+    }
+
+    public String getClassName() {
+        return className;
+    }
+
+    public void setClassName(String className) {
+        this.className = className;
+    }
+
+    public Double getScore() {
+        return score;
+    }
+
+    public void setScore(Double score) {
+        this.score = score;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public int getBindCount() {
+        return bindCount;
+    }
+
+    public void setBindCount(int bindCount) {
+        this.bindCount = bindCount;
+    }
+}

+ 35 - 0
paper-library-business/src/main/java/com/qmth/paper/library/business/enums/PictureSymbolEnum.java

@@ -0,0 +1,35 @@
+package com.qmth.paper.library.business.enums;
+
+import java.util.Objects;
+
+/**
+ * @Description 图片张数比较
+ */
+public enum PictureSymbolEnum {
+    GREAT_THEN("大于"),
+    EQUAL("等于"),
+    LESS_THEN("小于"),
+    NOT_EQUAL("不等于");
+
+    private final String desc;
+
+    PictureSymbolEnum(String desc) {
+        this.desc = desc;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+
+    /**
+     * 状态转换
+     */
+    public static String convertToName(String title) {
+        for (PictureSymbolEnum e : PictureSymbolEnum.values()) {
+            if (Objects.equals(title, e.getDesc())) {
+                return e.name();
+            }
+        }
+        return null;
+    }
+}

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

@@ -32,4 +32,6 @@ public interface PaperLibraryMapper extends BaseMapper<PaperLibrary> {
     int countScanStudentByScannerAndDate(@Param("createId") Long createId, @Param("scanDate") String scanDate);
 
     List<ScanStatExportResult> listScanStatExport(@Param("schoolId") Long schoolId, @Param("scanDateStr") String scanDateStr, @Param("scanner") String scanner);
+
+    List<String> listBatchNo(@Param("studentId") Long studentId);
 }

+ 18 - 0
paper-library-business/src/main/java/com/qmth/paper/library/business/mapper/PictureManageMapper.java

@@ -0,0 +1,18 @@
+package com.qmth.paper.library.business.mapper;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.qmth.paper.library.business.bean.result.PictureManageDetailResult;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface PictureManageMapper {
+
+    IPage<PictureManageDetailResult> pageData(Page<PictureManageDetailResult> page, @Param(value = "semesterIds") List<Long> semesterIds,
+            @Param(value = "examIds") List<Long> examIds, @Param(value = "courseCodes") List<String> courseCodes,
+            @Param(value = "collegeNames") List<String> collegeNames, @Param(value = "majorNames") List<String> majorNames,
+            @Param(value = "classNames") List<String> classNames, @Param(value = "teacher") String teacher, @Param(value = "teachClass") String teachClass,
+            @Param(value = "param") String param, @Param(value = "minScore") Double minScore,
+            @Param(value = "maxScore") Double maxScore, @Param(value = "pictureSymbol") String pictureSymbol, @Param(value = "pictureCount") Integer pictureCount);
+}

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

@@ -40,4 +40,6 @@ public interface PaperLibraryService extends IService<PaperLibrary> {
     int countByPaperScanTaskId(Long paperScanTaskId);
 
     int countScanStudentByScannerAndDate(Long createId, String scanDate);
+
+    List<String> listBatchNo(Long studentId);
 }

+ 19 - 0
paper-library-business/src/main/java/com/qmth/paper/library/business/service/PictureManageService.java

@@ -0,0 +1,19 @@
+package com.qmth.paper.library.business.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.qmth.paper.library.business.bean.result.PictureManageDetailResult;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+
+/**
+ * @Description 图片管理服务类
+ */
+public interface PictureManageService {
+
+    IPage<PictureManageDetailResult> pageData(List<Long> semesterIds, List<Long> examIds, List<String> courseCodes, List<String> collegeNames,
+            List<String> majorNames, List<String> classNames, String teacher, String teachClass, String param, Double minScore, Double maxScore,
+            String pictureSymbol, Integer pictureCount, Integer pageNumber, Integer pageSize);
+
+    boolean savePicture(MultipartFile file, String fileMd5, String fileUrl, Long paperLibraryId);
+}

+ 6 - 1
paper-library-business/src/main/java/com/qmth/paper/library/business/service/impl/PaperLibraryServiceImpl.java

@@ -100,7 +100,7 @@ public class PaperLibraryServiceImpl extends ServiceImpl<PaperLibraryMapper, Pap
         }
 
         QueryWrapper<PaperLibrary> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(PaperLibrary::getPaperScanTaskId, paperScanTaskId)
+        queryWrapper.lambda().eq(paperScanTaskId!= null, PaperLibrary::getPaperScanTaskId, paperScanTaskId)
                 .eq(PaperLibrary::getStudentId, studentId)
                 .orderByAsc(PaperLibrary::getSequence);
         List<PaperLibrary> paperLibraryList = this.list(queryWrapper);
@@ -363,4 +363,9 @@ public class PaperLibraryServiceImpl extends ServiceImpl<PaperLibraryMapper, Pap
         return baseMapper.countScanStudentByScannerAndDate(createId, scanDate);
     }
 
+    @Override
+    public List<String> listBatchNo(Long studentId) {
+        return baseMapper.listBatchNo(studentId);
+    }
+
 }

+ 71 - 0
paper-library-business/src/main/java/com/qmth/paper/library/business/service/impl/PictureManageServiceImpl.java

@@ -0,0 +1,71 @@
+package com.qmth.paper.library.business.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.qmth.paper.library.business.bean.result.PictureManageDetailResult;
+import com.qmth.paper.library.business.mapper.PictureManageMapper;
+import com.qmth.paper.library.business.service.PaperLibraryService;
+import com.qmth.paper.library.business.service.PictureManageService;
+import com.qmth.paper.library.common.enums.ExceptionResultEnum;
+import com.qmth.paper.library.common.util.FileStoreUtil;
+import org.apache.commons.codec.digest.DigestUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * @Description 图片管理服务类
+ */
+@Service
+public class PictureManageServiceImpl implements PictureManageService {
+
+    @Resource
+    private PictureManageMapper pictureManageMapper;
+
+    @Resource
+    private PaperLibraryService paperLibraryService;
+
+    @Resource
+    private FileStoreUtil fileStoreUtil;
+
+    @Override
+    public IPage<PictureManageDetailResult> pageData(List<Long> semesterIds, List<Long> examIds, List<String> courseCodes, List<String> collegeNames,
+            List<String> majorNames, List<String> classNames, String teacher, String teachClass, String param, Double minScore, Double maxScore,
+            String pictureSymbol, Integer pictureCount, Integer pageNumber, Integer pageSize) {
+        IPage<PictureManageDetailResult> picturePage = pictureManageMapper.pageData(new Page<>(pageNumber, pageSize), semesterIds, examIds,
+                courseCodes, collegeNames, majorNames, classNames, teacher,
+                teachClass, param, minScore, maxScore, pictureSymbol, pictureCount);
+        List<PictureManageDetailResult> records = picturePage.getRecords();
+        for (PictureManageDetailResult record : records) {
+            //一个考生 可能会存在多个批次号
+            List<String> batchNoList = paperLibraryService.listBatchNo(record.getStudentId());
+            if(!batchNoList.isEmpty()) {
+                record.setBatchNo(String.join(",", batchNoList));
+            }
+        }
+        return picturePage;
+    }
+
+    @Override
+    public boolean savePicture(MultipartFile file, String fileMd5, String fileUrl, Long paperLibraryId) {
+        if (Objects.isNull(file) || file.getSize() == 0) {
+            throw ExceptionResultEnum.ERROR.exception("图片为空");
+        }
+        String frontFileMd5;
+        try {
+            frontFileMd5 = DigestUtils.md5Hex(file.getBytes());
+            if (!Objects.equals(fileMd5, frontFileMd5)) {
+                throw ExceptionResultEnum.MD5_EQUALS_FALSE.exception();
+            }
+            //覆盖图片
+            fileStoreUtil.fileUpload(fileUrl, file.getInputStream(), fileMd5);
+        } catch (Exception e) {
+            throw ExceptionResultEnum.ERROR.exception("[图片管理]保存图片失败:" + e.getMessage());
+        }
+        return true;
+    }
+
+}

+ 11 - 0
paper-library-business/src/main/resources/db/log/hgh_update_log.sql

@@ -38,3 +38,14 @@ INSERT INTO `sys_privilege`(`id`, `name`, `url`, `type`, `parent_id`, `sequence`
 -- 2024-07-30
 ALTER TABLE `paper_library`
     ADD COLUMN `batch_no` varchar(20) NULL COMMENT '批次号' AFTER `recognize_result`;
+
+INSERT INTO `sys_privilege`(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (280, '图片管理', 'PictureManage', 'MENU', 18, 1, NULL, NULL, 1, 0, 1);
+INSERT INTO `sys_privilege`(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (281, '查询条件', 'Condition', 'CONDITION', 280, 1, 'AUTH', '286', 1, 0, 1);
+INSERT INTO `sys_privilege`(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (282, '列表', 'List', 'LIST', 280, 2, 'AUTH', '286', 1, 0, 1);
+INSERT INTO `sys_privilege`(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (283, '查询', 'Select', 'BUTTON', 280, 3, 'AUTH', '286', 1, 0, 1);
+INSERT INTO `sys_privilege`(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (284, '下载图片', 'Add', 'BUTTON', 280, 4, 'AUTH', '287', 1, 0, 1);
+INSERT INTO `sys_privilege`(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (285, '查看详情', 'Detail', 'LINK', 280, 5, 'AUTH', '288,289', 1, 0, 1);
+INSERT INTO `sys_privilege`(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (286, '查询接口', '/api/admin/paper/picture/page', 'URL', 280, 1, 'AUTH', NULL, 1, 1, 1);
+INSERT INTO `sys_privilege`(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (287, '下载图片', '/api/admin/paper/picture/download', 'URL', 280, 1, 'AUTH', NULL, 1, 1, 1);
+INSERT INTO `sys_privilege`(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (288, '查看图片', '/api/admin/paper/picture/list_student_picture', 'URL', 280, 1, 'AUTH', NULL, 1, 1, 1);
+INSERT INTO `sys_privilege`(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (289, '保存图片', '/api/admin/paper/picture/save', 'URL', 280, 1, 'AUTH', NULL, 1, 1, 1);

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

@@ -14,6 +14,7 @@
         <result column="create_time" property="createTime"/>
         <result column="update_id" property="updateId"/>
         <result column="update_time" property="updateTime"/>
+        <result column="batch_no" property="batchNo"/>
     </resultMap>
 
     <!-- 通用查询结果列 -->
@@ -129,4 +130,8 @@
         order by date_format( FROM_UNIXTIME( p.create_time / 1000 ), '%Y-%m-%d')
     </select>
 
+    <select id="listBatchNo" resultType="java.lang.String">
+        select distinct pl.batch_no from paper_library pl where student_id=#{studentId}
+    </select>
+
 </mapper>

+ 99 - 0
paper-library-business/src/main/resources/mapper/PictureManageMapper.xml

@@ -0,0 +1,99 @@
+<?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.PictureManageMapper">
+    <select id="pageData" resultType="com.qmth.paper.library.business.bean.result.PictureManageDetailResult">
+        SELECT
+        es.id studentId,
+        es.exam_id examId,
+        es.student_name studentName,
+        es.student_code studentCode,
+        bs.NAME semesterName,
+        ea.NAME examName,
+        es.course_code courseCode,
+        es.course_name courseName,
+        es.teacher,
+        es.teach_class teachClass,
+        es.college_name collegeName,
+        es.major_name majorName,
+        es.class_name className,
+        es.exam_room examRoom,
+        es.score,
+        es.remark,
+        es.bind_count bindCount
+        FROM
+        exam_student es,
+        basic_semester bs,
+        basic_exam ea
+        WHERE
+        es.semester_id = bs.id
+        AND es.exam_id = ea.id
+        AND es.bind_count>0
+        <if test="semesterIds != null and semesterIds.size>0">
+            AND bs.id IN
+            <foreach collection="semesterIds" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="examIds != null and examIds.size>0">
+            AND ea.id IN
+            <foreach collection="examIds" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="courseCodes != null and courseCodes != '' and courseCodes.size>0">
+            AND es.course_code IN
+            <foreach collection="courseCodes" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="collegeNames != null and collegeNames != '' and collegeNames.size>0">
+            AND es.college_name IN
+            <foreach collection="collegeNames" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="majorNames != null and majorNames != '' and majorNames.size>0">
+            AND es.major_name IN
+            <foreach collection="majorNames" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="classNames != null and classNames != '' and classNames.size>0">
+            AND es.class_name IN
+            <foreach collection="classNames" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="teacher != null and teacher != ''">
+            and es.teacher like concat(#{teacher},'%')
+        </if>
+        <if test="teachClass != null and teachClass != ''">
+            and es.teach_class like concat(#{teachClass},'%')
+        </if>
+        <if test="param != null and param != ''">
+            and (es.student_name like concat(#{param},'%') or es.student_code like concat(#{param},'%'))
+        </if>
+        <if test="minScore != null">
+            and es.score &gt;= #{minScore}
+        </if>
+        <if test="maxScore != null">
+            and es.score &lt;= #{maxScore}
+        </if>
+        <if test="pictureSymbol != null and pictureSymbol !='' and pictureCount != null and pictureCount !='' ">
+            <if test="pictureSymbol == 'GREAT_THEN'">
+                and es.bind_count > #{pictureCount}
+            </if>
+            <if test="pictureSymbol == 'EQUAL'">
+                and es.bind_count = #{pictureCount}
+            </if>
+            <if test="pictureSymbol == 'LESS_THEN'">
+                and es.bind_count <![CDATA[< #{pictureCount} ]]>
+            </if>
+            <if test="pictureSymbol == 'NOT_EQUAL'">
+                and es.bind_count != #{pictureCount}
+            </if>
+        </if>
+        order by es.student_code
+    </select>
+
+</mapper>

+ 87 - 0
paper-library/src/main/java/com/qmth/paper/library/api/PictureManageController.java

@@ -0,0 +1,87 @@
+package com.qmth.paper.library.api;
+
+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.business.service.PictureManageService;
+import com.qmth.paper.library.common.contant.ApiPrefixConstant;
+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 org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import java.util.List;
+
+/**
+ * @Description 图片管理控制类
+ */
+@Api(tags = "图片管理Controller")
+@RestController
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + ApiPrefixConstant.PREFIX_PAPER + "/picture")
+@Validated
+public class PictureManageController {
+
+    @Resource
+    private PictureManageService pictureManageService;
+
+    @Resource
+    private PaperLibraryService paperLibraryService;
+
+    @ApiOperation(value = "分页查询")
+    @PostMapping("/page")
+    @ApiResponses({ @ApiResponse(code = 200, message = "查询成功", response = Result.class) })
+    public Result page(@ApiParam(value = "学期IDS") @RequestParam(value = "semesterIds", required = false) List<Long> semesterIds,
+            @ApiParam(value = "考试IDS") @RequestParam(value = "examIds", required = false) List<Long> examIds,
+            @ApiParam(value = "课程代码") @RequestParam(value = "courseCodes", required = false) List<String> courseCodes,
+            @ApiParam(value = "学院") @RequestParam(value = "collegeNames", required = false) List<String> collegeNames,
+            @ApiParam(value = "专业") @RequestParam(value = "majorNames", required = false) List<String> majorNames,
+            @ApiParam(value = "班级") @RequestParam(value = "classNames", required = false) List<String> classNames,
+            @ApiParam(value = "任课老师") @RequestParam(value = "teacher", required = false) String teacher,
+            @ApiParam(value = "教学班") @RequestParam(value = "teachClass", required = false) String teachClass,
+            @ApiParam(value = "姓名或学号") @RequestParam(value = "param", required = false) String param,
+            @ApiParam(value = "成绩(小)") @RequestParam(value = "minScore", required = false) Double minScore,
+            @ApiParam(value = "成绩(大)") @RequestParam(value = "maxScore", required = false) Double maxScore,
+            @ApiParam(value = "大于、等于、小于、不等于") @RequestParam(value = "pictureSymbol", required = false) String pictureSymbol,
+            @ApiParam(value = "图片张数") @RequestParam(value = "pictureCount", required = false) Integer pictureCount,
+            @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(
+                pictureManageService.pageData(semesterIds, examIds, courseCodes, collegeNames, majorNames, classNames, teacher, teachClass, param, minScore,
+                        maxScore, pictureSymbol, pictureCount, pageNumber, pageSize));
+    }
+
+    @ApiOperation(value = "查询考生图片集合")
+    @PostMapping("/list_student_picture")
+    @ApiResponses({ @ApiResponse(code = 200, message = "查询成功", response = Result.class) })
+    public Result listStudentPicture(@ApiParam(value = "考生ID", required = true) @RequestParam Long studentId) {
+        return ResultUtil.ok(paperLibraryService.listStudentPicture(null, studentId));
+    }
+
+    @ApiOperation(value = "保存图片")
+    @PostMapping("/save")
+    @ApiResponses({ @ApiResponse(code = 200, message = "保存图片成功", response = Result.class) })
+    public Result save(@ApiParam(value = "需要修改的图片", required = true) @RequestParam MultipartFile file,
+            @ApiParam(value = "文件的MD5", required = true) @RequestParam String fileMd5,
+            @ApiParam(value = "修改文件的路径", required = true) @RequestParam String fileUrl,
+            @ApiParam(value = "图片表ID", required = true) @RequestParam Long paperLibraryId) {
+        return ResultUtil.ok(pictureManageService.savePicture(file, fileMd5, fileUrl, paperLibraryId));
+    }
+
+    @ApiOperation(value = "下载图片异步")
+    @PostMapping("/download")
+    @ApiResponses({ @ApiResponse(code = 200, message = "下载成功", response = EditResult.class) })
+    public Result download() {
+        //TODO 下载图片
+        return ResultUtil.ok();
+    }
+
+}