Эх сурвалжийг харах

3.3.0 删除评卷参数管理相关代码

xiaofei 1 жил өмнө
parent
commit
15c036e62a
40 өөрчлөгдсөн 84 нэмэгдсэн , 2348 устгасан
  1. 0 143
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/CardCustDto.java
  2. 0 80
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/CardDetailDto.java
  3. 0 96
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExamCardDto.java
  4. 0 32
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ReviewSampleDto.java
  5. 0 75
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/SyncExamCardDto.java
  6. 0 10
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamPaperClassMarkerMapper.java
  7. 0 12
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamPaperGroupMapper.java
  8. 0 7
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamStudentMapper.java
  9. 0 13
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamTaskSyncMapper.java
  10. 2 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamCardService.java
  11. 0 19
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamPaperClassMarkerService.java
  12. 0 42
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamPaperGroupService.java
  13. 0 56
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamPaperStructureService.java
  14. 0 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamPrintPlanService.java
  15. 0 14
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamStudentService.java
  16. 0 14
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamTaskSyncService.java
  17. 0 14
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TBSyncTaskService.java
  18. 42 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamCardServiceImpl.java
  19. 0 111
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPaperClassMarkerServiceImpl.java
  20. 0 124
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPaperGroupServiceImpl.java
  21. 10 640
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPaperStructureServiceImpl.java
  22. 0 7
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPrintPlanServiceImpl.java
  23. 4 40
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamStudentServiceImpl.java
  24. 1 11
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskDetailServiceImpl.java
  25. 0 33
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskSyncServiceImpl.java
  26. 0 4
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/PrintCommonServiceImpl.java
  27. 0 112
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TBSyncTaskServiceImpl.java
  28. 0 5
      distributed-print-business/src/main/resources/mapper/ExamPaperGroupMapper.xml
  29. 0 84
      distributed-print-business/src/main/resources/mapper/ExamStudentMapper.xml
  30. 2 1
      distributed-print/install/mysql/upgrade/3.3.0.sql
  31. 13 2
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamCardController.java
  32. 0 202
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamPaperStructureController.java
  33. 0 282
      distributed-print/src/test/java/com/qmth/distributed/print/ExamPaperStructureServiceTest.java
  34. 1 11
      distributed-print/src/test/java/com/qmth/distributed/print/ServiceTest.java
  35. 0 2
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysUserService.java
  36. 0 21
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysUserServiceImpl.java
  37. 0 4
      teachcloud-report-business/src/main/resources/mapper/ExamPaperClassMarkerMapper.xml
  38. 1 1
      teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/SubjectCalculateJob.java
  39. 0 5
      teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/service/JobService.java
  40. 8 17
      teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/service/impl/JobServiceImpl.java

+ 0 - 143
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/CardCustDto.java

@@ -1,143 +0,0 @@
-package com.qmth.distributed.print.business.bean.dto;
-
-/**
- * @Date: 2021/3/29.
- */
-public class CardCustDto {
-
-    private String examTaskId;
-    private String cardId;
-    private String cardRuleId;
-    private String courseCode;
-    private String courseName;
-    private String status;
-    private String paperNumber;
-    private String schoolId;
-    private String schoolName;
-    private String orgId;
-    private String orgName;
-    private String createId;
-    private Long createTime;
-    private String createName;
-    private Long updateTime;
-
-    public String getExamTaskId() {
-        return examTaskId;
-    }
-
-    public void setExamTaskId(String examTaskId) {
-        this.examTaskId = examTaskId;
-    }
-
-    public String getCardId() {
-        return cardId;
-    }
-
-    public void setCardId(String cardId) {
-        this.cardId = cardId;
-    }
-
-    public String getCardRuleId() {
-        return cardRuleId;
-    }
-
-    public void setCardRuleId(String cardRuleId) {
-        this.cardRuleId = cardRuleId;
-    }
-
-    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 getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-    public String getPaperNumber() {
-        return paperNumber;
-    }
-
-    public void setPaperNumber(String paperNumber) {
-        this.paperNumber = paperNumber;
-    }
-
-    public String getSchoolId() {
-        return schoolId;
-    }
-
-    public void setSchoolId(String schoolId) {
-        this.schoolId = schoolId;
-    }
-
-    public String getSchoolName() {
-        return schoolName;
-    }
-
-    public void setSchoolName(String schoolName) {
-        this.schoolName = schoolName;
-    }
-
-    public String getOrgId() {
-        return orgId;
-    }
-
-    public void setOrgId(String orgId) {
-        this.orgId = orgId;
-    }
-
-    public String getOrgName() {
-        return orgName;
-    }
-
-    public void setOrgName(String orgName) {
-        this.orgName = orgName;
-    }
-
-    public String getCreateId() {
-        return createId;
-    }
-
-    public void setCreateId(String createId) {
-        this.createId = createId;
-    }
-
-    public String getCreateName() {
-        return createName;
-    }
-
-    public void setCreateName(String createName) {
-        this.createName = createName;
-    }
-
-    public Long getCreateTime() {
-        return createTime;
-    }
-
-    public void setCreateTime(Long createTime) {
-        this.createTime = createTime;
-    }
-
-    public Long getUpdateTime() {
-        return updateTime;
-    }
-
-    public void setUpdateTime(Long updateTime) {
-        this.updateTime = updateTime;
-    }
-}

+ 0 - 80
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/CardDetailDto.java

@@ -1,80 +0,0 @@
-package com.qmth.distributed.print.business.bean.dto;
-
-/**
- * @Date: 2021/3/29.
- */
-public class CardDetailDto {
-
-    private String cardId;
-    private String title;
-    private String createMethod;
-    private String makeMethod;
-    private String content;
-    private String htmlContent;
-    private String type;
-    private String paperType;
-
-    public String getCardId() {
-        return cardId;
-    }
-
-    public void setCardId(String cardId) {
-        this.cardId = cardId;
-    }
-
-    public String getTitle() {
-        return title;
-    }
-
-    public void setTitle(String title) {
-        this.title = title;
-    }
-
-    public String getCreateMethod() {
-        return createMethod;
-    }
-
-    public void setCreateMethod(String createMethod) {
-        this.createMethod = createMethod;
-    }
-
-    public String getMakeMethod() {
-        return makeMethod;
-    }
-
-    public void setMakeMethod(String makeMethod) {
-        this.makeMethod = makeMethod;
-    }
-
-    public String getContent() {
-        return content;
-    }
-
-    public void setContent(String content) {
-        this.content = content;
-    }
-
-    public String getHtmlContent() {
-        return htmlContent;
-    }
-
-    public void setHtmlContent(String htmlContent) {
-        this.htmlContent = htmlContent;
-    }
-
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public String getPaperType() {
-        return paperType;
-    }
-
-    public void setPaperType(String paperType) {
-        this.paperType = paperType;
-    }
-}

+ 0 - 96
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExamCardDto.java

@@ -1,96 +0,0 @@
-package com.qmth.distributed.print.business.bean.dto;
-
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import com.qmth.distributed.print.business.enums.CardStatusEnum;
-import com.qmth.distributed.print.business.enums.CardTypeEnum;
-import com.qmth.distributed.print.business.enums.MakeMethodEnum;
-import com.qmth.teachcloud.common.enums.CardCreateMethodEnum;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-
-/**
- * @Description: 题卡dto对象
- * @Author: CaoZixuan
- * @Date: 2022-09-01
- */
-public class ExamCardDto implements Serializable {
-    @ApiModelProperty(value = "题卡id")
-    @JsonSerialize(using = ToStringSerializer.class)
-    private Long cardId;
-
-    @ApiModelProperty(value = "标题")
-    private String title;
-
-    @ApiModelProperty(value = "题卡制作方式:SELECT-选择已有题卡,SELF-自助创建,CUST-客户制卡")
-    private MakeMethodEnum makeMethod;
-
-    @ApiModelProperty(value = "STAGE-暂存,SUBMIT-提交")
-    private CardStatusEnum status;
-
-    @ApiModelProperty(value = "题卡类型:GENERIC-通卡,CUSTOM-自定义")
-    private CardTypeEnum type;
-
-    @ApiModelProperty(value = "通卡创建方式(UPLOAD-上传,CUSTOMIZE-自定义)")
-    private CardCreateMethodEnum createMethod;
-
-    @ApiModelProperty(value = "试卷编号")
-    private String paperType;
-
-    public Long getCardId() {
-        return cardId;
-    }
-
-    public void setCardId(Long cardId) {
-        this.cardId = cardId;
-    }
-
-    public String getTitle() {
-        return title;
-    }
-
-    public void setTitle(String title) {
-        this.title = title;
-    }
-
-    public MakeMethodEnum getMakeMethod() {
-        return makeMethod;
-    }
-
-    public void setMakeMethod(MakeMethodEnum makeMethod) {
-        this.makeMethod = makeMethod;
-    }
-
-    public CardStatusEnum getStatus() {
-        return status;
-    }
-
-    public void setStatus(CardStatusEnum status) {
-        this.status = status;
-    }
-
-    public CardTypeEnum getType() {
-        return type;
-    }
-
-    public void setType(CardTypeEnum type) {
-        this.type = type;
-    }
-
-    public CardCreateMethodEnum getCreateMethod() {
-        return createMethod;
-    }
-
-    public void setCreateMethod(CardCreateMethodEnum createMethod) {
-        this.createMethod = createMethod;
-    }
-
-    public String getPaperType() {
-        return paperType;
-    }
-
-    public void setPaperType(String paperType) {
-        this.paperType = paperType;
-    }
-}

+ 0 - 32
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ReviewSampleDto.java

@@ -1,32 +0,0 @@
-package com.qmth.distributed.print.business.bean.dto;
-
-import io.swagger.annotations.ApiModelProperty;
-
-/**
- * @Description: 审核样品Dto(来自 exam_task_detail 和 exam_task_paper_log)
- * @Author: CaoZixuan
- * @Date: 2021-04-27
- */
-public class ReviewSampleDto {
-    @ApiModelProperty(value = "试卷副本信息")
-    private String paperAttachmentIds;
-
-    @ApiModelProperty(value = "审核副本信息")
-    private String paperConfirmAttachmentIds;
-
-    public String getPaperAttachmentIds() {
-        return paperAttachmentIds;
-    }
-
-    public void setPaperAttachmentIds(String paperAttachmentIds) {
-        this.paperAttachmentIds = paperAttachmentIds;
-    }
-
-    public String getPaperConfirmAttachmentIds() {
-        return paperConfirmAttachmentIds;
-    }
-
-    public void setPaperConfirmAttachmentIds(String paperConfirmAttachmentIds) {
-        this.paperConfirmAttachmentIds = paperConfirmAttachmentIds;
-    }
-}

+ 0 - 75
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/SyncExamCardDto.java

@@ -1,75 +0,0 @@
-package com.qmth.distributed.print.business.bean.dto;
-
-import com.qmth.distributed.print.business.entity.ExamCard;
-
-/**
- * @Description: 题卡同步 DTO
- */
-public class SyncExamCardDto extends ExamCard {
-
-    private String courseCode;
-
-    private String courseName;
-
-    private String paperNumber;
-
-    private String sequence;
-
-    private String title;
-
-    private String content;
-
-    @Override
-    public String getCourseCode() {
-        return courseCode;
-    }
-
-    @Override
-    public void setCourseCode(String courseCode) {
-        this.courseCode = courseCode;
-    }
-
-    @Override
-    public String getCourseName() {
-        return courseName;
-    }
-
-    @Override
-    public void setCourseName(String courseName) {
-        this.courseName = courseName;
-    }
-
-    public String getPaperNumber() {
-        return paperNumber;
-    }
-
-    public void setPaperNumber(String paperNumber) {
-        this.paperNumber = paperNumber;
-    }
-
-    public String getSequence() {
-        return sequence;
-    }
-
-    public void setSequence(String sequence) {
-        this.sequence = sequence;
-    }
-
-    @Override
-    public String getTitle() {
-        return title;
-    }
-
-    @Override
-    public void setTitle(String title) {
-        this.title = title;
-    }
-
-    public String getContent() {
-        return content;
-    }
-
-    public void setContent(String content) {
-        this.content = content;
-    }
-}

+ 0 - 10
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamPaperClassMarkerMapper.java

@@ -1,10 +0,0 @@
-package com.qmth.distributed.print.business.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.qmth.distributed.print.business.entity.ExamPaperClassMarker;
-
-/**
- * @Description: 班级和评卷员关系mapper
- */
-public interface ExamPaperClassMarkerMapper extends BaseMapper<ExamPaperClassMarker> {
-}

+ 0 - 12
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamPaperGroupMapper.java

@@ -1,12 +0,0 @@
-package com.qmth.distributed.print.business.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.qmth.distributed.print.business.entity.ExamPaperGroup;
-
-/**
- * @Description: 试卷分组mapper
- * @Author: CaoZixuan
- * @Date: 2022-04-13
- */
-public interface ExamPaperGroupMapper extends BaseMapper<ExamPaperGroup> {
-}

+ 0 - 7
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamStudentMapper.java

@@ -46,19 +46,12 @@ public interface ExamStudentMapper extends BaseMapper<ExamStudent> {
      */
     List<ExamStudent> listExamStudentBySchoolIdAndClazzId(@Param("schoolId") Long schoolId, @Param("classId") String classId);
 
-    List<SysOrg> getBasicCollegeByBelongOrgId(@Param("studentCode") String studentCode, @Param("schoolId") Long schoolId);
-
     ExamStudentPdfInfoDto getByStudentId(Long id);
 
     @SuppressWarnings("MybatisXMapperMethodInspection")
-    List<Map> listStudentScoreSync(@Param("schoolId") Long schoolId, @Param("studentCode") String studentCode, @Param("examNumber") String examNumber, @Param("subjectCode") String subjectCode);
 
     List<ExamStudentCourseClassDto> listExamStudentByPaperNumberAndPaperType(@Param("batchId") Long batchId, @Param("paperNumber") String paperNumber, @Param("paperType") String paperType);
 
-    List<SyncExamStudentDto> listStudentByExamDetailCourseId(@Param("examDetailCourseId") Long examDetailCourseId, @Param("paperType") String paperType);
-
-    List<String> listTicketNumberByExamId(@Param("examId") Long examId);
-
     List<String> listUserClass(@Param("schoolId") Long schoolId, @Param("examId") Long examId, @Param("paperNumber") String paperNumber);
 
     ExamStudent listByExamDetailCourseIdLimit1(@Param("schoolId") Long schoolId, @Param("examDetailCourseId") Long examDetailCourseId);

+ 0 - 13
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamTaskSyncMapper.java

@@ -1,13 +0,0 @@
-package com.qmth.distributed.print.business.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.qmth.distributed.print.business.entity.ExamTaskSync;
-
-/**
- * <p>
- * 数据同步 Mapper 接口
- * </p>
- */
-public interface ExamTaskSyncMapper extends BaseMapper<ExamTaskSync> {
-
-}

+ 2 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamCardService.java

@@ -2,6 +2,7 @@ package com.qmth.distributed.print.business.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.qmth.distributed.print.business.bean.marking.CardJpgResult;
 import com.qmth.distributed.print.business.bean.params.ExamCardParams;
 import com.qmth.distributed.print.business.bean.params.GenericExamCardParams;
 import com.qmth.distributed.print.business.entity.ExamCard;
@@ -42,4 +43,5 @@ public interface ExamCardService extends IService<ExamCard> {
 
     void cardDownload(HttpServletResponse response, String id);
 
+    List<CardJpgResult> listCardImage(Long examId, String paperNumber, String paperType);
 }

+ 0 - 19
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamPaperClassMarkerService.java

@@ -1,19 +0,0 @@
-package com.qmth.distributed.print.business.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.qmth.distributed.print.business.bean.marking.ClassMarker;
-import com.qmth.distributed.print.business.entity.ExamPaperClassMarker;
-import com.qmth.distributed.print.business.entity.ExamPaperStructure;
-
-import java.util.List;
-
-/**
- * @Description: 班级和评卷员关系实现类
- */
-public interface ExamPaperClassMarkerService extends IService<ExamPaperClassMarker> {
-    void saveExamPaperClassInfo(ExamPaperStructure examPaperStructure, Boolean openClassReading, List<ClassMarker> classInfo);
-
-    void deleteExamPaperClassInfo(Long paperStructureId);
-
-    List<ExamPaperClassMarker> listByExamPaperStructureId(Long id);
-}

+ 0 - 42
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamPaperGroupService.java

@@ -1,42 +0,0 @@
-package com.qmth.distributed.print.business.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.qmth.distributed.print.business.bean.marking.CardJpgResult;
-import com.qmth.distributed.print.business.bean.marking.GroupInfo;
-import com.qmth.distributed.print.business.bean.marking.Marker;
-import com.qmth.distributed.print.business.entity.ExamPaperGroup;
-import com.qmth.distributed.print.business.entity.ExamPaperStructure;
-
-import java.util.List;
-
-/**
- * @Description: 试卷分组服务接口
- * @Author: CaoZixuan
- * @Date: 2022-04-13
- */
-public interface ExamPaperGroupService extends IService<ExamPaperGroup> {
-
-    /**
-     * 保存考试试卷分组信息
-     *
-     * @param examPaperStructure 试卷结构对象
-     * @param groupInfo          分组信息
-     */
-    void saveExamPaperGroupInfo(ExamPaperStructure examPaperStructure, List<GroupInfo> groupInfo);
-
-    /**
-     * 删除考试试卷分组信息
-     *
-     * @param examPaperStructureId 试卷结构id
-     */
-    void deleteExamPaperGroupInfo(Long examPaperStructureId);
-
-    /**
-     * 查询分组
-     *
-     * @param id 试卷结构表id
-     */
-    List<ExamPaperGroup> listByExamPaperStructureId(Long id);
-
-    void saveExamPaperGroupMarkerByGroupNumber(ExamPaperStructure examPaperStructure, Integer groupNumber, List<Marker> markerList);
-}

+ 0 - 56
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamPaperStructureService.java

@@ -28,9 +28,6 @@ public interface ExamPaperStructureService extends IService<ExamPaperStructure>
 
     IPage<ExamPaperStructurePageDto> listByPropositionTeacherId(Long semesterId, Long examId, Integer pageNumber, Integer pageSize, Boolean ready);
 
-    ExamPaperStructure upload(String examPaperStructure, String md5, String keys, MultipartFile[] files);
-
-    ExamPaperStructure uploadAnswer(String id, String md5, MultipartFile file);
 
     /**
      * 解析云阅卷试卷结构
@@ -42,58 +39,5 @@ public interface ExamPaperStructureService extends IService<ExamPaperStructure>
 
     long countByPropositionTeacherId(Boolean ready);
 
-    /**
-     * 评卷参数提交
-     *
-     * @param evaluationParameterStr 评卷参数
-     * @param requestUser            请求人(命题老师)
-     * @return 试卷结构
-     */
-    ExamPaperStructure submitExamPaperParams(String evaluationParameterStr, SysUser requestUser);
-
-    /**
-     * 更新客观题答案
-     *
-     * @param id                 试卷结构表Id
-     * @param objectiveStructure 客观题结构json
-     */
-    ExamPaperStructure updateObjectiveAnswer(Long id, String objectiveStructure);
-
-    /**
-     * 根据条件查找jpg文件路径
-     *
-     * @param examId      考试id
-     * @param courseCode  课程编号
-     * @param paperNumber 试卷编号
-     * @param paperType   试卷类型
-     * @return 题卡jpg文件结果
-     */
-    List<CardJpgResult> findCardJpgFileByPaperNumber(Long examId, String courseCode, String paperNumber, String paperType);
-
-    /**
-     * 绑定科组长
-     *
-     * @param data data
-     */
-    ExamPaperStructure bindMarkLeader(String data);
-
-    ExamPaperStructure saveMarkerAndClass(String data);
-
-    List<UserRoleDto> listSecretary();
-
-    /**
-     * 转办/打回
-     *
-     * @param courseCode  课程代码
-     * @param paperNumber 试卷编号
-     * @param transferId  转办对象ID
-     */
-    boolean transfer(Long examId, String courseCode, String paperNumber, Long transferId);
-
-    /**
-     * 自动统分
-     */
-    void subjectCalculate();
 
-    List<String> listUserClass(Long examId, String paperNumber);
 }

