Browse Source

3.4.0 update

xiaofei 1 year ago
parent
commit
6cf4c3e379
53 changed files with 327 additions and 788 deletions
  1. 0 10
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExamDetailCourseDto.java
  2. 28 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/CourseResult.java
  3. 0 10
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/ExaminationDetailResult.java
  4. 0 23
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/PrintPlanResult.java
  5. 0 11
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/ExamStudent.java
  6. 7 6
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/enums/RequiredFieldsEnum.java
  7. 3 3
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamDetailMapper.java
  8. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamTaskDetailMapper.java
  9. 0 5
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamDetailCourseService.java
  10. 3 3
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamDetailService.java
  11. 3 3
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamTaskDetailService.java
  12. 0 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamTaskService.java
  13. 6 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TeachCourseService.java
  14. 0 92
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamDetailCourseServiceImpl.java
  15. 10 10
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamDetailServiceImpl.java
  16. 6 6
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskDetailServiceImpl.java
  17. 0 22
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java
  18. 37 4
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TeachCourseServiceImpl.java
  19. 0 64
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncTaskReviewSampleExportService.java
  20. 0 9
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/TaskLogicService.java
  21. 12 151
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/TaskLogicServiceImpl.java
  22. 1 1
      distributed-print-business/src/main/resources/mapper/ExamCardMapper.xml
  23. 33 28
      distributed-print-business/src/main/resources/mapper/ExamDetailMapper.xml
  24. 0 2
      distributed-print-business/src/main/resources/mapper/ExamPrintPlanMapper.xml
  25. 8 5
      distributed-print-business/src/main/resources/mapper/ExamStudentMapper.xml
  26. 6 9
      distributed-print-business/src/main/resources/mapper/ExamTaskDetailMapper.xml
  27. 4 2
      distributed-print-business/src/main/resources/mapper/TFFlowApproveMapper.xml
  28. 17 1
      distributed-print/install/mysql/upgrade/3.4.0.sql
  29. 9 8
      distributed-print/src/main/java/com/qmth/distributed/print/api/BasicCourseController.java
  30. 18 44
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamDetailController.java
  31. 23 57
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamPrintPlanController.java
  32. 9 107
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamTaskAuditController.java
  33. 1 1
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamTaskQueryController.java
  34. 2 2
      distributed-print/src/main/java/com/qmth/distributed/print/api/SysOrgController.java
  35. 2 2
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkEntranceController.java
  36. 1 1
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkQuestionController.java
  37. 8 8
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkSettingController.java
  38. 0 3
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/bean/result/SyncListResult.java
  39. 0 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/enums/TaskTypeEnum.java
  40. 5 7
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/bean/archivescore/ArchiveScoreQuery.java
  41. 5 7
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/bean/document/ArchivePaperQuery.java
  42. 3 3
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/mapper/MarkPaperMapper.java
  43. 2 2
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/mapper/MarkTaskMapper.java
  44. 1 1
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/mapper/MarkUserGroupMapper.java
  45. 2 2
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/MarkPaperService.java
  46. 2 2
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/MarkTaskService.java
  47. 1 1
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/MarkUserGroupService.java
  48. 4 4
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkPaperServiceImpl.java
  49. 4 8
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkTaskServiceImpl.java
  50. 2 2
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkUserGroupServiceImpl.java
  51. 22 19
      teachcloud-mark/src/main/resources/mapper/MarkPaperMapper.xml
  52. 14 11
      teachcloud-mark/src/main/resources/mapper/MarkTaskMapper.xml
  53. 2 2
      teachcloud-mark/src/main/resources/mapper/MarkUserGroupMapper.xml

+ 0 - 10
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExamDetailCourseDto.java

