xiaofei 1 éve
szülő
commit
4492ee9d79

+ 3 - 1
distributed-print/install/mysql/upgrade/3.3.0.sql

@@ -93,7 +93,7 @@ INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('965', '绑定评卷员', '/api/admin/mark/marker/add', 'URL', '917', '21', 'AUTH', '1', '1', '1');
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('966', '评卷质量重新计算', '/api/admin/mark/quality/update', 'URL', '917', '22', 'AUTH', '1', '1', '1');
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('967', '评卷质量给分曲线', '/api/admin/mark/quality/chart', 'URL', '917', '23', 'AUTH', '1', '1', '1');
-INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `sequence`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('970', '扫描端', 'scan', 'MENU', '11', '971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005', '1', '0', '0');
+INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `sequence`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('970', '扫描端', 'scan', 'MENU', '11', '971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1007', '1', '0', '0');
 UPDATE `sys_privilege` SET `name` = '打印端', `related` = '200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,973,974,975' WHERE (`id` = '199');
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('971', '心跳接口', '/api/scan/server/heartbeat', 'URL', '970', '1', 'AUTH', '1', '1', '1');
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('972', '登出接口', '/api/scan/logout', 'URL', '970', '2', 'AUTH', '1', '1', '1');
@@ -130,6 +130,8 @@ INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('1003', '任务释放', '/api/scan/task/omr/release', 'URL', '970', '33', 'AUTH', '1', '1', '1');
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('1004', '任务历史', '/api/scan/task/omr/history', 'URL', '970', '34', 'AUTH', '1', '1', '1');
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('1005', '答题卡二次识别', '/api/scan/answer/refix', 'URL', '970', '35', 'AUTH', '1', '1', '1');
+INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`,`related`, `enable`, `default_auth`, `front_display`) VALUES ('1006', '查询条件', 'Condition', 'CONDITION', '970', '1', 'AUTH','971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1007', '1', '1', '1');
+INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('1007', '未扫描-导出', '/api/scan/student/unexist/export', 'URL', '970', '36', 'AUTH', '1', '1', '1');
 DELETE FROM `sys_privilege` WHERE (`id` = '392');
 DELETE FROM `sys_privilege` WHERE (`id` = '393');
 DELETE FROM `sys_privilege` WHERE (`id` = '394');

+ 37 - 29
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/ScanStudentController.java

@@ -1,13 +1,5 @@
 package com.qmth.distributed.print.api.mark;
 
-import org.springframework.beans.factory.annotation.Autowired;
-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.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.util.Result;
@@ -16,9 +8,14 @@ import com.qmth.teachcloud.mark.bean.UpdateTimeVo;
 import com.qmth.teachcloud.mark.bean.student.AbsentManualUpdateVo;
 import com.qmth.teachcloud.mark.bean.student.StudentQuery;
 import com.qmth.teachcloud.mark.service.MarkStudentService;
-
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
 
 /**
  * <p>
@@ -32,26 +29,37 @@ import io.swagger.annotations.ApiOperation;
 @RestController
 @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_SCAN + "/student")
 public class ScanStudentController {
-	@Autowired
-	private MarkStudentService markStudentService;
+    @Autowired
+    private MarkStudentService markStudentService;
+
+    @ApiOperation(value = "考生查询")
+    @RequestMapping(value = "find", method = RequestMethod.POST)
+    public Result student(@Validated StudentQuery query) {
+        return ResultUtil.ok(markStudentService.findOne(query));
+    }
+
+    @ApiOperation(value = "更新缺考状态")
+    @PostMapping("absent/update")
+    public AbsentManualUpdateVo absentManualUpdate(@RequestParam Long examId, @RequestParam String coursePaperId,
+                                                   @RequestParam String studentCode) {
+        return markStudentService.absentManualUpdate(examId, coursePaperId, studentCode);
+    }
 
-	@ApiOperation(value = "考生查询")
-	@RequestMapping(value = "find", method = RequestMethod.POST)
-	public Result student(@Validated StudentQuery query) {
-		return ResultUtil.ok(markStudentService.findOne(query));
-	}
+    @ApiOperation(value = "任务确认")
+    @PostMapping("confirm")
+    public UpdateTimeVo confirm(@RequestParam Long examId, @RequestParam String coursePaperId,
+                                @RequestParam String studentCode, @RequestParam(required = false) Boolean omrAbsent) {
+        return markStudentService.confirm(examId, coursePaperId, studentCode, omrAbsent);
+    }
 
-	@ApiOperation(value = "更新缺考状态")
-	@PostMapping("absent/update")
-	public AbsentManualUpdateVo absentManualUpdate(@RequestParam Long examId, @RequestParam String coursePaperId,
-			@RequestParam String studentCode) {
-		return markStudentService.absentManualUpdate(examId, coursePaperId,studentCode);
-	}
-	
-	@ApiOperation(value = "任务确认")
-	@PostMapping("confirm")
-	public UpdateTimeVo confirm(@RequestParam Long examId, @RequestParam String coursePaperId,
-			@RequestParam String studentCode,@RequestParam(required = false) Boolean omrAbsent) {
-		return markStudentService.confirm(examId, coursePaperId,studentCode,omrAbsent);
-	}
+    /**
+     * 导出评卷员工作量
+     */
+    @ApiOperation(value = "未扫描-导出")
+    @RequestMapping(value = "/unexist/export", method = RequestMethod.POST)
+    public void exportUnexist(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
+                              @ApiParam(value = "试卷编号", required = true) @RequestParam String coursePaperId,
+                              HttpServletResponse response) {
+        markStudentService.exportUnexist(examId, coursePaperId, response);
+    }
 }

+ 61 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/dto/UnexistStudentDto.java

@@ -0,0 +1,61 @@
+package com.qmth.teachcloud.mark.dto;
+
+import com.qmth.teachcloud.common.annotation.ExcelProperty;
+import com.qmth.teachcloud.mark.entity.ScanOmrTask;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class UnexistStudentDto {
+
+	@ExcelProperty(name = "课程代码", width = 20, index = 1)
+	private String courseCode;
+	@ExcelProperty(name = "课程名称", width = 20, index = 2)
+	private String courseName;
+	@ExcelProperty(name = "试卷编号", width = 20, index = 3)
+	private String paperNumber;
+	@ExcelProperty(name = "学号", width = 20, index = 4)
+	private String studentCode;
+	@ExcelProperty(name = "姓名", width = 20, index = 5)
+	private String studentName;
+
+	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 getPaperNumber() {
+		return paperNumber;
+	}
+
+	public void setPaperNumber(String paperNumber) {
+		this.paperNumber = paperNumber;
+	}
+
+	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;
+	}
+}

+ 3 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/mapper/MarkStudentMapper.java

@@ -13,6 +13,7 @@ import com.qmth.teachcloud.mark.bean.scananswer.AnswerQueryDomain;
 import com.qmth.teachcloud.mark.bean.scananswer.AnswerQueryVo;
 import com.qmth.teachcloud.mark.bean.student.StudentQuery;
 import com.qmth.teachcloud.mark.bean.student.StudentVo;
+import com.qmth.teachcloud.mark.dto.UnexistStudentDto;
 import com.qmth.teachcloud.mark.dto.mark.score.StudentScoreDetailDto;
 import com.qmth.teachcloud.mark.entity.MarkStudent;
 import org.apache.ibatis.annotations.Param;
@@ -62,4 +63,6 @@ public interface MarkStudentMapper extends BaseMapper<MarkStudent> {
 	List<CollegeVo> college(@Param("examId") Long examId, @Param("paperNumber") String paperNumber);
 	List<ClassVo> classData(@Param("examId") Long examId, @Param("paperNumber") String paperNumber);
 	List<TeacherVo> teacher(@Param("examId") Long examId, @Param("paperNumber") String paperNumber);
+
+    List<UnexistStudentDto> listUnexistStudentByExamIdAndCoursePaperId(@Param("examId") Long examId, @Param("coursePaperId") String coursePaperId);
 }

+ 2 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/MarkStudentService.java

@@ -109,4 +109,6 @@ public interface MarkStudentService extends IService<MarkStudent> {
 	void scoreExport(ArchiveStudentQuery query, HttpServletResponse response);
 
 	ScoreReportVo scoreReport(Long examId, String paperNumber);
+
+    void exportUnexist(Long examId, String coursePaperId, HttpServletResponse response);
 }

+ 12 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkStudentServiceImpl.java

@@ -15,6 +15,8 @@ import javax.validation.constraints.NotNull;
 
 import com.alibaba.fastjson.JSON;
 import com.qmth.teachcloud.mark.bean.FilePathVo;
+import com.qmth.teachcloud.mark.dto.UnexistStudentDto;
+import com.qmth.teachcloud.mark.dto.mark.manage.MarkerInfoDto;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -896,6 +898,16 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
         return ret;
     }
 
+    @Override
+    public void exportUnexist(Long examId, String coursePaperId, HttpServletResponse response) {
+        try {
+            List<UnexistStudentDto> unexistStudentDtoList = this.baseMapper.listUnexistStudentByExamIdAndCoursePaperId(examId, coursePaperId);
+            ExcelUtil.excelExport("评卷员工作量", UnexistStudentDto.class, unexistStudentDtoList, response);
+        } catch (Exception e) {
+            throw ExceptionResultEnum.ERROR.exception("导出评卷员工作量失败");
+        }
+    }
+
     private void fillObjective(ScoreReportVo ret, Long examId, String paperNumber) {
         List<MarkQuestion> qs = markQuestionService.listQuestionByExamIdAndPaperNumber(examId, paperNumber);
         List<MarkStudent> students = listByExamIdAndPaperNumberAndAbsent(examId, paperNumber, false);

+ 14 - 0
teachcloud-mark/src/main/resources/mapper/MarkStudentMapper.xml

@@ -330,4 +330,18 @@
           and course_paper_id = #{query.coursePaperId}
           and student_code = #{query.studentCode}
     </select>
+    <select id="listUnexistStudentByExamIdAndCoursePaperId"
+            resultType="com.qmth.teachcloud.mark.dto.UnexistStudentDto">
+        SELECT
+            t.course_code courseCode,
+            t.course_name courseName,
+            t.paper_number paperNumber,
+            t.student_code studentCode,
+            t.student_name studentName
+        FROM
+            mark_student t
+        WHERE
+            t.exam_id = #{examId} AND t.course_paper_id = #{coursePaperId}
+          AND t.scan_status = 'UNEXIST'
+    </select>
 </mapper>

+ 1 - 1
teachcloud-task/src/main/java/com/qmth/teachcloud/task/service/impl/PrintFinishServiceImpl.java

@@ -104,7 +104,7 @@ public class PrintFinishServiceImpl implements PrintFinishService {
                 if (markStudent != null) {
                     continue;
                 }
-                MarkStudent student = new MarkStudent(examStudent.getId(), dto.getExamId(), dto.getCourseCode(), dto.getCourseName(), dto.getPaperNumber(), dto.getCoursePaperId(), dto.getPaperType(), examStudent.getStudentCode(), examStudent.getStudentName(), dto.getPackageCode(), dto.getExamPlace(), dto.getExamRoom(), examStudent.getCollegeName(), examStudent.getStudentName());
+                MarkStudent student = new MarkStudent(examStudent.getId(), dto.getExamId(), dto.getCourseCode(), dto.getCourseName(), dto.getPaperNumber(), dto.getCoursePaperId(), dto.getPaperType(), examStudent.getStudentCode(), examStudent.getStudentName(), dto.getPackageCode(), dto.getExamPlace(), dto.getExamRoom(), examStudent.getCollegeName(), examStudent.getClazzName());
                 if (student.getSecretNumber() == null) {
                     student.randomSecretNumber();
                     while (secretNumberSet.contains(student.getSecretNumber())