+ 0 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamPrintPlanService.java

@@ -107,7 +107,5 @@ public interface ExamPrintPlanService extends IService<ExamPrintPlan> {
      */
     List<ExamPrintPlan> findByPaperNumber(Long schoolId, String paperNumber);
 
-    List<ExamPrintPlan> listBySchoolId(Long schoolId);
-
     void updateAttachmentIdByTemplateId(Long templateId, Long attachmentId);
 }

+ 0 - 14
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamStudentService.java

@@ -1,13 +1,9 @@
 package com.qmth.distributed.print.business.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.qmth.distributed.print.business.bean.dto.ExamDetailCourseDto;
 import com.qmth.distributed.print.business.bean.dto.ExamStudentCourseDto;
 import com.qmth.distributed.print.business.bean.dto.ExamStudentPdfInfoDto;
-import com.qmth.distributed.print.business.bean.dto.SyncExamStudentDto;
 import com.qmth.distributed.print.business.entity.ExamStudent;
-import com.qmth.teachcloud.common.entity.BasicCollege;
-import com.qmth.teachcloud.common.entity.SysOrg;
 
 import java.util.List;
 import java.util.Map;
@@ -37,18 +33,8 @@ public interface ExamStudentService extends IService<ExamStudent> {
 
     void insertBatch(List<ExamStudent> examStudents);
 
-    List<ExamStudent> listExamStudentBySchoolIdAndClazzId(Long schoolId, String classId);
-
-    SysOrg getBasicCollegeByBelongOrgId(String studentCode, Long schoolId);
-
     ExamStudentPdfInfoDto getByStudentId(Long id);
 
-    List<Map> listStudentScoreSync(Long schoolId, String studentCode, String examNumber, String subjectCode);
-
-    List<SyncExamStudentDto> listStudentByExamDetailCourseId(List<ExamDetailCourseDto> examDetailCourseList, String paperType);
-
-    List<String> listTicketNumberByExamId(Long examId);
-
     void removeByExamDetailCourseId(Long id);
 
     List<String> listUserClass(Long schoolId, Long examId, String paperNumber);

+ 0 - 14
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamTaskSyncService.java

@@ -1,14 +0,0 @@
-package com.qmth.distributed.print.business.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.qmth.distributed.print.business.entity.ExamTaskSync;
-
-/**
- * <p>
- * 数据同步 服务类
- * </p>
- */
-public interface ExamTaskSyncService extends IService<ExamTaskSync> {
-
-    ExamTaskSync getBySchoolIdAndOrgCodeAndPaperNumberAndPaperType(Long schoolId, Long examId, String orgCode, String paperNumber, String paperType);
-}

+ 0 - 14
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TBSyncTaskService.java

@@ -2,18 +2,12 @@ package com.qmth.distributed.print.business.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.qmth.distributed.print.business.entity.ExamPaperStructure;
 import com.qmth.distributed.print.business.entity.TBSyncTask;
-import com.qmth.teachcloud.common.bean.params.UserPushParam;
 import com.qmth.teachcloud.common.bean.result.SyncListResult;
-import com.qmth.teachcloud.common.entity.SysUser;
 import com.qmth.teachcloud.common.enums.PushTypeEnum;
 import com.qmth.teachcloud.common.enums.TaskResultEnum;
 import com.qmth.teachcloud.common.enums.TaskStatusEnum;
 
-import java.util.List;
-import java.util.Map;
-
 /**
  * <p>
  * 同步数据 服务类
@@ -23,18 +17,10 @@ public interface TBSyncTaskService extends IService<TBSyncTask> {
 
     TBSyncTask saveTask(Long schoolId, Long objectId, PushTypeEnum type, String remark);
 
-    TBSyncTask saveTaskStructure(Long schoolId, ExamPaperStructure examPaperStructure, Long objectId, PushTypeEnum type, String remark);
-
-    TBSyncTask saveTaskBaseData(Long schoolId, Long semesterId, Long examId, String courseCode, String courseName, String paperNumber, Long objectId, String orgCode, String thirdRelateName, String examTime, PushTypeEnum type, String remark);
-
     void updateStatusAndResultById(Long id, Long thirdRelateId, TaskStatusEnum status, TaskResultEnum result, String errorMessage);
 
     void updateStatusAndResultById(Long id, Long thirdRelateId, TaskStatusEnum status, TaskResultEnum result, String errorMessage, String remark);
 
-    TBSyncTask savePushCommon(PushTypeEnum pushTypeEnum, Map map, SysUser sysUser);
-
-    TBSyncTask savePushCommon(PushTypeEnum pushTypeEnum, Map map, SysUser sysUser, Long objectId);
-
     /**
      * 同步任务管理分页查询
      *

+ 42 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamCardServiceImpl.java

@@ -7,6 +7,7 @@ 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.distributed.print.business.bean.marking.CardJpgResult;
 import com.qmth.distributed.print.business.bean.marking.ConvertJpgStorage;
 import com.qmth.distributed.print.business.bean.params.ExamCardParams;
 import com.qmth.distributed.print.business.bean.params.GenericExamCardParams;
@@ -20,6 +21,7 @@ import com.qmth.distributed.print.business.util.CreatePdfUtil;
 import com.qmth.distributed.print.business.util.HtmlToJpgUtil;
 import com.qmth.distributed.print.business.util.HtmlToPdfUtil;
 import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
+import com.qmth.teachcloud.common.bean.vo.PaperInfoVo;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.BasicAttachment;
 import com.qmth.teachcloud.common.entity.BasicCourse;
@@ -32,6 +34,7 @@ import com.qmth.teachcloud.common.service.BasicCourseService;
 import com.qmth.teachcloud.common.service.BasicRoleDataPermissionService;
 import com.qmth.teachcloud.common.service.TeachcloudCommonService;
 import com.qmth.teachcloud.common.util.ConvertUtil;
+import com.qmth.teachcloud.common.util.ExamTaskUtil;
 import com.qmth.teachcloud.common.util.ServletUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
@@ -45,6 +48,8 @@ import javax.servlet.http.HttpServletResponse;
 import java.io.File;
 import java.nio.charset.StandardCharsets;
 import java.util.*;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 /**
  * <p>
@@ -512,6 +517,43 @@ public class ExamCardServiceImpl extends ServiceImpl<ExamCardMapper, ExamCard> i
         }
     }
 
+    @Override
+    public List<CardJpgResult> listCardImage(Long examId, String paperNumber, String paperType) {
+        Long examTaskId = examTaskService.getOne(new QueryWrapper<ExamTask>().lambda()
+                .eq(ExamTask::getExamId, examId)
+                .eq(ExamTask::getPaperNumber, paperNumber)).getId();
+        ExamTaskDetail examTaskDetail = examTaskDetailService.getOne(new QueryWrapper<ExamTaskDetail>().lambda()
+                .eq(ExamTaskDetail::getExamTaskId, examTaskId));
+        List<CardJpgResult> cardJpgResultList = new ArrayList<>();
+        if (Objects.nonNull(examTaskDetail) && Objects.nonNull(examTaskDetail.getPaperAttachmentIds())) {
+            List<PaperInfoVo> paperInfoVoList = ExamTaskUtil.parsePaperAttachmentPath(examTaskDetail.getPaperAttachmentIds());
+            for (PaperInfoVo paperInfoVo : paperInfoVoList) {
+                if (!paperType.equals(paperInfoVo.getName())) {
+                    // 试卷类型不匹配跳过
+                    continue;
+                }
+                String jpgAttachmentInfo = this.getOne(new QueryWrapper<ExamCard>().lambda()
+                        .eq(ExamCard::getId, paperInfoVo.getCardId())).getJpgAttachment();
+                if (StringUtils.isBlank(jpgAttachmentInfo)) {
+                    return new ArrayList<>();
+                }
+
+                List<ConvertJpgStorage> convertJpgStorageList = JSONObject.parseArray(jpgAttachmentInfo, ConvertJpgStorage.class);
+
+                cardJpgResultList.addAll(convertJpgStorageList.stream().flatMap(e -> {
+                    BasicAttachment basicAttachment = basicAttachmentService.getById(e.getAttachmentId());
+
+                    CardJpgResult cardJpgResult = new CardJpgResult();
+                    cardJpgResult.setName(basicAttachment.getName());
+                    cardJpgResult.setIndex(e.getIndex());
+                    cardJpgResult.setPath(teachcloudCommonService.filePreview(basicAttachment.getPath()));
+                    return Stream.of(cardJpgResult);
+                }).collect(Collectors.toList()));
+            }
+        }
+        return cardJpgResultList;
+    }
+
     /**
      * 生成新的title
      *

+ 0 - 111
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPaperClassMarkerServiceImpl.java

@@ -1,111 +0,0 @@
-package com.qmth.distributed.print.business.service.impl;
-
-import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.qmth.distributed.print.business.bean.marking.ClassMarker;
-import com.qmth.distributed.print.business.bean.marking.EvaluationParameters;
-import com.qmth.distributed.print.business.bean.marking.GroupInfo;
-import com.qmth.distributed.print.business.bean.marking.Marker;
-import com.qmth.distributed.print.business.entity.ExamPaperClassMarker;
-import com.qmth.distributed.print.business.entity.ExamPaperStructure;
-import com.qmth.distributed.print.business.enums.ExamPaperStructureStatusTypeEnum;
-import com.qmth.distributed.print.business.mapper.ExamPaperClassMarkerMapper;
-import com.qmth.distributed.print.business.service.ExamPaperClassMarkerService;
-import com.qmth.distributed.print.business.service.ExamPaperStructureService;
-import com.qmth.distributed.print.business.service.ExamStudentService;
-import com.qmth.teachcloud.common.contant.SystemConstant;
-import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.CollectionUtils;
-
-import javax.annotation.Resource;
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * @Description: 班级和评卷员关系服务实现类
- */
-@Service
-public class ExamPaperClassMarkerServiceImpl extends ServiceImpl<ExamPaperClassMarkerMapper, ExamPaperClassMarker> implements ExamPaperClassMarkerService {
-
-    @Resource
-    ExamPaperStructureService examPaperStructureService;
-
-    @Resource
-    ExamStudentService examStudentService;
-
-    @Transactional
-    @Override
-    public void saveExamPaperClassInfo(ExamPaperStructure examPaperStructure, Boolean openClassReading, List<ClassMarker> classInfo) {
-        // 1.删除原有数据
-        this.deleteExamPaperClassInfo(examPaperStructure.getId());
-        if (openClassReading != null && openClassReading) {
-            // 校验分组、班级
-            List<String> listUserClass = examStudentService.listUserClass(examPaperStructure.getSchoolId(), examPaperStructure.getExamId(), examPaperStructure.getPaperNumber());
-            if (!CollectionUtils.isEmpty(listUserClass)) {
-                EvaluationParameters evaluationParameters = JSON.parseObject(examPaperStructure.getPaperInfoJson(), EvaluationParameters.class);
-                List<GroupInfo> groupInfos = evaluationParameters.getGroupInfo();
-                Map<Integer, String> groupClassMap = new HashMap<>();
-                for (GroupInfo groupInfo : groupInfos) {
-                    Set<String> unbindClassSet = new HashSet<>();
-                    Set<String> bindClassSet = new HashSet<>();
-                    List<Marker> markerList = groupInfo.getMarkerList();
-                    for (Marker marker : markerList) {
-                        Optional<ClassMarker> optional = classInfo.stream().filter(m -> StringUtils.isNotBlank(m.getClassName()) && m.getId().equals(marker.getId()) && m.getLoginName().equals(marker.getLoginName())).findFirst();
-                        if (optional.isPresent()) {
-                            bindClassSet.addAll(new HashSet<>(Arrays.asList(optional.get().getClassName().split(","))));
-                        }
-                    }
-                    for (String s : listUserClass) {
-                        if (!bindClassSet.contains(s)) {
-                            unbindClassSet.add(s);
-                        }
-                    }
-                    if (!CollectionUtils.isEmpty(unbindClassSet)) {
-                        groupClassMap.put(groupInfo.getGroupNumber(), String.join(",", unbindClassSet));
-                    }
-                }
-
-                if (!groupClassMap.isEmpty()) {
-                    StringJoiner stringJoiner = new StringJoiner(";");
-                    for (Map.Entry<Integer, String> entry : groupClassMap.entrySet()) {
-                        stringJoiner.add(String.format("班级[%s]在分组[%s]中未被评卷员绑定", entry.getValue(), entry.getKey()));
-                    }
-                    throw ExceptionResultEnum.ERROR.exception(stringJoiner.toString());
-                }
-
-                List<ExamPaperClassMarker> list = new ArrayList<>();
-                for (ClassMarker classMarker : classInfo) {
-                    ExamPaperClassMarker examPaperClassMarker = new ExamPaperClassMarker();
-                    examPaperClassMarker.setId(SystemConstant.getDbUuid());
-                    examPaperClassMarker.setExamPaperStructureId(examPaperStructure.getId());
-                    examPaperClassMarker.setMarkerId(Long.valueOf(classMarker.getId()));
-                    examPaperClassMarker.setLoginName(classMarker.getLoginName());
-                    examPaperClassMarker.setClassName(classMarker.getClassName());
-                    list.add(examPaperClassMarker);
-                }
-                this.saveBatch(list);
-            }
-        }
-        examPaperStructure.setStatus(ExamPaperStructure.parseStatus(examPaperStructure.getStatus(), ExamPaperStructureStatusTypeEnum.MARKER_CLASS.getType(), "save", true));
-        examPaperStructureService.updateById(examPaperStructure);
-    }
-
-    @Override
-    public void deleteExamPaperClassInfo(Long paperStructureId) {
-        UpdateWrapper<ExamPaperClassMarker> updateWrapper = new UpdateWrapper<>();
-        updateWrapper.lambda().eq(ExamPaperClassMarker::getExamPaperStructureId, paperStructureId);
-        this.remove(updateWrapper);
-    }
-
-    @Override
-    public List<ExamPaperClassMarker> listByExamPaperStructureId(Long id) {
-        QueryWrapper<ExamPaperClassMarker> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(ExamPaperClassMarker::getExamPaperStructureId, id);
-        return this.list(queryWrapper);
-    }
-}

+ 0 - 124
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPaperGroupServiceImpl.java

@@ -1,124 +0,0 @@
-package com.qmth.distributed.print.business.service.impl;
-
-import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.qmth.distributed.print.business.bean.marking.*;
-import com.qmth.distributed.print.business.entity.ExamPaperGroup;
-import com.qmth.distributed.print.business.entity.ExamPaperStructure;
-import com.qmth.distributed.print.business.enums.ExamPaperStructureStatusTypeEnum;
-import com.qmth.distributed.print.business.mapper.ExamPaperGroupMapper;
-import com.qmth.distributed.print.business.service.ExamPaperGroupMarkerService;
-import com.qmth.distributed.print.business.service.ExamPaperGroupService;
-import com.qmth.distributed.print.business.service.ExamPaperStructureService;
-import com.qmth.teachcloud.common.base.BaseEntity;
-import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
-import com.qmth.teachcloud.common.enums.paperGroup.ScorePolicyEnum;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import javax.annotation.Resource;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-/**
- * @Description: 试卷分组服务类
- * @Author: CaoZixuan
- * @Date: 2022-04-13
- */
-@Service
-public class ExamPaperGroupServiceImpl extends ServiceImpl<ExamPaperGroupMapper, ExamPaperGroup> implements ExamPaperGroupService {
-    @Resource
-    private ExamPaperGroupMarkerService examPaperGroupMarkerService;
-
-    @Resource
-    private ExamPaperStructureService examPaperStructureService;
-
-    @Transactional(rollbackFor = Exception.class)
-    @Override
-    public void saveExamPaperGroupInfo(ExamPaperStructure examPaperStructure, List<GroupInfo> groupInfo) {
-        // 1.删除原有分组
-        this.deleteExamPaperGroupInfo(examPaperStructure.getId());
-        // 2.新增新的试卷结构分组
-        for (int i = 0; i < groupInfo.size(); i++) {
-            GroupInfo group = groupInfo.get(i);
-            // 题目信息
-            List<Question> questionList = group.getQuestions();
-            // 评卷员信息
-            List<Marker> markerList = group.getMarkerList();
-            // 是否开启双评
-            Double doubleRate = group.getDoubleRate();
-            // 仲裁阈值
-            Double arbitrateThreshold = group.getArbitrateThreshold();
-            // 图片配置
-            List<PictureConfig> pictureConfigList = group.getPictureConfigList();
-
-            ExamPaperGroup examPaperGroup = new ExamPaperGroup();
-            examPaperGroup.setExamPaperStructureId(examPaperStructure.getId());
-            examPaperGroup.setGroupNumber(i + 1);
-            examPaperGroup.setDoubleRate(doubleRate);
-            examPaperGroup.setArbitrateThreshold(arbitrateThreshold);
-            examPaperGroup.setScorePolicy(ScorePolicyEnum.AVG);
-            examPaperGroup.setTrialCount(0);
-            examPaperGroup.setMarkMode(null);
-            examPaperGroup.setQuestionInfo(JSON.toJSONString(questionList));
-            examPaperGroup.setPictureConfig(JSON.toJSONString(pictureConfigList));
-            this.save(examPaperGroup);
-            // 新增后的分组id
-            Long groupId = examPaperGroup.getId();
-            examPaperGroupMarkerService.saveExamPaperGroupMarkerByGroupId(groupId, markerList);
-        }
-        // 先保存分组
-        examPaperStructure.setStatus(ExamPaperStructure.parseStatus(examPaperStructure.getStatus(), ExamPaperStructureStatusTypeEnum.GROUP.getType(), "save", true));
-        // 再保存评卷员
-        examPaperStructure.setStatus(ExamPaperStructure.parseStatus(examPaperStructure.getStatus(), ExamPaperStructureStatusTypeEnum.MARKER.getType(), "save", true));
-        examPaperStructureService.updateById(examPaperStructure);
-    }
-
-    @Transactional(rollbackFor = Exception.class)
-    @Override
-    public void deleteExamPaperGroupInfo(Long examPaperStructureId) {
-        // 要删除的分组id集合
-        Set<Long> groupIdSet = this.list(new QueryWrapper<ExamPaperGroup>()
-                        .lambda()
-                        .eq(ExamPaperGroup::getExamPaperStructureId, examPaperStructureId))
-                .stream()
-                .map(BaseEntity::getId)
-                .collect(Collectors.toSet());
-
-        // 删除评卷员和分组的关系
-        examPaperGroupMarkerService.deleteExamPaperGroupMarkerService(groupIdSet);
-
-        // 删除分组信息
-        this.removeByIds(groupIdSet);
-    }
-
-    @Override
-    public List<ExamPaperGroup> listByExamPaperStructureId(Long id) {
-        QueryWrapper<ExamPaperGroup> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(ExamPaperGroup::getExamPaperStructureId, id);
-        return this.baseMapper.selectList(queryWrapper);
-    }
-
-    @Transactional
-    @Override
-    public void saveExamPaperGroupMarkerByGroupNumber(ExamPaperStructure examPaperStructure, Integer groupNumber, List<Marker> markerList) {
-        QueryWrapper<ExamPaperGroup> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(ExamPaperGroup::getExamPaperStructureId, examPaperStructure.getId())
-                .eq(ExamPaperGroup::getGroupNumber, groupNumber);
-        ExamPaperGroup examPaperGroup = this.getOne(queryWrapper);
-        if (examPaperGroup == null) {
-            throw ExceptionResultEnum.ERROR.exception("分组不存在");
-        }
-
-        // 删除分组下评卷员
-        examPaperGroupMarkerService.deleteExamPaperGroupMarkerService(new HashSet<>(Arrays.asList(examPaperGroup.getId())));
-        examPaperGroupMarkerService.saveExamPaperGroupMarkerByGroupId(examPaperGroup.getId(), markerList);
-
-        examPaperStructure.setStatus(ExamPaperStructure.parseStatus(examPaperStructure.getStatus(), ExamPaperStructureStatusTypeEnum.MARKER.getType(), "save", true));
-        examPaperStructureService.updateById(examPaperStructure);
-    }
-}

+ 10 - 640
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPaperStructureServiceImpl.java

@@ -1,58 +1,37 @@
 package com.qmth.distributed.print.business.service.impl;
 
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-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.google.common.collect.Lists;
-import com.qmth.boot.api.exception.ApiException;
-import com.qmth.distributed.print.business.bean.dto.ExamPaperObjectiveStructureDto;
-import com.qmth.distributed.print.business.bean.dto.ExamPaperStructureDto;
 import com.qmth.distributed.print.business.bean.dto.ExamPaperStructurePageDto;
-import com.qmth.distributed.print.business.bean.dto.ExamPaperSubjectiveStructureDto;
-import com.qmth.distributed.print.business.bean.marking.*;
-import com.qmth.teachcloud.common.bean.vo.PaperInfoVo;
-import com.qmth.distributed.print.business.entity.*;
-import com.qmth.distributed.print.business.enums.ExamPaperStructureStatusTypeEnum;
+import com.qmth.distributed.print.business.bean.marking.Question;
+import com.qmth.distributed.print.business.entity.ExamPaperStructure;
+import com.qmth.distributed.print.business.entity.ExamTaskDetail;
+import com.qmth.distributed.print.business.entity.TBSyncTask;
 import com.qmth.distributed.print.business.enums.ExamTaskSyncStatusEnum;
 import com.qmth.distributed.print.business.mapper.ExamPaperStructureMapper;
-import com.qmth.distributed.print.business.service.*;
+import com.qmth.distributed.print.business.service.ExamPaperStructureService;
+import com.qmth.distributed.print.business.service.ExamTaskDetailService;
+import com.qmth.distributed.print.business.service.TBSyncTaskService;
 import com.qmth.teachcloud.common.bean.auth.AuthBean;
 import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
-import com.qmth.teachcloud.common.bean.dto.UserRoleDto;
 import com.qmth.teachcloud.common.bean.dto.stmms.ExamCloudPaperStructDto;
-import com.qmth.teachcloud.common.contant.SystemConstant;
-import com.qmth.teachcloud.common.entity.BasicAttachment;
-import com.qmth.teachcloud.common.entity.BasicSemester;
+import com.qmth.teachcloud.common.bean.vo.PaperInfoVo;
 import com.qmth.teachcloud.common.entity.SysUser;
-import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.common.enums.PushTypeEnum;
 import com.qmth.teachcloud.common.enums.QuestionType;
-import com.qmth.teachcloud.common.enums.UploadFileEnum;
-import com.qmth.teachcloud.common.service.*;
+import com.qmth.teachcloud.common.service.BasicRoleDataPermissionService;
+import com.qmth.teachcloud.common.service.CommonCacheService;
 import com.qmth.teachcloud.common.util.ExamTaskUtil;
-import com.qmth.teachcloud.common.util.ExcelUtil;
-import com.qmth.teachcloud.common.util.ResultUtil;
 import com.qmth.teachcloud.common.util.ServletUtil;
-import com.qmth.teachcloud.common.util.excel.ExcelError;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.DigestUtils;
-import org.springframework.util.LinkedMultiValueMap;
-import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
-import java.io.IOException;
 import java.math.BigDecimal;
 import java.util.*;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
 
 /**
  * <p>
@@ -62,49 +41,15 @@ import java.util.stream.Stream;
 @Service
 public class ExamPaperStructureServiceImpl extends ServiceImpl<ExamPaperStructureMapper, ExamPaperStructure> implements ExamPaperStructureService {
 
-    @Resource
-    ExamTaskService examTaskService;
-
     @Resource
     ExamTaskDetailService examTaskDetailService;
 
-    @Resource
-    @Lazy
-    PrintCommonService printCommonService;
-
-    @Resource
-    BasicAttachmentService basicAttachmentService;
-
-    @Resource
-    BasicSemesterService basicSemesterService;
-
-    @Resource
-    BasicExamService basicExamService;
-
-    @Resource
-    SysUserService sysUserService;
-
-    @Resource
-    ExamPaperGroupService examPaperGroupService;
-
-    @Resource
-    ExamCardService examCardService;
-
-    @Resource
-    TeachcloudCommonService teachcloudCommonService;
-
     @Resource
     TBSyncTaskService tbSyncTaskService;
 
     @Resource
     private BasicRoleDataPermissionService basicRoleDataPermissionService;
 
-    @Resource
-    ExamStudentService examStudentService;
-
-    @Resource
-    ExamPaperClassMarkerService examPaperClassMarkerService;
-
     @Resource
     CommonCacheService commonCacheService;
 
@@ -145,151 +90,6 @@ public class ExamPaperStructureServiceImpl extends ServiceImpl<ExamPaperStructur
         return examPaperStructureIPage;
     }
 
-    @Transactional
-    @Override
-    public ExamPaperStructure upload(String examPaperStructure, String md5, String keys, MultipartFile[] files) {
-
-        ExamPaperStructure examPaperStructureTemp = JSONObject.parseObject(examPaperStructure, ExamPaperStructure.class);
-        if (Objects.isNull(examPaperStructureTemp.getId())) {
-            // 保存
-            examPaperStructureTemp.setId(SystemConstant.getDbUuid());
-            this.save(examPaperStructureTemp);
-        } else {
-            examPaperStructureTemp = this.getById(examPaperStructureTemp.getId());
-        }
-
-        // 组装ExamPaperStructureDto
-        List<ExamPaperStructureDto> examPaperStructureDtos = createExamPaperStructure(md5, keys, examPaperStructureTemp.getPaperType(), files);
-        List<BasicAttachment> basicAttachmentList = new ArrayList<>();
-
-        List<Map<String, Object>> paperAnswerList = new ArrayList<>();
-        List<Map<String, Object>> subjectiveStructureList = new ArrayList<>();
-        List<Map<String, Object>> objectiveStructureList = new ArrayList<>();
-
-        // 试卷卷型及原卷附件ID
-        Map<String, String> paperMap = createExamTaskAttachmentIds(examPaperStructureTemp);
-
-        // 上传试卷结构、标答文件
-        for (ExamPaperStructureDto examPaperStructureDto : examPaperStructureDtos) {
-            Map<String, Object> paperAnswerMap = new HashMap<>();
-            paperAnswerMap.put("paperType", examPaperStructureDto.getPaperType());
-            Map<String, Object> subjectiveStructureMap = new HashMap<>();
-            subjectiveStructureMap.put("paperType", examPaperStructureDto.getPaperType());
-            Map<String, Object> objectiveStructureMap = new HashMap<>();
-            objectiveStructureMap.put("paperType", examPaperStructureDto.getPaperType());
-            try {
-                // 客观题附件
-                List<Object> objectiveStructure = null;
-                if (examPaperStructureDto.getObjectiveQuestionFile() != null) {
-                    BasicAttachment objectiveBasicAttachment = printCommonService.saveAttachment(examPaperStructureDto.getObjectiveQuestionFile(), examPaperStructureDto.getObjectiveQuestionMd5(), UploadFileEnum.UPLOAD);
-                    if (Objects.isNull(objectiveBasicAttachment)) {
-                        throw ExceptionResultEnum.ATTACHMENT_ERROR.exception();
-                    }
-                    basicAttachmentList.add(objectiveBasicAttachment);
-                    // 解析试卷结构
-                    objectiveStructure = analyzPaperObjectiveStructure(examPaperStructureDto.getObjectiveQuestionFile());
-                }
-                objectiveStructureMap.put("content", CollectionUtils.isEmpty(objectiveStructure) ? null : objectiveStructure);
-
-                // 主观题附件
-                List<Object> subjectiveStructrue = null;
-                if (examPaperStructureDto.getSubjectiveQuestionFile() != null) {
-                    BasicAttachment subjectiveBasicAttachment = printCommonService.saveAttachment(examPaperStructureDto.getSubjectiveQuestionFile(), examPaperStructureDto.getSubjectiveQuestionMd5(), UploadFileEnum.UPLOAD);
-                    if (Objects.isNull(subjectiveBasicAttachment)) {
-                        throw ExceptionResultEnum.ATTACHMENT_ERROR.exception();
-                    }
-                    basicAttachmentList.add(subjectiveBasicAttachment);
-                    // 解析试卷结构
-                    subjectiveStructrue = analyzPaperSubjectiveStructure(examPaperStructureDto.getSubjectiveQuestionFile());
-                }
-                subjectiveStructureMap.put("content", CollectionUtils.isEmpty(subjectiveStructrue) ? null : subjectiveStructrue);
-
-                // 标答附件
-                Long answerId = null;
-                if (examPaperStructureDto.getStandardAnswerFile() != null) {
-                    BasicAttachment answerBasicAttachment = printCommonService.saveAttachment(examPaperStructureDto.getStandardAnswerFile(), examPaperStructureDto.getStandardAnswerMd5(), UploadFileEnum.UPLOAD);
-                    if (Objects.isNull(answerBasicAttachment)) {
-                        throw ExceptionResultEnum.ATTACHMENT_ERROR.exception();
-                    }
-                    basicAttachmentList.add(answerBasicAttachment);
-                    answerId = answerBasicAttachment.getId();
-                }
-                paperAnswerMap.put("answer", answerId);
-
-                // 试卷原卷
-                paperAnswerMap.put("paper", paperMap.get(examPaperStructureDto.getPaperType()));
-                paperAnswerList.add(paperAnswerMap);
-                subjectiveStructureList.add(subjectiveStructureMap);
-                objectiveStructureList.add(objectiveStructureMap);
-            } catch (Exception e) {
-                log.error(SystemConstant.LOG_ERROR, e);
-                for (BasicAttachment basicAttachment : basicAttachmentList) {
-                    basicAttachmentService.deleteAttachment(basicAttachment);
-                }
-                if (e instanceof ApiException) {
-                    ResultUtil.error((ApiException) e, ((ApiException) e).getCode(), e.getMessage());
-                } else {
-                    ResultUtil.error(e.getMessage());
-                }
-            }
-        }
-
-        // 保存
-        examPaperStructureTemp.setPaperAnswer(JSONObject.toJSONString(paperAnswerList));
-        examPaperStructureTemp.setSubjectiveStructure(JSONObject.toJSONString(subjectiveStructureList));
-        examPaperStructureTemp.setObjectiveStructure(JSONObject.toJSONString(objectiveStructureList));
-        // 上传成功
-        this.updateById(examPaperStructureTemp);
-
-        ExamTask examTask = examTaskService.getByCourseCodeAndPaperNumber(examPaperStructureTemp.getSchoolId(), examPaperStructureTemp.getExamId(), examPaperStructureTemp.getCourseCode(), examPaperStructureTemp.getPaperNumber());
-        return examPaperStructureTemp;
-    }
-
-    @Transactional
-    @Override
-    public ExamPaperStructure uploadAnswer(String id, String md5, MultipartFile file) {
-        if (id == null || "null".equals(id)) {
-            throw ExceptionResultEnum.ERROR.exception("请先设置试卷结构和分组");
-        }
-        ExamPaperStructure examPaperStructure = this.getById(id);
-        // 组装ExamPaperStructureDto
-        List<BasicAttachment> basicAttachmentList = new ArrayList<>();
-        List<Map<String, Object>> paperAnswerList = new ArrayList<>();
-
-        // 试卷卷型及原卷附件ID
-        Map<String, String> paperMap = createExamTaskAttachmentIds(examPaperStructure);
-        // 上传试卷结构、标答文件
-        Map<String, Object> paperAnswerMap = new HashMap<>();
-        paperAnswerMap.put("paperType", examPaperStructure.getPaperType());
-        try {
-            // 标答附件
-            BasicAttachment answerBasicAttachment = printCommonService.saveAttachment(file, md5, UploadFileEnum.UPLOAD);
-            if (Objects.isNull(answerBasicAttachment)) {
-                throw ExceptionResultEnum.ATTACHMENT_ERROR.exception();
-            }
-            basicAttachmentList.add(answerBasicAttachment);
-            paperAnswerMap.put("answer", answerBasicAttachment.getId());
-            // 试卷原卷
-            paperAnswerMap.put("paper", paperMap.get(examPaperStructure.getPaperType()));
-            paperAnswerList.add(paperAnswerMap);
-        } catch (Exception e) {
-            for (BasicAttachment basicAttachment : basicAttachmentList) {
-                basicAttachmentService.deleteAttachment(basicAttachment);
-            }
-            if (e instanceof ApiException) {
-                ResultUtil.error((ApiException) e, ((ApiException) e).getCode(), e.getMessage());
-            } else {
-                ResultUtil.error(e.getMessage());
-            }
-        }
-
-        // 保存
-        examPaperStructure.setPaperAnswer(JSONObject.toJSONString(paperAnswerList));
-        examPaperStructure.setStatus(ExamPaperStructure.parseStatus(examPaperStructure.getStatus(), ExamPaperStructureStatusTypeEnum.ANSWER_FILE.getType(), "save", true));
-        this.updateById(examPaperStructure);
-
-        return examPaperStructure;
-    }
 
     @Override
     public Map<QuestionType, List<Question>> parseExamCloudPaperStruct(List<ExamCloudPaperStructDto> examCloudPaperStructDtoList) {
@@ -330,435 +130,5 @@ public class ExamPaperStructureServiceImpl extends ServiceImpl<ExamPaperStructur
         return CollectionUtils.isEmpty(examPaperStructureList) ? 0 : examPaperStructureList.size();
     }
 
-    @Transactional(rollbackFor = Exception.class)
-    @Override
-    public ExamPaperStructure submitExamPaperParams(String evaluationParameterStr, SysUser requestUser) {
-        // 1.判断试卷中主观题是否全部完成分组
-        EvaluationParameters evaluationParameters = JSON.parseObject(evaluationParameterStr, EvaluationParameters.class);
-        boolean matchSubAndGroup = Question.matchTwoQuestionList(evaluationParameters.getPaperStructureInfo().getSubjectiveQuestionList(),
-                evaluationParameters.getGroupInfo().stream().flatMap(e -> {
-                    List<Question> questionList = e.getQuestions();
-                    return questionList.stream();
-                }).collect(Collectors.toList()));
-        if (!matchSubAndGroup) {
-            throw ExceptionResultEnum.ERROR.exception("题目没有全部完成分组或者试卷结构中的主观题结构和分组中主观题结构不一致");
-        }
-        // 2.保存试卷结构
-        ExamPaperStructure examPaperStructure = this.saveExamPaperStructure(evaluationParameterStr, requestUser);
-        // 3.保存分组和分组关系信息
-        examPaperGroupService.saveExamPaperGroupInfo(examPaperStructure, evaluationParameters.getGroupInfo());
-        // 4.保存分班阅信息
-        examPaperClassMarkerService.saveExamPaperClassInfo(examPaperStructure, examPaperStructure.getOpenClassReading(), evaluationParameters.getClassInfo());
-        // 返回试卷结构信息
-        return examPaperStructure;
-    }
-
-    @Override
-    public ExamPaperStructure updateObjectiveAnswer(Long id, String objectiveStructure) {
-        ExamPaperStructure examPaperStructure = this.getById(id);
-        if (examPaperStructure == null) {
-            throw ExceptionResultEnum.ERROR.exception("试卷结构数据不存在");
-        }
-
-        // 客观题答案有变动,需要重新统分
-        String objectiveAnswer = examPaperStructure.getObjectiveStructure();
-        if (StringUtils.isBlank(objectiveAnswer)) {
-            examPaperStructure.setObjectAnswerChange(true);
-        } else {
-            List<JSONObject> oldObjectiveAnswer = JSONObject.parseArray(objectiveAnswer, JSONObject.class);
-            List<JSONObject> newObjectiveAnswer = JSONObject.parseArray(objectiveStructure, JSONObject.class);
-
-            oldObjectiveAnswer.sort(Comparator.comparing(m -> m.getString("mainNumber") + "-" + m.getString("subNumber")));
-            newObjectiveAnswer.sort(Comparator.comparing(m -> m.getString("mainNumber") + "-" + m.getString("subNumber")));
-
-            // md5加密,比较
-            String md5OldExtends = DigestUtils.md5DigestAsHex(JSONObject.toJSONBytes(oldObjectiveAnswer));
-            String newOldExtends = DigestUtils.md5DigestAsHex(JSONObject.toJSONBytes(newObjectiveAnswer));
-            if (!md5OldExtends.equals(newOldExtends)) {
-                examPaperStructure.setObjectAnswerChange(true);
-            }
-        }
-        examPaperStructure.setObjectiveStructure(objectiveStructure);
-        examPaperStructure.setStatus(ExamPaperStructure.parseStatus(examPaperStructure.getStatus(), ExamPaperStructureStatusTypeEnum.OBJECTIVE.getType(), "save", true));
-        this.updateById(examPaperStructure);
-        return examPaperStructure;
-    }
-
-    @Override
-    public List<CardJpgResult> findCardJpgFileByPaperNumber(Long examId, String courseCode, String paperNumber, String paperType) {
-        Long examTaskId = examTaskService.getOne(new QueryWrapper<ExamTask>().lambda()
-                .eq(ExamTask::getExamId, examId)
-                .eq(ExamTask::getCourseCode, courseCode)
-                .eq(ExamTask::getPaperNumber, paperNumber)).getId();
-        ExamTaskDetail examTaskDetail = examTaskDetailService.getOne(new QueryWrapper<ExamTaskDetail>().lambda()
-                .eq(ExamTaskDetail::getExamTaskId, examTaskId));
-        List<CardJpgResult> cardJpgResultList = new ArrayList<>();
-        if (Objects.nonNull(examTaskDetail) && Objects.nonNull(examTaskDetail.getPaperAttachmentIds())) {
-            List<PaperInfoVo> paperInfoVoList = ExamTaskUtil.parsePaperAttachmentPath(examTaskDetail.getPaperAttachmentIds());
-            for (PaperInfoVo paperInfoVo : paperInfoVoList) {
-                if (!paperType.equals(paperInfoVo.getName())) {
-                    // 试卷类型不匹配跳过
-                    continue;
-                }
-                String jpgAttachmentInfo = examCardService.getOne(new QueryWrapper<ExamCard>().lambda()
-                        .eq(ExamCard::getId, paperInfoVo.getCardId())).getJpgAttachment();
-                if (StringUtils.isBlank(jpgAttachmentInfo)) {
-                    return new ArrayList<>();
-                }
-
-                List<ConvertJpgStorage> convertJpgStorageList = JSONObject.parseArray(jpgAttachmentInfo, ConvertJpgStorage.class);
-
-                cardJpgResultList.addAll(convertJpgStorageList.stream().flatMap(e -> {
-                    BasicAttachment basicAttachment = basicAttachmentService.getById(e.getAttachmentId());
-
-                    CardJpgResult cardJpgResult = new CardJpgResult();
-                    cardJpgResult.setName(basicAttachment.getName());
-                    cardJpgResult.setIndex(e.getIndex());
-                    cardJpgResult.setPath(teachcloudCommonService.filePreview(basicAttachment.getPath()));
-                    return Stream.of(cardJpgResult);
-                }).collect(Collectors.toList()));
-            }
-        }
-        return cardJpgResultList;
-    }
-
-    @Override
-    public ExamPaperStructure bindMarkLeader(String data) {
-        JSONObject jsonObject = JSON.parseObject(data);
-        Long id = jsonObject.getLong("id");
-        String markLeader = jsonObject.getString("markLeader");
-        ExamPaperStructure examPaperStructure = this.getById(id);
-        if (examPaperStructure == null) {
-            throw ExceptionResultEnum.ERROR.exception("请先设置试卷结构");
-        }
-        if (StringUtils.isBlank(markLeader)) {
-            throw ExceptionResultEnum.ERROR.exception("请选择科组长");
-        }
-        List<JSONObject> objectList = JSON.parseArray(markLeader, JSONObject.class);
-        if (objectList.isEmpty()) {
-            throw ExceptionResultEnum.ERROR.exception("请选择科组长");
-        }
-
-        examPaperStructure.setMarkLeader(markLeader);
-        examPaperStructure.setStatus(ExamPaperStructure.parseStatus(examPaperStructure.getStatus(), ExamPaperStructureStatusTypeEnum.MARKER_LEADER.getType(), "save", true));
-        this.updateById(examPaperStructure);
-        return examPaperStructure;
-    }
-
-    @Transactional
-    @Override
-    public ExamPaperStructure saveMarkerAndClass(String data) {
-        JSONObject jsonObject = JSON.parseObject(data, JSONObject.class);
-        Long examPaperStructureId = jsonObject.getLong("paperStructureId");
-        ExamPaperStructure examPaperStructure = this.getById(examPaperStructureId);
-        EvaluationParameters evaluationParameters = JSON.parseObject(examPaperStructure.getPaperInfoJson(), EvaluationParameters.class);
-
-        List<GroupInfo> groupInfo = JSON.parseArray(jsonObject.getString("groupInfo"), GroupInfo.class);
-        evaluationParameters.setGroupInfo(groupInfo);
-
-        Boolean openClassReading = jsonObject.containsKey("openClassReading") && jsonObject.getBoolean("openClassReading");
-        List<ClassMarker> classInfo = openClassReading ? JSON.parseArray(jsonObject.getString("classInfo"), ClassMarker.class) : null;
-        evaluationParameters.setClassInfo(classInfo);
-
-        examPaperStructure.setOpenClassReading(openClassReading);
-        examPaperStructure.setPaperInfoJson(JSON.toJSONString(evaluationParameters));
-
-        // 保存分组和分组关系信息
-        examPaperGroupService.saveExamPaperGroupInfo(examPaperStructure, evaluationParameters.getGroupInfo());
-        // 保存分班阅信息
-        examPaperClassMarkerService.saveExamPaperClassInfo(examPaperStructure, examPaperStructure.getOpenClassReading(), evaluationParameters.getClassInfo());
-        // 返回试卷结构信息
-        return examPaperStructure;
-    }
-
-    @Override
-    public List<UserRoleDto> listSecretary() {
-        return sysUserService.listSecretary();
-    }
-
-    @Override
-    public boolean transfer(Long examId, String courseCode, String paperNumber, Long transferId) {
-        Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
-        ExamTask examTask = examTaskService.getByCourseCodeAndPaperNumber(schoolId, examId, courseCode, paperNumber);
-        // transferId为空时,则为打回给命题老师
-        UpdateWrapper<ExamTask> updateWrapper = new UpdateWrapper<>();
-        updateWrapper.lambda().set(ExamTask::getTransferId, transferId)
-                .eq(ExamTask::getId, examTask.getId());
-        return examTaskService.update(updateWrapper);
-    }
-
-    @Override
-    public void subjectCalculate() {
-        // todo 3.3.0更新
-    }
 
-    @Override
-    public List<String> listUserClass(Long examId, String paperNumber) {
-        Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
-        return examStudentService.listUserClass(schoolId, examId, paperNumber);
-    }
-
-    /**
-     * 保存试卷结构
-     *
-     * @param evaluationParameterStr 评卷参数
-     * @return 评卷参数id
-     */
-    private ExamPaperStructure saveExamPaperStructure(String evaluationParameterStr, SysUser requestUser) {
-        EvaluationParameters evaluationParameters = JSON.parseObject(evaluationParameterStr, EvaluationParameters.class);
-        BasicPaperInfo basicPaperInfo = evaluationParameters.getBasicPaperInfo();
-        PaperStructureInfo paperStructureInfo = evaluationParameters.getPaperStructureInfo();
-
-        Long examId = basicPaperInfo.getExamId();
-        BasicSemester basicSemester = basicSemesterService.getById(SystemConstant.convertIdToLong(basicExamService.getById(examId).getSemesterId()));
-        Long semesterId = basicSemester.getId();
-        String semesterName = basicSemester.getName();
-        Long thirdRelateId = basicPaperInfo.getThirdRelateId();
-        String thirdRelateName = basicPaperInfo.getThirdRelateName();
-        String paperNumber = basicPaperInfo.getPaperNumber();
-        String courseCode = basicPaperInfo.getCourseCode();
-        String courseName = basicPaperInfo.getCourseName();
-        String paperType = basicPaperInfo.getPaperType();
-        if (!SystemConstant.strNotNull(paperType)) {
-            throw ExceptionResultEnum.ERROR.exception("试卷类型不存在");
-        }
-        String objectiveStructure = JSON.toJSONString(paperStructureInfo.getObjectiveQuestionList());
-        String subjectiveStructure = JSON.toJSONString(paperStructureInfo.getSubjectiveQuestionList());
-        Long propositionTeacherId = requestUser.getId();
-        Long examPaperStructureId = basicPaperInfo.getExamPaperStructureId();
-        String sequence = basicPaperInfo.getSequence();
-
-        ExamPaperStructure examPaperStructure = new ExamPaperStructure();
-        examPaperStructure.setSchoolId(requestUser.getSchoolId());
-        examPaperStructure.setSemesterId(semesterId);
-        examPaperStructure.setSemesterName(semesterName);
-        examPaperStructure.setExamId(examId);
-        examPaperStructure.setThirdRelateId(thirdRelateId);
-        examPaperStructure.setThirdRelateName(thirdRelateName);
-        examPaperStructure.setPaperNumber(paperNumber);
-        examPaperStructure.setCourseCode(courseCode);
-        examPaperStructure.setCourseName(courseName);
-        examPaperStructure.setSequence(sequence);
-        examPaperStructure.setPaperType(paperType);
-        examPaperStructure.setObjectiveStructure(objectiveStructure);
-        examPaperStructure.setSubjectiveStructure(subjectiveStructure);
-        examPaperStructure.setPaperInfoJson(evaluationParameterStr);
-        examPaperStructure.setPropositionTeacherId(propositionTeacherId);
-        examPaperStructure.setOpenClassReading(basicPaperInfo.getOpenClassReading());
-        examPaperStructure.setEnable(true);
-        if (SystemConstant.longNotNull(examPaperStructureId)) {
-            // 如果是编辑试卷机构,当客观题信息(大题名称、大题号、小题号、分数)全都没变的情况下不更新客观题机构(因为答案可能已经上传)
-            examPaperStructure.setId(examPaperStructureId);
-            ExamPaperStructure old = this.getById(examPaperStructureId);
-            // 更新paperAnswer不清
-            examPaperStructure.setPaperAnswer(old.getPaperAnswer());
-            // 数据库中的原客观题结构
-            String oldObjectiveQuestion = old.getObjectiveStructure();
-            if (this.matchObjectiveQuestion(objectiveStructure, oldObjectiveQuestion)) {
-                // 如果本次编辑试卷结构 客观题结构和之前数据库中存储的确实一致,则不更新客观题结构(把原数据库的客观题结构作为更新的)
-                examPaperStructure.setObjectiveStructure(oldObjectiveQuestion);
-            }
-            examPaperStructure.setStatus(ExamPaperStructure.parseStatus(old.getStatus(), ExamPaperStructureStatusTypeEnum.STRUCTURE.getType(), "save", true));
-
-        } else {
-            examPaperStructure.setStatus(ExamPaperStructure.parseStatus(null, ExamPaperStructureStatusTypeEnum.STRUCTURE.getType(), "save", true));
-        }
-        this.saveOrUpdate(examPaperStructure);
-        return examPaperStructure;
-    }
-
-
-    private Map<String, String> createExamTaskAttachmentIds(ExamPaperStructure examPaperStructure) {
-        ExamTask examTask = examTaskService.getByCourseCodeAndPaperNumber(examPaperStructure.getSchoolId(), examPaperStructure.getExamId(), examPaperStructure.getCourseCode(), examPaperStructure.getPaperNumber());
-
-        QueryWrapper<ExamTaskDetail> examTaskDetailQueryWrapper = new QueryWrapper<>();
-        examTaskDetailQueryWrapper.lambda().eq(ExamTaskDetail::getExamTaskId, examTask.getId());
-        ExamTaskDetail examTaskDetail = examTaskDetailService.getOne(examTaskDetailQueryWrapper);
-
-        List<PaperInfoVo> paperInfoVoList = ExamTaskUtil.parsePaperAttachmentPath(examTaskDetail.getPaperAttachmentIds());
-        if (CollectionUtils.isEmpty(paperInfoVoList)) {
-            throw ExceptionResultEnum.ERROR.exception("未找到关联的试卷文件");
-        }
-
-        return paperInfoVoList.stream().collect(Collectors.toMap(m -> m.getName(), m -> String.valueOf(m.getAttachmentId())));
-    }
-
-    /**
-     * 解析excel文件内容
-     *
-     * @param file
-     * @return
-     */
-    private List<Object> analyzPaperSubjectiveStructure(MultipartFile file) throws
-            IOException, NoSuchFieldException {
-        List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(file.getInputStream(), Lists.newArrayList(ExamPaperSubjectiveStructureDto.class), (finalExcelList, finalColumnNameList, finalExcelErrorList) -> {
-            List<ExcelError> excelErrorTemp = new ArrayList<>();
-            // 只允许导入一个sheet
-            if (finalExcelList.size() > 1) {
-                throw ExceptionResultEnum.ERROR.exception("excel中只允许有一个sheet");
-            }
-            for (int i = 0; i < finalExcelList.size(); i++) {
-                LinkedMultiValueMap<Integer, Object> excelMap = finalExcelList.get(i);
-                List<Object> examTaskTempList = excelMap.get(i);
-                for (int y = 0; y < examTaskTempList.size(); y++) {
-                    ExamPaperSubjectiveStructureDto subjectiveStructureDto = (ExamPaperSubjectiveStructureDto) examTaskTempList.get(y);
-                    if (StringUtils.isBlank(subjectiveStructureDto.getCourseCode())) {
-                        excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[课程代码]必填"));
-                    }
-                    if (StringUtils.isBlank(subjectiveStructureDto.getCourseName())) {
-                        excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[课程名称]必填"));
-                    }
-                    if (StringUtils.isBlank(subjectiveStructureDto.getMainName())) {
-                        excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[大题名称]必填"));
-                    }
-                    if (subjectiveStructureDto.getMainNumber() == null) {
-                        excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[大题号]必填"));
-                    }
-                    if (StringUtils.isBlank(subjectiveStructureDto.getSubNumber())) {
-                        excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[小题号]必填"));
-                    }
-                    if (StringUtils.isBlank(subjectiveStructureDto.getScore())) {
-                        excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[小题满分]必填"));
-                    }
-                }
-            }
-            if (excelErrorTemp.size() > 0) {
-                List<String> errors = excelErrorTemp.stream().map(ExcelError::getExcelErrorType).collect(Collectors.toList());
-                throw ExceptionResultEnum.ERROR.exception(JSONObject.toJSONString(errors));
-            }
-            return finalExcelList;
-        }, 2);
-        List<Object> list = new ArrayList<>();
-        for (LinkedMultiValueMap<Integer, Object> map : finalList) {
-            for (Map.Entry<Integer, List<Object>> entry : map.entrySet()) {
-                list.addAll(entry.getValue());
-            }
-        }
-        return list;
-    }
-
-    /**
-     * 解析excel文件内容
-     *
-     * @param file
-     * @return
-     */
-    private List<Object> analyzPaperObjectiveStructure(MultipartFile file) throws IOException, NoSuchFieldException {
-        List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(file.getInputStream(), Lists.newArrayList(ExamPaperObjectiveStructureDto.class), (finalExcelList, finalColumnNameList, finalExcelErrorList) -> {
-            List<ExcelError> excelErrorTemp = new ArrayList<>();
-            // 只允许导入一个sheet
-            if (finalExcelList.size() > 1) {
-                throw ExceptionResultEnum.ERROR.exception("excel中只允许有一个sheet");
-            }
-            for (int i = 0; i < finalExcelList.size(); i++) {
-                LinkedMultiValueMap<Integer, Object> excelMap = finalExcelList.get(i);
-                List<Object> examTaskTempList = excelMap.get(i);
-                for (int y = 0; y < examTaskTempList.size(); y++) {
-                    ExamPaperObjectiveStructureDto objectiveStructureDto = (ExamPaperObjectiveStructureDto) examTaskTempList.get(y);
-                    if (StringUtils.isBlank(objectiveStructureDto.getCourseCode())) {
-                        excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[课程代码]必填"));
-                    }
-                    if (StringUtils.isBlank(objectiveStructureDto.getCourseName())) {
-                        excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[课程名称]必填"));
-                    }
-                    if (StringUtils.isBlank(objectiveStructureDto.getPaperType())) {
-                        excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[试卷类型]必填"));
-                    }
-                    if (StringUtils.isBlank(objectiveStructureDto.getMainName())) {
-                        excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[大题名称]必填"));
-                    }
-                    if (objectiveStructureDto.getMainNumber() == null) {
-                        excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[大题号]必填"));
-                    }
-                    if (StringUtils.isBlank(objectiveStructureDto.getSubNumber())) {
-                        excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[小题号]必填"));
-                    }
-                    if (StringUtils.isBlank(objectiveStructureDto.getAnswer())) {
-                        excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[标准答案]必填"));
-                    }
-                    if (StringUtils.isBlank(objectiveStructureDto.getScore())) {
-                        excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[小题满分]必填"));
-                    }
-                }
-            }
-            if (excelErrorTemp.size() > 0) {
-                List<String> errors = excelErrorTemp.stream().map(ExcelError::getExcelErrorType).collect(Collectors.toList());
-                throw ExceptionResultEnum.ERROR.exception(JSONObject.toJSONString(errors));
-            }
-            return finalExcelList;
-        }, 2);
-        List<Object> list = new ArrayList<>();
-        for (LinkedMultiValueMap<Integer, Object> map : finalList) {
-            for (Map.Entry<Integer, List<Object>> entry : map.entrySet()) {
-                list.addAll(entry.getValue());
-            }
-        }
-        return list;
-    }
-
-    /**
-     * 组装ExamPaperStructureDto
-     *
-     * @param md5
-     * @param paperType
-     * @param files
-     * @return
-     */
-    private List<ExamPaperStructureDto> createExamPaperStructure(String md5, String keys, String paperType, MultipartFile[] files) {
-        if (StringUtils.isBlank(paperType)) {
-            throw ExceptionResultEnum.ERROR.exception("没有可上传文件的试卷卷型");
-        }
-        if (files == null || files.length == 0) {
-            throw ExceptionResultEnum.ERROR.exception("请上传文件");
-        }
-        if (StringUtils.isBlank(keys)) {
-            throw ExceptionResultEnum.ERROR.exception("上传文件有误");
-        }
-        if (StringUtils.isBlank(md5)) {
-            throw ExceptionResultEnum.ERROR.exception("上传文件有误");
-        }
-        String[] paperTypesAttr = paperType.split(",");
-        String[] md5sAttr = md5.split(",");
-        String[] keysAttr = keys.split(",");
-        String[] fileTypeAttr = {"objectiveQuestion", "subjectiveQuestion", "standardAnswer"};
-        List<ExamPaperStructureDto> list = new ArrayList<>();
-
-        for (String pType : paperTypesAttr) {
-            ExamPaperStructureDto examPaperStructureDto = new ExamPaperStructureDto();
-            examPaperStructureDto.setPaperType(pType);
-            int oi = Arrays.asList(keysAttr).indexOf(pType + SystemConstant.HYPHEN + fileTypeAttr[0]);
-            examPaperStructureDto.setObjectiveQuestionFile(oi < 0 ? null : files[oi]);
-            examPaperStructureDto.setObjectiveQuestionMd5(oi < 0 ? null : md5sAttr[oi]);
-            int si = Arrays.asList(keysAttr).indexOf(pType + SystemConstant.HYPHEN + fileTypeAttr[1]);
-            examPaperStructureDto.setSubjectiveQuestionFile(si < 0 ? null : files[si]);
-            examPaperStructureDto.setSubjectiveQuestionMd5(si < 0 ? null : md5sAttr[si]);
-            int ai = Arrays.asList(keysAttr).indexOf(pType + SystemConstant.HYPHEN + fileTypeAttr[2]);
-            examPaperStructureDto.setStandardAnswerFile(ai < 0 ? null : files[ai]);
-            examPaperStructureDto.setStandardAnswerMd5(ai < 0 ? null : md5sAttr[ai]);
-            list.add(examPaperStructureDto);
-        }
-        return list;
-    }
-
-    /**
-     * 匹配客观题结构是否更改(若未上传答案则直接返回true)
-     *
-     * @param newQuestions 新的结构
-     * @param dbQuestions  旧的结构
-     * @return 结果
-     */
-    private boolean matchObjectiveQuestion(String newQuestions, String dbQuestions) {
-        List<Question> dbList = JSON.parseArray(dbQuestions, Question.class);
-        if (dbList.size() == 0) {
-            return false;
-        }
-        // 旧结构没有答案,直接更新
-        if (!SystemConstant.strNotNull(dbList.get(0).getAnswer())) {
-            return false;
-        }
-
-        List<Question> freshList = JSON.parseArray(newQuestions, Question.class);
-
-        return Question.matchTwoQuestionList(dbList, freshList);
-    }
 }

