Browse Source

考试中心
印刷管理部分新增学期和考试查询条件修改

caozixuan 2 years ago
parent
commit
806eff8cf0
16 changed files with 339 additions and 44 deletions
  1. 18 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExamTaskDetailDto.java
  2. 33 9
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExaminationExportDto.java
  3. 46 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/PrintTaskDto.java
  4. 46 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/ExaminationDetailResult.java
  5. 46 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/ExaminationResult.java
  6. 6 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamDetailMapper.java
  7. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamTaskDetailMapper.java
  8. 11 4
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamDetailService.java
  9. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamTaskDetailService.java
  10. 20 10
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamDetailServiceImpl.java
  11. 2 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskDetailServiceImpl.java
  12. 56 2
      distributed-print-business/src/main/resources/mapper/ExamDetailMapper.xml
  13. 11 1
      distributed-print-business/src/main/resources/mapper/ExamStudentMapper.xml
  14. 15 1
      distributed-print-business/src/main/resources/mapper/ExamTaskDetailMapper.xml
  15. 17 7
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamDetailController.java
  16. 10 6
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamPrintPlanController.java

+ 18 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExamTaskDetailDto.java

@@ -33,7 +33,9 @@ public class ExamTaskDetailDto {
     private Integer totalSubjects;
     private String examDetailCourseIds;
 
+    private Long examId;
     private String examName;
+    private Long semesterId;
     private String semesterName;
 
     @ApiModelProperty(value = "题卡制作方式:SELECT-选择已有题卡,SELF-自助创建,CUST-客户制卡")
@@ -280,4 +282,20 @@ public class ExamTaskDetailDto {
     public void setPaperAttachmentIds(String paperAttachmentIds) {
         this.paperAttachmentIds = paperAttachmentIds;
     }
+
+    public Long getExamId() {
+        return examId;
+    }
+
+    public void setExamId(Long examId) {
+        this.examId = examId;
+    }
+
+    public Long getSemesterId() {
+        return semesterId;
+    }
+
+    public void setSemesterId(Long semesterId) {
+        this.semesterId = semesterId;
+    }
 }

+ 33 - 9
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExaminationExportDto.java

@@ -16,40 +16,48 @@ public class ExaminationExportDto {
     @ExcelProperty(name = "序号", width = 30, index = 1)
     private Long index;
 
+    @ApiModelProperty(value = "学期名称")
+    @ExcelProperty(name = "学期名称", width = 30, index = 2)
+    private String semesterName;
+
+    @ApiModelProperty(value = "考试名称")
+    @ExcelProperty(name = "考试名称", width = 30, index = 3)
+    private String examName;
+
     @ApiModelProperty(value = "印刷计划名称")
-    @ExcelProperty(name = "印刷计划名称", width = 30, index = 2)
+    @ExcelProperty(name = "印刷计划名称", width = 30, index = 4)
     private String printPlanName;
 
     @ApiModelProperty(value = "考试日期")
-    @ExcelProperty(name = "考试日期", width = 30, index = 3)
+    @ExcelProperty(name = "考试日期", width = 30, index = 5)
     private String examDate;
 
     @ApiModelProperty(value = "考试时间")
-    @ExcelProperty(name = "考试时间", width = 30, index = 4)
+    @ExcelProperty(name = "考试时间", width = 30, index = 6)
     private String examTime;
 
     @ApiModelProperty(value = "考点")
-    @ExcelProperty(name = "考点", width = 30, index = 5)
+    @ExcelProperty(name = "考点", width = 30, index = 7)
     private String examPlace;
 
     @ApiModelProperty(value = "考场")
-    @ExcelProperty(name = "考场", width = 30, index = 6)
+    @ExcelProperty(name = "考场", width = 30, index = 8)
     private String examRoom;
 
     @ApiModelProperty(value = "卷袋号")
-    @ExcelProperty(name = "卷袋号", width = 30, index = 7)
+    @ExcelProperty(name = "卷袋号", width = 30, index = 9)
     private String packageCode;
 
     @ApiModelProperty(value = "课程(代码)")
-    @ExcelProperty(name = "课程(代码)", width = 30, index = 8)
+    @ExcelProperty(name = "课程(代码)", width = 30, index = 10)
     private String courseNameCode;
 
     @ApiModelProperty(value = "试卷编号")
-    @ExcelProperty(name = "试卷编号", width = 30, index = 9)
+    @ExcelProperty(name = "试卷编号", width = 30, index = 11)
     private String paperNumber;
 
     @ApiModelProperty(value = "科次")
-    @ExcelProperty(name = "科次", width = 30, index = 10)
+    @ExcelProperty(name = "科次", width = 30, index = 12)
     private int totalSubjects;
 
     public Long getIndex() {
@@ -60,6 +68,22 @@ public class ExaminationExportDto {
         this.index = index;
     }
 
+    public String getSemesterName() {
+        return semesterName;
+    }
+
+    public void setSemesterName(String semesterName) {
+        this.semesterName = semesterName;
+    }
+
+    public String getExamName() {
+        return examName;
+    }
+
+    public void setExamName(String examName) {
+        this.examName = examName;
+    }
+
     public String getPrintPlanName() {
         return printPlanName;
     }

+ 46 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/PrintTaskDto.java

@@ -39,6 +39,20 @@ public class PrintTaskDto {
     @ApiModelProperty(value = "印刷室名称")
     private String printHouseName;
 
+    @ApiModelProperty(value = "学期id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long semesterId;
+
+    @ApiModelProperty(value = "学期名称")
+    private String semesterName;
+
+    @ApiModelProperty(value = "考试id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long examId;
+
+    @ApiModelProperty(value = "考试名称")
+    private String examName;
+
     public String getExamDetailId() {
         return examDetailId;
     }
@@ -214,4 +228,36 @@ public class PrintTaskDto {
     public void setPrintHouseName(String printHouseName) {
         this.printHouseName = printHouseName;
     }
+
+    public Long getSemesterId() {
+        return semesterId;
+    }
+
+    public void setSemesterId(Long semesterId) {
+        this.semesterId = semesterId;
+    }
+
+    public String getSemesterName() {
+        return semesterName;
+    }
+
+    public void setSemesterName(String semesterName) {
+        this.semesterName = semesterName;
+    }
+
+    public Long getExamId() {
+        return examId;
+    }
+
+    public void setExamId(Long examId) {
+        this.examId = examId;
+    }
+
+    public String getExamName() {
+        return examName;
+    }
+
+    public void setExamName(String examName) {
+        this.examName = examName;
+    }
 }

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

@@ -15,6 +15,20 @@ public class ExaminationDetailResult {
     @ApiModelProperty(value = "考务数据-学生明细主键")
     private Long id;
 
+    @JsonSerialize(using = ToStringSerializer.class)
+    @ApiModelProperty(value = "学期id")
+    private Long semesterId;
+
+    @ApiModelProperty(value = "学期名称")
+    private String semesterName;
+
+    @JsonSerialize(using = ToStringSerializer.class)
+    @ApiModelProperty(value = "考试id")
+    private Long examId;
+
+    @ApiModelProperty(value = "考试名称")
+    private String examName;
+
     @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(value = "印刷计划主键")
     private Long printPlanId;
@@ -70,6 +84,38 @@ public class ExaminationDetailResult {
         this.id = id;
     }
 
+    public Long getSemesterId() {
+        return semesterId;
+    }
+
+    public void setSemesterId(Long semesterId) {
+        this.semesterId = semesterId;
+    }
+
+    public String getSemesterName() {
+        return semesterName;
+    }
+
+    public void setSemesterName(String semesterName) {
+        this.semesterName = semesterName;
+    }
+
+    public Long getExamId() {
+        return examId;
+    }
+
+    public void setExamId(Long examId) {
+        this.examId = examId;
+    }
+
+    public String getExamName() {
+        return examName;
+    }
+
+    public void setExamName(String examName) {
+        this.examName = examName;
+    }
+
     public Long getPrintPlanId() {
         return printPlanId;
     }

+ 46 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/ExaminationResult.java

@@ -19,6 +19,20 @@ public class ExaminationResult {
     @ApiModelProperty(value = "学校id")
     private Long schoolId;
 
+    @JsonSerialize(using = ToStringSerializer.class)
+    @ApiModelProperty(value = "学期id")
+    private Long semesterId;
+
+    @ApiModelProperty(value = "学期名称")
+    private String semesterName;
+
+    @JsonSerialize(using = ToStringSerializer.class)
+    @ApiModelProperty(value = "考试id")
+    private Long examId;
+
+    @ApiModelProperty(value = "考试名称")
+    private String examName;
+
     @ApiModelProperty(value = "印刷计划id")
     private Long printPlanId;
 
@@ -81,6 +95,38 @@ public class ExaminationResult {
         this.schoolId = schoolId;
     }
 
+    public Long getSemesterId() {
+        return semesterId;
+    }
+
+    public void setSemesterId(Long semesterId) {
+        this.semesterId = semesterId;
+    }
+
+    public String getSemesterName() {
+        return semesterName;
+    }
+
+    public void setSemesterName(String semesterName) {
+        this.semesterName = semesterName;
+    }
+
+    public Long getExamId() {
+        return examId;
+    }
+
+    public void setExamId(Long examId) {
+        this.examId = examId;
+    }
+
+    public String getExamName() {
+        return examName;
+    }
+
+    public void setExamName(String examName) {
+        this.examName = examName;
+    }
+
     public Long getPrintPlanId() {
         return printPlanId;
     }

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

@@ -25,6 +25,8 @@ import java.util.Set;
 public interface ExamDetailMapper extends BaseMapper<ExamDetail> {
 
     IPage<PrintTaskDto> listPrintTask(Page<PrintTaskDto> page, @Param("schoolId") Long schoolId,
+                                      @Param("semesterId") Long semesterId,
+                                      @Param("examId") Long examId,
                                       @Param("printPlanId") Long printPlanId,
                                       @Param("status") String status,
                                       @Param("courseCode") String courseCode,
@@ -40,6 +42,8 @@ public interface ExamDetailMapper extends BaseMapper<ExamDetail> {
 
     IPage<ExaminationResult> findBriefPage(@Param("page") Page<ExaminationResult> page,
                                            @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,
@@ -52,6 +56,8 @@ public interface ExamDetailMapper extends BaseMapper<ExamDetail> {
 
     IPage<ExaminationDetailResult> findDetailPage(@Param("page") Page<ExaminationDetailResult> page,
                                                   @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,

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

@@ -20,7 +20,7 @@ import java.util.Set;
  * @since 2021-03-23
  */
 public interface ExamTaskDetailMapper extends BaseMapper<ExamTaskDetail> {
-    IPage<ExamTaskDetailDto> listPage(Page<ExamTaskDetailDto> page, @Param("schoolId") Long schoolId, @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("orgIds") Set<Long> orgIds);
+    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("orgIds") Set<Long> orgIds);
 
     List<String> listExamDetailCourse(@Param("schoolId") Long schoolId, @Param("paperType") String paperType, @Param("printPlanId") Long printPlanId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber);
 }

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

@@ -45,7 +45,7 @@ public interface ExamDetailService extends IService<ExamDetail> {
      */
     double calculateTotalPackages(Long printPlanId);
 
-    IPage<PrintTaskDto> listPrintTask(Long printPlanId, String status, String courseCode, String paperNumber, String examPlace, String examRoom, Long examStartTime, Long examEndTime, Long printStartTime, Long printEndTime, Long printHouseId, Integer pageNumber, Integer pageSize);
+    IPage<PrintTaskDto> listPrintTask(Long semesterId,Long examId, Long printPlanId, String status, String courseCode, String paperNumber, String examPlace, String examRoom, Long examStartTime, Long examEndTime, Long printStartTime, Long printEndTime, Long printHouseId, Integer pageNumber, Integer pageSize);
 
     PrintTaskTotalDto taskTotalData(Long printPlanId, String status, String courseCode, String paperNumber, String examPlace, String examRoom, Long examStartTime, Long examEndTime, Long printStartTime, Long printEndTime, Long printHouseId);
 
@@ -72,6 +72,8 @@ public interface ExamDetailService extends IService<ExamDetail> {
      * 查询考务数据-简略
      *
      * @param schoolId        学校id
+     * @param semesterId      学期id
+     * @param examId          考试id
      * @param printPlanIdList 印刷计划id集合
      * @param courseCode      课程代码
      * @param paperNumber     试卷编号
@@ -85,13 +87,15 @@ public interface ExamDetailService extends IService<ExamDetail> {
      * @param orgIds          权限控制参数
      * @return 查询结果
      */
-    IPage<ExaminationResult> findExaminationBriefPage(Long schoolId, List<Long> printPlanIdList, String courseCode, String paperNumber,
+    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, Set<Long> orgIds);
 
     /**
      * 查询考务数据-汇总数据查询
      *
      * @param schoolId        学校id
+     * @param semesterId      学期id
+     * @param examId          考试id
      * @param printPlanIdList 印刷计划id集合
      * @param courseCode      课程代码
      * @param paperNumber     试卷编号
@@ -103,13 +107,16 @@ public interface ExamDetailService extends IService<ExamDetail> {
      * @param orgIds          权限控制参数
      * @return 查询结果
      */
-    SummarizedDataResult findSummarizedData(Long schoolId, List<Long> printPlanIdList, String courseCode, String paperNumber,
+    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, Set<Long> orgIds);
 
 
     /**
      * 查询考务数据-明细
      *
+     * @param schoolId      学校id
+     * @param semesterId      学期id
+     * @param examId          考试id
      * @param printPlanIdList 印刷计划id集合
      * @param courseCode      课程代码
      * @param paperNumber     试卷编号
@@ -122,7 +129,7 @@ public interface ExamDetailService extends IService<ExamDetail> {
      * @param pageSize        分页数量
      * @return 查询结果
      */
-    IPage<ExaminationDetailResult> findExaminationDetail(Long schoolId, List<Long> printPlanIdList, String courseCode, String paperNumber, String examPlace,
+    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);
 
     IPage<ExaminationDetailResult> findExaminationDetail(Long convertIdToLong, int pageNumber, int pageSize);

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

@@ -25,7 +25,7 @@ public interface ExamTaskDetailService extends IService<ExamTaskDetail> {
 
     boolean updatePaper(RelatePaperParam paperParam) throws IOException;
 
-    IPage<ExamTaskDetailDto> list(String relateType, List<Long> printPlanId, String courseCode, String paperNumber, String userName, Long cardRuleId, Integer pageNumber, Integer pageSize);
+    IPage<ExamTaskDetailDto> list(Long semesterId, Long examId, String relateType, List<Long> printPlanId, String courseCode, String paperNumber, String userName, Long cardRuleId, Integer pageNumber, Integer pageSize);
 
     List<ExamTaskDetail> listByCardId(Long cardId);
 

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

@@ -127,11 +127,11 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
     }
 
     @Override
-    public IPage<PrintTaskDto> listPrintTask(Long printPlanId, String status, String courseCode, String paperNumber, String examPlace, String examRoom, Long examStartTime, Long examEndTime, Long printStartTime, Long printEndTime, Long printHouseId, Integer pageNumber, Integer pageSize) {
+    public IPage<PrintTaskDto> listPrintTask(Long semesterId,Long examId, Long printPlanId, String status, String courseCode, String paperNumber, String examPlace, String examRoom, Long examStartTime, Long examEndTime, Long printStartTime, Long printEndTime, Long printHouseId, Integer pageNumber, Integer pageSize) {
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(null);
         Page<PrintTaskDto> page = new Page<>(pageNumber, pageSize);
-        return this.baseMapper.listPrintTask(page, schoolId, printPlanId, status, courseCode, paperNumber, examPlace, examRoom, examStartTime, examEndTime, printStartTime, printEndTime, printHouseId, orgIds);
+        return this.baseMapper.listPrintTask(page, schoolId,semesterId,examId, printPlanId, status, courseCode, paperNumber, examPlace, examRoom, examStartTime, examEndTime, printStartTime, printEndTime, printHouseId, orgIds);
     }
 
     @Override
@@ -246,8 +246,8 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
 
     @Transactional(rollbackFor = Exception.class)
     @Override
-    public IPage<ExaminationResult> findExaminationBriefPage(Long schoolId, List<Long> printPlanIdList, String courseCode, String paperNumber, String examPlace, String examRoom, String packageCode, Long startDate, Long endDate, int pageNumber, int pageSize, Set<Long> orgIds) {
-        IPage<ExaminationResult> page = examDetailMapper.findBriefPage(new Page<>(pageNumber, pageSize), schoolId, printPlanIdList, courseCode, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, orgIds);
+    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, Set<Long> orgIds) {
+        IPage<ExaminationResult> page = examDetailMapper.findBriefPage(new Page<>(pageNumber, pageSize), schoolId, semesterId, examId, printPlanIdList, courseCode, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, orgIds);
         List<ExaminationResult> list = page.getRecords();
         for (ExaminationResult examinationResult : list) {
             String examDetailCourseIds = examinationResult.getExamDetailCourseIds();
@@ -287,8 +287,8 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
 
     @Transactional(rollbackFor = Exception.class)
     @Override
-    public SummarizedDataResult findSummarizedData(Long schoolId, List<Long> printPlanIdList, String courseCode, String paperNumber, String examPlace, String examRoom, String packageCode, Long startDate, Long endDate, Set<Long> orgIds) {
-        IPage<ExaminationResult> page = this.findExaminationBriefPage(schoolId, printPlanIdList, courseCode, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, SystemConstant.PAGE_NUMBER, SystemConstant.PAGE_SIZE, orgIds);
+    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, Set<Long> orgIds) {
+        IPage<ExaminationResult> page = this.findExaminationBriefPage(schoolId, semesterId, examId, printPlanIdList, courseCode, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, SystemConstant.PAGE_NUMBER, SystemConstant.PAGE_SIZE, orgIds);
         List<ExaminationResult> list = page.getRecords();
         int totalSubjects = 0;
         for (ExaminationResult examinationResult : list) {
@@ -304,9 +304,9 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
 
     @Transactional(rollbackFor = Exception.class)
     @Override
-    public IPage<ExaminationDetailResult> findExaminationDetail(Long schoolId, 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, String courseCode, String paperNumber, String examPlace, String examRoom, String studentParams, Long startDate, Long endDate, int pageNumber, int pageSize) {
         Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(null);
-        return examDetailMapper.findDetailPage(new Page<>(pageNumber, pageSize), schoolId, printPlanIdList, courseCode, paperNumber, examPlace, examRoom, SystemConstant.translateSpecificSign(studentParams), startDate, endDate, orgIds);
+        return examDetailMapper.findDetailPage(new Page<>(pageNumber, pageSize), schoolId,semesterId,examId, printPlanIdList, courseCode, paperNumber, examPlace, examRoom, SystemConstant.translateSpecificSign(studentParams), startDate, endDate, orgIds);
     }
 
     @Transactional(rollbackFor = Exception.class)
@@ -676,6 +676,14 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
     @Transactional(rollbackFor = Exception.class)
     @Override
     public List<ExaminationExportDto> findExaminationExportDtoDatasource(Map<String, Object> map) {
+        Long semesterId = null;
+        if (map.get("semesterId") != null) {
+            semesterId = Long.valueOf(String.valueOf(map.get("semesterId")));
+        }
+        Long examId = null;
+        if (map.get("examId") != null) {
+            examId = Long.valueOf(String.valueOf(map.get("examId")));
+        }
         List<Long> printPlanIdList = null;
         if (map.get("printPlanIdList") != null) {
             printPlanIdList = (List<Long>) map.get("printPlanIdList");
@@ -716,7 +724,7 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
         Long userId = tbTask.getCreateId();
         Long schoolId = tbTask.getSchoolId();
 
-        List<ExaminationResult> examinationResultList = this.findExaminationBriefPage(schoolId,
+        List<ExaminationResult> examinationResultList = this.findExaminationBriefPage(schoolId,semesterId,examId,
                 printPlanIdList, courseCode, paperNumber, examPlace, examRoom, packageCode, startDate, endDate,
                 SystemConstant.PAGE_NUMBER, SystemConstant.PAGE_SIZE, orgIds).getRecords();
         int index = 0;
@@ -725,6 +733,8 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
             index++;
             ExaminationExportDto examinationExportDto = new ExaminationExportDto();
             examinationExportDto.setIndex((long) index);
+            examinationExportDto.setExamName(examinationResult.getExamName());
+            examinationExportDto.setSemesterName(examinationResult.getSemesterName());
             examinationExportDto.setPrintPlanName(examinationResult.getPrintPlanName());
             examinationExportDto.setExamDate(examinationResult.getExamDate());
             examinationExportDto.setExamTime(examinationResult.getExamTime());
@@ -864,7 +874,7 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
         }
         // 准备删除的考务-场次表id
         LambdaQueryWrapper<ExamDetail> examDetailQueryWrapper = new QueryWrapper<ExamDetail>().lambda().eq(ExamDetail::getPrintPlanId, printPlanId);
-        if (Objects.nonNull(source)){
+        if (Objects.nonNull(source)) {
             examDetailQueryWrapper.eq(ExamDetail::getExamDataSource, source);
         }
         List<Long> examDetailIds = this.list(examDetailQueryWrapper).stream().map(ExamDetail::getId).collect(Collectors.toList());

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

@@ -246,12 +246,12 @@ public class ExamTaskDetailServiceImpl extends ServiceImpl<ExamTaskDetailMapper,
     }
 
     @Override
-    public IPage<ExamTaskDetailDto> list(String relateType, List<Long> printPlanIdList, String courseCode, String paperNumber, String userName, Long cardRuleId, Integer pageNumber, Integer pageSize) {
+    public IPage<ExamTaskDetailDto> list(Long semesterId,Long examId, String relateType, List<Long> printPlanIdList, String courseCode, String paperNumber, String userName, Long cardRuleId, Integer pageNumber, Integer pageSize) {
         userName = SystemConstant.translateSpecificSign(userName);
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(null);
         Page<ExamTaskDetailDto> page = new Page<>(pageNumber, pageSize);
-        IPage<ExamTaskDetailDto> examDetailDtoIPage = this.baseMapper.listPage(page, schoolId, relateType, printPlanIdList, courseCode, paperNumber, userName, cardRuleId, orgIds);
+        IPage<ExamTaskDetailDto> examDetailDtoIPage = this.baseMapper.listPage(page, schoolId,semesterId,examId, relateType, printPlanIdList, courseCode, paperNumber, userName, cardRuleId, orgIds);
         examDetailDtoIPage.getRecords().stream().map(m -> {
             String paperType = StringUtils.isBlank(m.getRelatePaperType()) ? null : m.getRelatePaperType();
             Long printPlanIdT = Long.valueOf(m.getPrintPlanId());

+ 56 - 2
distributed-print-business/src/main/resources/mapper/ExamDetailMapper.xml

@@ -48,7 +48,11 @@
             b.normal,
             b.print_house_id as printHouseId,
             e.name as printHouseName,
-            e.code as printHouseCode
+            e.code as printHouseCode,
+            bs.id as semesterId,
+            bs.name as semesterName,
+            be.id as examId,
+            be.name as examName
         FROM
             exam_print_plan a
                  JOIN
@@ -74,10 +78,20 @@
             sys_user d on a.create_id = d.id
                 LEFT JOIN
             sys_org e ON b.print_house_id = e.id
+                LEFT JOIN
+            basic_exam be ON be.id = a.exam_id
+                LEFT JOIN
+            basic_semester bs ON bs.id = be.semester_id
             <where>
                 <if test="schoolId != null and schoolId != ''">
                     and a.school_id = #{schoolId}
                 </if>
+                <if test="semesterId != null and semesterId != ''">
+                    and bs.id = #{semesterId}
+                </if>
+                <if test="examId != null and examId != ''">
+                    and be.id = #{examId}
+                </if>
                 <if test="printPlanId != null and printPlanId != ''">
                     and a.id = #{printPlanId}
                 </if>
@@ -118,6 +132,10 @@
     <select id="findBriefPage" resultType="com.qmth.distributed.print.business.bean.result.ExaminationResult">
         SELECT
         det.id AS id,
+        MAX(bs.id) AS semesterId,
+        MAX(bs.name) AS semesterName,
+        MAX(be.id) AS examId,
+        MAX(be.name) AS examName,
         MAX(det.school_id) AS schoolId,
         MAX(det.print_plan_id) AS printPlanId,
         MAX(det.print_plan_name) AS printPlanName,
@@ -139,6 +157,12 @@
         AND det.school_id = cou.school_id
         LEFT JOIN
         sys_user b on det.create_id = b.id
+        LEFT JOIN
+        exam_print_plan epp on epp.id = det.print_plan_id
+        LEFT JOIN
+        basic_exam be on be.id = epp.exam_id
+        LEFT JOIN
+        basic_semester bs on bs.id = be.semester_id
         <where>
             <if test="schoolId != null and schoolId > 0">
                 AND det.school_id = #{schoolId}
@@ -164,6 +188,12 @@
             <if test="endDate != null and endDate > 0">
                 AND #{endDate} >= det.exam_end_time
             </if>
+            <if test="semesterId != null and semesterId != ''">
+                AND bs.id = #{semesterId}
+            </if>
+            <if test="examId != null and examId != ''">
+                AND be.id = #{examId}
+            </if>
             <if test="orgIds != null and orgIds != '' and orgIds.size() > 0">
                 AND b.org_id IN
                 <foreach collection="orgIds" item="item" index="index" open="(" separator="," close=")">
@@ -192,6 +222,10 @@
             stu.site_number AS siteNumber,
             stu.create_id AS createId,
             stu.create_time AS createTime,
+            bs.id AS semesterId,
+            bs.name AS semesterName,
+            be.id AS examId,
+            be.name AS examName,
             CONCAT(cou.course_name,
                    '(',
                    cou.course_code,
@@ -218,6 +252,10 @@
                 AND cou.paper_number = et.paper_number
                 LEFT JOIN
             sys_user b on det.create_id = b.id
+                LEFT JOIN
+            basic_exam be ON be.id = et.exam_id
+                LEFT JOIN
+            basic_semester bs ON bs.id = be.semester_id
         <where>
             <if test="schoolId != null and schoolId > 0">
                 AND det.school_id = #{schoolId}
@@ -249,6 +287,12 @@
             <if test="endDate != null and endDate > 0">
                 AND #{endDate} >= det.exam_end_time
             </if>
+            <if test="semesterId != null and semesterId!= ''">
+                AND bs.id = #{semesterId}
+            </if>
+            <if test="examId != null and examId!= ''">
+                AND be.id = #{examId}
+            </if>
             <if test="orgIds != null and orgIds != '' and orgIds.size > 0">
                 AND b.org_id IN
                 <foreach collection="orgIds" item="item" index="index" open="(" separator="," close=")">
@@ -276,7 +320,11 @@
             det.print_plan_id AS printPlanId,
             det.print_plan_name AS printPlanName,
             det.exam_place AS examPlace,
-            det.exam_room AS examRoom
+            det.exam_room AS examRoom,
+            bs.id AS semesterId,
+            bs.name AS semesterName,
+            be.id AS examId,
+            be.name AS examName
         FROM
             exam_student stu
                 INNER JOIN
@@ -285,6 +333,12 @@
                 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
+            basic_exam be ON be.id = epp.exam_id
+                LEFT JOIN
+            basic_semester bs ON bs.id = be.semester_id
         <where>
             <if test="examDetailId != null and examDetailId > 0">
                 AND det.id = #{examDetailId}

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

@@ -44,12 +44,22 @@
                c.exam_start_time examStartTime,
                c.exam_end_time   examEndTime,
                c.exam_place      examPlace,
-               c.exam_room       examRoom
+               c.exam_room       examRoom,
+               bs.id             semesterId,
+               bs.name           semesterName,
+               be.id             examId,
+               be.name           examName
         FROM exam_student a
                  LEFT JOIN
              exam_detail_course b ON a.exam_detail_course_id = b.id
                  LEFT JOIN
              exam_detail c ON b.exam_detail_id = c.id
+                 LEFT JOIN
+             exam_print_plan epp on epp.id = c.print_plan_id
+                 LEFT JOIN
+             basic_exam be on be.id = epp.exam_id
+                 LEFT JOIN
+             basic_semester bs on be.semester_id = bs.id
         WHERE a.id = #{id}
     </select>
 

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

@@ -40,7 +40,11 @@
             d.exposed_paper_type exposedPaperType,
             d.unexposed_paper_type unexposedPaperType,
             a.paper_type relatePaperType,
-            a.total_subjects totalSubjects
+            a.total_subjects totalSubjects,
+            bs.id AS semesterId,
+            bs.name AS semesterName,
+            be.id AS examId,
+            be.name AS examName
         FROM
         (SELECT
             a.school_id,
@@ -67,10 +71,20 @@
         sys_user f ON c.user_id = f.id
             LEFT JOIN
         sys_user g ON c.create_id = g.id
+            LEFT JOIN
+        basic_exam be ON be.id = c.exam_id
+            LEFT JOIN
+        basic_semester bs ON be.semester_id = bs.id
         <where>
             <if test="schoolId != null and schoolId != ''">
                and a.school_id = #{schoolId}
             </if>
+            <if test="semesterId != null and semesterId != ''">
+                and bs.id = #{semesterId}
+            </if>
+            <if test="examId != null and examId != ''">
+                and be.id = #{examId}
+            </if>
             <if test="relateType != null and relateType != ''">
                 <if test="relateType == 'RELATE'">
                    and a.paper_type is not null

+ 17 - 7
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamDetailController.java

@@ -73,7 +73,9 @@ 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) List<String> printPlanIdList,
+    public Result findExaminationBrief(@ApiParam(value = "学期ID") @RequestParam(required = false) String semesterId,
+                                       @ApiParam(value = "考试id") @RequestParam(required = false) String examId,
+                                       @ApiParam(value = "印刷计划id集合") @RequestParam(required = false) List<String> printPlanIdList,
                                        @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
                                        @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                        @ApiParam(value = "考点") @RequestParam(required = false) String examPlace,
@@ -89,14 +91,16 @@ public class ExamDetailController {
         }
         List<Long> idList = printPlanIdList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList());
         Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(null);
-        return ResultUtil.ok(examDetailService.findExaminationBriefPage(schoolId,
+        return ResultUtil.ok(examDetailService.findExaminationBriefPage(schoolId, SystemConstant.convertIdToLong(semesterId), SystemConstant.convertIdToLong(examId),
                 idList, courseCode, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, pageNumber, pageSize, orgIds));
     }
 
     @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) List<String> printPlanIdList,
+    public Result findSummarizedData(@ApiParam(value = "学期ID") @RequestParam(required = false) String semesterId,
+                                     @ApiParam(value = "考试id") @RequestParam(required = false) String examId,
+                                     @ApiParam(value = "印刷计划id集合") @RequestParam(required = false) List<String> printPlanIdList,
                                      @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
                                      @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                      @ApiParam(value = "考点") @RequestParam(required = false) String examPlace,
@@ -111,13 +115,15 @@ public class ExamDetailController {
         }
         List<Long> idList = printPlanIdList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList());
         Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(null);
-        return ResultUtil.ok(examDetailService.findSummarizedData(schoolId, idList, courseCode, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, orgIds));
+        return ResultUtil.ok(examDetailService.findSummarizedData(schoolId, SystemConstant.convertIdToLong(semesterId), SystemConstant.convertIdToLong(examId), idList, courseCode, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, orgIds));
     }
 
     @ApiOperation(value = "考务数据导入-查看明细")
     @RequestMapping(value = "/data_detail", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
-    public Result findExaminationDetail(@ApiParam(value = "印刷计划主键集合") @RequestParam(required = false) List<String> printPlanIdList,
+    public Result findExaminationDetail(@ApiParam(value = "学期ID") @RequestParam(required = false) String semesterId,
+                                        @ApiParam(value = "考试id") @RequestParam(required = false) String examId,
+                                        @ApiParam(value = "印刷计划主键集合") @RequestParam(required = false) List<String> printPlanIdList,
                                         @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
                                         @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                         @ApiParam(value = "考点") @RequestParam(required = false) String examPlace,
@@ -133,7 +139,7 @@ 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, idList,
+        return ResultUtil.ok(examDetailService.findExaminationDetail(schoolId,SystemConstant.convertIdToLong(semesterId),SystemConstant.convertIdToLong(examId), idList,
                 courseCode, paperNumber, examPlace, examRoom, studentParams, startDate, endDate, pageNumber, pageSize));
     }
 
@@ -191,7 +197,9 @@ public class ExamDetailController {
     @ApiOperation(value = "考务数据导入-结果导出")
     @RequestMapping(value = "/data_export", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = EditResult.class)})
-    public Result dataExport(@ApiParam(value = "印刷计划id集合") @RequestParam(required = false) List<String> printPlanIdList,
+    public Result dataExport(@ApiParam(value = "学期ID") @RequestParam(required = false) String semesterId,
+                             @ApiParam(value = "考试id") @RequestParam(required = false) String examId,
+                             @ApiParam(value = "印刷计划id集合") @RequestParam(required = false) List<String> printPlanIdList,
                              @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
                              @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                              @ApiParam(value = "考点") @RequestParam(required = false) String examPlace,
@@ -209,6 +217,8 @@ public class ExamDetailController {
             printId = idList.get(0);
         }
         Map<String, Object> map = tbTaskService.saveTask(TaskTypeEnum.EXAMINATION_EXPORT, printId);
+        map.put("semesterId",semesterId);
+        map.put("examId",examId);
         map.put("printPlanIdList", idList);
         map.put("courseCode", courseCode);
         map.put("paperNumber", paperNumber);

+ 10 - 6
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamPrintPlanController.java

@@ -76,7 +76,7 @@ public class ExamPrintPlanController {
     @ApiOperation(value = "印刷计划查询")
     @RequestMapping(value = "/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
-    public Result findPrintPlanPage(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
+    public Result findPrintPlanPage(@ApiParam(value = "学期ID") @RequestParam(required = false) String semesterId,
                                     @ApiParam(value = "考试id") @RequestParam(required = false) String examId,
                                     @ApiParam(value = "印刷计划id集合") @RequestParam(required = false) List<String> printPlanIdList,
                                     @ApiParam(value = "印刷计划状态") @RequestParam(required = false) PrintPlanStatusEnum status,
@@ -90,7 +90,7 @@ public class ExamPrintPlanController {
             printPlanIdList = new ArrayList<>();
         }
         List<Long> idList = printPlanIdList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList());
-        return ResultUtil.ok(examPrintPlanService.printPlanPage(schoolId, semesterId, SystemConstant.convertIdToLong(examId), idList, status, startTime, endTime, pageNumber, pageSize));
+        return ResultUtil.ok(examPrintPlanService.printPlanPage(schoolId, SystemConstant.convertIdToLong(semesterId), SystemConstant.convertIdToLong(examId), idList, status, startTime, endTime, pageNumber, pageSize));
     }
 
     @ApiOperation(value = "印刷计划模糊查询")
@@ -147,7 +147,9 @@ public class ExamPrintPlanController {
      */
     @ApiOperation(value = "关联试卷管理-查询")
     @RequestMapping(value = "/relate_list", method = RequestMethod.POST)
-    public Result relateList(@RequestParam(value = "relateType", required = false) String relateType,
+    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,
@@ -159,7 +161,7 @@ public class ExamPrintPlanController {
             printPlanIdList = new ArrayList<>();
         }
         List<Long> idList = printPlanIdList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList());
-        IPage<ExamTaskDetailDto> examTasks = examTaskDetailService.list(relateType, idList, courseCode, paperNumber, userName, cardRuleId, pageNumber, pageSize);
+        IPage<ExamTaskDetailDto> examTasks = examTaskDetailService.list(SystemConstant.convertIdToLong(semesterId),SystemConstant.convertIdToLong(examId),relateType, idList, courseCode, paperNumber, userName, cardRuleId, pageNumber, pageSize);
         return ResultUtil.ok(examTasks);
     }
 
@@ -208,7 +210,9 @@ public class ExamPrintPlanController {
      */
     @ApiOperation(value = "印刷任务管理-查询")
     @RequestMapping(value = "/task_list", method = RequestMethod.POST)
-    public Result taskList(@RequestParam(value = "printPlanId", required = false) Long printPlanId,
+    public Result taskList(@ApiParam(value = "学期ID") @RequestParam(required = false) String semesterId,
+                           @ApiParam(value = "考试id") @RequestParam(required = false) String examId,
+                           @RequestParam(value = "printPlanId", required = false) Long printPlanId,
                            @RequestParam(value = "status", required = false) String status,
                            @RequestParam(value = "courseCode", required = false) String courseCode,
                            @RequestParam(value = "paperNumber", required = false) String paperNumber,
@@ -221,7 +225,7 @@ public class ExamPrintPlanController {
                            @RequestParam(value = "printHouseId", required = false) String printHouseId,
                            @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                            @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
-        IPage<PrintTaskDto> examTasks = examDetailService.listPrintTask(printPlanId, status, courseCode, paperNumber, examPlace, examRoom, examStartTime, examEndTime, printStartTime, printEndTime, SystemConstant.convertIdToLong(printHouseId), pageNumber, pageSize);
+        IPage<PrintTaskDto> examTasks = examDetailService.listPrintTask(SystemConstant.convertIdToLong(semesterId),SystemConstant.convertIdToLong(examId),printPlanId, status, courseCode, paperNumber, examPlace, examRoom, examStartTime, examEndTime, printStartTime, printEndTime, SystemConstant.convertIdToLong(printHouseId), pageNumber, pageSize);
         return ResultUtil.ok(examTasks);
     }