فهرست منبع

Merge remote-tracking branch 'origin/dev_v3.4.1' into dev_v3.4.1

wangliang 10 ماه پیش
والد
کامیت
9b27c24d1e
18فایلهای تغییر یافته به همراه125 افزوده شده و 66 حذف شده
  1. 5 5
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExamTaskDetailCardDto.java
  2. 5 5
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/params/ExamDetailList.java
  3. 6 6
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/ExamTask.java
  4. 2 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java
  5. 6 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/HtmlToJpgUtil.java
  6. 6 2
      distributed-print-business/src/main/resources/db/log/xf.sql
  7. 4 0
      distributed-print-business/src/main/resources/db/log/脚本-caozx.sql
  8. 1 1
      distributed-print-business/src/main/resources/mapper/ExamTaskMapper.xml
  9. 5 2
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkDocumentController.java
  10. 9 0
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkTaskController.java
  11. 24 6
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/contant/SystemConstant.java
  12. 2 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/entity/MarkTask.java
  13. 3 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/MarkTaskService.java
  14. 6 10
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkDocumentServiceImpl.java
  15. 2 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkServiceImpl.java
  16. 21 5
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkTaskServiceImpl.java
  17. 1 1
      teachcloud-mark/src/main/resources/mapper/MarkRejectHistoryMapper.xml
  18. 17 19
      teachcloud-mark/src/main/resources/mapper/MarkTaskMapper.xml

+ 5 - 5
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExamTaskDetailCardDto.java