+ 0 - 7
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPrintPlanServiceImpl.java

@@ -464,13 +464,6 @@ public class ExamPrintPlanServiceImpl extends ServiceImpl<ExamPrintPlanMapper, E
         return examPrintPlanList;
     }
 
-    @Override
-    public List<ExamPrintPlan> listBySchoolId(Long schoolId) {
-        QueryWrapper<ExamPrintPlan> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(ExamPrintPlan::getSchoolId, schoolId);
-        return this.list(queryWrapper);
-    }
-
     @Override
     public void updateAttachmentIdByTemplateId(Long templateId, Long attachmentId) {
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());

+ 4 - 40
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamStudentServiceImpl.java

@@ -4,22 +4,21 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.qmth.distributed.print.business.bean.dto.ExamDetailCourseDto;
 import com.qmth.distributed.print.business.bean.dto.ExamStudentCourseDto;
 import com.qmth.distributed.print.business.bean.dto.ExamStudentPdfInfoDto;
-import com.qmth.distributed.print.business.bean.dto.SyncExamStudentDto;
 import com.qmth.distributed.print.business.entity.ExamDetailCourse;
 import com.qmth.distributed.print.business.entity.ExamStudent;
 import com.qmth.distributed.print.business.mapper.ExamDetailCourseMapper;
 import com.qmth.distributed.print.business.mapper.ExamStudentMapper;
 import com.qmth.distributed.print.business.service.ExamStudentService;