@@ -9,8 +9,6 @@ public class ExamDetailCourseDto extends ExamDetailCourse {
 
     private Long examTaskId;
 
-    private Integer thirdRelateId;
-
     private String sequence;
 
     private String loginName;
@@ -25,14 +23,6 @@ public class ExamDetailCourseDto extends ExamDetailCourse {
         this.examTaskId = examTaskId;
     }
 
-    public Integer getThirdRelateId() {
-        return thirdRelateId;
-    }
-
-    public void setThirdRelateId(Integer thirdRelateId) {
-        this.thirdRelateId = thirdRelateId;
-    }
-
     public String getSequence() {
         return sequence;
     }

+ 28 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/CourseResult.java

@@ -0,0 +1,28 @@
+package com.qmth.distributed.print.business.bean.result;
+
+import com.qmth.teachcloud.common.entity.BasicCourse;
+
+import java.util.List;
+
+public class CourseResult {
+
+    private List<BasicCourse> teachCourseList;
+
+    private List<BasicCourse> basicCourseList;
+
+    public List<BasicCourse> getTeachCourseList() {
+        return teachCourseList;
+    }
+
+    public void setTeachCourseList(List<BasicCourse> teachCourseList) {
+        this.teachCourseList = teachCourseList;
+    }
+
+    public List<BasicCourse> getBasicCourseList() {
+        return basicCourseList;
+    }
+
+    public void setBasicCourseList(List<BasicCourse> basicCourseList) {
+        this.basicCourseList = basicCourseList;
+    }
+}

+ 0 - 10
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/ExaminationDetailResult.java

@@ -76,8 +76,6 @@ public class ExaminationDetailResult {
     @ApiModelProperty(value = "创建时间")
     private Long createTime;
 
-    private Boolean canDelete;
-
     public Long getId() {
         return id;
     }
@@ -237,12 +235,4 @@ public class ExaminationDetailResult {
     public void setCreateTime(Long createTime) {
         this.createTime = createTime;
     }
-
-    public Boolean getCanDelete() {
-        return canDelete;
-    }
-
-    public void setCanDelete(Boolean canDelete) {
-        this.canDelete = canDelete;
-    }
 }

+ 0 - 23
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/PrintPlanResult.java

@@ -90,12 +90,6 @@ public class PrintPlanResult {
     @ApiModelProperty(value = "创建人名字")
     private String createName;
 
-    @ApiModelProperty("第三方系统关联ID")
-    private Long thirdRelateId;
-
-    @ApiModelProperty("第三方系统关联考试名称")
-    private String thirdRelateName;
-
     @ApiModelProperty("考试id")
     @JsonSerialize(using = ToStringSerializer.class)
     private Long examId;
@@ -290,23 +284,6 @@ public class PrintPlanResult {
     public void setCreateName(String createName) {
         this.createName = createName;
     }
-
-    public Long getThirdRelateId() {
-        return thirdRelateId;
-    }
-
-    public void setThirdRelateId(Long thirdRelateId) {
-        this.thirdRelateId = thirdRelateId;
-    }
-
-    public String getThirdRelateName() {
-        return thirdRelateName;
-    }
-
-    public void setThirdRelateName(String thirdRelateName) {
-        this.thirdRelateName = thirdRelateName;
-    }
-
     public Long getExamId() {
         return examId;
     }

+ 0 - 11
distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/ExamStudent.java

@@ -111,9 +111,6 @@ public class ExamStudent extends BaseEntity implements Serializable {
     @TableField(value = "attachment_id")
     private Long attachmentId;
 
-    @TableField(value = "can_delete")
-    private Boolean canDelete;
-
     public Long getSchoolId() {
         return schoolId;
     }
@@ -314,14 +311,6 @@ public class ExamStudent extends BaseEntity implements Serializable {
         this.attachmentId = attachmentId;
     }
 
-    public Boolean getCanDelete() {
-        return canDelete;
-    }
-
-    public void setCanDelete(Boolean canDelete) {
-        this.canDelete = canDelete;
-    }
-
     public String getTeacherName() {
         return teacherName;
     }

+ 7 - 6
distributed-print-business/src/main/java/com/qmth/distributed/print/business/enums/RequiredFieldsEnum.java

@@ -13,20 +13,21 @@ public enum RequiredFieldsEnum {
 
     STUDENT_NAME("studentName","姓名", true, true),
     STUDENT_CODE("studentCode", "学号", true, true),
-    //    TICKET_NUMBER("ticketNumber", "考号", false, false),
-    SITE_NUMBER("siteNumber", "座位号", false, false),
+    SITE_NUMBER("siteNumber", "座位号", true, false),
     COURSE_NAME("courseName","课程名称", true, true),
     COURSE_CODE("courseCode","课程代码", true, true),
     PAPER_NUMBER("paperNumber","试卷编号", true, true),
     EXAM_DATE("examDate","考试日期", true, true),
     EXAM_TIME("examTime","考试时间", true, true),
-    EXAM_PLACE("examPlace","校区(考点)", true, true),
+    EXAM_PLACE("examPlace","校区(考点)", true, false),
     EXAM_ROOM("examRoom","考试教室(考场)", true, true),
     COLLEGE_NAME("collegeName","学院", true, true),
-    MAJOR_NAME("majorName","专业", false, false),
+    MAJOR_NAME("majorName","专业", true, false),
     TEACH_CLAZZ_NAME("teachClazzName","教学班", true, true),
-    CLAZZ_NAME("clazzName","行政班", false, false),
-    TEACHER_NAME("teacherName","任课老师", false, false);
+    CLAZZ_NAME("clazzName","行政班", true, false),
+    TEACHER_NAME("teacherName","任课老师", true, false),
+    TEACHER_CODE("teacherCode","任课老师工号", true, false),
+    TEACHER_ROOM_NAME("teacherRoomName","开课学院", true, false);
 
     private final String code;
     private final String name;

+ 3 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamDetailMapper.java

@@ -48,7 +48,7 @@ public interface ExamDetailMapper extends BaseMapper<ExamDetail> {
                                            @Param("semesterId") Long semesterId,
                                            @Param("examId") Long examId,
                                            @Param("printPlanIdList") List<Long> printPlanIdList,
-                                           @Param("courseCode") String courseCode,
+                                           @Param("courseId") Long courseId,
                                            @Param("paperNumber") String paperNumber,
                                            @Param("examPlace") String examPlace,
                                            @Param("examRoom") String examRoom,
@@ -62,7 +62,7 @@ public interface ExamDetailMapper extends BaseMapper<ExamDetail> {
                                                   @Param("semesterId") Long semesterId,
                                                   @Param("examId") Long examId,
                                                   @Param("printPlanIdList") List<Long> printPlanIdList,
-                                                  @Param("courseCode") String courseCode,
+                                                  @Param("courseId") Long courseId,
                                                   @Param("paperNumber") String paperNumber,
                                                   @Param("examPlace") String examPlace,
                                                   @Param("examRoom") String examRoom,
@@ -118,7 +118,7 @@ public interface ExamDetailMapper extends BaseMapper<ExamDetail> {
      */
     List<ExamDetailPdfDownloadDto> findPdfDownload(@Param("ids") List<Long> ids);
 
-    SummarizedDataResult findSummarizedData(@Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("printPlanIdList") List<Long> printPlanIdList, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("examPlace") String examPlace, @Param("examRoom") String examRoom, @Param("packageCode") String packageCode, @Param("startDate") Long startDate, @Param("endDate") Long endDate, @Param("dpr") DataPermissionRule dpr);
+    SummarizedDataResult findSummarizedData(@Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("printPlanIdList") List<Long> printPlanIdList, @Param("courseId") Long courseId, @Param("paperNumber") String paperNumber, @Param("examPlace") String examPlace, @Param("examRoom") String examRoom, @Param("packageCode") String packageCode, @Param("startDate") Long startDate, @Param("endDate") Long endDate, @Param("dpr") DataPermissionRule dpr);
 
     List<ExamDetailCourseDto> listByExamIdAndCourseCode(@Param("schoolId") Long schoolId, @Param("examId") Long examId, @Param("courseCode") String courseCode);
 

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamTaskDetailMapper.java

@@ -22,7 +22,7 @@ import java.util.List;
 public interface ExamTaskDetailMapper extends BaseMapper<ExamTaskDetail> {
     IPage<ExamTaskDetailDto> listPage(Page<ExamTaskDetailDto> page, @Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("relateType") String relateType, @Param("printPlanIdList") List<Long> printPlanIdList, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("userName") String userName, @Param("cardRuleId") Long cardRuleId, @Param("dpr") DataPermissionRule dpr);
 
-    List<ExamTaskDetailDto> listPage(@Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("relateType") String relateType, @Param("printPlanIdList") List<Long> printPlanIdList, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("userName") String userName, @Param("cardRuleId") Long cardRuleId, @Param("dpr") DataPermissionRule dpr);
+    List<ExamTaskDetailDto> listPage(@Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("relateType") String relateType, @Param("printPlanIdList") List<Long> printPlanIdList, @Param("courseId") Long courseId, @Param("paperNumber") String paperNumber, @Param("userName") String userName, @Param("dpr") DataPermissionRule dpr);
 
     List<String> listExamDetailCourse(@Param("schoolId") Long schoolId, @Param("paperType") String paperType, @Param("printPlanId") Long printPlanId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber);
 

+ 0 - 5
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamDetailCourseService.java

@@ -43,9 +43,4 @@ public interface ExamDetailCourseService extends IService<ExamDetailCourse> {
 
     List<JSONObject> listExamDetailPaperNumber(Long examDetailId);
 
-    boolean addExamStudent(SingleExamStudentAddParam singleExamStudentAddParam);
-
-	List<ExamDetailCourse> listByExamDetailIds(List<Long> edIds);
-
-    boolean deleteExamStudent(Long id);
 }

+ 3 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamDetailService.java

@@ -92,7 +92,7 @@ public interface ExamDetailService extends IService<ExamDetail> {
      * @param dpr             权限控制参数
      * @return 查询结果
      */
-    IPage<ExaminationResult> findExaminationBriefPage(Long schoolId, Long semesterId, Long examId, List<Long> printPlanIdList, String courseCode, String paperNumber,
+    IPage<ExaminationResult> findExaminationBriefPage(Long schoolId, Long semesterId, Long examId, List<Long> printPlanIdList, Long courseId, String paperNumber,
                                                       String examPlace, String examRoom, String packageCode, Long startDate, Long endDate, int pageNumber, int pageSize, DataPermissionRule dpr);
 
     /**
@@ -112,7 +112,7 @@ public interface ExamDetailService extends IService<ExamDetail> {
      * @param dpr             权限控制参数
      * @return 查询结果
      */
-    SummarizedDataResult findSummarizedData(Long schoolId, Long semesterId, Long examId, List<Long> printPlanIdList, String courseCode, String paperNumber,
+    SummarizedDataResult findSummarizedData(Long schoolId, Long semesterId, Long examId, List<Long> printPlanIdList, Long courseId, String paperNumber,
                                             String examPlace, String examRoom, String packageCode, Long startDate, Long endDate, DataPermissionRule dpr);
 
 
@@ -134,7 +134,7 @@ public interface ExamDetailService extends IService<ExamDetail> {
      * @param pageSize        分页数量
      * @return 查询结果
      */
-    IPage<ExaminationDetailResult> findExaminationDetail(Long schoolId, Long semesterId, Long examId, List<Long> printPlanIdList, String courseCode, String paperNumber, String examPlace,
+    IPage<ExaminationDetailResult> findExaminationDetail(Long schoolId, Long semesterId, Long examId, List<Long> printPlanIdList, Long courseId, String paperNumber, String examPlace,
                                                          String examRoom, String studentParams, Long startDate, Long endDate, int pageNumber, int pageSize);
 
     IPage<ExaminationDetailResult> findExaminationDetail(Long convertIdToLong, String param, int pageNumber, int pageSize);

+ 3 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamTaskDetailService.java

@@ -25,9 +25,9 @@ public interface ExamTaskDetailService extends IService<ExamTaskDetail> {
 
     boolean updatePaper(RelatePaperParam paperParam) throws IOException;
 
-    List<ExamTaskDetailDto> list(Long semesterId, Long examId, String relateType, List<Long> printPlanId, String courseCode, String paperNumber, String userName, Long cardRuleId);
+    List<ExamTaskDetailDto> list(Long semesterId, Long examId, String relateType, List<Long> printPlanId, Long courseId, String paperNumber, String userName);
 
-    Map listTotal(Long semesterId, Long examId, String relateType, List<Long> printPlanId, String courseCode, String paperNumber, String userName, Long cardRuleId);
+    Map listTotal(Long semesterId, Long examId, String relateType, List<Long> printPlanId, Long courseId, String paperNumber, String userName);
 
     void resetCardId(Long id);
 
@@ -60,7 +60,7 @@ public interface ExamTaskDetailService extends IService<ExamTaskDetail> {
      */
     ExamTaskDetailPdfDownloadDto findPdfDownload(Long examTaskId);
 
-    List<String> listRelateCommonTypes(Long semesterId, Long examId, String relateType, List<Long> idList, String courseCode, String paperNumber, String userName, Long cardRuleId);
+    List<String> listRelateCommonTypes(Long semesterId, Long examId, String relateType, List<Long> idList, Long courseId, String paperNumber, String userName);
 
     ExamTaskDetail findByExamIdAndCourseCodeAndPaperNumber(Long examId, String code, String number);
 

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

@@ -61,8 +61,6 @@ public interface ExamTaskService extends IService<ExamTask> {
 
     IPage<ExamTaskDto> listTaskReviewAudited(Long semesterId, Long examId, Long courseId, String paperNumber, Long userId, Long startTime, Long endTime, Long startCreateTime, Long endCreateTime, Integer pageNumber, Integer pageSize);
 
-    boolean taskReviewSave(ExamTaskReviewLog taskReviewLog) throws IOException;
-
     IPage<ExamTaskDetailDto> listTaskPaper(Long semesterId, Long examId, Long courseId, String paperNumber, Long startTime, Long endTime, Integer pageNumber, Integer pageSize);
 
     List<RelatePaperDto> listPaperTypes(Long examTaskId, Long printPlanId, String courseCode);

+ 6 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TeachCourseService.java

@@ -3,11 +3,13 @@ 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.params.TeachCourseSelectParam;
+import com.qmth.distributed.print.business.bean.result.CourseResult;
 import com.qmth.distributed.print.business.bean.result.CourseWeightSettingStatusResult;
 import com.qmth.distributed.print.business.bean.result.DictionaryResult;
 import com.qmth.distributed.print.business.bean.result.TeachCourseResult;
 import com.qmth.distributed.print.business.entity.TeachCourse;
 import com.qmth.distributed.print.business.enums.CourseSettingTypeEnum;
+import com.qmth.teachcloud.common.entity.BasicCourse;
 import com.qmth.teachcloud.common.entity.SysUser;
 
 import java.util.List;
@@ -85,4 +87,8 @@ public interface TeachCourseService extends IService<TeachCourse> {
      * @return 课程集合
      */
     List<DictionaryResult> findTeacherCourseInfo(Long userId);
+
+    CourseResult listUserCourse(String param, Long teachingRoomId);
+
+    List<BasicCourse> listByUserId(Long userId);
 }

+ 0 - 92
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamDetailCourseServiceImpl.java

@@ -132,96 +132,4 @@ public class ExamDetailCourseServiceImpl extends ServiceImpl<ExamDetailCourseMap
         }
         return jsonObjectList;
     }
-
-    @Transactional
-    @Override
-    public boolean addExamStudent(SingleExamStudentAddParam singleExamStudentAddParam) {
-        ExamDetailCourse examDetailCourse = this.getById(singleExamStudentAddParam.getExamDetailCourseId());
-        if (examDetailCourse == null) {
-            throw ExceptionResultEnum.ERROR.exception("考场科目数据不存在");
-        }
-        ExamDetail examDetail = examDetailService.getById(examDetailCourse.getExamDetailId());
-        if (examDetail == null) {
-            throw ExceptionResultEnum.ERROR.exception("考场数据不存在");
-        }
-        // 打印完成,才可以新增
-        if (!ExamDetailStatusEnum.FINISH.equals(examDetail.getStatus())) {
-            throw ExceptionResultEnum.ERROR.exception("考场还未印刷,不能新增考生");
-        }
-
-        int count = examStudentService.countByExamDetailCourseIdAndStudentCode(examDetailCourse.getId(), singleExamStudentAddParam.getStudentCode());
-        if (count > 0) {
-            throw ExceptionResultEnum.ERROR.exception("考号在本考场已存在");
-        }
-        ExamTask examTask = examTaskService.getByExamIdAndCourseCodeAndPaperNumber(examDetail.getExamId(), examDetailCourse.getCourseCode(), examDetailCourse.getPaperNumber());
-        if(examTask == null){
-            throw ExceptionResultEnum.ERROR.exception("命题任务不存在");
-        }
-        MarkPaper markPaper = markPaperService.getByExamIdAndPaperNumber(examDetail.getExamId(), examDetailCourse.getPaperNumber());
-        if (markPaper != null && MarkPaperStatus.FINISH.equals(markPaper.getStatus())) {
-            throw ExceptionResultEnum.ERROR.exception("已结束阅卷,不能新增考生");
-        }
-
-        // 保存exam_student
-        Long id = SystemConstant.getDbUuid();
-        ExamStudent examStudent = new ExamStudent();
-        examStudent.setId(id);
-        examStudent.setSchoolId(examDetail.getSchoolId());
-        examStudent.setExamDetailCourseId(examDetailCourse.getId());
-        examStudent.setStudentCode(singleExamStudentAddParam.getStudentCode());
-        examStudent.setStudentName(singleExamStudentAddParam.getStudentName());
-        examStudent.setExamId(examDetail.getExamId());
-        examStudent.setPaperNumber(examDetailCourse.getPaperNumber());
-        examStudent.setCoursePaperId(examDetailCourse.getCoursePaperId());
-        examStudent.setPaperType(singleExamStudentAddParam.getPaperType());
-        examStudent.setCollegeName(singleExamStudentAddParam.getCollege());
-        examStudent.setMajorName(singleExamStudentAddParam.getMajorName());
-        examStudent.setClazzName(singleExamStudentAddParam.getClassName());
-        examStudent.setCanDelete(true);
-        examStudentService.save(examStudent);
-
-        // 保存mark_student
-        MarkStudent markStudent = new MarkStudent(id, examDetail.getExamId(), examDetailCourse.getCourseId(),
-                examDetailCourse.getPaperNumber(),
-                examDetailCourse.getCoursePaperId(), singleExamStudentAddParam.getPaperType(),
-                singleExamStudentAddParam.getStudentCode(), singleExamStudentAddParam.getStudentName(),
-                examDetail.getPackageCode(), examDetail.getExamPlace(), examDetail.getExamRoom(),
-                singleExamStudentAddParam.getCollege(), singleExamStudentAddParam.getMajorName(), singleExamStudentAddParam.getClassName(),
-                null, null, examDetail.getExamStartTime(), examDetail.getExamEndTime(), examTask.getUserId());
-        if (markStudent.getSecretNumber() == null) {
-            markStudent.randomSecretNumber();
-            while (markStudentService.countByExamIdAndSecretNumber(markStudent.getExamId(), markStudent.getSecretNumber()) > 0) {
-                markStudent.randomSecretNumber();
-            }
-        }
-        markStudentService.save(markStudent);
-        markPaperService.updateStudentCountByExamIdAndPaperNumberAndPaperType(markPaper.getExamId(), markPaper.getPaperNumber(), markPaper.getPaperType());
-
-        return true;
-    }
-
-    @Override
-    public List<ExamDetailCourse> listByExamDetailIds(List<Long> edIds) {
-        QueryWrapper<ExamDetailCourse> wrapper = new QueryWrapper<>();
-        LambdaQueryWrapper<ExamDetailCourse> lw = wrapper.lambda();
-        lw.in(ExamDetailCourse::getExamDetailId, edIds);
-        return this.list(wrapper);
-    }
-
-    @Transactional
-    @Override
-    public boolean deleteExamStudent(Long id) {
-        ExamStudent examStudent = examStudentService.getById(id);
-        if (examStudent == null || !examStudent.getCanDelete()) {
-            throw ExceptionResultEnum.ERROR.exception("考生不能删除");
-        }
-        MarkStudent markStudent = markStudentService.getById(id);
-        if (markStudent.getUpload() != null && markStudent.getUpload()) {
-            throw ExceptionResultEnum.ERROR.exception("考生题卡已扫描,不能删除");
-        }
-        examStudentService.removeById(id);
-        markStudentService.removeById(id);
-        markPaperService.updateStudentCountByExamIdAndPaperNumberAndPaperType(markStudent.getExamId(), markStudent.getPaperNumber(), markStudent.getPaperType());
-        return true;
-    }
 }

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

@@ -362,8 +362,8 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
 
     @Transactional(rollbackFor = Exception.class)
     @Override
-    public IPage<ExaminationResult> findExaminationBriefPage(Long schoolId, Long semesterId, Long examId, List<Long> printPlanIdList, String courseCode, String paperNumber, String examPlace, String examRoom, String packageCode, Long startDate, Long endDate, int pageNumber, int pageSize, DataPermissionRule dpr) {
-        IPage<ExaminationResult> page = examDetailMapper.findBriefPage(new Page<>(pageNumber, pageSize), schoolId, semesterId, examId, printPlanIdList, courseCode, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, dpr);
+    public IPage<ExaminationResult> findExaminationBriefPage(Long schoolId, Long semesterId, Long examId, List<Long> printPlanIdList, Long courseId, String paperNumber, String examPlace, String examRoom, String packageCode, Long startDate, Long endDate, int pageNumber, int pageSize, DataPermissionRule dpr) {
+        IPage<ExaminationResult> page = examDetailMapper.findBriefPage(new Page<>(pageNumber, pageSize), schoolId, semesterId, examId, printPlanIdList, courseId, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, dpr);
         List<ExaminationResult> list = page.getRecords();
         for (ExaminationResult examinationResult : list) {
             // 处理时间
@@ -405,8 +405,8 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
 
     @Transactional(rollbackFor = Exception.class)
     @Override
-    public SummarizedDataResult findSummarizedData(Long schoolId, Long semesterId, Long examId, List<Long> printPlanIdList, String courseCode, String paperNumber, String examPlace, String examRoom, String packageCode, Long startDate, Long endDate, DataPermissionRule dpr) {
-        SummarizedDataResult summarizedDataResult = this.baseMapper.findSummarizedData(schoolId, semesterId, examId, printPlanIdList, courseCode, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, dpr);
+    public SummarizedDataResult findSummarizedData(Long schoolId, Long semesterId, Long examId, List<Long> printPlanIdList, Long courseId, String paperNumber, String examPlace, String examRoom, String packageCode, Long startDate, Long endDate, DataPermissionRule dpr) {
+        SummarizedDataResult summarizedDataResult = this.baseMapper.findSummarizedData(schoolId, semesterId, examId, printPlanIdList, courseId, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, dpr);
         if (summarizedDataResult == null) {
             summarizedDataResult = new SummarizedDataResult();
             summarizedDataResult.setSchoolId(schoolId);
@@ -419,9 +419,9 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
 
     @Transactional(rollbackFor = Exception.class)
     @Override
-    public IPage<ExaminationDetailResult> findExaminationDetail(Long schoolId, Long semesterId, Long examId, List<Long> printPlanIdList, String courseCode, String paperNumber, String examPlace, String examRoom, String studentParams, Long startDate, Long endDate, int pageNumber, int pageSize) {
+    public IPage<ExaminationDetailResult> findExaminationDetail(Long schoolId, Long semesterId, Long examId, List<Long> printPlanIdList, Long courseId, String paperNumber, String examPlace, String examRoom, String studentParams, Long startDate, Long endDate, int pageNumber, int pageSize) {
         DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission();
-        return examDetailMapper.findDetailPage(new Page<>(pageNumber, pageSize), schoolId, semesterId, examId, printPlanIdList, courseCode, paperNumber, examPlace, examRoom, SystemConstant.translateSpecificSign(studentParams), startDate, endDate, dpr);
+        return examDetailMapper.findDetailPage(new Page<>(pageNumber, pageSize), schoolId, semesterId, examId, printPlanIdList, courseId, paperNumber, examPlace, examRoom, SystemConstant.translateSpecificSign(studentParams), startDate, endDate, dpr);
     }
 
     @Transactional(rollbackFor = Exception.class)
@@ -804,9 +804,9 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
         if (map.get("printPlanIdList") != null) {
             printPlanIdList = JSON.parseArray(map.get("printPlanIdList").toString(), Long.class);
         }
-        String courseCode = null;
-        if (map.get("courseCode") != null) {
-            courseCode = String.valueOf(map.get("courseCode"));
+        Long courseId = null;
+        if (map.get("courseId") != null) {
+            courseId = Long.valueOf(String.valueOf(map.get("courseId")));
         }
         String paperNumber = null;
         if (map.get("paperNumber") != null) {
@@ -840,7 +840,7 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
         Long schoolId = tbTask.getSchoolId();
 
         List<ExaminationResult> examinationResultList = this.findExaminationBriefPage(schoolId, semesterId, examId,
-                printPlanIdList, courseCode, paperNumber, examPlace, examRoom, packageCode, startDate, endDate,
+                printPlanIdList, courseId, paperNumber, examPlace, examRoom, packageCode, startDate, endDate,
                 SystemConstant.PAGE_NUMBER, SystemConstant.PAGE_SIZE, dpr).getRecords();
         int index = 0;
         List<ExaminationExportDto> examinationExportDtoList = new ArrayList<>();

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

@@ -205,12 +205,12 @@ public class ExamTaskDetailServiceImpl extends ServiceImpl<ExamTaskDetailMapper,
     }
 
     @Override
-    public List<ExamTaskDetailDto> list(Long semesterId, Long examId, String relateType, List<Long> printPlanIdList, String courseCode, String paperNumber, String userName, Long cardRuleId) {
+    public List<ExamTaskDetailDto> list(Long semesterId, Long examId, String relateType, List<Long> printPlanIdList, Long courseId, String paperNumber, String userName) {
         userName = SystemConstant.translateSpecificSign(userName);
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
         DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(schoolId, requestUser.getId(), ServletUtil.getRequest().getServletPath());
-        List<ExamTaskDetailDto> examDetailDtoIPage = this.baseMapper.listPage(schoolId, semesterId, examId, relateType, printPlanIdList, courseCode, paperNumber, userName, cardRuleId, dpr);
+        List<ExamTaskDetailDto> examDetailDtoIPage = this.baseMapper.listPage(schoolId, semesterId, examId, relateType, printPlanIdList, courseId, paperNumber, userName, dpr);
         examDetailDtoIPage.stream().map(m -> {
             String paperType = StringUtils.isBlank(m.getRelatePaperType()) ? null : m.getRelatePaperType();
             Long printPlanIdT = Long.valueOf(m.getPrintPlanId());
@@ -224,12 +224,12 @@ public class ExamTaskDetailServiceImpl extends ServiceImpl<ExamTaskDetailMapper,
     }
 
     @Override
-    public Map listTotal(Long semesterId, Long examId, String relateType, List<Long> printPlanIdList, String courseCode, String paperNumber, String userName, Long cardRuleId) {
+    public Map listTotal(Long semesterId, Long examId, String relateType, List<Long> printPlanIdList, Long courseId, String paperNumber, String userName) {
         userName = SystemConstant.translateSpecificSign(userName);
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
         DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(schoolId, requestUser.getId(), ServletUtil.getRequest().getServletPath());
-        List<ExamTaskDetailDto> examDetailDtoList = this.baseMapper.listPage(schoolId, semesterId, examId, relateType, printPlanIdList, courseCode, paperNumber, userName, cardRuleId, dpr);
+        List<ExamTaskDetailDto> examDetailDtoList = this.baseMapper.listPage(schoolId, semesterId, examId, relateType, printPlanIdList, courseId, paperNumber, userName, dpr);
         Map<String, Object> map = new HashMap<>();
         // 课程数量
         long courseCodeCount = examDetailDtoList.stream().map(m -> m.getCourseCode()).distinct().count();
@@ -543,12 +543,12 @@ public class ExamTaskDetailServiceImpl extends ServiceImpl<ExamTaskDetailMapper,
     }
 
     @Override
-    public List<String> listRelateCommonTypes(Long semesterId, Long examId, String relateType, List<Long> idList, String courseCode, String paperNumber, String userName, Long cardRuleId) {
+    public List<String> listRelateCommonTypes(Long semesterId, Long examId, String relateType, List<Long> idList, Long courseId, String paperNumber, String userName) {
         userName = SystemConstant.translateSpecificSign(userName);
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
         DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(schoolId, requestUser.getId(), ServletUtil.getRequest().getServletPath());
-        List<ExamTaskDetailDto> examDetailDtoList = this.baseMapper.listPage(schoolId, semesterId, examId, relateType, idList, courseCode, paperNumber, userName, cardRuleId, dpr);
+        List<ExamTaskDetailDto> examDetailDtoList = this.baseMapper.listPage(schoolId, semesterId, examId, relateType, idList, courseId, paperNumber, userName, dpr);
         List<String> commonPaperTypes = new ArrayList<>();
         if (!examDetailDtoList.isEmpty()) {
             // 所有未曝光类型不为空的数据

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

@@ -687,28 +687,6 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
         return this.baseMapper.listTaskReviewAudited(new Page<>(pageNumber, pageSize), schoolId, semesterId, examId, courseId, paperNumber, userId, startTime, endTime, orgIds, startCreateTime, endCreateTime, sysUser.getId());
     }
 
-    @Transactional
-    @Override
-    public boolean taskReviewSave(ExamTaskReviewLog taskReviewLog) {
-        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-
-        // 校验状态,可能被撤回
-        ExamTask examTask = this.getById(taskReviewLog.getExamTaskId());
-
-        taskReviewLog.setOperateId(sysUser.getId());
-        taskReviewLog.setOperateTime(System.currentTimeMillis());
-        // 审核日志
-        examTaskReviewLogService.save(taskReviewLog);
-
-        ExamTaskPaperLog examTaskPaperLog = examTaskPaperLogService.getByExamTaskIdAndReview(taskReviewLog.getExamTaskId(), false);
-        if (examTaskPaperLog == null) {
-            if (!ExamStatusEnum.SUBMIT.equals(examTask.getStatus())) {
-                throw ExceptionResultEnum.ERROR.exception("当前状态不能审核");
-            }
-        }
-        return true;
-    }
-
     @Override
     public IPage<ExamTaskDetailDto> listTaskPaper(Long semesterId, Long examId, Long courseId, String paperNumber, Long startTime, Long endTime, Integer pageNumber, Integer pageSize) {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();

+ 37 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TeachCourseServiceImpl.java

@@ -6,6 +6,7 @@ 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.params.TeachCourseSelectParam;
+import com.qmth.distributed.print.business.bean.result.CourseResult;
 import com.qmth.distributed.print.business.bean.result.CourseWeightSettingStatusResult;
 import com.qmth.distributed.print.business.bean.result.DictionaryResult;
 import com.qmth.distributed.print.business.bean.result.TeachCourseResult;
@@ -16,14 +17,14 @@ import com.qmth.distributed.print.business.service.*;
 import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.BasicCourse;
+import com.qmth.teachcloud.common.entity.SysOrg;
 import com.qmth.teachcloud.common.entity.SysUser;
 import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
-import com.qmth.teachcloud.common.service.BasicCourseService;
-import com.qmth.teachcloud.common.service.BasicRoleDataPermissionService;
-import com.qmth.teachcloud.common.service.SysOrgService;
-import com.qmth.teachcloud.common.service.SysUserService;
+import com.qmth.teachcloud.common.enums.OrgTypeEnum;
+import com.qmth.teachcloud.common.service.*;
 import com.qmth.teachcloud.common.util.ServletUtil;
 import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -64,6 +65,8 @@ public class TeachCourseServiceImpl extends ServiceImpl<TeachCourseMapper, Teach
     private TeachStudentService teachStudentService;
     @Resource
     private BasicRoleDataPermissionService basicRoleDataPermissionService;
+    @Resource
+    private TeachcloudCommonService teachcloudCommonService;
 
     @Override
     public IPage<TeachCourseResult> teachCoursePage(Long examId, String courseName, int pageNumber, int pageSize) {
@@ -256,4 +259,34 @@ public class TeachCourseServiceImpl extends ServiceImpl<TeachCourseMapper, Teach
             return Stream.of(dictionaryResult);
         }).collect(Collectors.toList());
     }
+
+    @Override
+    public CourseResult listUserCourse(String param, Long teachingRoomId) {
+        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+        CourseResult courseResult = new CourseResult();
+        // 教学课程
+        List<BasicCourse> teachCourseList = this.listByUserId(sysUser.getId());
+        courseResult.setTeachCourseList(teachCourseList);
+
+        Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(teachingRoomId);
+        QueryWrapper<BasicCourse> queryWrapper = new QueryWrapper<>();
+        queryWrapper.lambda().in(BasicCourse::getTeachingRoomId, orgIds).eq(BasicCourse::getEnable, true);
+        if (StringUtils.isNotBlank(param)) {
+            queryWrapper.lambda().and(i -> i.like(BasicCourse::getCode, SystemConstant.translateSpecificSign(param))
+                    .or().like(BasicCourse::getName, SystemConstant.translateSpecificSign(param)));
+        }
+        List<BasicCourse> basicCourseList = basicCourseService.list(queryWrapper);
+        courseResult.setBasicCourseList(basicCourseList);
+
+        return courseResult;
+    }
+
+    @Override
+    public List<BasicCourse> listByUserId(Long userId) {
+        QueryWrapper<TeachCourse> queryWrapper = new QueryWrapper<>();
+        queryWrapper.lambda().eq(TeachCourse::getUserId, userId);
+        List<TeachCourse> list = this.list(queryWrapper);
+        List<BasicCourse> basicCourseList = list.stream().map(m -> basicCourseService.getById(m.getCourseId())).collect(Collectors.toList());
+        return basicCourseList;
+    }
 }

+ 0 - 64
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncTaskReviewSampleExportService.java

@@ -1,64 +0,0 @@
-package com.qmth.distributed.print.business.templete.execute;
-
-import cn.hutool.core.date.DateUtil;
-import com.qmth.boot.api.exception.ApiException;
-import com.qmth.distributed.print.business.templete.export.AsyncExportTaskTemplete;
-import com.qmth.distributed.print.business.templete.service.TaskLogicService;
-import com.qmth.teachcloud.common.contant.SpringContextHolder;
-import com.qmth.teachcloud.common.contant.SystemConstant;
-import com.qmth.teachcloud.common.entity.TBTask;
-import com.qmth.teachcloud.common.enums.TaskResultEnum;
-import com.qmth.teachcloud.common.enums.TaskStatusEnum;
-import com.qmth.teachcloud.common.service.TBTaskService;
-import com.qmth.teachcloud.common.util.Result;
-import com.qmth.teachcloud.common.util.ResultUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-
-import java.text.MessageFormat;
-import java.util.Date;
-import java.util.Map;
-import java.util.StringJoiner;
-
-/**
- * @Description: 异步任务-命题任务审核样本导出
- * @Author: CaoZixuan
- * @Date: 2021-04-19
- */
-@Service
-public class AsyncTaskReviewSampleExportService extends AsyncExportTaskTemplete {
-
-    public static final String OBJ_TITLE = "审核样本导出";
-    private final static Logger log = LoggerFactory.getLogger(AsyncTaskReviewSampleExportService.class);
-
-    @Override
-    public Result exportTask(Map<String, Object> map) throws Exception {
-        TBTask tbTask = (TBTask) map.get(SystemConstant.TASK);
-
-        StringJoiner stringJoinerSummary = new StringJoiner("\n")
-                .add(MessageFormat.format("{0}{1}{2}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), BEGIN_TITLE, OBJ_TITLE));
-        tbTask.setStatus(TaskStatusEnum.RUNNING);
-        TBTaskService tbTaskService = SpringContextHolder.getBean(TBTaskService.class);
-        tbTaskService.updateById(tbTask);
-        try {
-            TaskLogicService taskLogicService = SpringContextHolder.getBean(TaskLogicService.class);
-            Map<String, Object> result = taskLogicService.executeExportSampleLogic(map);
-            stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), FINISH_TITLE, Long.valueOf(String.valueOf(result.get("count"))), FINISH_SIZE));
-            tbTask.setResult(TaskResultEnum.SUCCESS);
-        } catch (Exception e) {
-            log.error(SystemConstant.LOG_ERROR, e);
-            stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
-            tbTask.setResult(TaskResultEnum.ERROR);
-            if (e instanceof ApiException) {
-                ResultUtil.error((ApiException) e, ((ApiException) e).getCode(), e.getMessage());
-            } else {
-                ResultUtil.error(e.getMessage());
-            }
-        } finally {//生成txt文件
-            tbTask.setSummary(stringJoinerSummary.toString());
-            super.createTxt(tbTask);
-        }
-        return ResultUtil.ok();
-    }
-}

+ 0 - 9
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/TaskLogicService.java

@@ -33,15 +33,6 @@ public interface TaskLogicService {
      * @throws IOException
      */
     Map<String, Object> executeDownloadPdfLogic(Map<String, Object> map) throws Exception;
-
-    /**
-     * 处理导出命题任务审核文件
-     *
-     * @param map
-     * @return
-     */
-    Map<String, Object> executeExportSampleLogic(Map<String, Object> map) throws Exception;
-
     /**
      * 导出试卷、题卡pdf
      *

+ 12 - 151
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/TaskLogicServiceImpl.java

@@ -4,11 +4,9 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.google.common.collect.Lists;
 import com.google.common.reflect.TypeToken;
 import com.google.gson.Gson;
-import com.itextpdf.text.DocumentException;
 import com.qmth.boot.api.exception.ApiException;
 import com.qmth.distributed.print.business.bean.dto.*;
 import com.qmth.distributed.print.business.bean.examRule.CodeNameEnableValue;
@@ -18,7 +16,10 @@ import com.qmth.distributed.print.business.bean.params.DownloadPaperFileParam;
 import com.qmth.distributed.print.business.bean.result.DictionaryResult;
 import com.qmth.distributed.print.business.bean.result.TSyncExamStudentScoreResult;
 import com.qmth.distributed.print.business.entity.*;
-import com.qmth.distributed.print.business.enums.*;
+import com.qmth.distributed.print.business.enums.ImageTrajectoryEnum;
+import com.qmth.distributed.print.business.enums.PaperFileDownloadContentEnum;
+import com.qmth.distributed.print.business.enums.PaperFileDownloadExposureStatusEnum;
+import com.qmth.distributed.print.business.enums.PrintPlanStatusEnum;
 import com.qmth.distributed.print.business.service.*;
 import com.qmth.distributed.print.business.templete.service.TaskLogicService;
 import com.qmth.distributed.print.business.util.CreatePdfUtil;
@@ -26,11 +27,13 @@ import com.qmth.distributed.print.business.util.pdf.CreatePdfNewUtil;
 import com.qmth.teachcloud.common.annotation.ExcelDBFieldDesc;
 import com.qmth.teachcloud.common.base.BaseEntity;
 import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
-import com.qmth.teachcloud.common.bean.dto.excel.*;
+import com.qmth.teachcloud.common.bean.dto.excel.BasicStudentImportDto;
+import com.qmth.teachcloud.common.bean.dto.excel.DescribeImportDto;
+import com.qmth.teachcloud.common.bean.dto.excel.StatisticsImportDto;
+import com.qmth.teachcloud.common.bean.dto.excel.SysUserImportDto;
 import com.qmth.teachcloud.common.bean.dto.excel.export.BasicStudentErrorExportDto;
 import com.qmth.teachcloud.common.bean.dto.excel.export.SysUserErrorExportDto;
 import com.qmth.teachcloud.common.bean.dto.mark.MarkUser;
-import com.qmth.teachcloud.common.bean.dto.mark.PictureConfig;
 import com.qmth.teachcloud.common.bean.params.ArraysParams;
 import com.qmth.teachcloud.common.bean.params.UserSaveParams;
 import com.qmth.teachcloud.common.bean.result.ExcelResult;
@@ -46,8 +49,6 @@ import com.qmth.teachcloud.common.util.excel.ExcelError;
 import com.qmth.teachcloud.mark.dto.mark.setting.MarkGroupDto;
 import com.qmth.teachcloud.mark.dto.mark.setting.MarkGroupSingleDto;
 import com.qmth.teachcloud.mark.entity.MarkPaper;
-import com.qmth.teachcloud.mark.enums.ScorePolicy;
-import com.qmth.teachcloud.mark.params.MarkQuestionParams;
 import com.qmth.teachcloud.mark.service.MarkGroupService;
 import com.qmth.teachcloud.mark.service.MarkPaperService;
 import com.qmth.teachcloud.mark.service.MarkQuestionService;
@@ -66,7 +67,6 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.dao.DuplicateKeyException;
 import org.springframework.stereotype.Service;
@@ -75,7 +75,10 @@ import org.springframework.util.FileCopyUtils;
 import org.springframework.util.LinkedMultiValueMap;
 
 import javax.annotation.Resource;
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.InputStream;
 import java.lang.reflect.Field;
 import java.nio.charset.StandardCharsets;
 import java.util.*;
@@ -620,148 +623,6 @@ public class TaskLogicServiceImpl implements TaskLogicService {
         }
         return map;
     }
-
-    @Override
-    @Transactional
-    public Map<String, Object> executeExportSampleLogic(Map<String, Object> map) throws Exception {
-        File zipFile = null;
-        String zipLocalRootPath = null;
-        try {
-            TBTask tbTask = (TBTask) map.get(SystemConstant.TASK);
-            Long time = System.currentTimeMillis();
-            boolean oss = dictionaryConfig.sysDomain().isOss();
-            StringJoiner stringJoiner = new StringJoiner("");
-            if (!oss && Objects.nonNull(dictionaryConfig.fssPublicDomain()) && !StringUtils.isBlank(dictionaryConfig.fssPublicDomain().getConfig()) && !dictionaryConfig.fssPublicDomain().getConfig().startsWith(SystemConstant.START_PARENT)) {
-                stringJoiner.add(dictionaryConfig.fssPublicDomain().getConfig()).add(File.separator);
-            }
-            stringJoiner = SystemConstant.getDirName(stringJoiner, UploadFileEnum.FILE, true);
-            stringJoiner.add("导出审核样本_" + time).add(SystemConstant.ZIP_PREFIX);
-
-            String zipDirName = FileUtil.replaceSplit(stringJoiner.toString());
-            zipFile = SystemConstant.getFileTempDirVar(SystemConstant.ZIP_PREFIX);
-            zipLocalRootPath = zipFile.getParent() + File.separator + time;
-
-            // 跟文件路径
-            Long[] ids = (Long[]) map.get("ids");
-            int count = 0;
-            for (Long id : ids) {
-                ExamTask examTask = examTaskService.getById(id);
-                if (Objects.isNull(examTask)) {
-                    throw ExceptionResultEnum.ERROR.exception(String.format("课程[%s(%s)],试卷编号[%s]的命题任务不存在", examTask.getCourseName(), examTask.getCourseCode(), examTask.getPaperNumber()));
-                }
-                String examTaskSign = examTask.getCourseName() + SystemConstant.HYPHEN + examTask.getPaperNumber();
-                String firstPath = zipLocalRootPath + File.separator + examTaskSign;
-                ExamTaskDetail examTaskDetail = examTaskDetailService.getByExamTaskId(id);
-                if (examTaskDetail == null) {
-                    throw ExceptionResultEnum.ERROR.exception(String.format("课程[%s(%s)],试卷编号[%s]的" + ExceptionResultEnum.EXAM_TASK_NOT_SUBMIT.getMessage(), examTask.getCourseName(), examTask.getCourseCode(), examTask.getPaperNumber()));
-                }
-
-                // 收集处理试卷和题卡
-                List<PaperInfoVo> paperInfoVos = ExamTaskUtil.parsePaperAttachmentPath(examTaskDetail.getPaperAttachmentIds());
-                if (CollectionUtils.isEmpty(paperInfoVos)) {
-                    throw ExceptionResultEnum.ERROR.exception(String.format("课程[%s(%s)],试卷编号[%s]的命题任务未上传试卷或题卡", examTask.getCourseName(), examTask.getCourseCode(), examTask.getPaperNumber()));
-                }
-
-                for (PaperInfoVo paperInfoVo : paperInfoVos) {
-                    // 下载试卷
-                    Long attachmentId = Long.valueOf(paperInfoVo.getAttachmentId());
-                    if (Objects.nonNull(attachmentId)) {
-                        BasicAttachment paperAttachment = basicAttachmentService.getById(attachmentId);
-                        JSONObject jsonObject = JSONObject.parseObject(paperAttachment.getPath());
-                        UploadFileEnum uploadFileEnum = UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
-                        String paperPath = firstPath + File.separator + "试卷" + File.separator + paperInfoVo.getName() + "-" + paperAttachment.getName() + paperAttachment.getType();
-                        if (oss || (!oss && dictionaryConfig.fssPrivateDomain().getConfig().startsWith(SystemConstant.START_PARENT))) {
-                            fileStoreUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), paperPath, uploadFileEnum.getFssType());
-                        } else {
-                            FileUtil.copyFile(jsonObject.getString(SystemConstant.PATH), paperPath);
-                        }
-                    }
-
-                    // 下载题卡
-                    Long cardId = Long.valueOf(paperInfoVo.getCardId());
-                    if (cardId != null) {
-                        String paperType = paperInfoVo.getName();
-                        ExamCard examCard = examCardService.getById(cardId);
-                        if (Objects.isNull(examCard)) {
-                            throw ExceptionResultEnum.ERROR.exception(String.format("课程[%s(%s)],试卷编号[%s],卷型[%s]的题卡不存在", examTask.getCourseName(), examTask.getCourseCode(), examTask.getPaperNumber(), paperType));
-                        }
-                        MakeMethodEnum makeMethodEnum = examCard.getMakeMethod();
-                        if (MakeMethodEnum.SELECT.equals(makeMethodEnum) && CardCreateMethodEnum.UPLOAD.equals(examCard.getCreateMethod())) {
-                            Long cardAttachmentId = examCard.getAttachmentId();
-                            if (cardAttachmentId == null) {
-                                throw ExceptionResultEnum.ERROR.exception(String.format("课程[%s(%s)],试卷编号[%s],卷型[%s]的题卡未上传", examTask.getCourseName(), examTask.getCourseCode(), examTask.getPaperNumber(), paperType));
-                            }
-                            BasicAttachment cardAttachment = basicAttachmentService.getById(cardAttachmentId);
-                            if (Objects.isNull(cardAttachment)) {
-                                throw ExceptionResultEnum.ERROR.exception(String.format("课程[%s(%s)],试卷编号[%s],卷型[%s]的题卡未找到上传附件数据", examTask.getCourseName(), examTask.getCourseCode(), examTask.getPaperNumber(), paperType));
-                            }
-                            JSONObject jsonObject = JSONObject.parseObject(cardAttachment.getPath());
-                            // 题卡路径
-                            String cardPath = firstPath + File.separator + "题卡" + File.separator + paperType + "-" + cardAttachment.getName() + cardAttachment.getType();
-                            UploadFileEnum uploadFileEnum = UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
-
-                            if (oss || (!oss && dictionaryConfig.fssPrivateDomain().getConfig().startsWith(SystemConstant.START_PARENT))) {
-                                fileStoreUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), cardPath, uploadFileEnum.getFssType());
-                            } else {
-                                FileUtil.copyFile(jsonObject.getString(SystemConstant.PATH), cardPath);
-                            }
-                        } else {
-                            String htmlContent = examCard.getHtmlContent();
-                            byte[] bytes = htmlContent.getBytes(StandardCharsets.UTF_8);
-                            // 题卡路径
-                            String cardPath = firstPath + File.separator + "题卡" + File.separator + paperType + "-" + examCard.getTitle() + SystemConstant.HTML_PREFIX;
-                            File localFile = new File(cardPath);
-                            if (!localFile.getParentFile().exists()) {
-                                localFile.getParentFile().mkdirs();
-                            }
-                            FileCopyUtils.copy(bytes, localFile);
-                        }
-                    }
-
-                    // 处理审核样品
-                    List<Map> confirmInfo = JSONObject.parseArray(examTaskDetail.getPaperConfirmAttachmentIds(), Map.class);
-                    for (Map confirmMap : confirmInfo) {
-                        if (Objects.isNull(confirmMap.get("attachmentId"))) {
-                            throw ExceptionResultEnum.ERROR.exception(String.format("课程[%s(%s)],试卷编号[%s]的附件未上传", examTask.getCourseName(), examTask.getCourseCode(), examTask.getPaperNumber()));
-                        }
-                        Long confirmAttachmentId = Long.valueOf(String.valueOf(confirmMap.get("attachmentId")));
-                        BasicAttachment confirmAttachment = basicAttachmentService.getById(confirmAttachmentId);
-                        if (confirmAttachment == null) {
-                            throw ExceptionResultEnum.ERROR.exception(String.format("课程[%s(%s)],试卷编号[%s]的附件未找到上传数据", examTask.getCourseName(), examTask.getCourseCode(), examTask.getPaperNumber()));
-                        }
-                        JSONObject jsonObject = JSONObject.parseObject(confirmAttachment.getPath());
-                        UploadFileEnum uploadFileEnum = UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
-                        String confirmPath = firstPath + File.separator + "审核样本" + File.separator + confirmAttachment.getName() + confirmAttachment.getType();
-                        if (oss || (!oss && dictionaryConfig.fssPrivateDomain().getConfig().startsWith(SystemConstant.START_PARENT))) {
-                            fileStoreUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), confirmPath, uploadFileEnum.getFssType());
-                        } else {
-                            FileUtil.copyFile(jsonObject.getString(SystemConstant.PATH), confirmPath);
-                        }
-                    }
-                }
-                count++;
-            }
-            JSONObject jsonObject = SystemConstant.createZip(zipFile, zipLocalRootPath, zipDirName);
-            tbTask.setResultFilePath(jsonObject.toJSONString());
-            map.put("count", count);
-        } catch (Exception e) {
-            log.error(SystemConstant.LOG_ERROR, e);
-            if (e instanceof ApiException) {
-                ResultUtil.error((ApiException) e, ((ApiException) e).getCode(), e.getMessage());
-            } else {
-                ResultUtil.error(e.getMessage());
-            }
-        } finally {
-            if (Objects.nonNull(zipFile)) {
-                zipFile.delete();
-            }
-            if (Objects.nonNull(zipLocalRootPath)) {
-                ConvertUtil.delFolder(zipLocalRootPath);
-            }
-        }
-        return map;
-    }
-
     @Override
     public Map<String, Object> executeExportPaperAndCardLogic(Map<String, Object> map) {
         String zipLocalRootPath = null;

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

@@ -100,7 +100,7 @@
                     </if>
                 </where>
                 ) t
-                WHERE LOCATE(id,t.cardId) > 0)
+                WHERE LOCATE(ec.id,t.cardId) > 0)
             </if>
             <if test="cardType != null and cardType != ''">
                 and ec.type = #{cardType}

+ 33 - 28
distributed-print-business/src/main/resources/mapper/ExamDetailMapper.xml

@@ -185,14 +185,16 @@
         MAX(det.create_id) AS createId,
         MAX(det.create_time) AS createTime,
         GROUP_CONCAT(cou.id) AS examDetailCourseIds,
-        GROUP_CONCAT(CONCAT(cou.course_name, '(', cou.course_code, ')')) AS courseNameCode,
-        GROUP_CONCAT(cou.course_code) AS courseCodes,
+        GROUP_CONCAT(CONCAT(bc.name, '(', bc.code, ')')) AS courseNameCode,
+        GROUP_CONCAT(cou.course_id) AS courseIds,
         GROUP_CONCAT(cou.paper_number) AS paperNumber
         FROM
         exam_detail det
         INNER JOIN
         exam_detail_course cou ON det.id = cou.exam_detail_id
         LEFT JOIN
+        basic_course bc ON cou.course_id = bc.id
+        LEFT JOIN
         basic_exam be on be.id = det.exam_id
         LEFT JOIN
         basic_semester bs on bs.id = be.semester_id
@@ -242,8 +244,8 @@
         </where>
         GROUP BY det.id
         <trim prefix="having" suffixOverrides="and">
-            <if test="courseCode != null and courseCode != ''">
-                find_in_set(#{courseCode},courseCodes) and
+            <if test="courseId != null">
+                find_in_set(#{courseId},courseIds) and
             </if>
             <if test="paperNumber != null and paperNumber != ''">
                 find_in_set(#{paperNumber},paperNumber) and
@@ -256,17 +258,16 @@
         SELECT
             stu.id AS id,
             stu.exam_detail_course_id,
-            stu.student_name AS studentName,
-            stu.student_code AS studentCode,
-            stu.ticket_number AS ticketNumber,
+            bes.student_name AS studentName,
+            bes.student_code AS studentCode,
             stu.site_number AS siteNumber,
             stu.create_id AS createId,
             stu.create_time AS createTime,
             a.exam_id AS examId,
             a.exam_name AS examName,
-            CONCAT(a.course_name,
+            CONCAT(a.name,
                    '(',
-                   a.course_code,
+                   a.code,
                    ')') AS courseNameCode,
             a.paper_number AS paperNumber,
             a.print_plan_id AS printPlanId,
@@ -279,8 +280,8 @@
             (select be.id exam_id,
                     be.name exam_name,
                     edc.id exam_detail_course_id,
-                    edc.course_code,
-                    edc.course_name,
+                    bc.code,
+                    bc.name,
                     edc.paper_number,
                     ed.print_plan_id,
                     ed.print_plan_name,
@@ -291,6 +292,8 @@
              from exam_detail ed
                 JOIN
             exam_detail_course edc on ed.id = edc.exam_detail_id
+                 LEFT JOIN
+            basic_course bc ON edc.course_id = bc.id
                 LEFT JOIN
             sys_user b on ed.create_id = b.id
                 LEFT JOIN
@@ -314,8 +317,8 @@
                         #{item}
                     </foreach>
                 </if>
-                <if test="courseCode != null and courseCode != ''">
-                    AND edc.course_code = #{courseCode}
+                <if test="courseId != null">
+                    AND edc.course_id = #{courseId}
                 </if>
                 <if test="paperNumber != null and paperNumber != ''">
                     AND edc.paper_number = #{paperNumber}
@@ -346,6 +349,8 @@
             </where>) a
                 join
             exam_student stu ON a.exam_detail_course_id = stu.exam_detail_course_id
+                join
+            basic_exam_student bes ON stu.student_id = bes.id
         <where>
 
             <if test="studentParams != null and studentParams != ''">
@@ -359,15 +364,14 @@
         SELECT
             stu.id AS id,
             stu.exam_detail_course_id,
-            stu.student_name AS studentName,
-            stu.student_code AS studentCode,
-            stu.ticket_number AS ticketNumber,
+            bes.student_name AS studentName,
+            bes.student_code AS studentCode,
             stu.site_number AS siteNumber,
             stu.create_id AS createId,
             stu.create_time AS createTime,
-            CONCAT(cou.course_name,
+            CONCAT(bc.name,
                    '(',
-                   cou.course_code,
+                   bc.code,
                    ')') AS courseNameCode,
             cou.paper_number AS paperNumber,
             det.print_plan_id AS printPlanId,
@@ -377,16 +381,17 @@
             bs.id AS semesterId,
             bs.name AS semesterName,
             be.id AS examId,
-            be.name AS examName,
-            stu.can_delete canDelete
+            be.name AS examName
         FROM
             exam_student stu
+                LEFT JOIN
+            basic_exam_student bes ON stu.student_id = bes.id
                 INNER JOIN
             exam_detail_course cou ON stu.exam_detail_course_id = cou.id
-                AND stu.school_id = cou.school_id
+                LEFT JOIN
+            basic_course bc ON cou.course_id = bc.id
                 INNER JOIN
             exam_detail det ON cou.exam_detail_id = det.id
-                AND stu.school_id = det.school_id
                 LEFT JOIN
             exam_print_plan epp ON det.print_plan_id = epp.id
                 LEFT JOIN
@@ -401,7 +406,7 @@
                 AND (stu.student_name like concat('%', #{param}) or stu.student_code like concat('%', #{param}))
             </if>
         </where>
-        order by stu.can_delete desc, stu.student_code
+        order by stu.student_code
     </select>
     <select id="taskTotalData" resultType="com.qmth.distributed.print.business.bean.dto.PrintTaskTotalDto">
         SELECT
@@ -672,7 +677,7 @@
         det.school_id schoolId,
         sum(ifnull(det.total_subjects, 0)) AS totalSubjects,
         count(det.package_code) AS packageCount,
-        GROUP_CONCAT(cou.course_code) AS courseCodes,
+        GROUP_CONCAT(cou.course_id) AS courseIds,
         GROUP_CONCAT(cou.paper_number) AS paperNumbers
         FROM
         exam_detail det
@@ -696,8 +701,8 @@
                     #{item}
                 </foreach>
             </if>
-            <if test="courseCode != null and courseCode != ''">
-                AND cou.course_code = #{courseCode}
+            <if test="courseId != null">
+                AND cou.course_id = #{courseId}
             </if>
             <if test="paperNumber != null and paperNumber != ''">
                 AND cou.paper_number = #{paperNumber}
@@ -731,8 +736,8 @@
         </where>
         GROUP BY det.school_id
         <trim prefix="having" suffixOverrides="and">
-            <if test="courseCode != null and courseCode != ''">
-                find_in_set(#{courseCode},courseCodes) and
+            <if test="courseId != null">
+                find_in_set(#{courseId},courseIds) and
             </if>
             <if test="paperNumber != null and paperNumber != ''">
                 find_in_set(#{paperNumber},paperNumbers) and

+ 0 - 2
distributed-print-business/src/main/resources/mapper/ExamPrintPlanMapper.xml

@@ -56,8 +56,6 @@
             a.create_id AS createId,
             a.create_time AS createTime,
             b.real_name AS createName,
-            a.third_relate_id thirdRelateId,
-            a.third_relate_name thirdRelateName,
             a.exam_id as examId,
             d.name as examName
         FROM

+ 8 - 5
distributed-print-business/src/main/resources/mapper/ExamStudentMapper.xml

@@ -23,13 +23,12 @@
         select id,school_id, exam_detail_course_id, student_name, student_code, ticket_number, site_number, print_paper, print_card, required_fields, extend_fields, paper_type from exam_student
     </sql>
     <select id="getStudentDetail" resultType="java.util.Map">
-        SELECT a.student_name    studentName,
-               a.student_code    studentCode,
-               a.ticket_number   ticketNumber,
+        SELECT bes.student_name    studentName,
+               bes.student_code    studentCode,
                a.site_number     siteNumber,
                a.extend_fields   extendFields,
-               b.course_code     courseCode,
-               b.course_name     courseName,
+               bc.code     courseCode,
+               bc.name     courseName,
                b.paper_number    paperNumber,
                c.exam_start_time examStartTime,
                c.exam_end_time   examEndTime,
@@ -40,8 +39,12 @@
                be.id             examId,
                be.name           examName
         FROM exam_student a
+                LEFT JOIN
+            basic_exam_student bes ON a.student_id = bes.id
                  LEFT JOIN
              exam_detail_course b ON a.exam_detail_course_id = b.id
+                LEFT JOIN
+            basic_course bc ON b.course_id = bc.id
                  LEFT JOIN
              exam_detail c ON b.exam_detail_id = c.id
                  LEFT JOIN

+ 6 - 9
distributed-print-business/src/main/resources/mapper/ExamTaskDetailMapper.xml

@@ -24,8 +24,8 @@
             c.id,
             a.school_id schoolId,
             a.print_plan_id printPlanId,
-            c.course_code courseCode,
-            c.course_name courseName,
+            bc.code courseCode,
+            bc.name courseName,
             c.paper_number paperNumber,
             c.card_rule_id cardRuleId,
             c.specialty,
@@ -52,8 +52,6 @@
             a.semester_name,
             a.print_plan_id,
             b.paper_number,
-            b.course_code,
-            b.course_name,
             b.paper_type,
             SUM(b.total_subjects) total_subjects
         FROM
@@ -96,6 +94,8 @@
             AND a.exam_id = c.exam_id
             AND a.paper_number = c.paper_number
             LEFT JOIN
+        basic_course bc ON c.course_id = bc.id
+            LEFT JOIN
         exam_task_detail d ON c.id = d.exam_task_id
             LEFT JOIN
         basic_card_rule e ON c.card_rule_id = e.id
@@ -104,15 +104,12 @@
             LEFT JOIN
         sys_user g ON c.create_id = g.id
         <where>
-            <if test="courseCode != null and courseCode != ''">
-                and c.course_code = #{courseCode}
+            <if test="courseId != null">
+                and c.course_id = #{courseId}
             </if>
             <if test="paperNumber != null and paperNumber != ''">
                 and c.paper_number = #{paperNumber}
             </if>
-            <if test="cardRuleId != null and cardRuleId != ''">
-                and c.card_rule_id = #{cardRuleId}
-            </if>
             <if test="userName != null and userName != ''">
                 and f.real_name like concat('%',#{userName},'%')
             </if>

+ 4 - 2
distributed-print-business/src/main/resources/mapper/TFFlowApproveMapper.xml

@@ -29,8 +29,8 @@
         et.user_id as teacherId,
         be.name examName,
         bs.name semesterName,
-        et.course_code courseCode,
-        et.course_name courseName,
+        bc.code courseCode,
+        bc.name courseName,
         et.paper_number paperNumber,
         (
         select
@@ -60,6 +60,8 @@
         tfcfe.flow_id = tffa.flow_id
         join exam_task et on
         et.flow_id = tffa.flow_id
+        left join basic_course bc on
+            et.course_id = bc.id
         left join basic_exam be on
         et.exam_id = be.id
         left join basic_semester bs on

+ 17 - 1
distributed-print/install/mysql/upgrade/3.4.0.sql

@@ -74,8 +74,24 @@ update exam_task a set a.course_id = (select bc.id from basic_course bc where a.
 update exam_card a set a.course_id = (select bc.id from basic_course bc where a.school_id = bc.school_id and a.course_code = bc.code) where a.course_id is null;
 update exam_detail_course a set a.course_id = (select bc.id from basic_course bc where a.school_id = bc.school_id and a.course_code = bc.code) where a.course_id is null;
 update teach_course a set a.course_id = (select bc.id from basic_course bc where a.school_id = bc.school_id and a.course_code = bc.code) where a.course_id is null;
--- update t_p_course a set a.course_id = (select bc.id from basic_course bc where a.school_id = bc.school_id and a.course_code = bc.code) where a.course_id is null;
+update t_p_course a left join t_p_professional tpp on a.professional_id = tpp.id left join basic_course bc on tpp.school_id = bc.school_id and a.course_code = bc.code set a.course_id = bc.id where a.course_id is null;
 update t_b_sync_task a set a.course_id = (select bc.id from basic_course bc where a.school_id = bc.school_id and a.course_code = bc.code) where a.course_id is null;
+update basic_exam_student a set a.course_id = (select bc.id from basic_course bc where a.school_id = bc.school_id and a.course_code = bc.code) where a.course_id is null;
+update basic_teach_clazz a set a.course_id = (select bc.id from basic_course bc where a.school_id = bc.school_id and a.course_code = bc.code) where a.course_id is null;
+update course_dimension a set a.course_id = (select bc.id from basic_course bc where a.school_id = bc.school_id and a.course_code = bc.code) where a.course_id is null;
+update course_evaluation a set a.course_id = (select bc.id from basic_course bc where a.school_id = bc.school_id and a.course_code = bc.code) where a.course_id is null;
+update course_target a set a.course_id = (select bc.id from basic_course bc where a.school_id = bc.school_id and a.course_code = bc.code) where a.course_id is null;
+update course_weight a set a.course_id = (select bc.id from basic_course bc where a.school_id = bc.school_id and a.course_code = bc.code) where a.course_id is null;
+update mark_student a left join basic_exam be on a.exam_id = be.id left join basic_course bc on be.school_id = bc.school_id and a.course_code = bc.code set a.course_id = bc.id where a.course_id is null;
+update mark_document a left join basic_exam be on a.exam_id = be.id left join basic_course bc on be.school_id = bc.school_id and a.course_code = bc.code set a.course_id = bc.id where a.course_id is null;
+update mark_group a left join basic_exam be on a.exam_id = be.id left join basic_course bc on be.school_id = bc.school_id and a.course_code = bc.code set a.course_id = bc.id where a.course_id is null;
+update mark_paper a left join basic_exam be on a.exam_id = be.id left join basic_course bc on be.school_id = bc.school_id and a.course_code = bc.code set a.course_id = bc.id where a.course_id is null;
+update mark_task a left join basic_exam be on a.exam_id = be.id left join basic_course bc on be.school_id = bc.school_id and a.course_code = bc.code set a.course_id = bc.id where a.course_id is null;
+update mark_paper_package a left join basic_exam be on a.exam_id = be.id left join basic_course bc on be.school_id = bc.school_id and a.course_code = bc.code set a.course_id = bc.id where a.course_id is null;
+
+
+ALTER TABLE `exam_print_plan` DROP COLUMN `third_relate_name`, DROP COLUMN `third_relate_id`;
+ALTER TABLE `exam_student` DROP COLUMN `can_delete`;
 
 -- drop table if exists exam_detail_course_paper_type;
 -- drop table if exists basic_template_org;

+ 9 - 8
distributed-print/src/main/java/com/qmth/distributed/print/api/BasicCourseController.java

@@ -1,8 +1,10 @@
 package com.qmth.distributed.print.api;
 
 import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.distributed.print.business.bean.result.CourseResult;
 import com.qmth.distributed.print.business.bean.result.EditResult;
 import com.qmth.distributed.print.business.service.PrintCommonService;
+import com.qmth.distributed.print.business.service.TeachCourseService;
 import com.qmth.teachcloud.common.annotation.OperationLogDetail;
 import com.qmth.teachcloud.common.bean.params.BasicCourseParams;
 import com.qmth.teachcloud.common.contant.SystemConstant;
@@ -50,17 +52,16 @@ public class BasicCourseController {
 
     @Resource
     private BasicCourseService basicCourseService;
+    @Resource
+    private TeachCourseService teachCourseService;
 
-    @ApiOperation(value = "模糊查询")
+    @ApiOperation(value = "课程查询")
     @RequestMapping(value = "/query", method = RequestMethod.POST)
-    public Result query(@RequestParam(value = "param", required = false) String param, @RequestParam(value = "printPlanId", required = false) List<String> printPlanId,
+    public Result query(@RequestParam(value = "param", required = false) String param,
                         @RequestParam(value = "teachingRoomId", required = false) Long teachingRoomId) {
-        if (Objects.isNull(printPlanId)) {
-            printPlanId = new ArrayList<>();
-        }
-        List<Long> printPlanIdList = printPlanId.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList());
-        List<BasicCourse> userDtos = printCommonService.list(param, printPlanIdList, teachingRoomId);
-        return ResultUtil.ok(userDtos);
+//        List<BasicCourse> basicCourseList = printCommonService.list(param, printPlanId, teachingRoomId);
+        CourseResult courseResult = teachCourseService.listUserCourse(param, teachingRoomId);
+        return ResultUtil.ok(courseResult);
     }
 
 

+ 18 - 44
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamDetailController.java

@@ -74,10 +74,10 @@ public class ExamDetailController {
     @ApiOperation(value = "考务数据导入-查询")
     @RequestMapping(value = "/data_list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
-    public Result findExaminationBrief(@ApiParam(value = "学期ID") @RequestParam(required = false) String semesterId,
-                                       @ApiParam(value = "考试id") @RequestParam(required = false) String examId,
+    public Result findExaminationBrief(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
+                                       @ApiParam(value = "考试id") @RequestParam(required = false) Long examId,
                                        @ApiParam(value = "印刷计划id集合") @RequestParam(required = false) List<String> printPlanIdList,
-                                       @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
+                                       @ApiParam(value = "课程ID") @RequestParam(required = false) Long courseId,
                                        @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                        @ApiParam(value = "考点") @RequestParam(required = false) String examPlace,
                                        @ApiParam(value = "考场") @RequestParam(required = false) String examRoom,
@@ -100,17 +100,17 @@ public class ExamDetailController {
         }
         List<Long> idList = printPlanIdList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList());
 
-        return ResultUtil.ok(examDetailService.findExaminationBriefPage(schoolId, SystemConstant.convertIdToLong(semesterId), SystemConstant.convertIdToLong(examId),
-                idList, courseCode, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, pageNumber, pageSize, dpr));
+        return ResultUtil.ok(examDetailService.findExaminationBriefPage(schoolId, semesterId, examId,
+                idList, courseId, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, pageNumber, pageSize, dpr));
     }
 
     @ApiOperation(value = "考务数据导入-汇总数据查询")
     @RequestMapping(value = "/data_total", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
-    public Result findSummarizedData(@ApiParam(value = "学期ID") @RequestParam(required = false) String semesterId,
-                                     @ApiParam(value = "考试id") @RequestParam(required = false) String examId,
+    public Result findSummarizedData(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
+                                     @ApiParam(value = "考试id") @RequestParam(required = false) Long examId,
                                      @ApiParam(value = "印刷计划id集合") @RequestParam(required = false) List<String> printPlanIdList,
-                                     @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
+                                     @ApiParam(value = "课程ID") @RequestParam(required = false) Long courseId,
                                      @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                      @ApiParam(value = "考点") @RequestParam(required = false) String examPlace,
                                      @ApiParam(value = "考场") @RequestParam(required = false) String examRoom,
@@ -124,16 +124,16 @@ public class ExamDetailController {
             printPlanIdList = new ArrayList<>();
         }
         List<Long> idList = printPlanIdList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList());
-        return ResultUtil.ok(examDetailService.findSummarizedData(schoolId, SystemConstant.convertIdToLong(semesterId), SystemConstant.convertIdToLong(examId), idList, courseCode, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, dpr));
+        return ResultUtil.ok(examDetailService.findSummarizedData(schoolId, semesterId, examId, idList, courseId, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, dpr));
     }
 
     @ApiOperation(value = "考务数据导入-查看明细")
     @RequestMapping(value = "/data_detail", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
-    public Result findExaminationDetail(@ApiParam(value = "学期ID") @RequestParam(required = false) String semesterId,
-                                        @ApiParam(value = "考试id") @RequestParam(required = false) String examId,
+    public Result findExaminationDetail(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
+                                        @ApiParam(value = "考试id") @RequestParam(required = false) Long examId,
                                         @ApiParam(value = "印刷计划主键集合") @RequestParam(required = false) List<String> printPlanIdList,
-                                        @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
+                                        @ApiParam(value = "课程ID") @RequestParam(required = false) Long courseId,
                                         @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                         @ApiParam(value = "考点") @RequestParam(required = false) String examPlace,
                                         @ApiParam(value = "考场") @RequestParam(required = false) String examRoom,
@@ -153,8 +153,8 @@ public class ExamDetailController {
         }
         List<Long> idList = printPlanIdList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList());
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
-        return ResultUtil.ok(examDetailService.findExaminationDetail(schoolId, SystemConstant.convertIdToLong(semesterId), SystemConstant.convertIdToLong(examId), idList,
-                courseCode, paperNumber, examPlace, examRoom, studentParams, startDate, endDate, pageNumber, pageSize));
+        return ResultUtil.ok(examDetailService.findExaminationDetail(schoolId, semesterId, examId, idList,
+                courseId, paperNumber, examPlace, examRoom, studentParams, startDate, endDate, pageNumber, pageSize));
     }
 
     @ApiOperation(value = "查看考生明细")
@@ -212,10 +212,10 @@ public class ExamDetailController {
     @RequestMapping(value = "/data_export", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = EditResult.class)})
     @OperationLogDetail(operationType = OperationTypeEnum.EXPORT)
-    public Result dataExport(@ApiParam(value = "学期ID") @RequestParam(required = false) String semesterId,
-                             @ApiParam(value = "考试id") @RequestParam(required = false) String examId,
+    public Result dataExport(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
+                             @ApiParam(value = "考试id") @RequestParam(required = false) Long examId,
                              @ApiParam(value = "印刷计划id集合") @RequestParam(required = false) List<String> printPlanIdList,
-                             @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
+                             @ApiParam(value = "课程ID") @RequestParam(required = false) Long courseId,
                              @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                              @ApiParam(value = "考点") @RequestParam(required = false) String examPlace,
                              @ApiParam(value = "考场") @RequestParam(required = false) String examRoom,
@@ -238,7 +238,7 @@ public class ExamDetailController {
         map.put("semesterId", semesterId);
         map.put("examId", examId);
         map.put("printPlanIdList", idList);
-        map.put("courseCode", courseCode);
+        map.put("courseId", courseId);
         map.put("paperNumber", paperNumber);
         map.put("examPlace", examPlace);
         map.put("examRoom", examRoom);
@@ -275,31 +275,5 @@ public class ExamDetailController {
     public Result listExamDetailPaperNumber(@ApiParam(value = "考务场次ID", required = true) @RequestParam Long examDetailId) {
         return ResultUtil.ok(examDetailCourseService.listExamDetailPaperNumber(examDetailId));
     }
-
-    /**
-     * 新增考生-保存
-     *
-     * @param singleExamStudentAddParam 请求参数
-     * @return
-     */
-    @ApiOperation(value = "考务数据导入-新增考生-保存")
-    @RequestMapping(value = "/add_exam_student", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.ADD)
-    public Result addExamStudent(@RequestBody SingleExamStudentAddParam singleExamStudentAddParam) {
-        return ResultUtil.ok(examDetailCourseService.addExamStudent(singleExamStudentAddParam));
-    }
-
-    /**
-     * 删除考生
-     *
-     * @param id 请求参数
-     * @return
-     */
-    @ApiOperation(value = "考务数据导入-查看详情-删除考生")
-    @RequestMapping(value = "/delete_exam_student", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.ADD)
-    public Result deleteExamStudent(@RequestParam Long id) {
-        return ResultUtil.ok(examDetailCourseService.deleteExamStudent(id));
-    }
 }
 

+ 23 - 57
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamPrintPlanController.java

@@ -124,26 +124,15 @@ public class ExamPrintPlanController {
         return ResultUtil.ok(examPrintPlanService.removePrintPlan(deleteParams));
     }
 
-    /**
-     * 关联试卷管理-查询
-     *
-     * @param relateType
-     * @param printPlanIdList 印刷计划id集合
-     * @param courseCode
-     * @param paperNumber
-     * @param userName        命题老师
-     * @return
-     */
     @ApiOperation(value = "关联试卷管理-查询")
     @RequestMapping(value = "/relate_list", method = RequestMethod.POST)
-    public Result relateList(@ApiParam(value = "学期ID") @RequestParam(required = false) String semesterId,
-                             @ApiParam(value = "考试id") @RequestParam(required = false) String examId,
-                             @RequestParam(value = "relateType", required = false) String relateType,
-                             @RequestParam(value = "printPlanIdList", required = false) List<String> printPlanIdList,
-                             @RequestParam(value = "courseCode", required = false) String courseCode,
-                             @RequestParam(value = "paperNumber", required = false) String paperNumber,
-                             @RequestParam(value = "userName", required = false) String userName,
-                             @RequestParam(value = "cardRuleId", required = false) Long cardRuleId) {
+    public Result relateList(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
+                             @ApiParam(value = "考试ID") @RequestParam(required = false) Long examId,
+                             @ApiParam(value = "关联类型") @RequestParam(value = "relateType", required = false) String relateType,
+                             @ApiParam(value = "计划ID集合") @RequestParam(value = "printPlanIdList", required = false) List<String> printPlanIdList,
+                             @ApiParam(value = "课程ID") @RequestParam(value = "courseId", required = false) Long courseId,
+                             @ApiParam(value = "试卷编号") @RequestParam(value = "paperNumber", required = false) String paperNumber,
+                             @ApiParam(value = "命题老师") @RequestParam(value = "userName", required = false) String userName) {
         if (semesterId == null) {
             throw ExceptionResultEnum.ERROR.exception("请选择学期");
         }
@@ -151,64 +140,42 @@ public class ExamPrintPlanController {
             printPlanIdList = new ArrayList<>();
         }
         List<Long> idList = printPlanIdList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList());
-        List<ExamTaskDetailDto> examTasks = examTaskDetailService.list(SystemConstant.convertIdToLong(semesterId), SystemConstant.convertIdToLong(examId), relateType, idList, courseCode, paperNumber, userName, cardRuleId);
+        List<ExamTaskDetailDto> examTasks = examTaskDetailService.list(semesterId, examId, relateType, idList, courseId, paperNumber, userName);
         return ResultUtil.ok(examTasks);
     }
 
-    /**
-     * 关联试卷管理-查询计划下命题任务共有的未曝光卷型
-     *
-     * @param relateType
-     * @param printPlanIdList 印刷计划id集合
-     * @param courseCode
-     * @param paperNumber
-     * @param userName        命题老师
-     * @return
-     */
     @ApiOperation(value = "关联试卷管理-查询计划下命题任务共有的未曝光卷型")
     @RequestMapping(value = "/list_relate_common_types", method = RequestMethod.POST)
-    public Result relateCommonTypes(@ApiParam(value = "学期ID") @RequestParam(required = false) String semesterId,
-                                    @ApiParam(value = "考试id") @RequestParam(required = false) String examId,
+    public Result relateCommonTypes(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
+                                    @ApiParam(value = "考试id") @RequestParam(required = false) Long examId,
                                     @RequestParam(value = "relateType", required = false) String relateType,
                                     @RequestParam(value = "printPlanIdList", required = false) List<String> printPlanIdList,
-                                    @RequestParam(value = "courseCode", required = false) String courseCode,
+                                    @RequestParam(value = "courseId", required = false) Long courseId,
                                     @RequestParam(value = "paperNumber", required = false) String paperNumber,
-                                    @RequestParam(value = "userName", required = false) String userName,
-                                    @RequestParam(value = "cardRuleId", required = false) Long cardRuleId) {
+                                    @RequestParam(value = "userName", required = false) String userName) {
         if (Objects.isNull(printPlanIdList)) {
             printPlanIdList = new ArrayList<>();
         }
         List<Long> idList = printPlanIdList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList());
-        List<String> examTasks = examTaskDetailService.listRelateCommonTypes(SystemConstant.convertIdToLong(semesterId), SystemConstant.convertIdToLong(examId), relateType, idList, courseCode, paperNumber, userName, cardRuleId);
+        List<String> examTasks = examTaskDetailService.listRelateCommonTypes(semesterId, examId, relateType, idList, courseId, paperNumber, userName);
         return ResultUtil.ok(examTasks);
     }
 
-    /**
-     * 关联试卷管理-批量关联
-     *
-     * @param relateType
-     * @param printPlanIdList 印刷计划id集合
-     * @param courseCode
-     * @param paperNumber
-     * @param userName        命题老师
-     * @return
-     */
     @ApiOperation(value = "关联试卷管理-批量关联")
     @RequestMapping(value = "/relate_update_batch", method = RequestMethod.POST)
     @OperationLogDetail(operationType = OperationTypeEnum.UPDATE)
-    public Result relateUpdateBatch(@ApiParam(value = "学期ID") @RequestParam(required = false) String semesterId,
-                                    @ApiParam(value = "考试id") @RequestParam(required = false) String examId,
+    public Result relateUpdateBatch(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
+                                    @ApiParam(value = "考试id") @RequestParam(required = false) Long examId,
                                     @RequestParam(value = "relateType", required = false) String relateType,
                                     @RequestParam(value = "printPlanIdList", required = false) List<String> printPlanIdList,
-                                    @RequestParam(value = "courseCode", required = false) String courseCode,
+                                    @RequestParam(value = "courseId", required = false) Long courseId,
                                     @RequestParam(value = "paperNumber", required = false) String paperNumber,
-                                    @RequestParam(value = "userName", required = false) String userName,
-                                    @RequestParam(value = "cardRuleId", required = false) Long cardRuleId) throws IOException {
+                                    @RequestParam(value = "userName", required = false) String userName) throws IOException {
         if (Objects.isNull(printPlanIdList)) {
             printPlanIdList = new ArrayList<>();
         }
         List<Long> idList = printPlanIdList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList());
-        List<ExamTaskDetailDto> examTasks = examTaskDetailService.list(SystemConstant.convertIdToLong(semesterId), SystemConstant.convertIdToLong(examId), relateType, idList, courseCode, paperNumber, userName, cardRuleId);
+        List<ExamTaskDetailDto> examTasks = examTaskDetailService.list(semesterId, examId, relateType, idList, courseId, paperNumber, userName);
         for (ExamTaskDetailDto examTask : examTasks) {
             RelatePaperParam relatePaperParam = new RelatePaperParam();
             relatePaperParam.setExamDetailCourseIds(examTask.getExamDetailCourseIds());
@@ -223,19 +190,18 @@ public class ExamPrintPlanController {
 
     @ApiOperation(value = "关联试卷管理-查询-汇总数据")
     @RequestMapping(value = "/relate_total", method = RequestMethod.POST)
-    public Result relateTotal(@ApiParam(value = "学期ID") @RequestParam(required = false) String semesterId,
-                              @ApiParam(value = "考试ID") @RequestParam(required = false) String examId,
+    public Result relateTotal(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
+                              @ApiParam(value = "考试ID") @RequestParam(required = false) Long examId,
                               @RequestParam(value = "relateType", required = false) String relateType,
                               @RequestParam(value = "printPlanIdList", required = false) List<String> printPlanIdList,
-                              @RequestParam(value = "courseCode", required = false) String courseCode,
+                              @RequestParam(value = "courseId", required = false) Long courseId,
                               @RequestParam(value = "paperNumber", required = false) String paperNumber,
-                              @RequestParam(value = "userName", required = false) String userName,
-                              @RequestParam(value = "cardRuleId", required = false) Long cardRuleId) {
+                              @RequestParam(value = "userName", required = false) String userName) {
         if (Objects.isNull(printPlanIdList)) {
             printPlanIdList = new ArrayList<>();
         }
         List<Long> idList = printPlanIdList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList());
-        Map map = examTaskDetailService.listTotal(SystemConstant.convertIdToLong(semesterId), SystemConstant.convertIdToLong(examId), relateType, idList, courseCode, paperNumber, userName, cardRuleId);
+        Map map = examTaskDetailService.listTotal(semesterId, examId, relateType, idList, courseId, paperNumber, userName);
         return ResultUtil.ok(map);
     }
 

+ 9 - 107
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamTaskAuditController.java

@@ -2,36 +2,27 @@ package com.qmth.distributed.print.api;
 
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.distributed.print.business.bean.params.ExamTaskReApplyParam;
-import com.qmth.distributed.print.business.entity.ExamTask;
-import com.qmth.distributed.print.business.entity.ExamTaskReviewLog;
-import com.qmth.distributed.print.business.enums.ReviewStatusEnum;
-import com.qmth.distributed.print.business.service.*;
-import com.qmth.distributed.print.business.templete.execute.AsyncTaskReviewSampleExportService;
+import com.qmth.distributed.print.business.service.ActivitiService;
+import com.qmth.distributed.print.business.service.ExamTaskService;
+import com.qmth.distributed.print.business.service.GradeInitializeService;
 import com.qmth.teachcloud.common.annotation.OperationLogDetail;
-import com.qmth.teachcloud.common.bean.params.ArraysParams;
 import com.qmth.teachcloud.common.contant.SystemConstant;
-import com.qmth.teachcloud.common.entity.SysUser;
-import com.qmth.teachcloud.common.entity.TBTask;
-import com.qmth.teachcloud.common.enums.*;
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
+import com.qmth.teachcloud.common.enums.GradeAnalyzePaperStatusEnum;
 import com.qmth.teachcloud.common.enums.log.OperationTypeEnum;
 import com.qmth.teachcloud.common.util.Result;
 import com.qmth.teachcloud.common.util.ResultUtil;
-import com.qmth.teachcloud.common.util.ServletUtil;
 import com.qmth.teachcloud.mark.service.MarkPaperService;
-import io.swagger.annotations.*;
-import org.activiti.engine.TaskService;
-import org.activiti.engine.task.Task;
-import org.springframework.util.CollectionUtils;
-import org.springframework.validation.BindingResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
-import javax.validation.Valid;
 import javax.validation.constraints.Max;
 import javax.validation.constraints.Min;
-import java.io.IOException;
-import java.util.*;
+import java.util.Map;
 
 /**
  * <p>
@@ -50,14 +41,6 @@ public class ExamTaskAuditController {
     @Resource
     private ExamTaskService examTaskService;
     @Resource
-    private AsyncTaskReviewSampleExportService asyncTaskReviewSampleExportService;
-    @Resource
-    private PrintCommonService printCommonService;
-    @Resource
-    private BasicMessageService basicMessageService;
-    @Resource
-    private TaskService taskService;
-    @Resource
     private ActivitiService activitiService;
     @Resource
     private GradeInitializeService gradeInitializeService;
@@ -128,86 +111,5 @@ public class ExamTaskAuditController {
         long gradeCount = gradeInitializeService.countByPropositionTeacherId(GradeAnalyzePaperStatusEnum.SETTING_GRADE_PAPER_PARAM, true);
         return ResultUtil.ok(taskReviewAuditedCount + paperCount + gradeCount);
     }
-
-    /**
-     * 审核
-     *
-     * @param taskReviewLog 审核对象
-     * @return Result ,
-     */
-    @ApiOperation(value = "审核")
-    @RequestMapping(value = "/review_save", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE)
-    public Result taskReviewSave(@RequestBody ExamTaskReviewLog taskReviewLog) throws IOException {
-        List<Long> examTaskIdList = new ArrayList<>();
-        examTaskIdList.add(taskReviewLog.getExamTaskId());
-        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        boolean isSuccess = examTaskService.taskReviewSave(taskReviewLog);
-        if (isSuccess && taskReviewLog.getReviewStatus().name().equals(ReviewStatusEnum.PASS.name())) {
-//            ExamTask examTask = examTaskService.getById(taskReviewLog.getExamTaskId());
-            // 校验是否可以提交打印状态
-//            printCommonService.checkData(examTask.getSchoolId(), examTask.getExamId(), examTask.getCourseCode(), examTask.getPaperNumber(), sysUser);
-            // 发送审核通过短信通知
-            basicMessageService.noticeOfExamTaskAudit(examTaskIdList, MessageEnum.NOTICE_OF_AUDIT_PASS, sysUser);
-        } else if (isSuccess && taskReviewLog.getReviewStatus().name().equals(ReviewStatusEnum.NOT_PASS.name())) {
-            // 发送审核不通过短信通知
-            basicMessageService.noticeOfExamTaskAudit(examTaskIdList, MessageEnum.NOTICE_OF_AUDIT_NOT_PASS, sysUser);
-        }
-        return ResultUtil.ok(isSuccess);
-    }
-
-    /**
-     * 入库审核-批量审核
-     *
-     * @param taskReviewLog 审核对象
-     * @return Result
-     */
-    @ApiOperation(value = "入库审核-批量审核")
-    @RequestMapping(value = "/review_save_batch", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE)
-    public Result taskReviewSaveBatch(@RequestBody ExamTaskReviewLog taskReviewLog) throws IOException {
-        List<Long> examTaskIdList = Arrays.asList(taskReviewLog.getExamTaskIds());
-        if (!CollectionUtils.isEmpty(examTaskIdList)) {
-            for (Long examTaskId : examTaskIdList) {
-                ExamTask examTask = examTaskService.getById(examTaskId);
-                List<Task> taskList = taskService.createTaskQuery().processInstanceId(String.valueOf(examTask.getFlowId())).list();
-                if (Objects.nonNull(taskList) && taskList.size() > 0) {
-                    for (Task task : taskList) {
-                        Map<String, Object> map = new HashMap<>();
-                        map.computeIfAbsent(SystemConstant.FLOW_TASK_ID, v -> task.getId());
-                        map.computeIfAbsent(SystemConstant.APPROVE_OPERATION, v -> FlowApprovePassEnum.PASS);
-                        activitiService.taskApprove(map);
-                        activitiService.sendFlowTaskApproveMsg(map);
-                    }
-                }
-            }
-        }
-        /*SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        boolean isSuccess = examTaskService.taskReviewSaveBatch(taskReviewLog);
-        if (isSuccess && taskReviewLog.getReviewStatus().name().equals(ReviewStatusEnum.PASS.name())) {
-            // 发送审核通过短信通知
-            basicMessageService.noticeOfExamTaskAudit(examTaskIdList, MessageEnum.NOTICE_OF_AUDIT_PASS, sysUser);
-        } else if (isSuccess && taskReviewLog.getReviewStatus().name().equals(ReviewStatusEnum.NOT_PASS.name())) {
-            // 发送审核不通过短信通知
-            basicMessageService.noticeOfExamTaskAudit(examTaskIdList, MessageEnum.NOTICE_OF_AUDIT_NOT_PASS, sysUser);
-        }*/
-        return ResultUtil.ok();
-    }
-
-    @ApiOperation(value = "导出审核样本")
-    @RequestMapping(value = "/review_export", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.EXPORT)
-    public Result taskReviewExport(@Valid @RequestBody ArraysParams arraysParams, BindingResult bindingResult) throws
-            Exception {
-        if (bindingResult.hasErrors()) {
-            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
-        }
-        Long[] ids = arraysParams.getIds();
-        Map<String, Object> map = printCommonService.saveTask(TaskTypeEnum.SAMPLE_EXPORT);
-        map.put("ids", ids);
-        asyncTaskReviewSampleExportService.exportTask(map);
-        TBTask tbTask = Objects.nonNull(map.get(SystemConstant.TASK)) ? (TBTask) map.get(SystemConstant.TASK) : null;
-        return Objects.nonNull(tbTask) ? ResultUtil.ok(tbTask.getId()) : ResultUtil.error("创建任务失败");
-    }
 }
 

+ 1 - 1
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamTaskQueryController.java

@@ -181,7 +181,7 @@ public class ExamTaskQueryController {
         return ResultUtil.ok(isSuccess);
     }
 
-    @ApiOperation(value = "卷库查询-重启流程(打回")
+    @ApiOperation(value = "卷库查询-打回")
     @RequestMapping(value = "/restart", method = RequestMethod.POST)
     @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "打回操作,命题任务ID:{{examTaskDetail.examTaskId}}")
     public Result taskFlowRestart(@RequestBody ExamTaskDetail examTaskDetail) {

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

@@ -55,8 +55,8 @@ public class SysOrgController {
                        @ApiParam(value = "父机构ID") @RequestParam(required = false) Long orgId,
                        @ApiParam(value = "是否包含课程") @RequestParam(required = false) boolean includeCourse,
                        @ApiParam(value = "是否包含用户") @RequestParam(required = false) boolean includeUser) {
-        Set<Long> longSet = teachcloudCommonService.listSubOrgIds(orgId);
-        return ResultUtil.ok(sysOrgService.listOrgTree(specialPrivilege, withoutPrintingRoom, courseId, longSet));
+//        Set<Long> longSet = teachcloudCommonService.listSubOrgIds(orgId);
+        return ResultUtil.ok(sysOrgService.listOrgTree(specialPrivilege, withoutPrintingRoom, courseId, null));
     }
 
     /**

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

@@ -44,7 +44,7 @@ public class MarkEntranceController {
     @RequestMapping(value = "/list", method = RequestMethod.POST)
     public Result list(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
                        @ApiParam(value = "考试ID") @RequestParam(required = false) Long examId,
-                       @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
+                       @ApiParam(value = "课程ID") @RequestParam(required = false) Long courseId,
                        @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                        @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                        @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
@@ -54,7 +54,7 @@ public class MarkEntranceController {
         if (examId == null) {
             throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
         }
-        IPage<MarkEntranceDto> markEntranceDtoIPage = markUserGroupService.listEntranceGroup(examId, courseCode, paperNumber, pageNumber, pageSize);
+        IPage<MarkEntranceDto> markEntranceDtoIPage = markUserGroupService.listEntranceGroup(examId, courseId, paperNumber, pageNumber, pageSize);
         return ResultUtil.ok(markEntranceDtoIPage);
     }
 

+ 1 - 1
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkQuestionController.java

@@ -62,7 +62,7 @@ public class MarkQuestionController extends BaseController {
     @RequestMapping(value = "/list", method = RequestMethod.POST)
     public Result list(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
                        @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
-                       @ApiParam(value = "试卷编号", required = true) @RequestParam String paperType) {
+                       @ApiParam(value = "试卷类型", required = true) @RequestParam String paperType) {
         boolean canCreate = false;
         ExamTaskDetail examTaskDetail = examTaskDetailService.findByExamIdAndCourseCodeAndPaperNumber(examId, null, paperNumber);
         if (examTaskDetail == null) {

+ 8 - 8
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkSettingController.java

@@ -69,7 +69,7 @@ public class MarkSettingController {
     @RequestMapping(value = "/list", method = RequestMethod.POST)
     public Result list(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
                        @ApiParam(value = "考试ID") @RequestParam(required = false) Long examId,
-                       @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
+                       @ApiParam(value = "课程Id") @RequestParam(required = false) Long courseId,
                        @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                        @ApiParam(value = "提交状态") @RequestParam(required = false) Boolean groupStatus,
                        @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber, @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
@@ -79,7 +79,7 @@ public class MarkSettingController {
         if (examId == null) {
             throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
         }
-        IPage<MarkSettingDto> markSettingDtoIPage = markPaperService.listPaperSetting(examId, courseCode, paperNumber,
+        IPage<MarkSettingDto> markSettingDtoIPage = markPaperService.listPaperSetting(examId, courseId, paperNumber,
                 groupStatus, pageNumber, pageSize);
         for (MarkSettingDto record : markSettingDtoIPage.getRecords()) {
             ExamTaskDetail examTaskDetail = examTaskDetailService.findByExamIdAndCourseCodeAndPaperNumber(record.getExamId(), record.getCourseCode(), record.getPaperNumber());
@@ -120,7 +120,7 @@ public class MarkSettingController {
     @RequestMapping(value = "/summary", method = RequestMethod.POST)
     public Result summary(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
                           @ApiParam(value = "考试ID") @RequestParam(required = false) Long examId,
-                          @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
+                          @ApiParam(value = "课程ID") @RequestParam(required = false) Long courseId,
                           @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                           @ApiParam(value = "完成进度") @RequestParam(required = false) Boolean progressStatus,
                           @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
@@ -131,7 +131,7 @@ public class MarkSettingController {
         if (examId == null) {
             throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
         }
-        IPage<MarkManageDto> markManageDtoIPage = markTaskService.listPaperManage(examId, courseCode, paperNumber,
+        IPage<MarkManageDto> markManageDtoIPage = markTaskService.listPaperManage(examId, courseId, paperNumber,
                 progressStatus, pageNumber, pageSize);
         return ResultUtil.ok(markManageDtoIPage);
     }
@@ -143,7 +143,7 @@ public class MarkSettingController {
     @RequestMapping(value = "/export_marker", method = RequestMethod.POST)
     public void exportMarker(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
                              @ApiParam(value = "考试ID") @RequestParam(required = false) Long examId,
-                             @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
+                             @ApiParam(value = "课程ID") @RequestParam(required = false) Long courseId,
                              @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                              HttpServletResponse response) {
         if (semesterId == null) {
@@ -152,7 +152,7 @@ public class MarkSettingController {
         if (examId == null) {
             throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
         }
-        markTaskService.exportMarker(examId, courseCode, paperNumber, response);
+        markTaskService.exportMarker(examId, courseId, paperNumber, response);
     }
 
     /**
@@ -162,7 +162,7 @@ public class MarkSettingController {
     @RequestMapping(value = "/scoreList", method = RequestMethod.POST)
     public Result scoreList(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
                             @ApiParam(value = "考试ID") @RequestParam(required = false) Long examId,
-                            @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
+                            @ApiParam(value = "课程ID") @RequestParam(required = false) Long courseId,
                             @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                             @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                             @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN)
@@ -173,7 +173,7 @@ public class MarkSettingController {
         if (examId == null) {
             throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
         }
-        IPage<CheckScoreListDto> scoreListDtoIPage = markPaperService.listStudentScoreList(examId, courseCode,
+        IPage<CheckScoreListDto> scoreListDtoIPage = markPaperService.listStudentScoreList(examId, courseId,
                 paperNumber, pageNumber, pageSize);
         return ResultUtil.ok(scoreListDtoIPage);
     }

+ 0 - 3
teachcloud-common/src/main/java/com/qmth/teachcloud/common/bean/result/SyncListResult.java

@@ -46,9 +46,6 @@ public class SyncListResult implements Serializable {
     @ApiModelProperty(value = "同步对象ID(包含计划ID、试卷结构ID)")
     private String objectId;
 
-//    @ApiModelProperty(value = "云阅卷考试ID")
-//    private String thirdRelateId;
-
     @ApiModelProperty(value = "任务状态,INIT:未开始,RUNNING:进行中,FINISH:已完成")
     private String status;
 

+ 0 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/enums/TaskTypeEnum.java

@@ -15,7 +15,6 @@ public enum TaskTypeEnum {
     MARK_STUDENT_IMPORT("阅卷数据导入"),
     COURSE_DIMENSION_IMPORT("课程知识点导入"),
     QUESTION_MISSION_BATCH_CREATE("批量新建命题任务"),
-    SAMPLE_EXPORT("导出审核样本"),
     EXAMINATION_IMPORT("考务数据导入"),
     EXAMINATION_EXPORT("考务数据导出"),
     PRINT_PDF_DOWNLOAD("批量下载pdf"),

+ 5 - 7
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/bean/archivescore/ArchiveScoreQuery.java

@@ -10,7 +10,7 @@ public class ArchiveScoreQuery extends PagerQuery {
 	@NotNull(message = "请选择考试")
 	private Long examId;
 	
-	private String courseCode;
+	private Long courseId;
 
 	public Long getSemesterId() {
 		return semesterId;
@@ -28,13 +28,11 @@ public class ArchiveScoreQuery extends PagerQuery {
 		this.examId = examId;
 	}
 
-	public String getCourseCode() {
-		return courseCode;
+	public Long getCourseId() {
+		return courseId;
 	}
 
-	public void setCourseCode(String courseCode) {
-		this.courseCode = courseCode;
+	public void setCourseId(Long courseId) {
+		this.courseId = courseId;
 	}
-
-
 }

+ 5 - 7
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/bean/document/ArchivePaperQuery.java

@@ -10,7 +10,7 @@ public class ArchivePaperQuery extends PagerQuery {
 	@NotNull(message = "请选择考试")
 	private Long examId;
 	
-	private String courseCode;
+	private Long courseId;
 
 	public Long getSemesterId() {
 		return semesterId;
@@ -28,13 +28,11 @@ public class ArchivePaperQuery extends PagerQuery {
 		this.examId = examId;
 	}
 
-	public String getCourseCode() {
-		return courseCode;
+	public Long getCourseId() {
+		return courseId;
 	}
 
-	public void setCourseCode(String courseCode) {
-		this.courseCode = courseCode;
+	public void setCourseId(Long courseId) {
+		this.courseId = courseId;
 	}
-
-
 }

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

@@ -27,15 +27,15 @@ import com.qmth.teachcloud.mark.entity.MarkPaper;
  */
 public interface MarkPaperMapper extends BaseMapper<MarkPaper> {
 
-    IPage<MarkSettingDto> listPaperSetting(@Param("page") Page<MarkSettingDto> page, @Param("schoolId") Long schoolId, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("groupStatus") Boolean groupStatus, @Param("dpr") DataPermissionRule dpr);
+    IPage<MarkSettingDto> listPaperSetting(@Param("page") Page<MarkSettingDto> page, @Param("schoolId") Long schoolId, @Param("examId") Long examId, @Param("courseId") Long courseId, @Param("paperNumber") String paperNumber, @Param("groupStatus") Boolean groupStatus, @Param("dpr") DataPermissionRule dpr);
 
     List<MarkPaper> listQualityMarkPaperByStatus(@Param("status") String status, @Param("uploadCount") int uploadCount);
 
-    IPage<CheckScoreListDto> listStudentScoreList(@Param("page") Page<CheckScoreListDto> page, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("dpr") DataPermissionRule dpr);
+    IPage<CheckScoreListDto> listStudentScoreList(@Param("page") Page<CheckScoreListDto> page, @Param("examId") Long examId, @Param("courseId") Long courseId, @Param("paperNumber") String paperNumber, @Param("dpr") DataPermissionRule dpr);
 
     IPage<MarkPaperPackageDto> listPackage(@Param("page") Page<MarkPaperPackageDto> page, @Param("examId") Long examId, @Param("coursePaperId") String coursePaperId, @Param("packageCode") String packageCode);
 
-    List<MarkSettingDto> listPaperSetting(@Param("schoolId") Long schoolId, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("groupStatus") boolean groupStatus, @Param("dpr") DataPermissionRule dpr);
+    List<MarkSettingDto> listPaperSetting(@Param("schoolId") Long schoolId, @Param("examId") Long examId, @Param("courseId") Long courseId, @Param("paperNumber") String paperNumber, @Param("groupStatus") boolean groupStatus, @Param("dpr") DataPermissionRule dpr);
 
     IPage<ArchiveScoreVo> scoreList(Page<ArchiveScoreVo> page, @Param("schoolId") Long schoolId, @Param("req") ArchiveScoreQuery query, @Param("dpr") DataPermissionRule dpr);
 

+ 2 - 2
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/mapper/MarkTaskMapper.java

@@ -23,9 +23,9 @@ import com.qmth.teachcloud.mark.entity.MarkTask;
  */
 public interface MarkTaskMapper extends BaseMapper<MarkTask> {
 
-    IPage<MarkManageDto> listPaperManage(@Param("page") Page<MarkManageDto> page, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("progressStatus") Boolean progressStatus, @Param("dpr") DataPermissionRule dpr);
+    IPage<MarkManageDto> listPaperManage(@Param("page") Page<MarkManageDto> page, @Param("examId") Long examId, @Param("courseId") Long courseId, @Param("paperNumber") String paperNumber, @Param("progressStatus") Boolean progressStatus, @Param("dpr") DataPermissionRule dpr);
 
-    List<MarkerInfoDto> listUserMarkedCount(@Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber);
+    List<MarkerInfoDto> listUserMarkedCount(@Param("examId") Long examId, @Param("courseId") Long courseId, @Param("paperNumber") String paperNumber);
 
     MarkTask getLastOneByUserIdAndStatus(@Param("examId") Long examId, @Param("paperNumber") String paperNumber, @Param("groupNumber") Integer groupNumber, @Param("userId") Long userId, @Param("status") String status);
 

+ 1 - 1
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/mapper/MarkUserGroupMapper.java

@@ -22,7 +22,7 @@ import java.util.List;
  */
 public interface MarkUserGroupMapper extends BaseMapper<MarkUserGroup> {
 
-    IPage<MarkEntranceDto> listEntranceGroup(@Param("page") Page<MarkUserGroup> page, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("userId") Long userId, @Param("status") String status);
+    IPage<MarkEntranceDto> listEntranceGroup(@Param("page") Page<MarkUserGroup> page, @Param("examId") Long examId, @Param("courseId") Long courseId, @Param("paperNumber") String paperNumber, @Param("userId") Long userId, @Param("status") String status);
 
     List<MarkUser> listGroupUserByExamIdAndPaperNumberAndGroupNumber(@Param("examId") Long examId, @Param("paperNumber") String paperNumber, @Param("groupNumber") Integer groupNumber, @Param("className") String className);
 

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

@@ -26,7 +26,7 @@ import com.qmth.teachcloud.mark.entity.MarkPaper;
  */
 public interface MarkPaperService extends IService<MarkPaper> {
 
-    IPage<MarkSettingDto> listPaperSetting(Long examId, String courseCode, String paperNumber, Boolean groupStatus, Integer pageNumber, Integer pageSize);
+    IPage<MarkSettingDto> listPaperSetting(Long examId, Long courseId, String paperNumber, Boolean groupStatus, Integer pageNumber, Integer pageSize);
 
     MarkPaper getByExamIdAndPaperNumber(Long examId, String paperNumber);
 
@@ -42,7 +42,7 @@ public interface MarkPaperService extends IService<MarkPaper> {
 
     int getPaperNumberCount(Long id, String courseCode, String coursePaperId, MarkPaperStatus status, DataPermissionRule dpr);
 
-    IPage<CheckScoreListDto> listStudentScoreList(Long examId, String courseCode, String paperNumber, Integer pageNumber, Integer pageSize);
+    IPage<CheckScoreListDto> listStudentScoreList(Long examId, Long courseId, String paperNumber, Integer pageNumber, Integer pageSize);
 
     void updateStatus(Long examId, String paperNumber, MarkPaperStatus newStatus, MarkPaperStatus currentStatus);
 

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

@@ -21,9 +21,9 @@ import com.qmth.teachcloud.mark.enums.MarkTaskStatus;
  */
 public interface MarkTaskService extends IService<MarkTask> {
 
-    IPage<MarkManageDto> listPaperManage(Long examId, String courseCode, String paperNumber, Boolean progressStatus, Integer pageNumber, Integer pageSize);
+    IPage<MarkManageDto> listPaperManage(Long examId, Long courseId, String paperNumber, Boolean progressStatus, Integer pageNumber, Integer pageSize);
 
-    void exportMarker(Long examId, String courseCode, String paperNumber, HttpServletResponse response);
+    void exportMarker(Long examId, Long courseId, String paperNumber, HttpServletResponse response);
 
     List<MarkTask> listByExamIdAndPaperNumberAndGroupNumberAndUserIdAndClassName(Long examId, String paperNumber, Integer groupNumber, Long userId, String className);
 

+ 1 - 1
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/MarkUserGroupService.java

@@ -22,7 +22,7 @@ import java.util.List;
  */
 public interface MarkUserGroupService extends IService<MarkUserGroup> {
 
-    IPage<MarkEntranceDto> listEntranceGroup(Long examId, String courseCode, String paperNumber, Integer pageNumber, Integer pageSize);
+    IPage<MarkEntranceDto> listEntranceGroup(Long examId, Long courseCode, String paperNumber, Integer pageNumber, Integer pageSize);
 
     List<MarkUser> listGroupUserByExamIdAndPaperNumberAndGroupNumberAndClassName(Long examId, String paperNumber, Integer number, String className);
 

+ 4 - 4
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkPaperServiceImpl.java

@@ -72,11 +72,11 @@ public class MarkPaperServiceImpl extends ServiceImpl<MarkPaperMapper, MarkPaper
 
 
     @Override
-    public IPage<MarkSettingDto> listPaperSetting(Long examId, String courseCode, String paperNumber, Boolean groupStatus, Integer pageNumber, Integer pageSize) {
+    public IPage<MarkSettingDto> listPaperSetting(Long examId, Long courseId, String paperNumber, Boolean groupStatus, Integer pageNumber, Integer pageSize) {
         Page<MarkSettingDto> page = new Page<>(pageNumber, pageSize);
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(sysUser.getSchoolId(), sysUser.getId(), "/api/admin/mark/setting/list");
-        IPage<MarkSettingDto> markSettingDtoIPage = this.baseMapper.listPaperSetting(page, sysUser.getSchoolId(), examId, courseCode, paperNumber, groupStatus, dpr);
+        IPage<MarkSettingDto> markSettingDtoIPage = this.baseMapper.listPaperSetting(page, sysUser.getSchoolId(), examId, courseId, paperNumber, groupStatus, dpr);
         for (MarkSettingDto record : markSettingDtoIPage.getRecords()) {
             if (Objects.nonNull(record.getMarkMode())) {
                 record.setMarkModeDisplay(record.getMarkMode().getName());
@@ -217,11 +217,11 @@ public class MarkPaperServiceImpl extends ServiceImpl<MarkPaperMapper, MarkPaper
     }
 
     @Override
-    public IPage<CheckScoreListDto> listStudentScoreList(Long examId, String courseCode, String paperNumber, Integer pageNumber, Integer pageSize) {
+    public IPage<CheckScoreListDto> listStudentScoreList(Long examId, Long courseId, String paperNumber, Integer pageNumber, Integer pageSize) {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         Page<CheckScoreListDto> page = new Page<>(pageNumber, pageSize);
         DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(sysUser.getSchoolId(), sysUser.getId(), ServletUtil.getRequest().getServletPath());
-        return this.baseMapper.listStudentScoreList(page, examId, courseCode, paperNumber, dpr);
+        return this.baseMapper.listStudentScoreList(page, examId, courseId, paperNumber, dpr);
     }
 
     @Override

+ 4 - 8
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkTaskServiceImpl.java

@@ -49,16 +49,12 @@ public class MarkTaskServiceImpl extends ServiceImpl<MarkTaskMapper, MarkTask> i
     private BasicRoleDataPermissionService basicRoleDataPermissionService;
 
     @Override
-    public IPage<MarkManageDto> listPaperManage(Long examId, String courseCode, String paperNumber, Boolean progressStatus, Integer pageNumber, Integer pageSize) {
+    public IPage<MarkManageDto> listPaperManage(Long examId, Long courseId, String paperNumber, Boolean progressStatus, Integer pageNumber, Integer pageSize) {
         Page<MarkManageDto> page = new Page<>(pageNumber, pageSize);
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(sysUser.getSchoolId(), sysUser.getId(), ServletUtil.getRequest().getServletPath());
-        IPage<MarkManageDto> markManageDtoIPage = this.baseMapper.listPaperManage(page, examId, courseCode, paperNumber, progressStatus, dpr);
+        IPage<MarkManageDto> markManageDtoIPage = this.baseMapper.listPaperManage(page, examId, courseId, paperNumber, progressStatus, dpr);
         for (MarkManageDto record : markManageDtoIPage.getRecords()) {
-//            int totalCount = markStudentService.countByExamIdAndPaperNumberAndMarkStatus(record.getExamId(), record.getPaperNumber(), null);
-//            record.setTotalCount(totalCount);
-//            int markedCount = markStudentService.countByExamIdAndPaperNumberAndMarkStatus(record.getExamId(), record.getPaperNumber(), SubjectiveStatus.MARKED);
-//            record.setMarkedCount(markedCount);
             record.setStatusDisplay(record.getStatus() == null ? null : record.getStatus().getName());
             record.setOmrAbsentCount(markStudentService.countOmrAbsentStudent(record.getExamId(), record.getPaperNumber(), record.getPaperType(), false));
             record.setPercent(Calculator.divide2String(Calculator.multiply(record.getMarkedCount(), 100), Double.valueOf(record.getTotalCount()), 2));
@@ -67,8 +63,8 @@ public class MarkTaskServiceImpl extends ServiceImpl<MarkTaskMapper, MarkTask> i
     }
 
     @Override
-    public void exportMarker(Long examId, String courseCode, String paperNumber, HttpServletResponse response) {
-        List<MarkerInfoDto> markerInfoDtoList = this.baseMapper.listUserMarkedCount(examId, courseCode, paperNumber);
+    public void exportMarker(Long examId, Long courseId, String paperNumber, HttpServletResponse response) {
+        List<MarkerInfoDto> markerInfoDtoList = this.baseMapper.listUserMarkedCount(examId, courseId, paperNumber);
         for (MarkerInfoDto markerInfoDto : markerInfoDtoList) {
             MarkGroup markGroup = markGroupService.getByExamIdAndPaperNumberAndGroupNumber(examId, markerInfoDto.getPaperNumber(), markerInfoDto.getGroupNumber());
             markGroup.setQuestionList(markQuestionService.listQuestionByExamIdAndPaperNumberAndGroupNumber(examId, markerInfoDto.getPaperNumber(), markerInfoDto.getGroupNumber(), false));

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

@@ -68,10 +68,10 @@ public class MarkUserGroupServiceImpl extends ServiceImpl<MarkUserGroupMapper, M
     private LockService lockService;
 
     @Override
-    public IPage<MarkEntranceDto> listEntranceGroup(Long examId, String courseCode, String paperNumber, Integer pageNumber, Integer pageSize) {
+    public IPage<MarkEntranceDto> listEntranceGroup(Long examId, Long courseId, String paperNumber, Integer pageNumber, Integer pageSize) {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         Page<MarkUserGroup> page = new Page<>(pageNumber, pageSize);
-        IPage<MarkEntranceDto> markEntranceDtoIPage = this.baseMapper.listEntranceGroup(page, examId, courseCode, paperNumber, sysUser.getId(), MarkPaperStatus.FORMAL.name());
+        IPage<MarkEntranceDto> markEntranceDtoIPage = this.baseMapper.listEntranceGroup(page, examId, courseId, paperNumber, sysUser.getId(), MarkPaperStatus.FORMAL.name());
         for (MarkEntranceDto record : markEntranceDtoIPage.getRecords()) {
             int taskCount = record.getTaskCount();
             int markedCount = record.getMarkedCount();

+ 22 - 19
teachcloud-mark/src/main/resources/mapper/MarkPaperMapper.xml

@@ -31,15 +31,17 @@
     <select id="listPaperSetting" resultType="com.qmth.teachcloud.common.bean.dto.mark.MarkSettingDto">
         SELECT
         mp.exam_id examId,
-        mp.course_code courseCode,
-        mp.course_name courseName,
+        bc.code courseCode,
+        bc.name courseName,
         mp.paper_number paperNumber,
         mp.mark_mode markMode,
         mp.group_status groupStatus,
         mp.paper_type paperType
         FROM
         mark_paper mp
-        LEFT JOIN
+            LEFT JOIN
+        basic_course bc ON mp.course_id = bc.id
+            LEFT JOIN
         sys_user su ON mp.user_id = su.id
         <where>
             <if test="schoolId != null">
@@ -48,8 +50,8 @@
             <if test="examId != null">
                 and mp.exam_id = #{examId}
             </if>
-            <if test="courseCode != null and courseCode != ''">
-                and mp.course_code = #{courseCode}
+            <if test="courseId != null">
+                and mp.course_id = #{courseId}
             </if>
             <if test="paperNumber != null and paperNumber != ''">
                 and mp.paper_number = #{paperNumber}
@@ -88,17 +90,18 @@
     <select id="listStudentScoreList" resultType="com.qmth.teachcloud.mark.dto.mark.score.CheckScoreListDto">
         SELECT
         mp.exam_id examId,
-        mp.course_code courseCode,
-        mp.course_name courseName,
+        bc.code courseCode,
+        bc.name courseName,
         mp.paper_number paperNumber,
         mp.student_count studentCount,
         mp.upload_count uploadCount
         FROM
         mark_paper mp
+        LEFT JOIN basic_course bc ON mp.course_id = bc.id
         LEFT JOIN sys_user su ON mp.user_id = su.id
         where mp.exam_id = #{examId}
-        <if test="courseCode != null and courseCode != ''">
-            AND mp.course_code = #{courseCode}
+        <if test="courseId != null">
+            AND mp.course_id = #{courseId}
         </if>
         <if test="paperNumber != null and paperNumber != ''">
             AND mp.paper_number = #{paperNumber}
@@ -108,7 +111,7 @@
                 AND mp.user_id = #{dpr.requestUserId}
             </if>
             <if test="dpr.courseUserId != null">
-                AND EXISTS( SELECT 1 FROM (select course_code from teach_course where exam_id = #{examId} and user_id = #{dpr.courseUserId}) tc WHERE tc.course_code = mp.course_code)
+                AND EXISTS( SELECT 1 FROM (select course_id from teach_course where exam_id = #{examId} and user_id = #{dpr.courseUserId}) tc WHERE tc.course_id = mp.course_id)
             </if>
             <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                 AND su.org_id IN
@@ -133,7 +136,7 @@
         ORDER BY sp.package_code
     </select>
     <select id="scoreList" resultType="com.qmth.teachcloud.mark.bean.archivescore.ArchiveScoreVo">
-        SELECT t.id,t.exam_id,t.course_code,t.course_name,t.paper_number,
+        SELECT t.id,t.exam_id,bc.code courseCode,bc.name courseName,t.paper_number,
         count(*) studentCount,count(distinct s.class_name) classCount,
         sum(case when s.is_absent =1 or s.omr_absent =1 then 1 else 0 end) absentCount,
         avg(case when s.is_absent !=1 then ifnull(s.objective_score,0)+ifnull(s.subjective_score,0) else null end) avgScore,
@@ -146,11 +149,11 @@
         FROM
         mark_paper t
         left join mark_student s on t.exam_id=s.exam_id and t.course_paper_id=s.course_paper_id
-        left join (select * from basic_course where school_id = #{schoolId}) bc on s.course_code = bc.code
+        left join (select * from basic_course where school_id = #{schoolId}) bc on s.course_id = bc.id
         WHERE
         t.exam_id = #{req.examId}
-        <if test="req.courseCode != null and req.courseCode != ''">
-            AND t.course_code = #{req.courseCode}
+        <if test="req.courseId != null">
+            AND t.course_id = #{req.courseId}
         </if>
         AND t.status = 'FINISH'
         <if test="dpr != null">
@@ -158,7 +161,7 @@
                 AND s.teacher_id = #{dpr.requestUserId}
             </if>
             <if test="dpr.courseUserId != null">
-                AND EXISTS( SELECT 1 FROM (select course_code from teach_course where exam_id = #{req.examId} and user_id = #{dpr.courseUserId}) tc WHERE tc.course_code = t.course_code)
+                AND EXISTS( SELECT 1 FROM (select course_id from teach_course where exam_id = #{req.examId} and user_id = #{dpr.courseUserId}) tc WHERE tc.course_id = t.course_id)
             </if>
             <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                 AND bc.teaching_room_id IN
@@ -167,7 +170,7 @@
                 </foreach>
             </if>
         </if>
-        group by t.id,t.exam_id,t.course_code,t.course_name,t.paper_number
+        group by t.id,t.exam_id,t.course_id, t.paper_number
         ORDER BY t.id desc
     </select>
     <select id="getCourseCount" resultType="java.lang.Integer">
@@ -244,8 +247,8 @@
         left join sys_user su on t.user_id = su.id
         WHERE
         t.exam_id = #{req.examId}
-        <if test="req.courseCode != null and req.courseCode != ''">
-            AND t.course_code = #{req.courseCode}
+        <if test="req.courseId != null">
+            AND t.course_id = #{req.courseId}
         </if>
         AND t.status = 'FINISH'
         <if test="dpr != null">
@@ -253,7 +256,7 @@
                 AND t.user_id = #{dpr.requestUserId}
             </if>
             <if test="dpr.courseUserId != null">
-                AND EXISTS( SELECT 1 FROM (select course_code from teach_course where exam_id = #{req.examId} and user_id = #{dpr.courseUserId}) tc WHERE tc.course_code = t.course_code)
+                AND EXISTS( SELECT 1 FROM (select course_id from teach_course where exam_id = #{req.examId} and user_id = #{dpr.courseUserId}) tc WHERE tc.course_id = t.course_id)
             </if>
             <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                 AND su.org_id IN

+ 14 - 11
teachcloud-mark/src/main/resources/mapper/MarkTaskMapper.xml

@@ -28,8 +28,8 @@
     <select id="listPaperManage" resultType="com.qmth.teachcloud.mark.dto.mark.manage.MarkManageDto">
         SELECT
             mp.exam_id examId,
-            mp.course_code courseCode,
-            mp.course_name courseName,
+            bc.code courseCode,
+            bc.name courseName,
             mp.paper_number paperNumber,
             mp.paper_type paperType,
             mp.status,
@@ -44,8 +44,8 @@
                  count(1) totalCount,
                  sum(case ms.subjective_status when 'MARKED' then 1 else 0 end) markedCount
              from mark_student ms where ms.exam_id = #{examId}
-                <if test="courseCode != null and courseCode != ''">
-                    and ms.course_code = #{courseCode}
+                <if test="courseId != null">
+                    and ms.course_id = #{courseId}
                 </if>
                 <if test="paperNumber != null and paperNumber != ''">
                     and ms.paper_number = #{paperNumber}
@@ -53,11 +53,12 @@
                 and ms.is_upload = true and ms.is_absent = false and ms.is_breach = false and ms.omr_absent = false
                 group by ms.exam_id, ms.paper_number, ms.paper_type) b
                     on mp.exam_id = b.exam_id and mp.paper_number = b.paper_number and mp.paper_type = b.paper_type
+            left join basic_course bc on mp.course_id = bc.id
             left join sys_user su on mp.user_id = su.id
         <where>
             mp.exam_id = #{examId}
-            <if test="courseCode != null and courseCode != ''">
-                and mp.course_code = #{courseCode}
+            <if test="courseId != null">
+                and mp.course_id = #{courseId}
             </if>
             <if test="paperNumber != null and paperNumber != ''">
                 and mp.paper_number = #{paperNumber}
@@ -67,7 +68,7 @@
                     and mp.user_id = #{dpr.requestUserId}
                 </if>
                 <if test="dpr.courseUserId != null">
-                    AND EXISTS( SELECT 1 FROM (select course_code from teach_course where exam_id = #{examId} and user_id = #{dpr.courseUserId}) tc WHERE tc.course_code = mp.course_code)
+                    AND EXISTS( SELECT 1 FROM (select course_id from teach_course where exam_id = #{examId} and user_id = #{dpr.courseUserId}) tc WHERE tc.course_id = mp.course_id)
                 </if>
                 <if test="dpr.orgIdSet != null">
                     AND su.org_id IN
@@ -91,8 +92,8 @@
             resultType="com.qmth.teachcloud.mark.dto.mark.manage.MarkerInfoDto">
         SELECT
             mt.exam_id examId,
-            mt.course_code courseCode,
-            mt.course_name courseName,
+            bc.code courseCode,
+            bc.name courseName,
             mt.paper_number paperNumber,
             mt.group_number groupNumber,
             su.login_name loginName,
@@ -102,11 +103,13 @@
         FROM
             mark_task mt
                 LEFT JOIN
+            basic_course bc ON mt.course_id = bc.id
+                LEFT JOIN
             sys_user su ON mt.user_id = su.id
         <where>
             mt.exam_id = #{examId}
-            <if test="courseCode != null and courseCode != ''">
-                and mt.course_code = #{courseCode}
+            <if test="courseId != null">
+                and mt.course_id = #{courseId}
             </if>
             <if test="paperNumber != null and paperNumber != ''">
                 and mt.paper_number = #{paperNumber}

+ 2 - 2
teachcloud-mark/src/main/resources/mapper/MarkUserGroupMapper.xml

@@ -37,8 +37,8 @@
                 AND mug.group_number = mg.number
         <where>
             mg.exam_id = #{examId}
-            <if test="courseCode != null and courseCode != ''">
-                and mg.course_code = #{courseCode}
+            <if test="courseId != null">
+                and mg.course_id = #{courseId}
             </if>
             <if test="paperNumber != null and paperNumber != ''">
                 and mg.paper_number = #{paperNumber}