@@ -38,7 +38,7 @@ public class ExamTaskDetailCardDto {
     private String printContent;
     private String auditContent;
     private Boolean review;
-    private String requestBody;
+    private String examTaskContent;
 
     public FlowStatusEnum getFlowStatus() {
         return flowStatus;
@@ -267,11 +267,11 @@ public class ExamTaskDetailCardDto {
         this.auditContent = auditContent;
     }
 
-    public String getRequestBody() {
-        return requestBody;
+    public String getExamTaskContent() {
+        return examTaskContent;
     }
 
-    public void setRequestBody(String requestBody) {
-        this.requestBody = requestBody;
+    public void setExamTaskContent(String examTaskContent) {
+        this.examTaskContent = examTaskContent;
     }
 }

+ 5 - 5
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/params/ExamDetailList.java

@@ -19,7 +19,7 @@ public class ExamDetailList {
     private Long printHouseId;
     private String printHouseName;
     private String extendFields;
-    private List<Long> examTaskStudentObjectParamList;
+    private List<Long> examTaskStudentObjectParamListIds;
 
     public String getClassId() {
         return classId;
@@ -109,11 +109,11 @@ public class ExamDetailList {
         this.extendFields = extendFields;
     }
 
-    public List<Long> getExamTaskStudentObjectParamList() {
-        return examTaskStudentObjectParamList;
+    public List<Long> getExamTaskStudentObjectParamListIds() {
+        return examTaskStudentObjectParamListIds;
     }
 
-    public void setExamTaskStudentObjectParamList(List<Long> examTaskStudentObjectParamList) {
-        this.examTaskStudentObjectParamList = examTaskStudentObjectParamList;
+    public void setExamTaskStudentObjectParamListIds(List<Long> examTaskStudentObjectParamListIds) {
+        this.examTaskStudentObjectParamListIds = examTaskStudentObjectParamListIds;
     }
 }

+ 6 - 6
distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/ExamTask.java

@@ -145,8 +145,8 @@ public class ExamTask extends BaseEntity implements Serializable {
     private ExamTaskSourceEnum source;
 
     @ApiModelProperty(value = "入库申请请求参数")
-    @TableField(value = "request_body")
-    private String requestBody;
+    @TableField(value = "exam_task_content")
+    private String examTaskContent;
 
     @TableField(exist = false)
     private Long examStartTime;
@@ -409,11 +409,11 @@ public class ExamTask extends BaseEntity implements Serializable {
         this.source = source;
     }
 
-    public String getRequestBody() {
-        return requestBody;
+    public String getExamTaskContent() {
+        return examTaskContent;
     }
 
-    public void setRequestBody(String requestBody) {
-        this.requestBody = requestBody;
+    public void setExamTaskContent(String examTaskContent) {
+        this.examTaskContent = examTaskContent;
     }
 }

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java

@@ -1077,7 +1077,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
             examTask.setStatus(ExamStatusEnum.SUBMIT);
             examTask.setSource(ExamTaskSourceEnum.SELF);
             examTask.insertInfo(sysUser.getId());
-            examTask.setRequestBody(JSON.toJSONString(examTaskSubmitPram));
+            examTask.setExamTaskContent(JSON.toJSONString(examTaskSubmitPram));
 
             if (Objects.isNull(examTask.getFlowId())) {
                 if (Objects.nonNull(basicPrintConfig.getReview()) && basicPrintConfig.getReview()) {
@@ -1193,7 +1193,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
                         }
 
                         // 校验班级或班级内考生是否已命题
-                        List<Long> examTaskStudentObjectParamList = examDetailList.getExamTaskStudentObjectParamList();
+                        List<Long> examTaskStudentObjectParamList = examDetailList.getExamTaskStudentObjectParamListIds();
                         if (MapUtils.isNotEmpty(basicStudentIdUserMap)) {
                             examTaskStudentObjectParamList.forEach(i -> {
                                 if (basicStudentIdUserMap.containsKey(i)) {

+ 6 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/HtmlToJpgUtil.java

@@ -10,12 +10,15 @@ import com.qmth.teachcloud.common.service.BasicAttachmentService;
 import com.qmth.teachcloud.common.service.FileUploadService;
 import com.qmth.teachcloud.common.util.ConvertUtil;
 import jdk.internal.util.xml.impl.Input;
+import org.apache.commons.io.FileUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
+import java.io.ByteArrayInputStream;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.InputStream;
 import java.math.BigDecimal;
 import java.util.ArrayList;
@@ -77,18 +80,19 @@ public class HtmlToJpgUtil {
      * @return
      */
     public List<ConvertJpgStorage> convertPdfToJpg(Long id, InputStream inputStream, Long userId) {
+        byte[] bytes = SystemConstant.cloneInputStream(inputStream);
         // jpg临时路径
         List<ConvertJpgStorage> convertJpgStorages = new ArrayList<>();
         List<BasicAttachment> basicAttachmentList = new ArrayList<>();
         // html
         try {
             // pdf文件转jpg
-            List<File> jpgFileList = ConvertUtil.pdfToImageFile(inputStream);
+            List<File> jpgFileList = ConvertUtil.pdfToImageFile(new ByteArrayInputStream(bytes));
             for (int i = 0; i < jpgFileList.size(); i++) {
                 int index = i + 1;
                 String fileName = id + "-" + index + SystemConstant.JPG_PREFIX;
                 FilePathVo filePathVo = fileUploadService.uploadFile(jpgFileList.get(i), UploadFileEnum.IMAGE, fileName);
-                BasicAttachment basicAttachment = new BasicAttachment(JSON.toJSONString(filePathVo), fileName, SystemConstant.JPG_PREFIX, new BigDecimal(inputStream.available()), filePathVo.getMd5(), userId);
+                BasicAttachment basicAttachment = new BasicAttachment(JSON.toJSONString(filePathVo), fileName, SystemConstant.JPG_PREFIX, new BigDecimal(new ByteArrayInputStream(bytes).available()), filePathVo.getMd5(), userId);
                 basicAttachmentService.save(basicAttachment);
                 basicAttachmentList.add(basicAttachment);
 

+ 6 - 2
distributed-print-business/src/main/resources/db/log/xf.sql

@@ -20,6 +20,7 @@ ALTER TABLE `mark_task` ADD COLUMN `reject_reason` VARCHAR(128) NULL COMMENT '
 ALTER TABLE `mark_user_group` ADD COLUMN `reject_count` INT NULL COMMENT '打回次数' AFTER `min_score`;
 ALTER TABLE `mark_subjective_score` ADD COLUMN `rejected` TINYINT(1) NULL DEFAULT 0 COMMENT '是否打回' AFTER `uncalculate`;
 ALTER TABLE `mark_task` ADD COLUMN `basic_student_id` BIGINT(20) NULL COMMENT '考生管理ID' AFTER `student_id`;
+update mark_task mt set mt.basic_student_id = (select ms.basic_student_id from mark_student ms where mt.student_id = ms.id) where mt.basic_student_id is null;
 
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('1184', '打回', 'MarkTaskReject', 'LINK', '917', '10', 'AUTH', '1185', '1', '0', '1');
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('1183', '任务管理列表查询', '/api/admin/mark/task/list', 'URL', '917', '24', 'AUTH', '1', '1', '1');
@@ -37,7 +38,7 @@ CREATE TABLE `mark_reject_history`(
       `basic_student_id` bigint NULL DEFAULT NULL COMMENT 'basic_exam_student表id',
       `student_code` varchar(255) NULL DEFAULT NULL COMMENT '学号',
       `secret_number` varchar(255) NULL DEFAULT NULL COMMENT '任务密号',
-      `user_id` int NULL DEFAULT NULL COMMENT '评卷用户ID',
+      `user_id` bigint NULL DEFAULT NULL COMMENT '评卷用户ID',
       `reject_reason` varchar(255) NULL DEFAULT NULL COMMENT '打回原因',
       `reject_score_list` varchar(255) NULL DEFAULT NULL COMMENT '打回后分数列表',
       `marker_score_list` varchar(255) NULL DEFAULT NULL COMMENT '打回前分数列表',
@@ -50,4 +51,7 @@ CREATE TABLE `mark_reject_history`(
       INDEX `index1`(`exam_id` ASC, `paper_number` ASC, `group_number` ASC) USING BTREE
 ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;
 
-ALTER TABLE `exam_task` ADD COLUMN `request_body` MEDIUMTEXT NULL COMMENT '入库申请请求参数' AFTER `source`;
+ALTER TABLE `exam_task` ADD COLUMN `exam_task_content` MEDIUMTEXT NULL COMMENT '入库申请请求参数' AFTER `source`;
+
+INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('1187', '打回-查询轨迹图', '/api/admin/mark/task/get_mark_track', 'URL', '917', '27', 'AUTH', '1', '1', '1');
+UPDATE `sys_privilege` SET `related` = '1185,1187' WHERE (`id` = '1184');

+ 4 - 0
distributed-print-business/src/main/resources/db/log/脚本-caozx.sql

@@ -7,3 +7,7 @@ INSERT INTO `sys_config` (`id`, `school_id`, `org_id`, `config_key`, `config_nam
 -- 2024-08-22
 INSERT INTO sys_privilege (id, name, url, type, parent_id, sequence, property, enable, default_auth, front_display) VALUES ('3057', '总量分析', '/api/admin/mark/archive/score/list/export', 'URL', '487', '3', 'AUTH', '1', '1', '1');
 INSERT INTO sys_privilege (id, name, url, type, parent_id, sequence, property, related, enable, default_auth, front_display) VALUES ('3058', '总量分析', 'aggregateAnalysis', 'BUTTON', '487', '3', 'AUTH', '3057', '1', '0', '1');
+
+-- 2024-08-26
+INSERT INTO sys_privilege (id, name, url, type, parent_id, sequence, property, enable, default_auth, front_display) VALUES ('3059', '文档管理-批量下载', '/api/admin/mark/archive/document/download_batch', 'URL', '577', '7', 'AUTH', '1', '1', '1');
+UPDATE sys_privilege SET related = '466,467,494,544,585,586,587,588,3059' WHERE (id = '582');

+ 1 - 1
distributed-print-business/src/main/resources/mapper/ExamTaskMapper.xml

@@ -592,7 +592,7 @@
             e.flow_id flowId,
             f.setup,
             f.status as flowStatus,
-            e.request_body
+            e.exam_task_content
         FROM
             exam_task e
                 left JOIN

+ 5 - 2
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkDocumentController.java

@@ -121,12 +121,15 @@ public class MarkDocumentController {
         if (document.getType().equals(DocumentType.TRACK)) {
             markStudentService.trackExport(document.getExamId(), markPaper.getCoursePaperId(), response);
         }
+        if (document.getType().equals(DocumentType.SIGN)) {
+            scanPackageService.export(markPaper.getExamId(), markPaper.getCoursePaperId(), response);
+        }
     }
 
     @ApiOperation(value = "文档管理-批量下载")
     @RequestMapping(value = "/download_batch", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.EXPORT, detail = "文档下载操作,考试id:{{id}}, 试卷编号;{{paperNumber}}")
-    public void download(@ApiParam(value = "考试ID", required = true) Long examId,
+    @OperationLogDetail(operationType = OperationTypeEnum.EXPORT, detail = "文档下载操作,考试id:{{examId}}, 试卷编号;{{paperNumber}}")
+    public void download(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
             @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber, HttpServletResponse response) {
         markDocumentService.downloadBatch(examId, paperNumber, response);
     }

+ 9 - 0
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkTaskController.java

@@ -59,6 +59,15 @@ public class MarkTaskController {
         return ResultUtil.ok(markTaskDtoIPage);
     }
 
+    /**
+     * 打回
+     */
+    @ApiOperation(value = "评卷轨迹")
+    @RequestMapping(value = "/get_mark_track", method = RequestMethod.POST)
+    public Result getMarkTrack(@ApiParam(value = "任务ID", required = true) @RequestParam Long id) {
+        return ResultUtil.ok(markTaskService.getMarkTrack(id));
+    }
+
     /**
      * 打回
      */

+ 24 - 6
teachcloud-common/src/main/java/com/qmth/teachcloud/common/contant/SystemConstant.java

@@ -176,7 +176,7 @@ public class SystemConstant {
     public static final String ATTACHMENT_LENGTH = "attachment.length";
     public static final String ATTACHMENT_SIZE = "attachment.size";
     public static final String CREATE_PDF_JOB_DB_LIMIT = "create.pdf.job.db.limit";
-//    public static final String AUTO_CREATE_PDF_RESET_MAX_COUNT = "auto.create.pdf.reset.max.count";
+    //    public static final String AUTO_CREATE_PDF_RESET_MAX_COUNT = "auto.create.pdf.reset.max.count";
     public static final String THREAD_POOL_CORE_SIZE = "thread.pool.core.size";
     public static final String CUSTOM_THREAD_POOL_CORE_SIZE = "custom.thread.pool.core.size";
     public static final String SESSION_ACTIVE = "session.active";
@@ -300,7 +300,7 @@ public class SystemConstant {
     public static final int IN_SIZE_MAX = 1000;
     public static final int ALL_CARD = -1;
     public static final String MANUAL = "manual";
-//    public static final String CREATE_PDF_TYPE = "createPdfType";
+    //    public static final String CREATE_PDF_TYPE = "createPdfType";
     public static final String DELIMITER = ":";
     public static final String COMMA = ",";
     public static final int FINAL_SCALE = 1;
@@ -317,7 +317,7 @@ public class SystemConstant {
     //    public static final int MAX_RETRY_CREATE_PDF_COUNT = 5;
     //英文字母、数字、中文括号、英文括号、下划线(_)、减号(-)、中文横线(—)
     public static final String REGULAR_EXPRESSION_OF_CODE = "[a-zA-Z0-9](\\w+)?-?(\\w+)?—?(\\w+)?(\\((\\w+)?-?(\\w+)?—?(\\w+)?\\))?(\\((\\w+)?-?(\\w+)?—?(\\w+)?\\))?(\\w+)?";
-//    public static final String REGULAR_EXPRESSION_OF_CODE1 = "^[a-zA-Z0-9]+$";
+    //    public static final String REGULAR_EXPRESSION_OF_CODE1 = "^[a-zA-Z0-9]+$";
     public static final String REGULAR_EXPRESSION_OF_PHONE = "((\\d{3,4})|(\\(\\d{3,4}\\)-))?\\d{7,8}";
     public static final String REGULAR_EXPRESSION_OF_CODE_PRIMARY_DIMENSION = "[A-Z]";
     public static final String REGULAR_EXPRESSION_OF_CODE_SECOND_DIMENSION = "[A-Z][1-9][0-9]*";
@@ -351,7 +351,7 @@ public class SystemConstant {
     public static final String GET_EQUAL = "=";
     public static final String PATH_MATCH = "*";
     public static final String CATALOG_LINK = "->";
-//    public static final String OPERATE_LINK = "--";
+    //    public static final String OPERATE_LINK = "--";
     public static final String LIMIT1 = "limit 1";
 
     public static final Integer DEFAULT_BACKUP_COUNT = 1;
@@ -527,13 +527,13 @@ public class SystemConstant {
     public static final String OBJECT_DATA = "objectData";
     public static final String APPROVE_TF_FLOW_LOG = "TFFlowLog";//流程院长自动审批
     public static final String APPROVE_TF_FLOW_APPROVE = "TFFlowAppove";//流程流转记录
-//    public static final String FLOW_WORK_MESSAGE = "workMsg";
+    //    public static final String FLOW_WORK_MESSAGE = "workMsg";
 //    public static final String FLOW_VIEW_MESSAGE = "viewMsg";
     public static final String PAPAER_ATTACHMENT_IDS = "paperAttachmentIds";//命题附件ids
     public static final String REDIS_LOCK_FLOW_TASK_PREFIX = "redis:lock:flow:task:";//流程节点锁
     public static final String REDIS_LOCK_EXAM_TASK_FLOW_PREFIX = "redis:lock:exam:task:flow:";//考试任务流程节点锁
     public static final String REDIS_LOCK_PAPER_NUMBER_PREFIX = "redis:lock:paper:number:";//试卷编号锁
-//    public static final String REDIS_LOCK_COURSE_CODE_SEQUENCE_PREFIX = "redis:lock:courseCode:sequence:";//课程序号锁
+    //    public static final String REDIS_LOCK_COURSE_CODE_SEQUENCE_PREFIX = "redis:lock:courseCode:sequence:";//课程序号锁
     public static final long REDIS_LOCK_FLOW_TASK_TIME_OUT = 60L * 2;
     public static final long REDIS_LOCK_EXAM_TASK_FLOW_TIME_OUT = 60L * 2;
     public static final String REDIS_LOCK_FLOW_PREFIX = "redis:lock:flow:";//流程锁
@@ -1318,6 +1318,24 @@ public class SystemConstant {
         return null;
     }
 
+    public static byte[] cloneInputStream(InputStream input) {
+        try {
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            byte[] buffer = new byte[1024];
+            int len;
+            while ((len = input.read(buffer)) > -1) {
+                baos.write(buffer, 0, len);
+            }
+            baos.flush();
+            baos.close();
+            input.close();
+            return baos.toByteArray();
+        } catch (IOException e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
     /**
      * 路径拼接
      *

+ 2 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/entity/MarkTask.java

@@ -92,9 +92,11 @@ public class MarkTask implements Serializable {
 
     @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(value = "科组长ID")
+    @TableField(updateStrategy = FieldStrategy.IGNORED)
     private Long headerId;
 
     @ApiModelProperty(value = "科组长评卷时间")
+    @TableField(updateStrategy = FieldStrategy.IGNORED)
     private Long headerTime;
 
     @ApiModelProperty(value = "科组长总分")

+ 3 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/MarkTaskService.java

@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.teachcloud.mark.dto.mark.manage.MarkManageDto;
 import com.qmth.teachcloud.mark.dto.mark.manage.MarkTaskDto;
+import com.qmth.teachcloud.mark.dto.mark.manage.Task;
 import com.qmth.teachcloud.mark.entity.MarkTask;
 import com.qmth.teachcloud.mark.enums.MarkTaskStatus;
 
@@ -86,4 +87,6 @@ public interface MarkTaskService extends IService<MarkTask> {
     IPage<MarkTaskDto> pageMarkTask(Long examId, String paperNumber, Integer groupNumber, String loginName, MarkTaskStatus status, String studentCode, String secretNumber, String teachClassName, Double subScore, Integer pageNumber, Integer pageSize);
 
     void rejectMarkTask(Long id, String rejectReason);
+
+    Task getMarkTrack(Long id);
 }

+ 6 - 10
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkDocumentServiceImpl.java

@@ -221,11 +221,12 @@ public class MarkDocumentServiceImpl extends ServiceImpl<MarkDocumentMapper, Mar
 
     @Override
     public void downloadBatch(Long examId, String paperNumber, HttpServletResponse response) {
-        List<MarkDocument> documentList = this.listByExamIdAndPaperNumber(examId, paperNumber);
+        List<MarkDocument> documentList = this.list(
+                new QueryWrapper<MarkDocument>().lambda().eq(MarkDocument::getExamId, examId)
+                        .eq(MarkDocument::getPaperNumber, paperNumber));
         try {
             response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode("文档管理.zip", "UTF-8"));
             ZipWriter writer = ZipWriter.create(response.getOutputStream());
-            ByteArrayOutputStream os = new ByteArrayOutputStream();
 
             // 本地保存目录
             File tempFile = SystemConstant.getFileTempParentDirVar(SystemConstant.TEMP_PREFIX);
@@ -233,7 +234,7 @@ public class MarkDocumentServiceImpl extends ServiceImpl<MarkDocumentMapper, Mar
             for (int i = 0; i < documentList.size(); i++) {
                 MarkDocument markDocument = documentList.get(i);
                 String path = markDocument.getFilePath();
-                String name = i + '-' + markDocument.getName();
+                String name = (i + 1) + "-" + markDocument.getName();
                 DocumentType documentType = markDocument.getType();
 
                 switch (documentType) {
@@ -271,7 +272,6 @@ public class MarkDocumentServiceImpl extends ServiceImpl<MarkDocumentMapper, Mar
                     file.delete();
                     break;
                 case SIGN:
-                    String signClassifyPath = tempFile.getPath() + File.separator + name;
                     MarkPaper markPaper = markPaperService.getByExamIdAndPaperNumber(examId, paperNumber);
                     if (markPaper == null) {
                         throw ExceptionResultEnum.ERROR.exception("试卷不存在");
@@ -283,15 +283,11 @@ public class MarkDocumentServiceImpl extends ServiceImpl<MarkDocumentMapper, Mar
                     lw.orderByAsc(ScanPackage::getPackageNo);
                     List<ScanPackage> scanPackageList = scanPackageService.list(wrapper);
                     if (CollectionUtils.isNotEmpty(scanPackageList)) {
-                        File signClassifyFile = new File(signClassifyPath);
-                        if (!signClassifyFile.exists()) {
-                            signClassifyFile.mkdirs();
-                        }
                         for (ScanPackage scanPackage : scanPackageList) {
                             FilePathVo filePathVo = JSON.parseObject(scanPackage.getPath(), FilePathVo.class);
-                            filePath = signClassifyFile.getPath() + File.separator + FilenameUtils.getName(filePathVo.getPath());
+                            filePath = tempFile.getPath() + File.separator + FilenameUtils.getName(filePathVo.getPath());
                             File scanPackageFile = fileUploadService.downloadFile(scanPackage.getPath(), filePath);
-                            writer.write(scanPackageFile, scanPackageFile.getName());
+                            writer.write(scanPackageFile, name, scanPackageFile.getName());
                             scanPackageFile.delete();
                         }
                     }

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

@@ -490,6 +490,7 @@ public class MarkServiceImpl implements MarkService {
                     markTask.setPaperNumber(student.getPaperNumber());
                     markTask.setGroupNumber(group.getNumber());
                     markTask.setStudentId(student.getId());
+                    markTask.setBasicStudentId(student.getBasicStudentId());
                     markTask.setStudentCode(student.getStudentCode());
                     markTask.setSecretNumber(student.getSecretNumber());
                     markTask.setTaskNumber(1);
@@ -518,6 +519,7 @@ public class MarkServiceImpl implements MarkService {
                             markTask.setPaperNumber(student.getPaperNumber());
                             markTask.setGroupNumber(group.getNumber());
                             markTask.setStudentId(student.getId());
+                            markTask.setBasicStudentId(student.getBasicStudentId());
                             markTask.setStudentCode(student.getStudentCode());
                             markTask.setSecretNumber(student.getSecretNumber());
                             markTask.setTaskNumber(2);

+ 21 - 5
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkTaskServiceImpl.java

@@ -13,10 +13,7 @@ import com.qmth.teachcloud.common.enums.mark.MarkProblemStatus;
 import com.qmth.teachcloud.common.service.BasicRoleDataPermissionService;
 import com.qmth.teachcloud.common.util.ExcelUtil;
 import com.qmth.teachcloud.common.util.ServletUtil;
-import com.qmth.teachcloud.mark.dto.mark.manage.MarkManageDto;
-import com.qmth.teachcloud.mark.dto.mark.manage.MarkRejectHistoryDto;
-import com.qmth.teachcloud.mark.dto.mark.manage.MarkTaskDto;
-import com.qmth.teachcloud.mark.dto.mark.manage.MarkerInfoDto;
+import com.qmth.teachcloud.mark.dto.mark.manage.*;
 import com.qmth.teachcloud.mark.entity.MarkGroup;
 import com.qmth.teachcloud.mark.entity.MarkProblemHistory;
 import com.qmth.teachcloud.mark.entity.MarkTask;
@@ -56,6 +53,8 @@ public class MarkTaskServiceImpl extends ServiceImpl<MarkTaskMapper, MarkTask> i
     @Resource
     private LockService lockService;
     @Resource
+    private TaskService taskService;
+    @Resource
     private BasicRoleDataPermissionService basicRoleDataPermissionService;
 
     @Override
@@ -317,7 +316,10 @@ public class MarkTaskServiceImpl extends ServiceImpl<MarkTaskMapper, MarkTask> i
                 .set(MarkTask::getMarkerScore, markerScore)
                 .set(MarkTask::getMarkerScoreList, scoreList)
                 .set(MarkTask::getMarkerTime, now)
-                .set(MarkTask::getMarkerSpent, spent);
+                .set(MarkTask::getMarkerSpent, spent)
+                .set(MarkTask::getHeaderId, null)
+                .set(MarkTask::getHeaderTime, null)
+                .set(MarkTask::getRejectReason, null);
         return this.update(updateWrapper);
     }
 
@@ -380,4 +382,18 @@ public class MarkTaskServiceImpl extends ServiceImpl<MarkTaskMapper, MarkTask> i
             lockService.unwatch(LockType.EXAM_SUBJECT, markTask.getExamId(), markTask.getPaperNumber());
         }
     }
+
+    @Override
+    public Task getMarkTrack(Long id) {
+        MarkTask markTask = this.getById(id);
+        if (markTask == null) {
+            throw ExceptionResultEnum.ERROR.exception("任务不存在,请刷新列表");
+        }
+        if (!MarkTaskStatus.MARKED.equals(markTask.getStatus())) {
+            throw ExceptionResultEnum.ERROR.exception("已评任务才允许打回");
+        }
+        Task dto = taskService.build(markTask);
+        dto.setPrevious(true);
+        return dto;
+    }
 }

+ 1 - 1
teachcloud-mark/src/main/resources/mapper/MarkRejectHistoryMapper.xml

@@ -28,7 +28,7 @@
             bes.class_name,
             bes.teach_class_name,
             su.login_name,
-            su.real_name,
+            su.real_name userName,
             so.name orgName,
             su1.login_name rejectLoginName,
             su1.real_name rejectUserName

+ 17 - 19
teachcloud-mark/src/main/resources/mapper/MarkTaskMapper.xml

@@ -300,8 +300,8 @@
             bes.student_name,
             bes.class_name,
             bes.teach_class_name,
-            su.login_name,
-            su.real_name,
+            su.login_name loginName,
+            su.real_name userName,
             so.name orgName,
             su1.login_name rejectLoginName,
             su1.real_name rejectUserName
@@ -312,23 +312,21 @@
                  mark_task
              WHERE
                  exam_id = #{examId} AND paper_number = #{paperNumber}
-                <where>
-                    <if test="groupNumber != null and groupNumber != ''">
-                        and group_number = #{groupNumber}
-                    </if>
-                    <if test="studentCode != null and studentCode != ''">
-                        and student_code like concat('%', #{studentCode}, '%')
-                    </if>
-                    <if test="secretNumber != null and secretNumber != ''">
-                        and secret_number = #{secretNumber}
-                    </if>
-                    <if test="status != null">
-                        and status = #{status}
-                    </if>
-                    <if test="subScore != null">
-                        and (marker_score_list like concat(#{subScore}, ',%') or marker_score_list like concat('%,', #{subScore}) or marker_score_list like concat('%,', #{subScore}, ',%'))
-                    </if>
-                </where>
+                <if test="groupNumber != null and groupNumber != ''">
+                    and group_number = #{groupNumber}
+                </if>
+                <if test="studentCode != null and studentCode != ''">
+                    and student_code like concat('%', #{studentCode}, '%')
+                </if>
+                <if test="secretNumber != null and secretNumber != ''">
+                    and secret_number = #{secretNumber}
+                </if>
+                <if test="status != null">
+                    and status = #{status}
+                </if>
+                <if test="subScore != null">
+                    and (marker_score_list like concat(#{subScore}, ',%') or marker_score_list like concat('%,', #{subScore}) or marker_score_list like concat('%,', #{subScore}, ',%'))
+                </if>
              ) mt
                 LEFT JOIN
             (SELECT