-import com.qmth.teachcloud.common.entity.SysOrg;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
-import org.springframework.util.CollectionUtils;
 
 import javax.annotation.Resource;
-import java.util.*;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
 import java.util.stream.Collectors;
 
 /**
@@ -83,47 +82,12 @@ public class ExamStudentServiceImpl extends ServiceImpl<ExamStudentMapper, ExamS
         this.baseMapper.insertBatch(examStudents);
     }
 
-    @Override
-    public List<ExamStudent> listExamStudentBySchoolIdAndClazzId(Long schoolId, String classId) {
-        return this.baseMapper.listExamStudentBySchoolIdAndClazzId(schoolId, classId);
-    }
-
-    @Override
-    public SysOrg getBasicCollegeByBelongOrgId(String studentCode, Long schoolId) {
-        List<SysOrg> basicCollegeList = this.baseMapper.getBasicCollegeByBelongOrgId(studentCode, schoolId);
-        if (!CollectionUtils.isEmpty(basicCollegeList)) {
-            return basicCollegeList.get(0);
-        }
-        return null;
-    }
 
     @Override
     public ExamStudentPdfInfoDto getByStudentId(Long id) {
         return this.baseMapper.getByStudentId(id);
     }
 
-    @Override
-    public List<Map> listStudentScoreSync(Long schoolId, String studentCode, String examNumber, String subjectCode) {
-        return this.baseMapper.listStudentScoreSync(schoolId, studentCode, examNumber, subjectCode);
-    }
-
-    @Override
-    public List<SyncExamStudentDto> listStudentByExamDetailCourseId(List<ExamDetailCourseDto> examDetailCourseList, String paperType) {
-        List<SyncExamStudentDto> syncExamStudentDtoList = new ArrayList<>();
-        for (ExamDetailCourseDto examDetailCourseDto : examDetailCourseList) {
-            List<SyncExamStudentDto> syncExamStudentDtos = this.baseMapper.listStudentByExamDetailCourseId(examDetailCourseDto.getId(), paperType);
-            if (!syncExamStudentDtos.isEmpty()) {
-                syncExamStudentDtoList.addAll(syncExamStudentDtos);
-            }
-        }
-        return syncExamStudentDtoList;
-    }
-
-    @Override
-    public List<String> listTicketNumberByExamId(Long examId) {
-        return this.baseMapper.listTicketNumberByExamId(examId);
-    }
-
     @Override
     public void removeByExamDetailCourseId(Long id) {
         UpdateWrapper<ExamStudent> updateWrapper = new UpdateWrapper<>();

+ 1 - 11
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskDetailServiceImpl.java

@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.distributed.print.business.bean.dto.ExamTaskDetailDto;
 import com.qmth.distributed.print.business.bean.dto.ExamTaskDetailPdfDownloadDto;
 import com.qmth.distributed.print.business.bean.params.RelatePaperParam;
-import com.qmth.teachcloud.common.bean.vo.PaperInfoVo;
 import com.qmth.distributed.print.business.cache.CreatePdfCacheUtil;
 import com.qmth.distributed.print.business.entity.*;
 import com.qmth.distributed.print.business.enums.*;
@@ -16,6 +15,7 @@ import com.qmth.distributed.print.business.service.*;
 import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
 import com.qmth.teachcloud.common.bean.dto.MqDto;
 import com.qmth.teachcloud.common.bean.result.TbTaskDetailResult;
+import com.qmth.teachcloud.common.bean.vo.PaperInfoVo;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.SysOrg;
 import com.qmth.teachcloud.common.entity.SysUser;
@@ -106,9 +106,6 @@ public class ExamTaskDetailServiceImpl extends ServiceImpl<ExamTaskDetailMapper,
     @Resource
     BasicRoleDataPermissionService basicRoleDataPermissionService;
 
-    @Resource
-    ExamTaskSyncService examTaskSyncService;
-
     @Resource
     ExamPaperStructureService examPaperStructureService;
 
@@ -672,13 +669,6 @@ public class ExamTaskDetailServiceImpl extends ServiceImpl<ExamTaskDetailMapper,
                 examDetailCourseService.update(examDetailCourseUpdateWrapper);
             }
         }
-        // 推送数据改为作废
-        UpdateWrapper<ExamTaskSync> examTaskSyncUpdateWrapper = new UpdateWrapper<>();
-        examTaskSyncUpdateWrapper.lambda().set(ExamTaskSync::getPaperNumber, paperNumberCancel)
-                .eq(ExamTaskSync::getSchoolId, examTask.getSchoolId())
-                .eq(ExamTaskSync::getExamId, examTask.getExamId())
-                .eq(ExamTaskSync::getPaperNumber, paperNumber);
-        examTaskSyncService.update(examTaskSyncUpdateWrapper);
 
         // 任务数据改为作废
         UpdateWrapper<TBTask> tbTaskUpdateWrapper = new UpdateWrapper<>();

+ 0 - 33
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskSyncServiceImpl.java

@@ -1,33 +0,0 @@
-package com.qmth.distributed.print.business.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.qmth.distributed.print.business.entity.ExamTaskSync;
-import com.qmth.distributed.print.business.mapper.ExamTaskSyncMapper;
-import com.qmth.distributed.print.business.service.ExamTaskSyncService;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.stereotype.Service;
-
-/**
- * <p>
- * 数据同步 服务实现类
- * </p>
- */
-@Service
-public class ExamTaskSyncServiceImpl extends ServiceImpl<ExamTaskSyncMapper, ExamTaskSync> implements ExamTaskSyncService {
-
-    @Override
-    public ExamTaskSync getBySchoolIdAndOrgCodeAndPaperNumberAndPaperType(Long schoolId, Long examId, String orgCode, String paperNumber, String paperType) {
-        QueryWrapper<ExamTaskSync> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(ExamTaskSync::getSchoolId, schoolId)
-                .eq(ExamTaskSync::getExamId, examId)
-                .eq(ExamTaskSync::getPaperNumber, paperNumber)
-                .eq(ExamTaskSync::getPaperType, paperType);
-        if(StringUtils.isNotBlank(orgCode)){
-            queryWrapper.lambda().eq(ExamTaskSync::getOrgCode, orgCode);
-        } else {
-            queryWrapper.lambda().isNull(ExamTaskSync::getOrgCode);
-        }
-        return this.getOne(queryWrapper);
-    }
-}

+ 0 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/PrintCommonServiceImpl.java

@@ -1053,10 +1053,6 @@ public class PrintCommonServiceImpl implements PrintCommonService {
     @Override
     public List<ExamStudent> createBatchStudentByStudentList(Long schoolId, Long examId, String semesterId, ExamTask examTask, String extendFields, List<ExamTaskStudentObjectParam> examTaskStudentObjectParamList, Long examDetailCourseId, Long cardRuleId, SysUser sysUser) {
         AtomicInteger atomicInteger = new AtomicInteger(1);
-        BasicCardRule basicCardRule = basicCardRuleService.getById(cardRuleId);
-
-        // 查询学期下所有考务数据的准考证号集合
-        List<String> examStudentTicketNumberList = examStudentService.listTicketNumberByExamId(examId);
 
         Map<String, String> map = new HashMap<>();
         List<ExamStudent> examStudentList = new ArrayList<>();

+ 0 - 112
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TBSyncTaskServiceImpl.java

@@ -5,7 +5,6 @@ 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.distributed.print.business.entity.ExamPaperStructure;
 import com.qmth.distributed.print.business.entity.TBSyncTask;
 import com.qmth.distributed.print.business.mapper.TBSyncTaskMapper;
 import com.qmth.distributed.print.business.service.ExamPaperStructureService;
@@ -23,13 +22,11 @@ import com.qmth.teachcloud.common.enums.TaskResultEnum;
 import com.qmth.teachcloud.common.enums.TaskStatusEnum;
 import com.qmth.teachcloud.common.service.BasicRoleDataPermissionService;
 import com.qmth.teachcloud.common.util.ServletUtil;
-import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.List;
-import java.util.Map;
 import java.util.Objects;
 
 /**
@@ -83,84 +80,6 @@ public class TBSyncTaskServiceImpl extends ServiceImpl<TBSyncTaskMapper, TBSyncT
         return tbSyncTask;
     }
 
-    @Transactional
-    @Override
-    public TBSyncTask saveTaskStructure(Long schoolId, ExamPaperStructure examPaperStructure, Long objectId, PushTypeEnum type, String remark) {
-        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        QueryWrapper<TBSyncTask> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(TBSyncTask::getSchoolId, schoolId)
-                .eq(TBSyncTask::getObjectId, objectId)
-                .eq(TBSyncTask::getType, type);
-        TBSyncTask tbSyncTask = this.getOne(queryWrapper);
-        Long id = SystemConstant.getDbUuid();
-        if (tbSyncTask != null) {
-            if (!TaskStatusEnum.FINISH.equals(tbSyncTask.getStatus())) {
-                throw ExceptionResultEnum.ERROR.exception("有任务未结束");
-            }
-            id = tbSyncTask.getId();
-            this.removeById(id);
-        }
-        tbSyncTask = new TBSyncTask();
-        tbSyncTask.setId(id);
-        tbSyncTask.setSchoolId(schoolId);
-        tbSyncTask.setSemesterId(examPaperStructure.getSemesterId());
-        tbSyncTask.setExamId(examPaperStructure.getExamId());
-        tbSyncTask.setCourseCode(examPaperStructure.getCourseCode());
-        tbSyncTask.setCourseName(examPaperStructure.getCourseName());
-        tbSyncTask.setPaperNumber(examPaperStructure.getPaperNumber());
-        tbSyncTask.setObjectId(objectId);
-        tbSyncTask.setType(type);
-        tbSyncTask.setRemark(remark);
-        tbSyncTask.setStatus(TaskStatusEnum.INIT);
-        tbSyncTask.setCreateId(sysUser.getId());
-        tbSyncTask.setCreateTime(System.currentTimeMillis());
-        this.save(tbSyncTask);
-        return tbSyncTask;
-    }
-
-    @Transactional
-    @Override
-    public TBSyncTask saveTaskBaseData(Long schoolId, Long semesterId, Long examId, String courseCode, String courseName, String paperNumber, Long objectId, String orgCode, String thirdRelateName, String examTime, PushTypeEnum type, String remark) {
-        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        QueryWrapper<TBSyncTask> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(TBSyncTask::getSchoolId, schoolId)
-                .eq(TBSyncTask::getObjectId, objectId)
-                .eq(TBSyncTask::getType, type);
-        if (StringUtils.isNotBlank(orgCode)) {
-            queryWrapper.lambda().eq(TBSyncTask::getOrgCode, orgCode);
-        } else {
-            queryWrapper.lambda().isNull(TBSyncTask::getOrgCode);
-        }
-        TBSyncTask tbSyncTask = this.getOne(queryWrapper);
-        Long id = SystemConstant.getDbUuid();
-        if (tbSyncTask != null) {
-            if (!TaskStatusEnum.FINISH.equals(tbSyncTask.getStatus())) {
-                throw ExceptionResultEnum.ERROR.exception("有任务未结束");
-            }
-            id = tbSyncTask.getId();
-            this.removeById(id);
-        }
-        tbSyncTask = new TBSyncTask();
-        tbSyncTask.setId(id);
-        tbSyncTask.setSchoolId(schoolId);
-        tbSyncTask.setSemesterId(semesterId);
-        tbSyncTask.setExamId(examId);
-        tbSyncTask.setCourseCode(courseCode);
-        tbSyncTask.setCourseName(courseName);
-        tbSyncTask.setPaperNumber(paperNumber);
-        tbSyncTask.setObjectId(objectId);
-        tbSyncTask.setOrgCode(orgCode);
-        tbSyncTask.setThirdRelateName(thirdRelateName);
-        tbSyncTask.setExamTime(examTime);
-        tbSyncTask.setType(type);
-        tbSyncTask.setRemark(remark);
-        tbSyncTask.setStatus(TaskStatusEnum.INIT);
-        tbSyncTask.setCreateId(sysUser.getId());
-        tbSyncTask.setCreateTime(System.currentTimeMillis());
-        this.save(tbSyncTask);
-        return tbSyncTask;
-    }
-
     @Override
     public void updateStatusAndResultById(Long id, Long thirdRelateId, TaskStatusEnum status, TaskResultEnum result, String errorMessage) {
         UpdateWrapper<TBSyncTask> tbSyncTaskUpdateWrapper = new UpdateWrapper<>();
@@ -184,37 +103,6 @@ public class TBSyncTaskServiceImpl extends ServiceImpl<TBSyncTaskMapper, TBSyncT
         this.update(tbSyncTaskUpdateWrapper);
     }
 
-    @Transactional
-    @Override
-    public TBSyncTask savePushCommon(PushTypeEnum pushTypeEnum, Map map, SysUser sysUser) {
-        SysUser requestUser = Objects.nonNull(sysUser) ? sysUser : (SysUser) ServletUtil.getRequestUser();
-        TBSyncTask tbSyncTask = new TBSyncTask(pushTypeEnum,
-                TaskStatusEnum.INIT,
-                requestUser.getId(),
-                requestUser.getSchoolId());
-
-        map.computeIfAbsent(SystemConstant.TB_SYNC_TASK, v -> tbSyncTask);
-        map.computeIfAbsent(SystemConstant.USER, v -> requestUser);
-        map.computeIfAbsent(SystemConstant.TB_SYNC_TASK_ID, v -> tbSyncTask.getId());
-        return tbSyncTask;
-    }
-
-    @Transactional
-    @Override
-    public TBSyncTask savePushCommon(PushTypeEnum pushTypeEnum, Map map, SysUser sysUser, Long objectId) {
-        SysUser requestUser = Objects.nonNull(sysUser) ? sysUser : (SysUser) ServletUtil.getRequestUser();
-        TBSyncTask tbSyncTask = new TBSyncTask(pushTypeEnum,
-                TaskStatusEnum.INIT,
-                requestUser.getId(),
-                requestUser.getSchoolId(),
-                objectId);
-
-        map.computeIfAbsent(SystemConstant.TB_SYNC_TASK, v -> tbSyncTask);
-        map.computeIfAbsent(SystemConstant.USER, v -> requestUser);
-        map.computeIfAbsent(SystemConstant.TB_SYNC_TASK_ID, v -> tbSyncTask.getId());
-        return tbSyncTask;
-    }
-
     @Override
     public IPage<SyncListResult> query(Long schoolId, Long semesterId, Long examId, String courseCode, String paperNumber, TaskStatusEnum status, PushTypeEnum type, TaskResultEnum result, int pageNumber, int pageSize) {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();

+ 0 - 5
distributed-print-business/src/main/resources/mapper/ExamPaperGroupMapper.xml

@@ -1,5 +0,0 @@
-<?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.distributed.print.business.mapper.ExamPaperGroupMapper">
-
-</mapper>

+ 0 - 84
distributed-print-business/src/main/resources/mapper/ExamStudentMapper.xml

@@ -109,33 +109,6 @@
         </where>
         order by 0 + cast(es.site_number as char)
     </select>
-    <select id="listStudentByExamDetailCourseId"
-            resultType="com.qmth.distributed.print.business.bean.dto.SyncExamStudentDto">
-        SELECT a.id,
-               b.course_code   courseCode,
-               b.course_name   courseName,
-               b.paper_number  paperNumber,
-               a.student_name  studentName,
-               a.student_code  studentCode,
-               a.ticket_number ticketNumber,
-               a.clazz_name    clazzName,
-               a.extend_fields extendFields,
-               a.paper_type    paperType,
-               a.college_name collegeName,
-               c.package_code packageCode,
-               et.sequence
-        FROM (select * from exam_detail_course WHERE id = #{examDetailCourseId}) b
-                  JOIN
-             exam_student a ON a.exam_detail_course_id = b.id
-                 LEFT JOIN
-             exam_detail c ON b.exam_detail_id = c.id
-                 LEFT JOIN
-             exam_task et ON b.school_id = et.school_id
-                 and c.exam_id = et.exam_id
-                 and b.course_code = et.course_code
-                 and b.paper_number = et.paper_number
-            where a.paper_type = #{paperType}
-    </select>
     <select id="listExamStudentBySchoolIdAndClazzId"
             resultType="com.qmth.distributed.print.business.entity.ExamStudent">
         SELECT
@@ -179,15 +152,6 @@
         </where>
         ) t0;
     </select>
-    <select id="getBasicCollegeByBelongOrgId" resultType="com.qmth.teachcloud.common.entity.SysOrg">
-        SELECT bc.id,
-               bc.name
-        FROM basic_student bs
-                 LEFT JOIN
-             sys_org bc ON bs.belong_org_id = bc.id
-        WHERE bs.student_code = #{studentCode}
-          and bs.school_id = #{schoolId}
-    </select>
     <select id="getByStudentId"
             resultType="com.qmth.distributed.print.business.bean.dto.ExamStudentPdfInfoDto">
         SELECT a.student_code  studentCode,
@@ -214,38 +178,6 @@
              exam_detail c ON b.exam_detail_id = c.id
         WHERE a.id = #{id}
     </select>
-    <select id="listStudentScoreSync" resultType="java.util.Map">
-        SELECT
-            CASE a.student_clazz_type
-                WHEN 'TEACH_CLAZZ' THEN a.teach_clazz_id
-                WHEN 'BASIC_CLAZZ' THEN a.clazz_id
-                END clazzId,
-            CASE a.student_clazz_type
-                WHEN 'TEACH_CLAZZ' THEN a.teach_clazz_name
-                WHEN 'BASIC_CLAZZ' THEN a.clazz_name
-                END clazzName,
-            a.major_name majorName,
-            b.course_code courseCode,
-            b.paper_number paperNumber,
-            a.paper_type paperType,
-            d.sequence
-        FROM
-            exam_student a
-                JOIN
-            exam_detail_course b ON a.exam_detail_course_id = b.id
-                JOIN
-            exam_detail ed ON b.exam_detail_id = ed.id
-                JOIN
-            exam_task d ON b.school_id = d.school_id
-                AND ed.exam_id = d.exam_id
-                AND b.course_code = d.course_code
-                AND b.paper_number = d.paper_number
-        WHERE
-            a.school_id = #{schoolId}
-          AND a.student_code = #{studentCode}
-          AND a.ticket_number = #{examNumber}
-          AND CONCAT(b.course_code, a.paper_type, d.sequence) = #{subjectCode}
-    </select>
     <select id="listExamStudentByPaperNumberAndPaperType"
             resultType="com.qmth.distributed.print.business.bean.dto.ExamStudentCourseClassDto">
         SELECT
@@ -288,22 +220,6 @@
                 AND a.paper_type = b.paper_type
                 AND a.clazz_id = b.clazz_id
     </select>
-    <select id="listTicketNumberByExamId" resultType="java.lang.String">
-        SELECT
-            es.ticket_number
-        FROM
-            exam_student es
-        WHERE
-            EXISTS( SELECT
-                        1
-                    FROM
-                        exam_detail_course edc
-                            JOIN
-                        exam_detail ed ON edc.exam_detail_id = ed.id
-                    WHERE
-                        es.exam_detail_course_id = edc.id
-                        AND ed.exam_id = #{examId})
-    </select>
     <select id="listUserClass" resultType="java.lang.String">
         SELECT DISTINCT
             clazz_name

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

@@ -26,7 +26,7 @@ INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('898', '列表', 'List', 'LIST', '897', '1', 'AUTH', '900', '1', '0', '1');
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('899', '查询', 'Select', 'BUTTON', '897', '2', 'AUTH', '900', '1', '0', '1');
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('900', '查询', '/api/admin/mark/setting/summary', 'URL', '897', '1', 'AUTH', '1', '1', '1');
-INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('901', '评卷参数设置', 'MarkParamSetting', 'LINK', '897', '3', 'AUTH', '902,903,904,905,906,907,908,909,910,911,912,913,962,963', '1', '0', '1');
+INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('901', '评卷参数设置', 'MarkParamSetting', 'LINK', '897', '3', 'AUTH', '672,902,903,904,905,906,907,908,909,910,911,912,913,962,963', '1', '0', '1');
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('902', '结构查询', '/api/admin/mark/question/list', 'URL', '897', '1', 'AUTH', '1', '1', '1');
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('903', '结构提交', '/api/admin/mark/question/save', 'URL', '897', '2', 'AUTH', '1', '1', '1');
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('904', '评卷任务查询', '/api/admin/mark/group/list', 'URL', '897', '3', 'AUTH', '1', '1', '1');
@@ -149,5 +149,6 @@ INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence
 ALTER TABLE `exam_student` ADD COLUMN `required_fields` MEDIUMTEXT NULL COMMENT '基础字段' AFTER `print_card`;
 
 INSERT INTO `sys_config` (`id`, `config_key`, `config_name`, `config_value`, `enable`, `sort`, `create_id`) VALUES ('41', 'package.barcode.position', '签到表条码坐标', '[0,0,0.5,0.5]', '1', '17', '1');
+UPDATE `sys_privilege` SET `url` = '/api/admin/exam/card/find_jpg_file' WHERE (`id` = '672');
 
 

+ 13 - 2
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamCardController.java

@@ -14,8 +14,7 @@ import com.qmth.teachcloud.common.entity.BasicPrintConfig;
 import com.qmth.teachcloud.common.enums.log.CustomizedOperationTypeEnum;
 import com.qmth.teachcloud.common.util.Result;
 import com.qmth.teachcloud.common.util.ResultUtil;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.*;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -178,4 +177,16 @@ public class ExamCardController {
     public void cardDownload(HttpServletResponse response, @RequestParam(value = "id") String id) {
         examCardService.cardDownload(response, id);
     }
+
+    /**
+     * 获取评卷区题卡图片
+     */
+    @ApiOperation(value = "获取题卡图片")
+    @RequestMapping(value = "/find_jpg_file", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
+    public Result listCardImage(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
+                                               @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
+                                               @ApiParam(value = "试卷类型", required = true) @RequestParam String paperType) {
+        return ResultUtil.ok(examCardService.listCardImage(examId, paperNumber, paperType));
+    }
 }

+ 0 - 202
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamPaperStructureController.java

@@ -1,202 +0,0 @@
-package com.qmth.distributed.print.api;
-
-
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.qmth.boot.api.constant.ApiConstant;
-import com.qmth.distributed.print.business.bean.dto.ExamPaperStructurePageDto;
-import com.qmth.distributed.print.business.bean.result.EditResult;
-import com.qmth.distributed.print.business.entity.ExamPaperStructure;
-import com.qmth.distributed.print.business.service.ExamPaperStructureService;
-import com.qmth.teachcloud.common.annotation.OperationLogDetail;
-import com.qmth.teachcloud.common.contant.SystemConstant;
-import com.qmth.teachcloud.common.entity.SysUser;
-import com.qmth.teachcloud.common.enums.log.CustomizedOperationTypeEnum;
-import com.qmth.teachcloud.common.util.Result;
-import com.qmth.teachcloud.common.util.ResultUtil;
-import com.qmth.teachcloud.common.util.ServletUtil;
-import io.swagger.annotations.*;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.annotation.Resource;
-import javax.validation.constraints.Max;
-import javax.validation.constraints.Min;
-
-/**
- * <p>
- * 试卷结构 前端控制器
- * </p>
- *
- * @author xf
- */
-@Api(tags = "试卷结构Controller")
-@RestController
-@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_EXAM + "/structure")
-public class ExamPaperStructureController {
-
-    @Resource
-    private ExamPaperStructureService examPaperStructureService;
-
-
-    /**
-     * 查询
-     *
-     * @return
-     */
-    @ApiOperation(value = "查询")
-    @RequestMapping(value = "/list", method = RequestMethod.POST)
-    public Result list(@ApiParam(value = "学期ID", required = false) @RequestParam(required = false) Long semesterId,
-                       @ApiParam(value = "考试ID", required = false) @RequestParam(required = false) Long examId,
-                       @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
-                       @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
-        IPage<ExamPaperStructurePageDto> examPaperStructureIPage = examPaperStructureService.listByPropositionTeacherId(semesterId, examId, pageNumber, pageSize, null);
-        return ResultUtil.ok(examPaperStructureIPage);
-    }
-
-    /**
-     * 查询最新状态
-     *
-     * @param id 评卷参数ID
-     */
-    @ApiOperation(value = "查询最新状态")
-    @RequestMapping(value = "/get_structure_status", method = RequestMethod.POST)
-    public Result getStructureStatus(@RequestParam("id") String id) {
-        ExamPaperStructure examPaperStructure = examPaperStructureService.getById(id);
-        return ResultUtil.ok(examPaperStructure == null ? null : examPaperStructure.getStatus(), null);
-    }
-
-
-    /**
-     * 上传
-     *
-     * @param md5   文件md5
-     * @param files 文件数组
-     * @return Result
-     */
-    @ApiOperation(value = "上传试卷结构、标答")
-    @RequestMapping(value = "/upload", method = RequestMethod.POST)
-    @OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.UPDATE)
-    public Result upload(@RequestParam("examPaperStructure") String examPaperStructure,
-                         @RequestParam("md5") String md5,
-                         @RequestParam("keys") String keys,
-                         @RequestParam("files") MultipartFile[] files) {
-        ExamPaperStructure examPaper = examPaperStructureService.upload(examPaperStructure, md5, keys, files);
-        return ResultUtil.ok(String.valueOf(examPaper.getId()), null);
-    }
-
-    @ApiOperation(value = "设置评卷参数-提交")
-    @RequestMapping(value = "/submit", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "更新成功", response = EditResult.class)})
-    @OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.UPDATE)
-    public Result submitExamPaperParams(@RequestBody String evaluationParameters) {
-        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        ExamPaperStructure examPaperStructure = examPaperStructureService.submitExamPaperParams(evaluationParameters, sysUser);
-        return ResultUtil.ok(String.valueOf(examPaperStructure.getId()), null);
-    }
-
-    /**
-     * 上传标答文件
-     *
-     * @param md5  文件md5
-     * @param file 文件数组
-     * @return Result
-     */
-    @ApiOperation(value = "上传试卷标答文件")
-    @RequestMapping(value = "/upload_answer", method = RequestMethod.POST)
-    @OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.UPDATE)
-    public Result uploadAnswer(@RequestParam("id") String id,
-                               @RequestParam("md5") String md5,
-                               @RequestParam("file") MultipartFile file) {
-        ExamPaperStructure examPaperStructure = examPaperStructureService.uploadAnswer(id, md5, file);
-        return ResultUtil.ok(true);
-    }
-
-    /**
-     * 设置科组长
-     *
-     * @param data data
-     * @return Result
-     */
-    @ApiOperation(value = "设置科组长")
-    @RequestMapping(value = "/bind_mark_leader", method = RequestMethod.POST)
-    @OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.UPDATE)
-    public Result bindMarkLeader(@RequestBody String data) {
-        ExamPaperStructure examPaperStructure = examPaperStructureService.bindMarkLeader(data);
-        return ResultUtil.ok(true);
-    }
-
-    /**
-     * 绑定评卷员、分班阅
-     *
-     * @param data
-     * @return
-     */
-    @ApiOperation(value = "绑定评卷员、分班阅")
-    @RequestMapping(value = "/bind_marker", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "更新成功", response = EditResult.class)})
-    @OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.UPDATE)
-    public Result bindMarker(@RequestBody String data) {
-        ExamPaperStructure examPaperStructure = examPaperStructureService.saveMarkerAndClass(data);
-        return ResultUtil.ok(true);
-    }
-
-    /**
-     * 保存客观题答案
-     *
-     * @param body body
-     */
-    @ApiOperation(value = "保存客观题答案")
-    @RequestMapping(value = "/update_objective_answer", method = RequestMethod.POST)
-    @OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.UPDATE)
-    public Result updateObjectiveAnswer(@RequestBody String body) {
-        JSONObject object = JSONObject.parseObject(body, JSONObject.class);
-        Long id = object.getLong("id");
-        String objectiveStructure = object.getString("objectiveStructure");
-        ExamPaperStructure examPaperStructure = examPaperStructureService.updateObjectiveAnswer(id, objectiveStructure);
-        return ResultUtil.ok(true);
-    }
-
-    @ApiOperation(value = "评卷参数设置-获取题卡图片")
-    @RequestMapping(value = "/find_jpg_file", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
-    public Result findCardJpgFileByPaperNumber(@ApiParam(value = "考试id", required = true) @RequestParam String examId,
-                                               @ApiParam(value = "课程代码", required = true) @RequestParam String courseCode,
-                                               @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
-                                               @ApiParam(value = "试卷类型", required = true) @RequestParam String paperType) {
-        return ResultUtil.ok(examPaperStructureService.findCardJpgFileByPaperNumber(SystemConstant.convertIdToLong(examId), courseCode, paperNumber, paperType));
-    }
-
-    /**
-     * 查询教学秘书
-     */
-    @ApiOperation(value = "查询")
-    @RequestMapping(value = "/list_secretary", method = RequestMethod.POST)
-    public Result listSecretary() {
-        return ResultUtil.ok(examPaperStructureService.listSecretary());
-    }
-
-    /**
-     * 转办/打回
-     */
-    @ApiOperation(value = "转办/打回")
-    @RequestMapping(value = "/transfer", method = RequestMethod.POST)
-    @OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.UPDATE)
-    public Result transfer(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
-                           @ApiParam(value = "课程代码", required = true) @RequestParam String courseCode,
-                           @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
-                           @ApiParam(value = "用户ID", required = false) @RequestParam(required = false) Long transferId) {
-        return ResultUtil.ok(examPaperStructureService.transfer(examId, courseCode, paperNumber, transferId));
-    }
-
-    /**
-     * 查询绑定班级
-     */
-    @ApiOperation(value = "查询绑定班级")
-    @RequestMapping(value = "/list_user_class", method = RequestMethod.POST)
-    public Result transfer(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
-                           @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber) {
-        return ResultUtil.ok(examPaperStructureService.listUserClass(examId, paperNumber));
-    }
-}
-

+ 0 - 282
distributed-print/src/test/java/com/qmth/distributed/print/ExamPaperStructureServiceTest.java

@@ -1,282 +0,0 @@
-package com.qmth.distributed.print;
-
-import com.alibaba.fastjson.JSONObject;
-import com.qmth.distributed.print.business.bean.marking.EvaluationParameters;
-import com.qmth.distributed.print.business.service.ExamPaperStructureService;
-import com.qmth.teachcloud.common.entity.SysUser;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-import javax.annotation.Resource;
-
-/**
- * @Description: 評卷參數測試類
- * @Author: CaoZixuan
- * @Date: 2022-04-13
- */
-@SpringBootTest
-@RunWith(SpringRunner.class)
-public class ExamPaperStructureServiceTest {
-    @Resource
-    private ExamPaperStructureService examPaperStructureService;
-
-    @Test
-    public void submit(){
-        String e = "{\n" +
-                "\t\"basicPaperInfo\": {\n" +
-                "\t\t\"examPaperStructureId\": null,\n" +
-                "\t\t\"examId\": 237292182900310016,\n" +
-                "\t\t\"thirdRelateId\": 1,\n" +
-                "\t\t\"thirdRelateName\": \"考试1\",\n" +
-                "\t\t\"courseName\": \"语文\",\n" +
-                "\t\t\"courseCode\": \"yw001\",\n" +
-                "\t\t\"paperNumber\": 112345667,\n" +
-                "\t\t\"paperType\": \"AB\",\n" +
-                "\t\t\"paperTypes\": [\n" +
-                "\t\t\t\"A\",\n" +
-                "\t\t\t\"B\"\n" +
-                "\t\t],\n" +
-                "\t\t\"sequence\": 1,\n" +
-                "\t\t\"status\": \"FINISH\"\n" +
-                "\t},\n" +
-                "\t\"paperStructureInfo\": {\n" +
-                "\t\t\"objectiveQuestionList\": [\n" +
-                "\t\t\t{\n" +
-                "\t\t\t\t\"id\": \"rr1fbqe8ccbtino8\",\n" +
-                "\t\t\t\t\"mainId\": \"hmdk0lmgf8b8a3dg\",\n" +
-                "\t\t\t\t\"mainTitle\": \"1111\",\n" +
-                "\t\t\t\t\"mainNumber\": 1,\n" +
-                "\t\t\t\t\"subNumber\": 1,\n" +
-                "\t\t\t\t\"totalScore\": 1,\n" +
-                "\t\t\t\t\"isMainFirstSub\": true,\n" +
-                "\t\t\t\t\"expandSub\": true\n" +
-                "\t\t\t},\n" +
-                "\t\t\t{\n" +
-                "\t\t\t\t\"id\": \"qe8bmmcfmnrualau\",\n" +
-                "\t\t\t\t\"mainId\": \"hmdk0lmgf8b8a3dg\",\n" +
-                "\t\t\t\t\"mainTitle\": \"1111\",\n" +
-                "\t\t\t\t\"mainNumber\": 1,\n" +
-                "\t\t\t\t\"subNumber\": 2,\n" +
-                "\t\t\t\t\"totalScore\": 1,\n" +
-                "\t\t\t\t\"isMainFirstSub\": false,\n" +
-                "\t\t\t\t\"expandSub\": true\n" +
-                "\t\t\t},\n" +
-                "\t\t\t{\n" +
-                "\t\t\t\t\"id\": \"b890eq5gph1rnj28\",\n" +
-                "\t\t\t\t\"mainId\": \"hmdk0lmgf8b8a3dg\",\n" +
-                "\t\t\t\t\"mainTitle\": \"1111\",\n" +
-                "\t\t\t\t\"mainNumber\": 1,\n" +
-                "\t\t\t\t\"subNumber\": 3,\n" +
-                "\t\t\t\t\"totalScore\": 1,\n" +
-                "\t\t\t\t\"isMainFirstSub\": false,\n" +
-                "\t\t\t\t\"expandSub\": true\n" +
-                "\t\t\t},\n" +
-                "\t\t\t{\n" +
-                "\t\t\t\t\"id\": \"r5ur82e8j4sfhuje\",\n" +
-                "\t\t\t\t\"mainId\": \"hmdk0lmgf8b8a3dg\",\n" +
-                "\t\t\t\t\"mainTitle\": \"1111\",\n" +
-                "\t\t\t\t\"mainNumber\": 1,\n" +
-                "\t\t\t\t\"subNumber\": 4,\n" +
-                "\t\t\t\t\"totalScore\": 1,\n" +
-                "\t\t\t\t\"isMainFirstSub\": false,\n" +
-                "\t\t\t\t\"expandSub\": true\n" +
-                "\t\t\t}\n" +
-                "\t\t],\n" +
-                "\t\t\"subjectiveQuestionList\": [\n" +
-                "\t\t\t{\n" +
-                "\t\t\t\t\"id\": \"febv2i6omdni1nao\",\n" +
-                "\t\t\t\t\"mainId\": \"jt809h2g4i10gl58\",\n" +
-                "\t\t\t\t\"mainTitle\": \"2222\",\n" +
-                "\t\t\t\t\"mainNumber\": 2,\n" +
-                "\t\t\t\t\"subNumber\": 1,\n" +
-                "\t\t\t\t\"totalScore\": 1,\n" +
-                "\t\t\t\t\"isMainFirstSub\": true,\n" +
-                "\t\t\t\t\"expandSub\": true\n" +
-                "\t\t\t},\n" +
-                "\t\t\t{\n" +
-                "\t\t\t\t\"id\": \"vhhkj93ooqoal1vg\",\n" +
-                "\t\t\t\t\"mainId\": \"jt809h2g4i10gl58\",\n" +
-                "\t\t\t\t\"mainTitle\": \"2222\",\n" +
-                "\t\t\t\t\"mainNumber\": 2,\n" +
-                "\t\t\t\t\"subNumber\": 2,\n" +
-                "\t\t\t\t\"totalScore\": 1,\n" +
-                "\t\t\t\t\"isMainFirstSub\": false,\n" +
-                "\t\t\t\t\"expandSub\": true\n" +
-                "\t\t\t},\n" +
-                "\t\t\t{\n" +
-                "\t\t\t\t\"id\": \"d90rgrbgef610le8\",\n" +
-                "\t\t\t\t\"mainId\": \"jt809h2g4i10gl58\",\n" +
-                "\t\t\t\t\"mainTitle\": \"2222\",\n" +
-                "\t\t\t\t\"mainNumber\": 2,\n" +
-                "\t\t\t\t\"subNumber\": 3,\n" +
-                "\t\t\t\t\"totalScore\": 1,\n" +
-                "\t\t\t\t\"isMainFirstSub\": false,\n" +
-                "\t\t\t\t\"expandSub\": true\n" +
-                "\t\t\t}\n" +
-                "\t\t]\n" +
-                "\t},\n" +
-                "\t\"groupInfo\": [\n" +
-                "\t\t{\n" +
-                "\t\t\t\"id\": \"gv10hsogia49s8k8\",\n" +
-                "\t\t\t\"markerList\": [\n" +
-                "\t\t\t\t{\n" +
-                "\t\t\t\t\t\"id\": \"236486056571052032\",\n" +
-                "\t\t\t\t\t\"userId\": \"236486056571052032\",\n" +
-                "\t\t\t\t\t\"loginName\": \"张三\",\n" +
-                "\t\t\t\t\t\"label\": \"test1(美术印刷室)\",\n" +
-                "\t\t\t\t\t\"name\": \"test1\",\n" +
-                "\t\t\t\t\t\"orgName\": \"美术印刷室\",\n" +
-                "\t\t\t\t\t\"selected\": false,\n" +
-                "\t\t\t\t\t\"isUser\": true\n" +
-                "\t\t\t\t}\n" +
-                "\t\t\t],\n" +
-                "\t\t\t\"doubleRate\": 1,\n" +
-                "\t\t\t\"arbitrateThreshold\": 1,\n" +
-                "\t\t\t\"questions\": [\n" +
-                "\t\t\t\t{\n" +
-                "\t\t\t\t\t\"id\": \"rr1fbqe8ccbtino8\",\n" +
-                "\t\t\t\t\t\"mainId\": \"hmdk0lmgf8b8a3dg\",\n" +
-                "\t\t\t\t\t\"mainTitle\": \"1111\",\n" +
-                "\t\t\t\t\t\"mainNumber\": 1,\n" +
-                "\t\t\t\t\t\"subNumber\": 1,\n" +
-                "\t\t\t\t\t\"totalScore\": 1,\n" +
-                "\t\t\t\t\t\"isMainFirstSub\": true,\n" +
-                "\t\t\t\t\t\"expandSub\": true\n" +
-                "\t\t\t\t},\n" +
-                "\t\t\t\t{\n" +
-                "\t\t\t\t\t\"id\": \"qe8bmmcfmnrualau\",\n" +
-                "\t\t\t\t\t\"mainId\": \"hmdk0lmgf8b8a3dg\",\n" +
-                "\t\t\t\t\t\"mainTitle\": \"1111\",\n" +
-                "\t\t\t\t\t\"mainNumber\": 1,\n" +
-                "\t\t\t\t\t\"subNumber\": 2,\n" +
-                "\t\t\t\t\t\"totalScore\": 1,\n" +
-                "\t\t\t\t\t\"isMainFirstSub\": false,\n" +
-                "\t\t\t\t\t\"expandSub\": true\n" +
-                "\t\t\t\t},\n" +
-                "\t\t\t\t{\n" +
-                "\t\t\t\t\t\"id\": \"b890eq5gph1rnj28\",\n" +
-                "\t\t\t\t\t\"mainId\": \"hmdk0lmgf8b8a3dg\",\n" +
-                "\t\t\t\t\t\"mainTitle\": \"1111\",\n" +
-                "\t\t\t\t\t\"mainNumber\": 1,\n" +
-                "\t\t\t\t\t\"subNumber\": 3,\n" +
-                "\t\t\t\t\t\"totalScore\": 1,\n" +
-                "\t\t\t\t\t\"isMainFirstSub\": false,\n" +
-                "\t\t\t\t\t\"expandSub\": true\n" +
-                "\t\t\t\t},\n" +
-                "\t\t\t\t{\n" +
-                "\t\t\t\t\t\"id\": \"r5ur82e8j4sfhuje\",\n" +
-                "\t\t\t\t\t\"mainId\": \"hmdk0lmgf8b8a3dg\",\n" +
-                "\t\t\t\t\t\"mainTitle\": \"1111\",\n" +
-                "\t\t\t\t\t\"mainNumber\": 1,\n" +
-                "\t\t\t\t\t\"subNumber\": 4,\n" +
-                "\t\t\t\t\t\"totalScore\": 1,\n" +
-                "\t\t\t\t\t\"isMainFirstSub\": false,\n" +
-                "\t\t\t\t\t\"expandSub\": true\n" +
-                "\t\t\t\t}\n" +
-                "\t\t\t],\n" +
-                "\t\t\t\"pictureConfigList\": [\n" +
-                "\t\t\t\t{\n" +
-                "\t\t\t\t\t\"i\": 1,\n" +
-                "\t\t\t\t\t\"x\": 0,\n" +
-                "\t\t\t\t\t\"y\": 0,\n" +
-                "\t\t\t\t\t\"w\": 1191,\n" +
-                "\t\t\t\t\t\"h\": 842\n" +
-                "\t\t\t\t},\n" +
-                "\t\t\t\t{\n" +
-                "\t\t\t\t\t\"i\": 2,\n" +
-                "\t\t\t\t\t\"x\": 0,\n" +
-                "\t\t\t\t\t\"y\": 0,\n" +
-                "\t\t\t\t\t\"w\": 1191,\n" +
-                "\t\t\t\t\t\"h\": 842\n" +
-                "\t\t\t\t}\n" +
-                "\t\t\t]\n" +
-                "\t\t},\n" +
-                "\t\t{\n" +
-                "\t\t\t\"id\": \"gfpiqsfg225g4mlg\",\n" +
-                "\t\t\t\"markerList\": [\n" +
-                "\t\t\t\t{\n" +
-                "\t\t\t\t\t\"id\": \"236165142725787648\",\n" +
-                "\t\t\t\t\t\"userId\": \"236165142725787648\",\n" +
-                "\t\t\t\t\t\"loginName\": \"张三\",\n" +
-                "\t\t\t\t\t\"label\": \"kw03(美术教研室)\",\n" +
-                "\t\t\t\t\t\"name\": \"kw03\",\n" +
-                "\t\t\t\t\t\"orgName\": \"美术教研室\",\n" +
-                "\t\t\t\t\t\"selected\": false,\n" +
-                "\t\t\t\t\t\"isUser\": true\n" +
-                "\t\t\t\t},\n" +
-                "\t\t\t\t{\n" +
-                "\t\t\t\t\t\"id\": \"236160410883981312\",\n" +
-                "\t\t\t\t\t\"userId\": \"236160410883981312\",\n" +
-                "\t\t\t\t\t\"loginName\": \"张三\",\n" +
-                "\t\t\t\t\t\"label\": \"mt03(美术教研室)\",\n" +
-                "\t\t\t\t\t\"name\": \"mt03\",\n" +
-                "\t\t\t\t\t\"orgName\": \"美术教研室\",\n" +
-                "\t\t\t\t\t\"selected\": false,\n" +
-                "\t\t\t\t\t\"isUser\": true\n" +
-                "\t\t\t\t},\n" +
-                "\t\t\t\t{\n" +
-                "\t\t\t\t\t\"id\": \"236163969650262016\",\n" +
-                "\t\t\t\t\t\"userId\": \"236163969650262016\",\n" +
-                "\t\t\t\t\t\"loginName\": \"张三\",\n" +
-                "\t\t\t\t\t\"label\": \"zr03(美术教研室)\",\n" +
-                "\t\t\t\t\t\"name\": \"zr03\",\n" +
-                "\t\t\t\t\t\"orgName\": \"美术教研室\",\n" +
-                "\t\t\t\t\t\"selected\": false,\n" +
-                "\t\t\t\t\t\"isUser\": true\n" +
-                "\t\t\t\t}\n" +
-                "\t\t\t],\n" +
-                "\t\t\t\"doubleRate\": 1,\n" +
-                "\t\t\t\"arbitrateThreshold\": 1,\n" +
-                "\t\t\t\"questions\": [\n" +
-                "\t\t\t\t{\n" +
-                "\t\t\t\t\t\"id\": \"febv2i6omdni1nao\",\n" +
-                "\t\t\t\t\t\"mainId\": \"jt809h2g4i10gl58\",\n" +
-                "\t\t\t\t\t\"mainTitle\": \"2222\",\n" +
-                "\t\t\t\t\t\"mainNumber\": 2,\n" +
-                "\t\t\t\t\t\"subNumber\": 1,\n" +
-                "\t\t\t\t\t\"totalScore\": 1,\n" +
-                "\t\t\t\t\t\"isMainFirstSub\": true,\n" +
-                "\t\t\t\t\t\"expandSub\": true\n" +
-                "\t\t\t\t},\n" +
-                "\t\t\t\t{\n" +
-                "\t\t\t\t\t\"id\": \"vhhkj93ooqoal1vg\",\n" +
-                "\t\t\t\t\t\"mainId\": \"jt809h2g4i10gl58\",\n" +
-                "\t\t\t\t\t\"mainTitle\": \"2222\",\n" +
-                "\t\t\t\t\t\"mainNumber\": 2,\n" +
-                "\t\t\t\t\t\"subNumber\": 2,\n" +
-                "\t\t\t\t\t\"totalScore\": 1,\n" +
-                "\t\t\t\t\t\"isMainFirstSub\": false,\n" +
-                "\t\t\t\t\t\"expandSub\": true\n" +
-                "\t\t\t\t},\n" +
-                "\t\t\t\t{\n" +
-                "\t\t\t\t\t\"id\": \"d90rgrbgef610le8\",\n" +
-                "\t\t\t\t\t\"mainId\": \"jt809h2g4i10gl58\",\n" +
-                "\t\t\t\t\t\"mainTitle\": \"2222\",\n" +
-                "\t\t\t\t\t\"mainNumber\": 2,\n" +
-                "\t\t\t\t\t\"subNumber\": 3,\n" +
-                "\t\t\t\t\t\"totalScore\": 1,\n" +
-                "\t\t\t\t\t\"isMainFirstSub\": false,\n" +
-                "\t\t\t\t\t\"expandSub\": true\n" +
-                "\t\t\t\t}\n" +
-                "\t\t\t],\n" +
-                "\t\t\t\"pictureConfigList\": [\n" +
-                "\t\t\t\t{\n" +
-                "\t\t\t\t\t\"i\": 3,\n" +
-                "\t\t\t\t\t\"x\": 0,\n" +
-                "\t\t\t\t\t\"y\": 0,\n" +
-                "\t\t\t\t\t\"w\": 1191,\n" +
-                "\t\t\t\t\t\"h\": 842\n" +
-                "\t\t\t\t}\n" +
-                "\t\t\t]\n" +
-                "\t\t}\n" +
-                "\t]\n" +
-                "}";
-        SysUser sysUser = new SysUser();
-        sysUser.setId(237287449405947904L);
-        sysUser.setSchoolId(2L);
-        examPaperStructureService.submitExamPaperParams(e,sysUser);
-    }
-
-}

+ 1 - 11
distributed-print/src/test/java/com/qmth/distributed/print/ServiceTest.java

@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.qmth.distributed.print.business.bean.dto.examObject.ExamObjectDto;
-import com.qmth.distributed.print.business.bean.marking.CardJpgResult;
 import com.qmth.distributed.print.business.entity.ExamPrintPlan;
 import com.qmth.distributed.print.business.entity.ExamStudent;
 import com.qmth.distributed.print.business.mapper.ExamStudentMapper;
@@ -59,9 +58,6 @@ public class ServiceTest {
     @Resource
     private ExamStudentMapper examStudentMapper;
 
-    @Resource
-    private ExamPaperStructureService examPaperStructureService;
-
     @Resource
     private ExamStudentService examStudentService;
 
@@ -169,18 +165,12 @@ public class ServiceTest {
         System.out.println(JSON.toJSONString(examStudentList));
     }
 
-    @Test
-    public void findCardJpgFileByPaperNumber() {
-        List<CardJpgResult> resultList = examPaperStructureService.findCardJpgFileByPaperNumber(237292182900310016L, "yznwl", "yznwl-0415-001", "A");
-        System.out.println(JSON.toJSONString(resultList));
-    }
-
     @Test
     public void testFindExamObject() throws Exception {
     }
 
     @Test
-    public void upExamStudent(){
+    public void upExamStudent() {
         List<ExamStudent> examStudentList = examStudentService.list();
         for (ExamStudent examStudent : examStudentList) {
             Long examDetailCourseId = examStudent.getExamDetailCourseId();

+ 0 - 2
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysUserService.java

@@ -293,7 +293,5 @@ public interface SysUserService extends IService<SysUser> {
      */
     List<SysUserResult> findCourseSysUserResultByTeachIdSet(Set<Long> teachIdSet);
 
-    List<UserRoleDto> listSecretary();
-
     SysUser getByUserId(Long userId);
 }

+ 0 - 21
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysUserServiceImpl.java

@@ -1157,27 +1157,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
         return sysUserMapper.findCourseSysUserResultByTeachIdSet(teachIdSet);
     }
 
-    @Override
-    public List<UserRoleDto> listSecretary() {
-        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        SysOrg sysOrg = sysOrgService.findCollegeByOrgId(sysUser.getSchoolId(), sysUser.getOrgId());
-        List<UserRoleDto> userRoleDtos = new ArrayList<>();
-        if (sysOrg != null) {
-            // 学院秘书
-            List<UserRoleDto> assistantList = this.baseMapper.findByRoleTypeAndOrgId(RoleTypeEnum.ASSISTANT.name(), sysOrg.getId());
-            if (!assistantList.isEmpty()) {
-                userRoleDtos.addAll(assistantList);
-            }
-        }
-        // 学校管理员
-        SysOrg rootOrg = sysOrgService.findRootOrg(sysUser.getSchoolId());
-        List<UserRoleDto> adminList = this.baseMapper.findByRoleTypeAndOrgId(RoleTypeEnum.SCHOOL_ADMIN.name(), rootOrg.getId());
-        if (!adminList.isEmpty()) {
-            userRoleDtos.addAll(adminList);
-        }
-        return userRoleDtos;
-    }
-
     @Override
     public SysUser getByUserId(Long userId) {
         return this.baseMapper.getByUserId(userId);

+ 0 - 4
teachcloud-report-business/src/main/resources/mapper/ExamPaperClassMarkerMapper.xml

@@ -1,4 +0,0 @@
-<?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.distributed.print.business.mapper.ExamPaperClassMarkerMapper">
-</mapper>

+ 1 - 1
teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/SubjectCalculateJob.java

@@ -21,7 +21,7 @@ public class SubjectCalculateJob extends QuartzJobBean {
     @Override
     protected void executeInternal(JobExecutionContext jobExecutionContext) {
         try {
-            jobService.subjectCalculate();
+//            jobService.subjectCalculate();
         } catch (Exception e) {
             log.error(SystemConstant.LOG_ERROR, e);
         }

+ 0 - 5
teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/service/JobService.java

@@ -33,11 +33,6 @@ public interface JobService {
      */
     void resendSmsTask();
 
-    /**
-     * 自动统分
-     */
-    void subjectCalculate();
-
     /**
      * 组装job
      *

+ 8 - 17
teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/service/impl/JobServiceImpl.java

@@ -1,27 +1,26 @@
 package com.qmth.teachcloud.task.job.service.impl;
 
-import cn.hutool.core.date.DateUtil;
 import com.qmth.boot.redis.uid.RedisMachineService;
-import com.qmth.distributed.print.business.bean.dto.ExamDetailCourseDto;
 import com.qmth.distributed.print.business.bean.dto.initMarkData.ExamDetailCourseInitMarkDto;
 import com.qmth.distributed.print.business.enums.ExamDetailStatusEnum;
-import com.qmth.distributed.print.business.service.*;
+import com.qmth.distributed.print.business.service.BasicMessageService;
+import com.qmth.distributed.print.business.service.ExamDetailService;
+import com.qmth.distributed.print.business.service.PrintCommonService;
+import com.qmth.distributed.print.business.service.SmsSendService;
 import com.qmth.teachcloud.common.bean.dto.MqDto;
 import com.qmth.teachcloud.common.contant.SystemConstant;
-import com.qmth.teachcloud.common.util.DateDisposeUtils;
-import com.qmth.teachcloud.mark.entity.MarkPaper;
 import com.qmth.teachcloud.common.enums.mark.MarkPaperStatus;
-import com.qmth.teachcloud.mark.enums.LockType;
-import com.qmth.teachcloud.mark.service.MarkPaperService;
+import com.qmth.teachcloud.common.util.DateDisposeUtils;
 import com.qmth.teachcloud.common.util.RedisUtil;
 import com.qmth.teachcloud.mark.entity.MarkGroup;
+import com.qmth.teachcloud.mark.entity.MarkPaper;
 import com.qmth.teachcloud.mark.entity.MarkUserGroup;
 import com.qmth.teachcloud.mark.service.MarkGroupService;
+import com.qmth.teachcloud.mark.service.MarkPaperService;
 import com.qmth.teachcloud.mark.service.MarkService;
 import com.qmth.teachcloud.mark.service.MarkUserGroupService;
 import com.qmth.teachcloud.task.job.service.JobService;
 import com.qmth.teachcloud.task.service.PrintFinishService;
-import org.apache.commons.lang3.time.DateUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
@@ -53,9 +52,6 @@ public class JobServiceImpl implements JobService {
     @Resource
     BasicMessageService basicMessageService;
 
-    @Resource
-    ExamPaperStructureService examPaperStructureService;
-
     @Resource
     MarkPaperService markPaperService;
 
@@ -102,11 +98,6 @@ public class JobServiceImpl implements JobService {
         basicMessageService.resendSmsTask();
     }
 
-    @Override
-    public void subjectCalculate() {
-        examPaperStructureService.subjectCalculate();
-    }
-
     @Override
     public void machineHeart() {
         redisUtil.set(SystemConstant.TASK_MACHINE_ID + redisMachineService.getMachineId(), redisMachineService.getMachineId(), 30, TimeUnit.SECONDS);
@@ -161,7 +152,7 @@ public class JobServiceImpl implements JobService {
         long startTime = DateDisposeUtils.parseDate("2023-10-01 00:00:00").getTime();
         List<ExamDetailCourseInitMarkDto> examDetailCourseInitMarkDtoList = examDetailService.listPrintFinishExamDetailCourse(ExamDetailStatusEnum.FINISH.name(), startTime, MarkPaperStatus.FINISH.name());
         for (ExamDetailCourseInitMarkDto dto : examDetailCourseInitMarkDtoList) {
-            printFinishService.insertMarkPaper(dto.getExamId(), dto.getCourseCode(), dto.getCourseName(), dto.getPaperNumber(),dto.getPackageCode());
+            printFinishService.insertMarkPaper(dto.getExamId(), dto.getCourseCode(), dto.getCourseName(), dto.getPaperNumber(), dto.getPackageCode());
             printFinishService.insertMarkStudent(dto);
             printFinishService.insertScanAnswerCard(dto);
         }