Bladeren bron

3.3.3 update

xiaofei 1 jaar geleden
bovenliggende
commit
800e441191
61 gewijzigde bestanden met toevoegingen van 845 en 561 verwijderingen
  1. 3 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ConditionMapper.java
  2. 16 13
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamDetailMapper.java
  3. 0 6
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/TSyncExamStudentScoreMapper.java
  4. 0 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/TeachCourseMapper.java
  5. 1 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/BasicExamStudentService.java
  6. 0 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TeachCourseService.java
  7. 4 5
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicExamStudentServiceImpl.java
  8. 12 24
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ConditionServiceImpl.java
  9. 0 3
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/DownloadServiceImpl.java
  10. 8 17
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamDetailServiceImpl.java
  11. 6 18
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TSyncExamStudentScoreServiceImpl.java
  12. 0 5
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TeachCourseServiceImpl.java
  13. 83 10
      distributed-print-business/src/main/resources/mapper/ConditionMapper.xml
  14. 320 238
      distributed-print-business/src/main/resources/mapper/ExamDetailMapper.xml
  15. 9 0
      distributed-print-business/src/main/resources/mapper/ExamTaskMapper.xml
  16. 3 0
      distributed-print-business/src/main/resources/mapper/TFFlowApproveMapper.xml
  17. 3 6
      distributed-print-business/src/main/resources/mapper/TSyncExamStudentScoreMapper.xml
  18. 0 14
      distributed-print-business/src/main/resources/mapper/TeachCourseMapper.xml
  19. 2 2
      distributed-print/src/main/java/com/qmth/distributed/print/api/BasicExamController.java
  20. 10 4
      distributed-print/src/main/java/com/qmth/distributed/print/api/BasicExamStudentController.java
  21. 8 1
      distributed-print/src/main/java/com/qmth/distributed/print/api/DownloadController.java
  22. 4 1
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamCardController.java
  23. 13 5
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamDetailController.java
  24. 8 6
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamPrintPlanController.java
  25. 30 41
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamPrintTaskController.java
  26. 2 2
      distributed-print/src/main/java/com/qmth/distributed/print/api/SsoController.java
  27. 3 3
      distributed-print/src/main/java/com/qmth/distributed/print/api/SysOrgController.java
  28. 4 4
      distributed-print/src/main/java/com/qmth/distributed/print/api/SysRoleController.java
  29. 7 7
      distributed-print/src/main/java/com/qmth/distributed/print/api/SysUserController.java
  30. 7 0
      distributed-print/src/main/java/com/qmth/distributed/print/api/TBSyncTaskController.java
  31. 9 1
      distributed-print/src/main/java/com/qmth/distributed/print/api/TBTaskPdfController.java
  32. 7 0
      distributed-print/src/main/java/com/qmth/distributed/print/api/TCStatisticsController.java
  33. 8 1
      distributed-print/src/main/java/com/qmth/distributed/print/api/TCUsualScoreController.java
  34. 6 0
      distributed-print/src/main/java/com/qmth/distributed/print/api/TFCustomFlowController.java
  35. 8 1
      distributed-print/src/main/java/com/qmth/distributed/print/api/TRBasicInfoController.java
  36. 34 26
      distributed-print/src/main/java/com/qmth/distributed/print/api/TeachCourseController.java
  37. 0 3
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkArchiveController.java
  38. 1 1
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkClassController.java
  39. 7 1
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkDocumentController.java
  40. 6 2
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkEntranceController.java
  41. 6 6
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkGroupController.java
  42. 4 0
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkInspectedController.java
  43. 1 1
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkPaperController.java
  44. 3 0
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkProblemController.java
  45. 3 0
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkQualityController.java
  46. 4 3
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkQuestionController.java
  47. 42 16
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkSettingController.java
  48. 3 0
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkStudentController.java
  49. 0 3
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkTrackController.java
  50. 10 3
      distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkUserGroupController.java
  51. 71 37
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/aspect/LogAspect.java
  52. 5 5
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/bean/dto/DataPermissionRule.java
  53. 1 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/contant/SystemConstant.java
  54. 1 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/enums/ExceptionResultEnum.java
  55. 2 3
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/enums/log/OperationTypeEnum.java
  56. 7 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/BasicRoleDataPermissionServiceImpl.java
  57. 2 1
      teachcloud-common/src/main/resources/mapper/BasicOperationLogMapper.xml
  58. 9 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/bean/archivescore/ArchiveScoreQuery.java
  59. 9 0
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/bean/document/ArchivePaperQuery.java
  60. 6 0
      teachcloud-mark/src/main/resources/mapper/MarkPaperMapper.xml
  61. 4 4
      teachcloud-mark/src/main/resources/mapper/MarkTaskMapper.xml

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

@@ -29,7 +29,7 @@ public interface ConditionMapper {
 
     List<PrintPlanBrief> listPrintPlan(@Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("dpr") DataPermissionRule dpr);
 
-    List<BasicCourse> listCourseForScore(@Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("basicCourses") List<BasicCourse> basicCourses, @Param("status") String status, @Param("dpr") DataPermissionRule dpr);
+    List<BasicCourse> listCourseForScore(@Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("status") String status, @Param("dpr") DataPermissionRule dpr);
 
     List<BasicClazz> listClazz(@Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("clazzName") String clazzName, @Param("dpr") DataPermissionRule dpr);
 
@@ -60,4 +60,6 @@ public interface ConditionMapper {
     List<BasicCourse> listCourseForApproveHistory(@Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("dpr") DataPermissionRule dpr);
 
     List<String> listPaperNumberForApproveHistory(@Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("dpr") DataPermissionRule dpr);
+
+    List<String> listPaperNumberForScore(@Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("status") String status, @Param("dpr") DataPermissionRule dpr);
 }

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

@@ -10,6 +10,7 @@ import com.qmth.distributed.print.business.bean.result.ExaminationDetailResult;
 import com.qmth.distributed.print.business.bean.result.ExaminationResult;
 import com.qmth.distributed.print.business.bean.result.SummarizedDataResult;
 import com.qmth.distributed.print.business.entity.ExamDetail;
+import com.qmth.distributed.print.business.entity.ExamDetailCourse;
 import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
 import org.apache.ibatis.annotations.Param;
 
@@ -93,19 +94,21 @@ public interface ExamDetailMapper extends BaseMapper<ExamDetail> {
     @SuppressWarnings("MybatisXMapperMethodInspection")
     List<Map> listStudentByExamDetailCourseId(@Param("schoolId") Long schoolId, @Param("examDetailCourseId") Long examDetailCourseId, @Param("studentCode") String studentCode, @Param("type") String type);
 
-    Integer selectPaperCount(@Param("schoolId") Long schoolId,
-                        @Param("semesterId") Long semesterId,
-                        @Param("examId") Long examId,
-                        @Param("printPlanId") Long printPlanId,
-                        @Param("status") String status,
-                        @Param("courseCode") String courseCode,
-                        @Param("paperNumber") String paperNumber,
-                        @Param("examPlace") String examPlace,
-                        @Param("examRoom") String examRoom,
-                        @Param("examStartTime") Long examStartTime,
-                        @Param("examEndTime") Long examEndTime,
-                        @Param("printHouseId") Long printHouseId,
-                        @Param("dpr") DataPermissionRule dpr);
+    List<ExamDetailCourse> selectPaperCount(@Param("schoolId") Long schoolId,
+                                            @Param("semesterId") Long semesterId,
+                                            @Param("examId") Long examId,
+                                            @Param("printPlanId") Long printPlanId,
+                                            @Param("status") String status,
+                                            @Param("courseCode") String courseCode,
+                                            @Param("paperNumber") String paperNumber,
+                                            @Param("examPlace") String examPlace,
+                                            @Param("examRoom") String examRoom,
+                                            @Param("examStartTime") Long examStartTime,
+                                            @Param("examEndTime") Long examEndTime,
+                                            @Param("printStartTime") Long printStartTime,
+                                            @Param("printEndTime") Long printEndTime,
+                                            @Param("printHouseId") Long printHouseId,
+                                            @Param("dpr") DataPermissionRule dpr);
 
     /**
      * 根据id下载examDetail

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

@@ -29,7 +29,6 @@ public interface TSyncExamStudentScoreMapper extends BaseMapper<TSyncExamStudent
      * @param semesterId
      * @param clazzId
      * @param courseCode
-     * @param basicCourses
      * @param dpr
      * @return
      */
@@ -39,7 +38,6 @@ public interface TSyncExamStudentScoreMapper extends BaseMapper<TSyncExamStudent
                                                    @Param("examId") Long examId,
                                                    @Param("clazzId") Long clazzId,
                                                    @Param("courseCode") String courseCode,
-                                                   @Param("basicCourses") List<BasicCourse> basicCourses,
                                                    @Param("dpr") DataPermissionRule dpr);
 
     /**
@@ -49,7 +47,6 @@ public interface TSyncExamStudentScoreMapper extends BaseMapper<TSyncExamStudent
      * @param semesterId
      * @param clazzId
      * @param courseCode
-     * @param basicCourses
      * @return
      */
     public List<TSyncExamStudentScoreResult> export(@Param("schoolId") Long schoolId,
@@ -57,7 +54,6 @@ public interface TSyncExamStudentScoreMapper extends BaseMapper<TSyncExamStudent
                                                     @Param("examId") Long examId,
                                                     @Param("clazzId") Long clazzId,
                                                     @Param("courseCode") String courseCode,
-                                                    @Param("basicCourses") List<BasicCourse> basicCourses,
                                                     @Param("dpr") DataPermissionRule dpr);
 
     /**
@@ -67,7 +63,6 @@ public interface TSyncExamStudentScoreMapper extends BaseMapper<TSyncExamStudent
      * @param semesterId
      * @param clazzId
      * @param courseCode
-     * @param basicCourses
      * @return
      */
     public int exportCount(@Param("schoolId") Long schoolId,
@@ -75,6 +70,5 @@ public interface TSyncExamStudentScoreMapper extends BaseMapper<TSyncExamStudent
                            @Param("examId") Long examId,
                            @Param("clazzId") Long clazzId,
                            @Param("courseCode") String courseCode,
-                           @Param("basicCourses") List<BasicCourse> basicCourses,
                            @Param("dpr") DataPermissionRule dpr);
 }

+ 0 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/TeachCourseMapper.java

@@ -52,6 +52,4 @@ public interface TeachCourseMapper extends BaseMapper<TeachCourse> {
      * @return 教师查询集合
      */
     List<TeacherSelectResult> findTeacherByOrgIds(@Param("orgIdList") List<Long> orgIdList);
-
-    List<BasicCourse> findTeachCourseByUserId(Long userId);
 }

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

@@ -26,7 +26,6 @@ public interface BasicExamStudentService extends IService<BasicExamStudent> {
     /**
      * 分页查询
      *
-     * @param requestUser     请求人
      * @param semesterId      学期id
      * @param examId          考试id
      * @param courseCode      课程代码
@@ -39,7 +38,7 @@ public interface BasicExamStudentService extends IService<BasicExamStudent> {
      * @param pageSize        分页数量
      * @return 查询结果
      */
-    IPage<BasicExamStudentResult> page(SysUser requestUser, Long semesterId, Long examId, String courseCode, String teacher,
+    IPage<BasicExamStudentResult> page(Long semesterId, Long examId, String courseCode, String teacher,
                                        String college, String major, String teachClazz, String examStudentInfo, int pageNumber, int pageSize);
 
     /**

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

@@ -128,8 +128,6 @@ public interface TeachCourseService extends IService<TeachCourse> {
      */
     List<TeacherSelectResult> findUserByOrgId(Long orgId);
 
-    List<BasicCourse> findTeachCourseByUserId(Long userId);
-
     /**
      * 插入老师和课程关联表
      *

+ 4 - 5
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicExamStudentServiceImpl.java

@@ -29,7 +29,6 @@ import com.qmth.teachcloud.mark.entity.MarkStudent;
 import com.qmth.teachcloud.mark.service.MarkPaperService;
 import com.qmth.teachcloud.mark.service.MarkStudentService;
 import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang3.RegExUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
@@ -70,10 +69,10 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
     private BasicExamService basicExamService;
 
     @Override
-    public IPage<BasicExamStudentResult> page(SysUser requestUser, Long semesterId, Long examId, String courseCode,
+    public IPage<BasicExamStudentResult> page(Long semesterId, Long examId, String courseCode,
                                               String teacher, String college, String major, String teachClazz, String examStudentInfo, int pageNumber,
                                               int pageSize) {
-        Long schoolId = requestUser.getSchoolId();
+        SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
 
         courseCode = SystemConstant.translateSpecificSign(courseCode);
         teacher = SystemConstant.translateSpecificSign(teacher);
@@ -82,10 +81,10 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
         examStudentInfo = SystemConstant.translateSpecificSign(examStudentInfo);
         teachClazz = SystemConstant.translateSpecificSign(teachClazz);
 
-        DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(schoolId, requestUser.getId(),
+        DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(requestUser.getSchoolId(), requestUser.getId(),
                 ServletUtil.getRequest().getServletPath());
         IPage<BasicExamStudentResult> page = this.baseMapper.findBasicExamStudentPage(new Page<>(pageNumber, pageSize),
-                schoolId, semesterId, examId, courseCode, teacher, college, major, teachClazz, examStudentInfo, dpr);
+                requestUser.getSchoolId(), semesterId, examId, courseCode, teacher, college, major, teachClazz, examStudentInfo, dpr);
         for (BasicExamStudentResult record : page.getRecords()) {
             Long examStartTime = record.getExamStartTime();
             Long examEndTime = record.getExamEndTime();

+ 12 - 24
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ConditionServiceImpl.java

@@ -89,7 +89,7 @@ public class ConditionServiceImpl implements ConditionService {
         Long privilegeId = ServletUtil.getCurrentPrivilegeId();
         String privilegeIdString = privilegeId == null ? null : String.valueOf(privilegeId);
 
-        DataPermissionRule dpr = new DataPermissionRule();
+        DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(privilegeId);
         // 未找到权限菜单,默认为本人权限
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
 
@@ -104,28 +104,22 @@ public class ConditionServiceImpl implements ConditionService {
         // 入库审核(41)
         else if ("41".equals(privilegeIdString)) {
             return conditionMapper.listCourseForAudit(semesterId, examId, enable);
-        }// 卷库查询(42)
+        }
+        // 卷库查询(42)
         else if ("42".equals(privilegeIdString)) {
             return conditionMapper.listCourseForQuery(examId, dpr);
         }
         // 印刷任务管理(47)
         else if ("47".equals(privilegeIdString)) {
-            dpr = basicRoleDataPermissionService.findDataPermission(privilegeId);
             return conditionMapper.listCourseForPlanTask(semesterId, examId, printPlanIds, dpr);
         }
         // 流程审批记录管理(403)
         else if ("403".equals(privilegeIdString)) {
-            dpr = basicRoleDataPermissionService.findDataPermission(privilegeId);
             return conditionMapper.listCourseForApproveHistory(semesterId, examId, dpr);
         }
         // 成绩查询
         else if ("487".equals(privilegeIdString) || "2001".equals(privilegeIdString)) {
-            List<BasicCourse> basicCourses = teachCourseService.findTeachCourseByUserId(sysUser.getId());
-            if (CollectionUtils.isNotEmpty(basicCourses)) {
-                return basicCourses;
-            }
-            dpr = basicRoleDataPermissionService.findDataPermission(privilegeId);
-            return conditionMapper.listCourseForScore(semesterId, examId, basicCourses, MarkPaperStatus.FINISH.name(), dpr);
+            return conditionMapper.listCourseForScore(semesterId, examId, MarkPaperStatus.FINISH.name(), dpr);
         }
         // 评卷入口(491)
         else if ("491".equals(privilegeIdString)) {
@@ -133,15 +127,12 @@ public class ConditionServiceImpl implements ConditionService {
         }
         // 评卷设置(897)、评卷管理(917)、成绩检查(946)
         else if ("897".equals(privilegeIdString) || "917".equals(privilegeIdString) || "946".equals(privilegeIdString)) {
-            dpr = basicRoleDataPermissionService.findDataPermission(privilegeId);
             return conditionMapper.listCourseFromMarkPaper(examId, dpr);
         }
         // 下载管理(653)
         else if ("653".equals(privilegeIdString)) {
-            dpr = basicRoleDataPermissionService.findDataPermission(privilegeId);
             return conditionMapper.listCourseFromExamTaskByUserId(examId, dpr);
         } else {
-            dpr = basicRoleDataPermissionService.findDataPermission(privilegeId);
             return conditionMapper.listCourse(semesterId, examId, enable, printPlanIds, dpr);
         }
     }
@@ -158,26 +149,19 @@ public class ConditionServiceImpl implements ConditionService {
         // 未找到权限菜单,默认为本人权限
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
 
-        // 如果byAssignUser为true时,不能通过层级关系查询
-        if (privilegeId == null) {
-            dpr.setRequestUserId(sysUser.getId());
-            dpr.setOrgIdSet(null);
-        } else {
-            dpr = basicRoleDataPermissionService.findDataPermission(privilegeId);
-        }
-
+        // 命题任务管理(39)
         if ("39".equals(privilegeIdString)) {
             return conditionMapper.listPaperNumberFromExamTaskByCreateId(examId, courseCode, dpr);
         }
-        // 入库申请菜单
+        // 入库申请(40)
         else if ("40".equals(privilegeIdString)) {
             return conditionMapper.listPaperNumberForApply(examId, courseCode, sysUser.getId());
         }
-        // 入库审核菜单
+        // 入库审核(41)
         else if ("41".equals(privilegeIdString)) {
             return conditionMapper.listPaperNumberAudit(semesterId, examId, courseCode);
         }
-        // 入库审核(42)
+        // 卷库查询(42)
         else if ("42".equals(privilegeIdString)) {
             return conditionMapper.listPaperNumberForQuery(examId, courseCode, dpr);
         }
@@ -189,6 +173,10 @@ public class ConditionServiceImpl implements ConditionService {
         else if ("403".equals(privilegeIdString)) {
             return conditionMapper.listPaperNumberForApproveHistory(semesterId, examId, courseCode, dpr);
         }
+        // 成绩查询
+        else if ("487".equals(privilegeIdString) || "2001".equals(privilegeIdString)) {
+            return conditionMapper.listPaperNumberForScore(semesterId, examId, MarkPaperStatus.FINISH.name(), dpr);
+        }
         // 评卷入口(491)
         else if ("491".equals(privilegeIdString)) {
             return conditionMapper.listPaperNumberForEntrance(examId, sysUser.getId(), courseCode, MarkPaperStatus.FORMAL.name());

+ 0 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/DownloadServiceImpl.java

@@ -72,9 +72,6 @@ public class DownloadServiceImpl implements DownloadService {
 
     @Override
     public IPage<ExamTaskDetailDto> page(Long examId, String courseCode, String paperNumber, Long orgId, String userParam, Integer pageNumber, Integer pageSize) {
-        if(examId == null){
-            throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
-        }
         Page<ExamTaskDetailDto> page = new Page<>(pageNumber, pageSize);
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
         DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(requestUser.getSchoolId(), requestUser.getId(), ServletUtil.getRequest().getServletPath());

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

@@ -182,8 +182,14 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
 
         if (printTaskTotalDto != null) {
             // 试卷总计
-            Integer paperNumberCount = this.baseMapper.selectPaperCount(schoolId, semesterId, examId, printPlanId, status, courseCode, paperNumber, examPlace, examRoom, examStartTime, examEndTime, printHouseId, dpr);
-            printTaskTotalDto.setPaperCount(paperNumberCount);
+            Set<String> paperNumberTypeSet = new HashSet<>();
+            List<ExamDetailCourse> examDetailCourseList = this.baseMapper.selectPaperCount(schoolId, semesterId, examId, printPlanId, status, courseCode, paperNumber, examPlace, examRoom, examStartTime, examEndTime, printStartTime, printEndTime, printHouseId, dpr);
+            for (ExamDetailCourse examDetailCourse : examDetailCourseList) {
+                for (String s : examDetailCourse.getPaperType().split(",")) {
+                    paperNumberTypeSet.add(examDetailCourse.getPaperNumber().concat(s));
+                }
+            }
+            printTaskTotalDto.setPaperCount(paperNumberTypeSet.size());
         }
         return printTaskTotalDto;
     }
@@ -400,21 +406,6 @@ 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) {
-
-
-        /*IPage<ExaminationResult> page = this.findExaminationBriefPage(schoolId, semesterId, examId, printPlanIdList, courseCode, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, SystemConstant.PAGE_NUMBER, SystemConstant.PAGE_SIZE, dpr);
-        List<ExaminationResult> list = page.getRecords();
-        int totalSubjects = 0;
-        for (ExaminationResult examinationResult : list) {
-            int subjects = examinationResult.getTotalSubjects();
-            totalSubjects = totalSubjects + subjects;
-        }
-        SummarizedDataResult summarizedDataResult = new SummarizedDataResult();
-        summarizedDataResult.setSchoolId(schoolId);
-        summarizedDataResult.setTotalSubjects(totalSubjects);
-        summarizedDataResult.setPackageCount(list.size());
-        return summarizedDataResult;*/
-
         SummarizedDataResult summarizedDataResult = this.baseMapper.findSummarizedData(schoolId, semesterId, examId, printPlanIdList, courseCode, paperNumber, examPlace, examRoom, packageCode, startDate, endDate, dpr);
         if (summarizedDataResult == null) {
             summarizedDataResult = new SummarizedDataResult();

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

@@ -79,12 +79,8 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
             throw ExceptionResultEnum.ERROR.exception("请选择学期");
         }
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        List<BasicCourse> basicCourses = teachCourseService.findTeachCourseByUserId(sysUser.getId());
-        DataPermissionRule dpr = null;
-        if (basicCourses.isEmpty()) {
-            dpr = basicRoleDataPermissionService.findDataPermission(sysUser.getSchoolId(), sysUser.getId(), ServletUtil.getRequest().getServletPath());
-        }
-        IPage<TSyncExamStudentScoreResult> list = tSyncExamStudentScoreMapper.list(iPage, sysUser.getSchoolId(), semesterId, examId, clazzId, courseCode, basicCourses, dpr);
+        DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(sysUser.getSchoolId(), sysUser.getId(), ServletUtil.getRequest().getServletPath());
+        IPage<TSyncExamStudentScoreResult> list = tSyncExamStudentScoreMapper.list(iPage, sysUser.getSchoolId(), semesterId, examId, clazzId, courseCode, dpr);
         list.getRecords().stream().map(m -> {
             String localSheetUrls = m.getLocalSheetUrls();
             if (StringUtils.isNotBlank(localSheetUrls)) {
@@ -113,12 +109,8 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
     @Override
     public List<TSyncExamStudentScoreResult> export(SysUser sysUser, Long semesterId, Long examId, Long clazzId, String courseCode, String servletPath) {
         Long schoolId = sysUser.getSchoolId();
-        List<BasicCourse> basicCourses = teachCourseService.findTeachCourseByUserId(sysUser.getId());
-        DataPermissionRule dpr = null;
-        if (basicCourses.isEmpty()) {
-            dpr = basicRoleDataPermissionService.findDataPermission(schoolId, sysUser.getId(), servletPath);
-        }
-        return tSyncExamStudentScoreMapper.export(schoolId, semesterId, examId, clazzId, courseCode, basicCourses, dpr);
+        DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(schoolId, sysUser.getId(), servletPath);
+        return tSyncExamStudentScoreMapper.export(schoolId, semesterId, examId, clazzId, courseCode, dpr);
     }
 
     /**
@@ -133,12 +125,8 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
     @Override
     public int exportCount(Long schoolId, Long semesterId, Long examId, Long clazzId, String courseCode) {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        List<BasicCourse> basicCourses = teachCourseService.findTeachCourseByUserId(sysUser.getId());
-        DataPermissionRule dpr = null;
-        if (basicCourses.isEmpty()) {
-            dpr = basicRoleDataPermissionService.findDataPermission(schoolId, sysUser.getId(), ServletUtil.getRequest().getServletPath());
-        }
-        return tSyncExamStudentScoreMapper.exportCount(schoolId, semesterId, examId, clazzId, courseCode, basicCourses, dpr);
+        DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(schoolId, sysUser.getId(), ServletUtil.getRequest().getServletPath());
+        return tSyncExamStudentScoreMapper.exportCount(schoolId, semesterId, examId, clazzId, courseCode, dpr);
     }
 
     /**

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

@@ -470,11 +470,6 @@ public class TeachCourseServiceImpl extends ServiceImpl<TeachCourseMapper, Teach
         return this.baseMapper.findTeacherByOrgIds(new ArrayList<>(orgIdSet));
     }
 
-    @Override
-    public List<BasicCourse> findTeachCourseByUserId(Long userId) {
-        return this.baseMapper.findTeachCourseByUserId(userId);
-    }
-
     /**
      * 插入老师和课程关联表
      *

+ 83 - 10
distributed-print-business/src/main/resources/mapper/ConditionMapper.xml

@@ -27,6 +27,9 @@
                             <if test="dpr.requestUserId != null">
                                 AND et.create_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 = et.course_code)
+                            </if>
                             <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                                 AND et.org_id IN
                                 <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
@@ -75,6 +78,9 @@
                 <if test="dpr.requestUserId != null">
                     AND et.create_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 = et.course_code)
+                </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND et.org_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
@@ -206,16 +212,13 @@
             <if test="examId != null">
                 AND mp.exam_id = #{examId}
             </if>
-            <if test="basicCourses.size > 0">
-                and mp.course_code in
-                <foreach collection="basicCourses" item="item" index="index" open="(" separator="," close=")">
-                    #{item.code}
-                </foreach>
-            </if>
             <if test="dpr != null">
                 <if test="dpr.requestUserId != null">
                     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)
+                </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND su.org_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
@@ -299,8 +302,9 @@
         exam_detail b ON a.id = b.print_plan_id
         JOIN
         exam_detail_course c ON b.id = c.exam_detail_id
+        left join exam_task et on b.exam_id = et.exam_id and c.course_code = et.course_code and c.paper_number = et.paper_number
         JOIN
-        sys_user d ON a.create_id = d.id
+        sys_user d ON et.user_id = d.id
         JOIN
         basic_exam e ON a.exam_id = e.id
         <where>
@@ -318,7 +322,10 @@
             </if>
             <if test="dpr != null">
                 <if test="dpr.requestUserId != null">
-                    AND a.create_id = #{dpr.requestUserId}
+                    AND et.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 = c.course_code)
                 </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND d.org_id IN
@@ -338,8 +345,9 @@
         exam_detail b ON a.id = b.print_plan_id
         JOIN
         exam_detail_course c ON b.id = c.exam_detail_id
+        left join exam_task et on b.exam_id = et.exam_id and c.course_code = et.course_code and c.paper_number = et.paper_number
         JOIN
-        sys_user d ON a.create_id = d.id
+        sys_user d ON et.user_id = d.id
         JOIN
         basic_exam e ON a.exam_id = e.id
         <where>
@@ -360,7 +368,10 @@
             </if>
             <if test="dpr != null">
                 <if test="dpr.requestUserId != null">
-                    AND a.create_id = #{dpr.requestUserId}
+                    AND et.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 = c.course_code)
                 </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND d.org_id IN
@@ -423,6 +434,9 @@
             <if test="dpr.requestUserId != null">
                 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)
+            </if>
             <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                 AND su.org_id IN
                 <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
@@ -445,6 +459,9 @@
             <if test="dpr.requestUserId != null">
                 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)
+            </if>
             <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                 AND su.org_id IN
                 <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
@@ -469,6 +486,9 @@
                 <if test="dpr.requestUserId != null">
                     AND a.create_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 = a.course_code)
+                </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND d.org_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
@@ -497,6 +517,9 @@
                 <if test="dpr.requestUserId != null">
                     AND a.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 = a.course_code)
+                </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND d.org_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
@@ -524,6 +547,9 @@
                 <if test="dpr.requestUserId != null">
                     AND a.create_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 = a.course_code)
+                </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND d.org_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
@@ -555,6 +581,9 @@
                 <if test="dpr.requestUserId != null">
                     AND a.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 = a.course_code)
+                </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND d.org_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
@@ -584,6 +613,9 @@
                 <if test="dpr.requestUserId != null">
                     AND a.create_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 = a.course_code)
+                </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND d.org_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
@@ -614,6 +646,9 @@
                 <if test="dpr.requestUserId != null">
                     AND a.create_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 = a.course_code)
+                </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND d.org_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
@@ -651,6 +686,9 @@
                 <if test="dpr.requestUserId != null">
                     AND et.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 = et.course_code)
+                </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND su.org_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
@@ -691,6 +729,9 @@
                 <if test="dpr.requestUserId != null">
                     AND et.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 = et.course_code)
+                </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND su.org_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
@@ -702,4 +743,36 @@
             and et.enable = 1
         </where>
     </select>
+    <select id="listPaperNumberForScore" resultType="java.lang.String">
+        SELECT DISTINCT
+            mp.paper_number paperNumber
+        FROM
+        mark_paper mp
+        left join sys_user su ON mp.user_id = su.id
+        left join basic_exam be ON mp.exam_id = be.id
+        <where>
+            and mp.status = #{status}
+            <if test="semesterId != null">
+                AND be.semester_id = #{semesterId}
+            </if>
+            <if test="examId != null">
+                AND mp.exam_id = #{examId}
+            </if>
+            <if test="dpr != null">
+                <if test="dpr.requestUserId != null">
+                    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)
+                </if>
+                <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
+                    AND su.org_id IN
+                    <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
+                        #{item}
+                    </foreach>
+                </if>
+            </if>
+        </where>
+        order by mp.course_code
+    </select>
 </mapper>

+ 320 - 238
distributed-print-business/src/main/resources/mapper/ExamDetailMapper.xml

@@ -27,114 +27,139 @@
     </sql>
     <select id="listPrintTask" resultType="com.qmth.distributed.print.business.bean.dto.PrintTaskDto">
         SELECT
-            b.id examDetailId,
-            b.package_code packageCode,
-            a.id printPlanId,
-            a.name printPlanName,
-            b.exam_start_time examStartTime,
-            b.exam_end_time examEndTime,
+            ed.id examDetailId,
+            ed.package_code packageCode,
+            epp.id printPlanId,
+            epp.name printPlanName,
+            ed.exam_start_time examStartTime,
+            ed.exam_end_time examEndTime,
             c.courseNameCode,
             c.paperNumber,
-            b.exam_place examPlace,
-            b.exam_room examRoom,
-            b.total_subjects totalSubjects,
-            ifnull(b.paper_pages, 0) paperPages,
-            ifnull(b.card_pages, 0) cardPages,
-            ifnull(b.pages_a4, 0) pagesA4,
-            c.singlePagesA3,
-            b.status,
-            b.validate,
-            b.print_start_time printStartTime,
-            b.print_end_time printEndTime,
-            b.normal,
-            b.print_house_id as printHouseId,
-            b.task_id taskId,
-            e.name as printHouseName,
-            e.code as printHouseCode,
-            a.semester_id as semesterId,
-            a.semester_name as semesterName,
-            a.exam_id as examId,
-            a.exam_name as examName
+            ed.exam_place examPlace,
+            ed.exam_room examRoom,
+            ed.total_subjects totalSubjects,
+            ed.status,
+            ed.validate,
+            ed.print_start_time printStartTime,
+            ed.print_end_time printEndTime,
+            ed.normal,
+            so.name AS printHouseName,
+            ed.exam_id AS examId
         FROM
-            (select epp.id, epp.exam_id, epp.name, be.name exam_name, bs.id semester_id, bs.name semester_name
-             from exam_print_plan epp
-                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 epp.school_id = #{schoolId}
-                </if>
-                <if test="semesterId != null">
-                    and bs.id = #{semesterId}
-                </if>
-                <if test="examId != null">
-                    and be.id = #{examId}
-                </if>
-                <if test="printPlanId != null">
-                    and epp.id = #{printPlanId}
-                </if>
-                <if test="dpr != null">
-                    <if test="dpr.requestUserId != null">
-                        AND epp.create_id = #{dpr.requestUserId}
-                    </if>
-                    <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
-                        AND epp.org_id IN
-                        <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
-                            #{item}
-                        </foreach>
-                    </if>
-                </if>
-            </where>) a
-                 JOIN
-            (select * from exam_detail
-        <where>
-            <if test="status != null and status != ''">
-                and status = #{status}
-            </if>
-            <if test="examPlace != null and examPlace != ''">
-                and exam_place = #{examPlace}
-            </if>
-            <if test="examRoom != null and examRoom != ''">
-                and exam_room = #{examRoom}
-            </if>
-            <if test="examStartTime != null and examStartTime != ''">
-                and exam_start_time &gt; #{examStartTime}
-            </if>
-            <if test="examEndTime != null and examEndTime != ''">
-                and exam_end_time &lt; #{examEndTime}
-            </if>
-            <if test="printStartTime != null and printStartTime != ''">
-                and print_start_time &gt; #{printStartTime}
-            </if>
-            <if test="printEndTime != null and printEndTime != ''">
-                and print_start_time &lt; #{printEndTime}
-            </if>
-            <if test="printHouseId != null and printHouseId != ''">
-                and print_house_id = #{printHouseId}
-            </if>
-        </where>) b ON a.id = b.print_plan_id
-                 JOIN
             (SELECT
-                exam_detail_id,
-                    GROUP_CONCAT(CONCAT(course_name, '(', course_code, ')')) courseNameCode,
-                    GROUP_CONCAT(paper_number) paperNumber,
-                    GROUP_CONCAT(ifnull(paper_pages_a3, 0) + ifnull(card_pages_a3, 0)) singlePagesA3
-            FROM
-                exam_detail_course
+                 a.*
+             FROM
+                 exam_detail a
+                     LEFT JOIN basic_exam b ON a.exam_id = b.id
                 <where>
-                    <if test="courseCode != null and courseCode != ''">
-                        and course_code = #{courseCode}
+                    <if test="schoolId != null">
+                        and a.school_id = #{schoolId}
+                    </if>
+                    <if test="semesterId != null">
+                        and b.semester_id = #{semesterId}
+                    </if>
+                    <if test="examId != null">
+                        and a.exam_id = #{examId}
+                    </if>
+                    <if test="printPlanId != null">
+                        and a.print_plan_id = #{printPlanId}
+                    </if>
+                    <if test="status != null and status != ''">
+                        and a.status = #{status}
+                    </if>
+                    <if test="examPlace != null and examPlace != ''">
+                        and a.exam_place = #{examPlace}
+                    </if>
+                    <if test="examRoom != null and examRoom != ''">
+                        and a.exam_room = #{examRoom}
+                    </if>
+                    <if test="examStartTime != null and examStartTime != ''">
+                        and a.exam_start_time &gt; #{examStartTime}
+                    </if>
+                    <if test="examEndTime != null and examEndTime != ''">
+                        and a.exam_end_time &lt; #{examEndTime}
                     </if>
-                    <if test="paperNumber != null and paperNumber != ''">
-                        and paper_number = #{paperNumber}
+                    <if test="printStartTime != null and printStartTime != ''">
+                        and a.print_start_time &gt; #{printStartTime}
+                    </if>
+                    <if test="printEndTime != null and printEndTime != ''">
+                        and a.print_start_time &lt; #{printEndTime}
+                    </if>
+                    <if test="printHouseId != null and printHouseId != ''">
+                        and a.print_house_id = #{printHouseId}
                     </if>
                 </where>
-            GROUP BY exam_detail_id) c ON b.id = c.exam_detail_id
+             ) ed
+                JOIN
+            (SELECT
+                 edc.exam_detail_id,
+                 GROUP_CONCAT(CONCAT(edc.course_name, '(', edc.course_code, ')')) courseNameCode,
+                 GROUP_CONCAT(edc.paper_number) paperNumber
+             FROM
+                 exam_detail_course edc
+             WHERE
+                 EXISTS( SELECT
+                             1
+                         FROM
+                             exam_detail ed
+                         WHERE
+                             edc.exam_detail_id = ed.id
+                           AND ed.exam_id = #{examId})
+             GROUP BY exam_detail_id) c ON ed.id = c.exam_detail_id
+                LEFT JOIN
+            exam_print_plan epp ON ed.print_plan_id = epp.id
                 LEFT JOIN
-            sys_org e ON b.print_house_id = e.id
-        ORDER BY b.id desc
+            sys_org so ON ed.print_house_id = so.id
+        WHERE
+            EXISTS( SELECT
+                        1
+                    FROM
+                        (SELECT
+                             *
+                         FROM
+                             exam_detail_course edc
+                         WHERE
+                             EXISTS( SELECT
+                                         1
+                                     FROM
+                                         exam_detail ed
+                                     WHERE
+                                         edc.exam_detail_id = ed.id
+                                       AND ed.exam_id = #{examId})) edc
+                            JOIN
+                        (SELECT
+                             *
+                         FROM
+                             exam_task
+                         WHERE
+                             exam_id = #{examId}) et ON edc.course_code = et.course_code
+                            AND edc.paper_number = et.paper_number
+                            LEFT JOIN
+                                sys_user su ON et.user_id = su.id
+                    WHERE
+                        ed.id = edc.exam_detail_id
+                        <if test="courseCode != null and courseCode != ''">
+                            and edc.course_code = #{courseCode}
+                        </if>
+                        <if test="paperNumber != null and paperNumber != ''">
+                            and edc.paper_number = #{paperNumber}
+                        </if>
+                        <if test="dpr != null">
+                            <if test="dpr.requestUserId != null">
+                                AND et.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 = et.course_code)
+                            </if>
+                            <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
+                                AND su.org_id IN
+                                <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
+                                    #{item}
+                                </foreach>
+                            </if>
+                        </if>
+                        )
+        ORDER BY ed.id DESC
     </select>
 
     <select id="findBriefPage" resultType="com.qmth.distributed.print.business.bean.result.ExaminationResult">
@@ -376,84 +401,118 @@
     </select>
     <select id="taskTotalData" resultType="com.qmth.distributed.print.business.bean.dto.PrintTaskTotalDto">
         SELECT
-            ifnull(count(b.package_code), 0) packageCount,
-            ifnull(sum(b.total_subjects), 0) totalSubjects,
-            ifnull(sum(ifnull(b.paper_pages, 0)), 0)/2 paperPages,
-            ifnull(sum(ifnull(b.card_pages, 0)), 0)/2 cardPages,
-            ifnull(sum(ifnull(b.pages_a4, 0)), 0) /2 pagesA4,
-            ifnull(sum(case b.status when 'FINISH' then 0 else ifnull(b.paper_pages, 0) end),0)/2 paperPagesLeft,
-            ifnull(sum(case b.status when 'FINISH' then 0 else ifnull(b.card_pages, 0) end),0)/2 cardPagesLeft,
-            ifnull(sum(case b.status when 'FINISH' then 0 else ifnull(b.pages_a4, 0) end),0)/2 pagesA4Left
+            IFNULL(COUNT(ed.package_code), 0) packageCount,
+            IFNULL(SUM(ed.total_subjects), 0) totalSubjects,
+            IFNULL(SUM(IFNULL(ed.paper_pages, 0)), 0) / 2 paperPages,
+            IFNULL(SUM(IFNULL(ed.card_pages, 0)), 0) / 2 cardPages,
+            IFNULL(SUM(IFNULL(ed.pages_a4, 0)), 0) / 2 pagesA4,
+            IFNULL(SUM(CASE ed.status
+                           WHEN 'FINISH' THEN 0
+                           ELSE IFNULL(ed.paper_pages, 0)
+                END),
+                   0) / 2 paperPagesLeft,
+            IFNULL(SUM(CASE ed.status
+                           WHEN 'FINISH' THEN 0
+                           ELSE IFNULL(ed.card_pages, 0)
+                END),
+                   0) / 2 cardPagesLeft,
+            IFNULL(SUM(CASE ed.status
+                           WHEN 'FINISH' THEN 0
+                           ELSE IFNULL(ed.pages_a4, 0)
+                END),
+                   0) / 2 pagesA4Left
         FROM
-            (select epp.id from exam_print_plan epp
-                LEFT JOIN
-                basic_exam be ON be.id = epp.exam_id
-                LEFT JOIN
-                basic_semester bs ON bs.id = be.semester_id
-            <where>
-                and be.enable = true
-                <if test="schoolId != null">
-                    and epp.school_id = #{schoolId}
-                </if>
-                <if test="semesterId != null">
-                    and bs.id = #{semesterId}
-                </if>
-                <if test="examId != null">
-                    and be.id = #{examId}
-                </if>
-                <if test="printPlanId != null">
-                    and epp.id = #{printPlanId}
-                </if>
-                <if test="dpr != null">
-                    <if test="dpr.requestUserId != null">
-                        AND epp.create_id = #{dpr.requestUserId}
-                    </if>
-                    <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
-                        AND epp.org_id IN
-                        <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
-                            #{item}
-                        </foreach>
-                    </if>
-                </if>
-            </where>) a
-         JOIN
-            (select * from exam_detail ed
-        <where>
-            <if test="status != null and status != ''">
-                and ed.status = #{status}
-            </if>
-            <if test="examPlace != null and examPlace != ''">
-                and ed.exam_place = #{examPlace}
-            </if>
-            <if test="examRoom != null and examRoom != ''">
-                and ed.exam_room = #{examRoom}
-            </if>
-            <if test="examStartTime != null and examStartTime != ''">
-                and ed.exam_start_time &gt; #{examStartTime}
-            </if>
-            <if test="examEndTime != null and examEndTime != ''">
-                and ed.exam_end_time &lt; #{examEndTime}
-            </if>
-            <if test="printStartTime != null and printStartTime != ''">
-                and ed.print_start_time &gt; #{printStartTime}
-            </if>
-            <if test="printEndTime != null and printEndTime != ''">
-                and ed.print_start_time &lt; #{printEndTime}
-            </if>
-            <if test="printHouseId != null and printHouseId != ''">
-                and ed.print_house_id = #{printHouseId}
-            </if>
-            <if test="courseCode != null or paperNumber != null">
-                and exists (select 1 from exam_detail_course edc where ed.id = edc.exam_detail_id
-                <if test="courseCode != null">
-                    and edc.course_code = #{courseCode}
-                </if>
-                <if test="paperNumber != null">
-                    and edc.paper_number = #{paperNumber}
-                </if>
+            (SELECT
+                 a.*
+             FROM
+                 exam_detail a
+                     LEFT JOIN basic_exam b ON a.exam_id = b.id
+                    <where>
+                        <if test="schoolId != null">
+                            and a.school_id = #{schoolId}
+                        </if>
+                        <if test="semesterId != null">
+                            and b.semester_id = #{semesterId}
+                        </if>
+                        <if test="examId != null">
+                            and a.exam_id = #{examId}
+                        </if>
+                        <if test="printPlanId != null">
+                            and a.print_plan_id = #{printPlanId}
+                        </if>
+                        <if test="status != null and status != ''">
+                            and a.status = #{status}
+                        </if>
+                        <if test="examPlace != null and examPlace != ''">
+                            and a.exam_place = #{examPlace}
+                        </if>
+                        <if test="examRoom != null and examRoom != ''">
+                            and a.exam_room = #{examRoom}
+                        </if>
+                        <if test="examStartTime != null and examStartTime != ''">
+                            and a.exam_start_time &gt; #{examStartTime}
+                        </if>
+                        <if test="examEndTime != null and examEndTime != ''">
+                            and a.exam_end_time &lt; #{examEndTime}
+                        </if>
+                        <if test="printStartTime != null and printStartTime != ''">
+                            and a.print_start_time &gt; #{printStartTime}
+                        </if>
+                        <if test="printEndTime != null and printEndTime != ''">
+                            and a.print_start_time &lt; #{printEndTime}
+                        </if>
+                        <if test="printHouseId != null and printHouseId != ''">
+                            and a.print_house_id = #{printHouseId}
+                        </if>
+                    </where>
+             ) ed
+        WHERE
+            EXISTS( SELECT
+                        1
+                    FROM
+                        (SELECT
+                             *
+                         FROM
+                             exam_detail_course edc
+                         WHERE
+                             EXISTS( SELECT
+                                         1
+                                     FROM
+                                         exam_detail ed
+                                     WHERE
+                                         edc.exam_detail_id = ed.id
+                                       AND ed.exam_id = #{examId})) edc
+                            JOIN
+                        (SELECT
+                             *
+                         FROM
+                             exam_task
+                         WHERE
+                             exam_id = #{examId}) et ON edc.course_code = et.course_code
+                            AND edc.paper_number = et.paper_number
+                    WHERE
+                        ed.id = edc.exam_detail_id
+                        <if test="courseCode != null and courseCode != ''">
+                            and edc.course_code = #{courseCode}
+                        </if>
+                        <if test="paperNumber != null and paperNumber != ''">
+                            and edc.paper_number = #{paperNumber}
+                        </if>
+                        <if test="dpr != null">
+                            <if test="dpr.requestUserId != null">
+                                AND et.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 = et.course_code)
+                            </if>
+                            <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
+                                AND su.org_id IN
+                                <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
+                                    #{item}
+                                </foreach>
+                            </if>
+                        </if>
                 )
-            </if>
-        </where>) b ON a.id = b.print_plan_id
     </select>
     <select id="listStudentByExamDetailCourseId" resultType="java.util.Map">
         SELECT
@@ -479,69 +538,96 @@
             and c.student_code >= #{studentCode}
         </if>
     </select>
-    <select id="selectPaperCount" resultType="java.lang.Integer">
+    <select id="selectPaperCount" resultType="com.qmth.distributed.print.business.entity.ExamDetailCourse">
         SELECT
-            count(distinct c.paper_number, c.paper_type)
+            edc.*
         FROM
-            exam_print_plan a
-            JOIN
-            exam_detail b ON a.id = b.print_plan_id
-                JOIN
-            exam_detail_course c ON b.id = c.exam_detail_id
-                JOIN
-            sys_user d ON a.create_id = d.id
+            (SELECT
+                 edc.exam_detail_id,
+                 edc.course_code,
+                 edc.paper_number,
+                 edc.paper_type
+             FROM
+                 exam_detail_course edc
+             WHERE
+                 EXISTS( SELECT
+                             1
+                         FROM
+                             exam_detail ed
+                                LEFT JOIN
+                             basic_exam be ON ed.exam_id = be.id
+                         WHERE
+                             edc.exam_detail_id = ed.id
+                            <if test="schoolId != null">
+                                and ed.school_id = #{schoolId}
+                            </if>
+                            <if test="semesterId != null">
+                                and be.semester_id = #{semesterId}
+                            </if>
+                            <if test="examId != null">
+                                and ed.exam_id = #{examId}
+                            </if>
+                            <if test="printPlanId != null">
+                                and ed.print_plan_id = #{printPlanId}
+                            </if>
+                            <if test="status != null and status != ''">
+                                and ed.status = #{status}
+                            </if>
+                            <if test="examPlace != null and examPlace != ''">
+                                and ed.exam_place = #{examPlace}
+                            </if>
+                            <if test="examRoom != null and examRoom != ''">
+                                and ed.exam_room = #{examRoom}
+                            </if>
+                            <if test="examStartTime != null and examStartTime != ''">
+                                and ed.exam_start_time &gt; #{examStartTime}
+                            </if>
+                            <if test="examEndTime != null and examEndTime != ''">
+                                and ed.exam_end_time &lt; #{examEndTime}
+                            </if>
+                            <if test="printStartTime != null and printStartTime != ''">
+                                and ed.print_start_time &gt; #{printStartTime}
+                            </if>
+                            <if test="printEndTime != null and printEndTime != ''">
+                                and ed.print_start_time &lt; #{printEndTime}
+                            </if>
+                            <if test="printHouseId != null and printHouseId != ''">
+                                and ed.print_house_id = #{printHouseId}
+                            </if>
+                    )
+               AND edc.paper_type IS NOT NULL) edc
                 JOIN
-            basic_exam e ON a.exam_id = e.id
-        <where>
-            and c.paper_type is not null and e.enable = true
-            <if test="schoolId != null and schoolId != ''">
-                and a.school_id = #{schoolId}
-            </if>
-            <if test="semesterId != null and semesterId != ''">
-                and e.semester_id = #{semesterId}
-            </if>
-            <if test="examId != null and examId != ''">
-                and e.id = #{examId}
-            </if>
-            <if test="printPlanId != null and printPlanId != ''">
-                and a.id = #{printPlanId}
-            </if>
-            <if test="status != null and status != ''">
-                and b.status = #{status}
-            </if>
-            <if test="courseCode != null and courseCode != ''">
-                and c.course_code = #{courseCode}
-            </if>
-            <if test="paperNumber != null and paperNumber != ''">
-                and c.paper_number = #{paperNumber}
-            </if>
-            <if test="examPlace != null and examPlace != ''">
-                and b.exam_place = #{examPlace}
-            </if>
-            <if test="examRoom != null and examRoom != ''">
-                and b.exam_room = #{examRoom}
-            </if>
-            <if test="examStartTime != null and examStartTime != ''">
-                and b.exam_start_time &gt; #{examStartTime}
-            </if>
-            <if test="examEndTime != null and examEndTime != ''">
-                and b.exam_end_time &lt; #{examEndTime}
-            </if>
-            <if test="printHouseId != null and printHouseId != ''">
-                and b.print_house_id = #{printHouseId}
-            </if>
-            <if test="dpr != null">
-                <if test="dpr.requestUserId != null">
-                    AND a.create_id = #{dpr.requestUserId}
+            (SELECT
+                 *
+             FROM
+                 exam_task
+             WHERE
+                 exam_id = #{examId}) et ON edc.course_code = et.course_code
+                AND edc.paper_number = et.paper_number
+                LEFT JOIN
+             sys_user su ON et.user_id = su.id
+            <where>
+                <if test="courseCode != null and courseCode != ''">
+                    and edc.course_code = #{courseCode}
                 </if>
-                <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
-                    AND a.org_id IN
-                    <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
-                        #{item}
-                    </foreach>
+                <if test="paperNumber != null and paperNumber != ''">
+                    and edc.paper_number = #{paperNumber}
                 </if>
-            </if>
-        </where>
+                <if test="dpr != null">
+                    <if test="dpr.requestUserId != null">
+                        AND et.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 = et.course_code)
+                    </if>
+                    <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
+                        AND su.org_id IN
+                        <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
+                            #{item}
+                        </foreach>
+                    </if>
+                </if>
+            </where>
     </select>
 
     <select id="findPdfDownload" resultType="com.qmth.distributed.print.business.bean.dto.ExamDetailPdfDownloadDto">
@@ -592,15 +678,11 @@
         LEFT JOIN
         basic_semester bs on bs.id = be.semester_id
         <where>
-            <if test="schoolId != null and schoolId > 0">
+            <if test="schoolId != null">
                 AND det.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="printPlanIdList != null and printPlanIdList != '' and printPlanIdList.size() > 0">
                 AND det.print_plan_id IN
                 <foreach collection="printPlanIdList" item="item" index="index" open="(" separator="," close=")">

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

@@ -102,6 +102,9 @@
                 <if test="dpr.requestUserId != null">
                     AND a.create_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 = a.course_code)
+                </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND d.org_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
@@ -578,6 +581,9 @@
                 <if test="dpr.requestUserId != null">
                     AND a.create_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 = a.course_code)
+                </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND a.org_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
@@ -1093,6 +1099,9 @@
                 <if test="dpr.requestUserId != null">
                     AND a.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 = a.course_code)
+                </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND su.org_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">

+ 3 - 0
distributed-print-business/src/main/resources/mapper/TFFlowApproveMapper.xml

@@ -113,6 +113,9 @@
                 <if test="dpr.requestUserId != null">
                     AND et.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 = et.course_code)
+                </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND su.org_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">

+ 3 - 6
distributed-print-business/src/main/resources/mapper/TSyncExamStudentScoreMapper.xml

@@ -53,16 +53,13 @@
             <if test="courseCode != null and courseCode != ''">
                 and et.course_code = #{courseCode}
             </if>
-            <if test="(courseCode == null or courseCode == '') and basicCourses.size > 0">
-                and et.course_code in
-                <foreach collection="basicCourses" item="item" index="index" open="(" separator="," close=")">
-                    #{item.code}
-                </foreach>
-            </if>
             <if test="dpr != null">
                 <if test="dpr.requestUserId != null">
                     AND et.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 = et.course_code)
+                </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND su.org_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">

+ 0 - 14
distributed-print-business/src/main/resources/mapper/TeachCourseMapper.xml

@@ -88,20 +88,6 @@
         </where>
         ORDER BY so.id
     </select>
-    <select id="findTeachCourseByUserId" resultType="com.qmth.teachcloud.common.entity.BasicCourse">
-        SELECT
-            bc.code, bc.name
-        FROM
-            basic_course bc
-        WHERE
-            EXISTS( SELECT
-                        1
-                    FROM
-                        teach_course tc
-                    WHERE
-                        tc.school_id = bc.school_id and bc.code = tc.course_code
-                      AND tc.user_id = #{userId})
-    </select>
 </mapper>
 
 

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

@@ -70,7 +70,7 @@ public class BasicExamController {
     @ApiOperation(value = "考试管理-新增/编辑")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "更新成功", response = EditResult.class)})
-    @OperationLogDetail(operationType = OperationTypeEnum.SAVE)
+    @OperationLogDetail(operationType = OperationTypeEnum.SAVE, detail = "新增/编辑一条考试数据:id:{{basicExam.id}}")
     public Result saveBasicExam(@Valid @RequestBody BasicExam basicExam, BindingResult bindingResult) throws IllegalAccessException {
         if (bindingResult.hasErrors()) {
             return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
@@ -86,7 +86,7 @@ public class BasicExamController {
      */
     @ApiOperation(value = "启用/禁用")
     @RequestMapping(value = "/enable", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "启用/禁用:{{id}}")
     public Result enable(@ApiParam(value = "考试ID", required = true) @RequestParam Long id,
                          @ApiParam(value = "启用/禁用", required = true) @RequestParam Boolean enable) {
         boolean isSuccess = basicExamService.enable(id, enable);

+ 10 - 4
distributed-print/src/main/java/com/qmth/distributed/print/api/BasicExamStudentController.java

@@ -9,6 +9,7 @@ import com.qmth.distributed.print.business.templete.execute.SyncBasicExamStudent
 import com.qmth.teachcloud.common.annotation.OperationLogDetail;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.SysUser;
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.common.enums.TaskTypeEnum;
 import com.qmth.teachcloud.common.enums.log.OperationTypeEnum;
 import com.qmth.teachcloud.common.util.Result;
@@ -54,8 +55,8 @@ public class BasicExamStudentController {
     @RequestMapping(value = "/page", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = BasicExamStudentResult.class)})
     public Result findBasicExamStudentPage(@ApiParam(value = "学期id") @RequestParam(required = false) String semesterId,
-                                           @ApiParam(value = "学期id") @RequestParam(required = false) String examId,
-                                           @ApiParam(value = "考试id") @RequestParam(required = false) String courseCode,
+                                           @ApiParam(value = "考试id") @RequestParam(required = false) String examId,
+                                           @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
                                            @ApiParam(value = "教师(工号/姓名)") @RequestParam(required = false) String teacher,
                                            @ApiParam(value = "学院") @RequestParam(required = false) String college,
                                            @ApiParam(value = "专业") @RequestParam(required = false) String major,
@@ -63,8 +64,13 @@ public class BasicExamStudentController {
                                            @ApiParam(value = "考生信息(姓名/学号)") @RequestParam(required = false) String examStudentInfo,
                                            @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                            @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
-        SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
-        return ResultUtil.ok(basicExamStudentService.page(requestUser, SystemConstant.convertIdToLong(semesterId),
+        if (semesterId == null) {
+            throw ExceptionResultEnum.ERROR.exception("请选择学期");
+        }
+        if (examId == null) {
+            throw ExceptionResultEnum.ERROR.exception("请选择考试");
+        }
+        return ResultUtil.ok(basicExamStudentService.page(SystemConstant.convertIdToLong(semesterId),
                 SystemConstant.convertIdToLong(examId), courseCode, teacher, college, major, teachClazz,
                 examStudentInfo, pageNumber, pageSize));
     }

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

@@ -45,13 +45,20 @@ public class DownloadController {
     @ApiOperation(value = "分页查询")
     @RequestMapping(value = "/page", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = TaskListResult.class)})
-    public Object page(@ApiParam(value = "考试ID") @RequestParam(required = false) Long examId,
+    public Object page(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
+                       @ApiParam(value = "考试ID") @RequestParam(required = false) Long examId,
                        @ApiParam(value = "课程开课机构ID") @RequestParam(required = false) Long orgId,
                        @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
                        @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                        @ApiParam(value = "命题老师工号/姓名") @RequestParam(required = false) String userParam,
                        @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                        @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+        if (semesterId == null) {
+            throw ExceptionResultEnum.SEMESTER_ID_IS_NULL.exception();
+        }
+        if (examId == null) {
+            throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
+        }
         return ResultUtil.ok(downloadService.page(examId, courseCode, paperNumber, orgId, userParam, pageNumber, pageSize));
     }
 

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

@@ -81,7 +81,7 @@ public class ExamCardController {
      */
     @ApiOperation(value = "新增/修改")
     @RequestMapping(value = "/save_generic", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.SAVE)
+    @OperationLogDetail(operationType = OperationTypeEnum.SAVE, detail = "新增/修改了一条题卡数据")
     public Result save(@RequestBody GenericExamCardParams params) throws Exception {
         Map<String, String> map = examCardService.saveGeneric(params);
         return ResultUtil.ok(map);
@@ -108,6 +108,7 @@ public class ExamCardController {
      */
     @ApiOperation(value = "新建")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
+    @OperationLogDetail(operationType = OperationTypeEnum.SAVE, detail = "新增/修改操作,题卡ID:{{examCardParams.id}}、题卡标题:{{examCardParams.title}}")
     public Result save(@RequestBody ExamCardParams examCardParams) throws Exception {
         Map<String, String> map = examCardService.saveExamCard(examCardParams);
         return ResultUtil.ok(map);
@@ -147,6 +148,7 @@ public class ExamCardController {
      */
     @ApiOperation(value = "复制题卡")
     @RequestMapping(value = "/copy", method = RequestMethod.POST)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "复制题卡操作,题卡ID:{{id}}")
     public Result copyCard(@RequestParam(value = "id") String id,
                            @RequestParam(value = "courseCode") String courseCode) {
         Long copyCardId = examCardService.copyCard(SystemConstant.convertIdToLong(id), courseCode);
@@ -160,6 +162,7 @@ public class ExamCardController {
      */
     @ApiOperation(value = "题卡转图片")
     @RequestMapping(value = "/convert_image", method = RequestMethod.POST)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "生成图片操作,题卡ID:{{id}}")
     public Result convertImage(@RequestParam(value = "id") String id) {
         examCardService.convertImage(SystemConstant.convertIdToLong(id));
         return ResultUtil.ok(true, "");

+ 13 - 5
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamDetailController.java

@@ -86,8 +86,11 @@ public class ExamDetailController {
                                        @ApiParam(value = "考试日期-终止") @RequestParam(required = false) Long endDate,
                                        @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                        @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+        if (semesterId == null) {
+            throw ExceptionResultEnum.SEMESTER_ID_IS_NULL.exception();
+        }
         if (examId == null) {
-            throw ExceptionResultEnum.ERROR.exception("请选择考试");
+            throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
         }
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
@@ -139,8 +142,10 @@ public class ExamDetailController {
                                         @ApiParam(value = "考试日期-终止") @RequestParam(required = false) Long endDate,
                                         @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                         @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
-
-        if(examId == null){
+        if (semesterId == null) {
+            throw ExceptionResultEnum.SEMESTER_ID_IS_NULL.exception();
+        }
+        if (examId == null) {
             throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
         }
         if (Objects.isNull(printPlanIdList)) {
@@ -168,7 +173,7 @@ public class ExamDetailController {
                                             @ApiParam(value = "姓名/学号") @RequestParam(required = false) String param,
                                             @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                             @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
-        return ResultUtil.ok(examDetailService.findExaminationDetail(SystemConstant.convertIdToLong(examDetailId),param, pageNumber, pageSize));
+        return ResultUtil.ok(examDetailService.findExaminationDetail(SystemConstant.convertIdToLong(examDetailId), param, pageNumber, pageSize));
     }
 
     @ApiOperation(value = "考务数据导入-考点模糊查询")
@@ -217,7 +222,7 @@ public class ExamDetailController {
                              @ApiParam(value = "卷袋号") @RequestParam(required = false) String packageCode,
                              @ApiParam(value = "考试日期-起始") @RequestParam(required = false) Long startDate,
                              @ApiParam(value = "考试日期-终止") @RequestParam(required = false) Long endDate) {
-        if(examId == null){
+        if (examId == null) {
             throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
         }
         DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission();
@@ -262,6 +267,7 @@ public class ExamDetailController {
 
     /**
      * 获取新增考生考务字段
+     *
      * @param examDetailId 考场ID
      */
     @ApiOperation(value = "考务数据导入-新增考生-考场科目")
@@ -272,6 +278,7 @@ public class ExamDetailController {
 
     /**
      * 新增考生-保存
+     *
      * @param singleExamStudentAddParam 请求参数
      * @return
      */
@@ -284,6 +291,7 @@ public class ExamDetailController {
 
     /**
      * 删除考生
+     *
      * @param id 请求参数
      * @return
      */

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

@@ -61,15 +61,17 @@ public class ExamPrintPlanController {
     @RequestMapping(value = "/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
     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) String examId,
                                     @ApiParam(value = "印刷计划id集合") @RequestParam(required = false) List<String> printPlanIdList,
                                     @ApiParam(value = "印刷计划状态") @RequestParam(required = false) PrintPlanStatusEnum status,
                                     @ApiParam(value = "计划创建时间段开始时间") @RequestParam(required = false) Long startTime,
                                     @ApiParam(value = "计划创建时间段结束时间") @RequestParam(required = false) Long endTime,
                                     @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                     @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
-
-        if(examId == null){
+        if (semesterId == null) {
+            throw ExceptionResultEnum.SEMESTER_ID_IS_NULL.exception();
+        }
+        if (examId == null) {
             throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
         }
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
@@ -101,7 +103,7 @@ public class ExamPrintPlanController {
     @ApiOperation(value = "印刷计划-新增/修改")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "更新成功", response = Result.class)})
-    @OperationLogDetail(operationType = OperationTypeEnum.SAVE)
+    @OperationLogDetail(operationType = OperationTypeEnum.SAVE, detail = "新增/修改操作,考试ID:{{printPlanParams.examId}}、计划ID:{{printPlanParams.id}}、计划名称:{{printPlanParams.name}}")
     public Result savePrintPlan(@Valid @RequestBody PrintPlanParams printPlanParams, BindingResult bindingResult) {
         if (bindingResult.hasErrors()) {
             return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
@@ -114,7 +116,7 @@ public class ExamPrintPlanController {
     @ApiOperation(value = "印刷计划-删除")
     @RequestMapping(value = "/remove", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "删除成功", response = Result.class)})
-    @OperationLogDetail(operationType = OperationTypeEnum.DELETE)
+    @OperationLogDetail(operationType = OperationTypeEnum.DELETE, detail = "删除操作,用户ID:{{deleteParams.id}}")
     public Result removePrintPlan(@Valid @RequestBody DeleteParams deleteParams, BindingResult bindingResult) {
         if (bindingResult.hasErrors()) {
             return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
@@ -245,7 +247,7 @@ public class ExamPrintPlanController {
      */
     @ApiOperation(value = "关联/更换试卷")
     @RequestMapping(value = "/relate_update", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "关联试卷操作,考试ID:{{paperParam.examId}}、试卷编号:{{paperParam.paperNumber}}、关联卷型:{{paperParam.relatePaperType}}")
     public Result relateUpdate(@RequestBody RelatePaperParam paperParam) throws IOException {
         boolean isSuccess = examTaskDetailService.updatePaper(paperParam);
         return ResultUtil.ok(isSuccess);

+ 30 - 41
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamPrintTaskController.java

@@ -59,41 +59,29 @@ public class ExamPrintTaskController {
 
     /**
      * 印刷任务管理-查询
-     *
-     * @param printPlanId
-     * @param status
-     * @param courseCode
-     * @param paperNumber
-     * @param examPlace
-     * @param examStartTime
-     * @param examEndTime
-     * @param printHouseId  印刷室id
-     * @param pageNumber
-     * @param pageSize
-     * @return
      */
     @ApiOperation(value = "印刷任务管理-查询")
     @RequestMapping(value = "/task_list", method = RequestMethod.POST)
     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,
-                           @RequestParam(value = "examPlace", required = false) String examPlace,
-                           @RequestParam(value = "examRoom", required = false) String examRoom,
-                           @RequestParam(value = "examStartTime", required = false) Long examStartTime,
-                           @RequestParam(value = "examEndTime", required = false) Long examEndTime,
-                           @RequestParam(value = "printStartTime", required = false) Long printStartTime,
-                           @RequestParam(value = "printEndTime", required = false) Long printEndTime,
-                           @RequestParam(value = "printHouseId", required = false) String printHouseId,
+                           @ApiParam(value = "考试ID") @RequestParam(required = false) String examId,
+                           @ApiParam(value = "印刷计划ID") @RequestParam(value = "printPlanId", required = false) Long printPlanId,
+                           @ApiParam(value = "印刷计划状态") @RequestParam(value = "status", required = false) String status,
+                           @ApiParam(value = "课程代码") @RequestParam(value = "courseCode", required = false) String courseCode,
+                           @ApiParam(value = "试卷编号") @RequestParam(value = "paperNumber", required = false) String paperNumber,
+                           @ApiParam(value = "考点") @RequestParam(value = "examPlace", required = false) String examPlace,
+                           @ApiParam(value = "考场") @RequestParam(value = "examRoom", required = false) String examRoom,
+                           @ApiParam(value = "考试时间(开始)") @RequestParam(value = "examStartTime", required = false) Long examStartTime,
+                           @ApiParam(value = "考试时间(结束)") @RequestParam(value = "examEndTime", required = false) Long examEndTime,
+                           @ApiParam(value = "打印时间(开始)") @RequestParam(value = "printStartTime", required = false) Long printStartTime,
+                           @ApiParam(value = "打印时间(结束)") @RequestParam(value = "printEndTime", required = false) Long printEndTime,
+                           @ApiParam(value = "印刷室ID") @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) {
         if (semesterId == null) {
-            throw ExceptionResultEnum.ERROR.exception("请选择学期");
+            throw ExceptionResultEnum.SEMESTER_ID_IS_NULL.exception();
         }
         if (examId == null) {
-            throw ExceptionResultEnum.ERROR.exception("请选择考试");
+            throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
         }
         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);
@@ -115,18 +103,18 @@ public class ExamPrintTaskController {
     @ApiOperation(value = "印刷任务管理-汇总数据查询")
     @RequestMapping(value = "/task_total_data", method = RequestMethod.POST)
     public Result taskTotalData(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
-                                @ApiParam(value = "考试id") @RequestParam(required = false) Long 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,
-                                @RequestParam(value = "examPlace", required = false) String examPlace,
-                                @RequestParam(value = "examRoom", required = false) String examRoom,
-                                @RequestParam(value = "examStartTime", required = false) Long examStartTime,
-                                @RequestParam(value = "examEndTime", required = false) Long examEndTime,
-                                @RequestParam(value = "printStartTime", required = false) Long printStartTime,
-                                @RequestParam(value = "printEndTime", required = false) Long printEndTime,
-                                @RequestParam(value = "printHouseId", required = false) String printHouseId) {
+                                @ApiParam(value = "考试ID") @RequestParam(required = false) Long examId,
+                                @ApiParam(value = "印刷计划ID") @RequestParam(value = "printPlanId", required = false) Long printPlanId,
+                                @ApiParam(value = "印刷计划状态") @RequestParam(value = "status", required = false) String status,
+                                @ApiParam(value = "课程代码") @RequestParam(value = "courseCode", required = false) String courseCode,
+                                @ApiParam(value = "试卷编号") @RequestParam(value = "paperNumber", required = false) String paperNumber,
+                                @ApiParam(value = "考点") @RequestParam(value = "examPlace", required = false) String examPlace,
+                                @ApiParam(value = "考场") @RequestParam(value = "examRoom", required = false) String examRoom,
+                                @ApiParam(value = "考试时间(开始)") @RequestParam(value = "examStartTime", required = false) Long examStartTime,
+                                @ApiParam(value = "考试时间(结束)") @RequestParam(value = "examEndTime", required = false) Long examEndTime,
+                                @ApiParam(value = "打印时间(开始)") @RequestParam(value = "printStartTime", required = false) Long printStartTime,
+                                @ApiParam(value = "打印时间(结束)") @RequestParam(value = "printEndTime", required = false) Long printEndTime,
+                                @ApiParam(value = "印刷室ID") @RequestParam(value = "printHouseId", required = false) String printHouseId) {
         PrintTaskTotalDto printTaskTotalDto = examDetailService.taskTotalData(semesterId, examId, printPlanId, status, courseCode, paperNumber, examPlace, examRoom, examStartTime, examEndTime, printStartTime, printEndTime, SystemConstant.convertIdToLong(printHouseId));
         return ResultUtil.ok(printTaskTotalDto);
     }
@@ -139,7 +127,7 @@ public class ExamPrintTaskController {
      */
     @ApiOperation(value = "印刷任务管理-提交印刷")
     @RequestMapping(value = "/task_submit", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "提交印刷操作,考场ID:{{examDetail.id}}、状态:{{examDetail.status}}")
     public Result taskSubmit(@RequestBody ExamDetail examDetail) throws IOException {
         boolean isSuccess = examDetailService.taskSubmit(examDetail);
         return ResultUtil.ok(isSuccess);
@@ -153,7 +141,7 @@ public class ExamPrintTaskController {
      */
     @ApiOperation(value = "印刷任务管理-撤回提交")
     @RequestMapping(value = "/task_cancel", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "撤回提交操作,考场ID:{{examDetail.id}}、状态:{{examDetail.status}}")
     public Result taskCancel(@RequestBody ExamDetail examDetail) {
         boolean isSuccess = examDetailService.taskCancel(examDetail.getId());
         return ResultUtil.ok(isSuccess);
@@ -167,7 +155,7 @@ public class ExamPrintTaskController {
      */
     @ApiOperation(value = "印刷任务管理-批量完成/撤回/提交")
     @RequestMapping(value = "/task_batch_cancel", method = RequestMethod.POST)
-    @OperationLogDetail(detail = "批量完成/撤回/提交", operationType = OperationTypeEnum.UPDATE)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "批量完成/撤回/提交操作,参数:{{data}}")
     public Result taskCancel(@RequestBody Map data) {
         boolean isSuccess = examDetailService.taskBatchCancel(data);
         return ResultUtil.ok(isSuccess);
@@ -217,6 +205,7 @@ public class ExamPrintTaskController {
     @ApiOperation(value = "印刷任务管理-批量下载PDF")
     @RequestMapping(value = "/task_download_pdf", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = EditResult.class)})
+    @OperationLogDetail(operationType = OperationTypeEnum.EXPORT)
     public Result taskDownloadPdf(@ApiParam(value = "id数组", required = true) @Valid @RequestBody ArraysParams arraysParams, BindingResult bindingResult) throws Exception {
         if (bindingResult.hasErrors()) {
             return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());

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

@@ -47,7 +47,7 @@ public class SsoController {
     @ApiOperation(value = "题库单点登录")
     @ApiResponses({@ApiResponse(code = 200, message = "题库单点登录", response = Result.class)})
     @RequestMapping(value = "/question_library_login", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.TIKU_SSO)
+    @OperationLogDetail(operationType = OperationTypeEnum.SSO)
     public Result questionLibraryLogin(@ApiParam(value = "登录名", required = true) @RequestParam String loginName,
                                        @ApiParam(value = "真实姓名", required = true) @RequestParam String realName,
                                        @ApiParam(value = "角色", required = true) @RequestParam RoleTypeEnum role,
@@ -71,7 +71,7 @@ public class SsoController {
     @ApiOperation(value = "教研分析单点登录")
     @ApiResponses({@ApiResponse(code = 200, message = "教研分析单点登录", response = Result.class)})
     @RequestMapping(value = "/analysis_login", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.REPORT_SSO)
+    @OperationLogDetail(operationType = OperationTypeEnum.SSO)
     public Result analysisLogin(@ApiParam(value = "登录名", required = true) @RequestParam String loginName,
                                 @ApiParam(value = "角色", required = true) @RequestParam RoleTypeEnum role,
                                 @ApiParam(value = "学院名称", required = true) @RequestParam String orgName,

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

@@ -68,7 +68,7 @@ public class SysOrgController {
      */
     @ApiOperation(value = "新增/修改")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.SAVE)
+    @OperationLogDetail(operationType = OperationTypeEnum.SAVE, detail = "新增/修改操作,机构ID:{{org.id}},机构名称:{{org.name}}")
     public Result save(@Valid @RequestBody SysOrg org, BindingResult bindingResult) {
         if (bindingResult.hasErrors()) {
             return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
@@ -85,7 +85,7 @@ public class SysOrgController {
      */
     @ApiOperation(value = "启用/禁用")
     @RequestMapping(value = "/enable", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "启用/禁用操作,机构ID:{{org.id}},启用/禁用状态:{{org.enable}}")
     public Result enable(@RequestBody SysOrg org) {
         return ResultUtil.ok(printCommonService.enable(org));
     }
@@ -98,7 +98,7 @@ public class SysOrgController {
      */
     @ApiOperation(value = "删除")
     @RequestMapping(value = "/remove", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.DELETE)
+    @OperationLogDetail(operationType = OperationTypeEnum.DELETE, detail = "删除操作,机构ID:{{org.id}}")
     public Result remove(@RequestBody SysOrg org) {
         return ResultUtil.ok(printCommonService.sysOrgRemove(org.getId()));
     }

+ 4 - 4
distributed-print/src/main/java/com/qmth/distributed/print/api/SysRoleController.java

@@ -86,7 +86,7 @@ public class SysRoleController {
      */
     @ApiOperation(value = "新增/修改")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.SAVE)
+    @OperationLogDetail(operationType = OperationTypeEnum.SAVE, detail = "新增/修改操作,角色ID:{{sysRolePrivilegeParams.id}}、角色名称:{{sysRolePrivilegeParams.name}}")
     public Result save(@Valid @RequestBody SysRolePrivilegeParams sysRolePrivilegeParams, BindingResult bindingResult) {
         if (bindingResult.hasErrors()) {
             return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
@@ -103,7 +103,7 @@ public class SysRoleController {
      */
     @ApiOperation(value = "启用/禁用")
     @RequestMapping(value = "/enable", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "启用/禁用操作,角色ID:{{role.id}}、启用/状态:{{role.enable}}")
     public Result enable(@RequestBody SysRole role) throws NoSuchAlgorithmException {
         return ResultUtil.ok(sysRoleService.enableReport(role));
     }
@@ -116,8 +116,8 @@ public class SysRoleController {
      */
     @ApiOperation(value = "删除")
     @RequestMapping(value = "/remove", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.DELETE)
-    public Result remove(@RequestParam(value = "id", required = true) Long id) {
+    @OperationLogDetail(operationType = OperationTypeEnum.DELETE, detail = "删除操作,角色ID:{{id}}")
+    public Result remove(@RequestParam(value = "id") Long id) {
         return ResultUtil.ok(sysRoleService.removeReport(id));
     }
 

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

@@ -117,7 +117,7 @@ public class SysUserController {
      */
     @ApiOperation(value = "新增/修改")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.SAVE)
+    @OperationLogDetail(operationType = OperationTypeEnum.SAVE, detail = "新增/修改操作,用户ID:{{userSaveParams.id}},姓名:{{userSaveParams.name}},用户名/工号:{{userSaveParams.loginName}}")
     public Result save(@ApiParam(value = "用户信息", required = true) @Valid @RequestBody UserSaveParams userSaveParams, BindingResult bindingResult) throws IllegalAccessException {
         if (bindingResult.hasErrors()) {
             return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
@@ -150,7 +150,7 @@ public class SysUserController {
      */
     @ApiOperation(value = "启用/禁用")
     @RequestMapping(value = "/enable", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "启用/禁用操作,用户ID:{{user.id}}、启用/状态:{{user.enable}}")
     public Result enable(@RequestBody SysUser user) throws NoSuchAlgorithmException, IllegalAccessException {
         sysUserService.enable(user);
         return ResultUtil.ok();
@@ -159,7 +159,7 @@ public class SysUserController {
     @ApiOperation(value = "课程管理-批量删除")
     @RequestMapping(value = "/delete_batch", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "删除成功", response = EditResult.class)})
-    @OperationLogDetail(operationType = OperationTypeEnum.DELETE)
+    @OperationLogDetail(operationType = OperationTypeEnum.DELETE, detail = "批量删除操作,用户ID集合:{{idList}}")
     public Result deleteBatch(@ApiParam(value = "删除对象ID集合", required = true) @RequestParam List<Long> idList) {
         return ResultUtil.ok(sysUserService.removeBasicCourseBatch(idList));
     }
@@ -172,7 +172,7 @@ public class SysUserController {
      */
     @ApiOperation(value = "删除")
     @RequestMapping(value = "/remove", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.DELETE)
+    @OperationLogDetail(operationType = OperationTypeEnum.DELETE, detail = "删除操作,用户ID:{{id}}")
     public Result remove(@RequestParam(value = "id") Long id) throws NoSuchAlgorithmException {
         return ResultUtil.ok(sysUserService.remove(id));
     }
@@ -185,7 +185,7 @@ public class SysUserController {
      */
     @ApiOperation(value = "重置密码")
     @RequestMapping(value = "/reset_password", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "重置密码操作,用户ID:{{user.id}}")
     public Result resetPassword(@RequestBody SysUser user) throws NoSuchAlgorithmException {
         return ResultUtil.ok(sysUserService.resetPassword(user.getId()));
     }
@@ -198,7 +198,7 @@ public class SysUserController {
     @ApiOperation(value = "修改密码")
     @RequestMapping(value = "/update_password", method = RequestMethod.POST)
     @Aac(strict = false, auth = false)
-    @OperationLogDetail(detail = "修改密码", operationType = OperationTypeEnum.UPDATE)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "修改密码操作,用户ID:{{user.id}}")
     public Result updatePassword(@RequestBody SysUser user) throws NoSuchAlgorithmException {
         return ResultUtil.ok(sysUserService.updatePassword(user));
     }
@@ -211,7 +211,7 @@ public class SysUserController {
      */
     @ApiOperation(value = "绑定角色")
     @RequestMapping(value = "/bind_roles", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "绑定角色操作,用户ID:{{user.id}}")
     public Result bindRoles(@RequestBody SysUser sysUser) {
         return ResultUtil.ok(sysUserService.bindRoles(sysUser));
     }

+ 7 - 0
distributed-print/src/main/java/com/qmth/distributed/print/api/TBSyncTaskController.java

@@ -7,6 +7,7 @@ import com.qmth.teachcloud.common.annotation.OperationLogDetail;
 import com.qmth.teachcloud.common.bean.result.SyncListResult;
 import com.qmth.teachcloud.common.bean.result.TaskListResult;
 import com.qmth.teachcloud.common.contant.SystemConstant;
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.common.enums.PushTypeEnum;
 import com.qmth.teachcloud.common.enums.TaskResultEnum;
 import com.qmth.teachcloud.common.enums.TaskStatusEnum;
@@ -54,6 +55,12 @@ public class TBSyncTaskController {
                             @ApiParam(value = "同步数据结果") @RequestParam(required = false) TaskResultEnum result,
                             @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                             @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+        if (semesterId == null) {
+            throw ExceptionResultEnum.SEMESTER_ID_IS_NULL.exception();
+        }
+        if (examId == null) {
+            throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
+        }
         Long schoolId = SystemConstant.convertIdToLong(String.valueOf(ServletUtil.getRequestHeaderSchoolId()));
         IPage<SyncListResult> page = tbSyncTaskService.query(schoolId, semesterId, examId, courseCode, paperNumber, status, type, result, pageNumber, pageSize);
         return ResultUtil.ok(page);

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

@@ -12,6 +12,7 @@ import com.qmth.teachcloud.common.bean.result.TaskListResult;
 import com.qmth.teachcloud.common.bean.result.TaskPdfResult;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.enums.CreatePdfTypeEnum;
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.common.enums.TaskResultEnum;
 import com.qmth.teachcloud.common.enums.TaskStatusEnum;
 import com.qmth.teachcloud.common.util.Result;
@@ -51,7 +52,8 @@ public class TBTaskPdfController {
     @ApiOperation(value = "PDF生成管理查询接口")
     @RequestMapping(value = "/page_pdf_create", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "PDF生成管理列表信息", response = TaskListResult.class)})
-    public Result taskQuery(@ApiParam(value = "考试ID", required = true) @RequestParam(value = "examId") Long examId,
+    public Result taskQuery(@ApiParam(value = "学期ID", required = true) @RequestParam(value = "semesterId", required = false) Long semesterId,
+                            @ApiParam(value = "考试ID", required = true) @RequestParam(value = "examId", required = false) Long examId,
                             @ApiParam(value = "印刷计划ID") @RequestParam(required = false) String printPlanId,
                             @ApiParam(value = "课程代码") @RequestParam(value = "courseCode", required = false) String courseCode,
                             @ApiParam(value = "试着编号") @RequestParam(value = "paperNumber", required = false) String paperNumber,
@@ -63,6 +65,12 @@ public class TBTaskPdfController {
                             @ApiParam(value = "考试时间(结束)") @RequestParam(value = "examEndTime", required = false) Long examEndTime,
                             @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                             @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+        if (semesterId == null) {
+            throw ExceptionResultEnum.SEMESTER_ID_IS_NULL.exception();
+        }
+        if (examId == null) {
+            throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
+        }
         IPage<TaskPdfResult> taskListResultIPage = tbTaskPdfService.pageData(new Page<>(pageNumber, pageSize), examId, printPlanId, courseCode, paperNumber, status, result, examPlace, examRoom, examStartTime, examEndTime);
         return ResultUtil.ok(taskListResultIPage);
     }

+ 7 - 0
distributed-print/src/main/java/com/qmth/distributed/print/api/TCStatisticsController.java

@@ -12,6 +12,7 @@ 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.ExceptionResultEnum;
 import com.qmth.teachcloud.common.enums.TaskTypeEnum;
 import com.qmth.teachcloud.common.enums.log.OperationTypeEnum;
 import com.qmth.teachcloud.common.util.Result;
@@ -83,6 +84,12 @@ public class TCStatisticsController {
                        @ApiParam(value = "任课老师名称") @RequestParam(required = false) String teacherName,
                        @ApiParam(value = "页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                        @ApiParam(value = "数量", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+        if (semesterId == null) {
+            throw ExceptionResultEnum.SEMESTER_ID_IS_NULL.exception();
+        }
+        if (examId == null) {
+            throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
+        }
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         return ResultUtil.ok(tcStatisticsService.findExamTaskPrintStatistic(SystemConstant.convertIdToLong(semesterId), SystemConstant.convertIdToLong(examId), SystemConstant.convertIdToLong(collegeId), SystemConstant.convertIdToLong(teachingRoomId), status, courseName, teacherName, sysUser.getSchoolId(), sysUser.getId(),pageNumber,pageSize));
     }

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

@@ -70,10 +70,17 @@ public class TCUsualScoreController {
     @ApiOperation(value = "成绩管理列表")
     @RequestMapping(value = "/score/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = ScoreResult.class)})
-    public Result scoreList(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
+    public Result scoreList(@ApiParam(value = "学期ID", required = true) @RequestParam(required = false) Long semesterId,
+                            @ApiParam(value = "考试ID", required = true) @RequestParam(required = false) Long examId,
                             @ApiParam(value = "课程编码") @RequestParam(required = false) String courseCode,
                             @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                             @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+        if (semesterId == null) {
+            throw ExceptionResultEnum.SEMESTER_ID_IS_NULL.exception();
+        }
+        if (examId == null) {
+            throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
+        }
         return ResultUtil.ok(printCommonService.scoreList(new Page<>(pageNumber, pageSize), examId, courseCode));
     }
 

+ 6 - 0
distributed-print/src/main/java/com/qmth/distributed/print/api/TFCustomFlowController.java

@@ -196,6 +196,12 @@ public class TFCustomFlowController {
                                   @ApiParam(value = "提交人名称", required = false) @RequestParam(required = false) String pendApproveUserName,
                                   @ApiParam(value = "页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                   @ApiParam(value = "数量", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+        if (semesterId == null) {
+            throw ExceptionResultEnum.ERROR.exception("请选择学期");
+        }
+        if (examId == null) {
+            throw ExceptionResultEnum.ERROR.exception("请选择考试");
+        }
         return ResultUtil.ok(tfFlowApproveService.findApproveList(new Page<>(pageNumber, pageSize), semesterId, examId, courseCode, paperNumber, status, teacherUserName, SystemConstant.convertIdToLong(teachingRoomId), startTime, endTime, pendApproveUserName, SystemConstant.getHeadOrUserSchoolId(), null));
     }
 

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

@@ -100,10 +100,17 @@ public class TRBasicInfoController {
     @ApiOperation(value = "报告管理列表")
     @RequestMapping(value = "/report/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = ScoreResult.class)})
-    public Result reportList(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
+    public Result reportList(@ApiParam(value = "学期ID", required = true) @RequestParam(required = false) Long semesterId,
+                             @ApiParam(value = "考试ID", required = true) @RequestParam(required = false) Long examId,
                              @ApiParam(value = "课程编码") @RequestParam(required = false) String courseCode,
                              @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                              @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+        if (semesterId == null) {
+            throw ExceptionResultEnum.SEMESTER_ID_IS_NULL.exception();
+        }
+        if (examId == null) {
+            throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
+        }
         return ResultUtil.ok(printCommonService.scoreList(new Page<>(pageNumber, pageSize), examId, courseCode));
     }
 

+ 34 - 26
distributed-print/src/main/java/com/qmth/distributed/print/api/TeachCourseController.java

@@ -10,6 +10,7 @@ import com.qmth.distributed.print.business.service.TeachCourseService;
 import com.qmth.teachcloud.common.annotation.OperationLogDetail;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.SysUser;
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.common.enums.log.OperationTypeEnum;
 import com.qmth.teachcloud.common.util.Result;
 import com.qmth.teachcloud.common.util.ResultUtil;
@@ -35,7 +36,7 @@ import java.util.stream.Collectors;
  */
 @Api(tags = "教学课程Controller")
 @RestController
-@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX  + SystemConstant.PREFIX_URL_TEACH + "/course")
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_TEACH + "/course")
 @Validated
 //@Aac(strict = BOOL.FALSE, auth = BOOL.FALSE)
 public class TeachCourseController {
@@ -45,11 +46,18 @@ public class TeachCourseController {
 
     @ApiOperation(value = "教学课程-查询")
     @RequestMapping(value = "/page", method = RequestMethod.POST)
-    @ApiResponses({ @ApiResponse(code = 200, message = "查询成功", response = Result.class) })
-    public Result findTeachCoursePage(@ApiParam(value = "考试id") @RequestParam(required = false) String examId,
-            @ApiParam(value = "课程名称(模糊查询)") @RequestParam(required = false) String courseName,
-            @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
-            @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
+    public Result findTeachCoursePage(@ApiParam(value = "学期ID") @RequestParam(required = false) String semesterId,
+                                      @ApiParam(value = "考试ID") @RequestParam(required = false) String examId,
+                                      @ApiParam(value = "课程名称(模糊查询)") @RequestParam(required = false) String courseName,
+                                      @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+                                      @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+        if (semesterId == null) {
+            throw ExceptionResultEnum.SEMESTER_ID_IS_NULL.exception();
+        }
+        if (examId == null) {
+            throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
+        }
         return ResultUtil.ok(
                 teachCourseService.teachCoursePage(SystemConstant.convertIdToLong(examId), courseName, pageNumber,
                         pageSize));
@@ -57,7 +65,7 @@ public class TeachCourseController {
 
     @ApiOperation(value = "教学课程-手动添加课程")
     @RequestMapping(value = "/manual_create", method = RequestMethod.POST)
-    @ApiResponses({ @ApiResponse(code = 200, message = "创建成功", response = EditResult.class) })
+    @ApiResponses({@ApiResponse(code = 200, message = "创建成功", response = EditResult.class)})
     @OperationLogDetail(detail = "手动添加教学课程,参数[{{teachCourseParams}}]", operationType = OperationTypeEnum.ADD)
     @Deprecated
     public Result manualCreate(@Valid @RequestBody TeachCourseParams teachCourseParams, BindingResult bindingResult) {
@@ -70,8 +78,8 @@ public class TeachCourseController {
 
     @ApiOperation(value = "教学课程-课程表选择教学课程")
     @RequestMapping(value = "/select_create", method = RequestMethod.POST)
-    @ApiResponses({ @ApiResponse(code = 200, message = "创建成功", response = EditResult.class) })
-    @OperationLogDetail(detail = "从课程表选择并创建教学课程,参数[{{teachCourseSelectParam}}]", operationType = OperationTypeEnum.ADD)
+    @ApiResponses({@ApiResponse(code = 200, message = "创建成功", response = EditResult.class)})
+    @OperationLogDetail(operationType = OperationTypeEnum.ADD, detail = "添加课程操作,考试ID:{{teachCourseSelectParam.examId}}、课程代码:{{teachCourseSelectParam.courseCodeList}}")
     public Result selectCreate(@Valid @RequestBody TeachCourseSelectParam teachCourseSelectParam, BindingResult bindingResult) {
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
         if (bindingResult.hasErrors()) {
@@ -83,7 +91,7 @@ public class TeachCourseController {
 
     @ApiOperation(value = "教学课程-教学课程批量导入")
     @RequestMapping(value = "/import", method = RequestMethod.POST)
-    @ApiResponses({ @ApiResponse(code = 200, message = "创建成功", response = EditResult.class) })
+    @ApiResponses({@ApiResponse(code = 200, message = "创建成功", response = EditResult.class)})
     @OperationLogDetail(detail = "教学课程批量导入", operationType = OperationTypeEnum.ADD)
     @Deprecated
     public Result importTeachCourse(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file) throws IOException, NoSuchFieldException {
@@ -94,7 +102,7 @@ public class TeachCourseController {
 
     @ApiOperation(value = "教学课程-查找基础课程")
     @RequestMapping(value = "/find_basic_course", method = RequestMethod.POST)
-    @ApiResponses({ @ApiResponse(code = 200, message = "查询成功", response = Result.class) })
+    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
     public Result findBasicCourse() {
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
         return ResultUtil.ok(teachCourseService.findBasicCourseByUser(requestUser));
@@ -102,8 +110,8 @@ public class TeachCourseController {
 
     @ApiOperation(value = "教学课程-批量删除")
     @RequestMapping(value = "/delete", method = RequestMethod.POST)
-    @ApiResponses({ @ApiResponse(code = 200, message = "删除成功", response = EditResult.class) })
-    @OperationLogDetail(detail = "用户根据教学课程id集合[{{idList}}]批量删除教学课程", operationType = OperationTypeEnum.DELETE)
+    @ApiResponses({@ApiResponse(code = 200, message = "删除成功", response = EditResult.class)})
+    @OperationLogDetail(operationType = OperationTypeEnum.DELETE,detail = "删除操作,教学课程ID:[{{idList}}]")
     public Result deleteTeachCourse(@ApiParam(value = "选择的要删除的课程id集合", required = true) @RequestParam List<String> idList) {
         teachCourseService.deleteTeachCourseBatch(
                 idList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList()));
@@ -112,7 +120,7 @@ public class TeachCourseController {
 
     @ApiOperation(value = "教师团队-手动添加教师")
     @RequestMapping(value = "/manual_create_teacher", method = RequestMethod.POST)
-    @ApiResponses({ @ApiResponse(code = 200, message = "创建成功", response = EditResult.class) })
+    @ApiResponses({@ApiResponse(code = 200, message = "创建成功", response = EditResult.class)})
     @OperationLogDetail(detail = "手动添加教师,参数[{{teacherTeamParam}}]", operationType = OperationTypeEnum.ADD)
     public Result manualCreateTeacher(@Valid @RequestBody TeacherTeamParam teacherTeamParam, BindingResult bindingResult) throws IllegalAccessException {
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
@@ -125,10 +133,10 @@ public class TeachCourseController {
 
     @ApiOperation(value = "教师团队-用户表选择教师")
     @RequestMapping(value = "/select_create_teacher", method = RequestMethod.POST)
-    @ApiResponses({ @ApiResponse(code = 200, message = "创建成功", response = EditResult.class) })
+    @ApiResponses({@ApiResponse(code = 200, message = "创建成功", response = EditResult.class)})
     @OperationLogDetail(operationType = OperationTypeEnum.ADD)
     public Result selectCreate(@ApiParam(value = "考试id", required = true) @RequestParam String teachCourseId,
-            @ApiParam(value = "教师id集合", required = true) @RequestParam List<String> userIdList) {
+                               @ApiParam(value = "教师id集合", required = true) @RequestParam List<String> userIdList) {
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
         teachCourseService.selectCreateTeacher(SystemConstant.convertIdToLong(teachCourseId),
                 userIdList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList()), requestUser);
@@ -137,7 +145,7 @@ public class TeachCourseController {
 
     @ApiOperation(value = "教师团队-批量导入教师")
     @RequestMapping(value = "/import_teacher", method = RequestMethod.POST)
-    @ApiResponses({ @ApiResponse(code = 200, message = "创建成功", response = EditResult.class) })
+    @ApiResponses({@ApiResponse(code = 200, message = "创建成功", response = EditResult.class)})
     @OperationLogDetail(detail = "教学课程批量导入", operationType = OperationTypeEnum.ADD)
     @Deprecated
     public Result importTeacherTeam(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file, @ApiParam(value = "基础课程", required = true) @RequestParam Long basicCourseId)
@@ -149,11 +157,11 @@ public class TeachCourseController {
 
     @ApiOperation(value = "教师团队-分页查询")
     @RequestMapping(value = "/teacher_team_page", method = RequestMethod.POST)
-    @ApiResponses({ @ApiResponse(code = 200, message = "查询成功", response = Result.class) })
+    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
     public Result findTeachTeamPage(@ApiParam(value = "教学课程id", required = true) @RequestParam String teachCourseId,
-            @ApiParam(value = "用户姓名工号(模糊查询)") @RequestParam(required = false) String userInfo,
-            @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
-            @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+                                    @ApiParam(value = "用户姓名工号(模糊查询)") @RequestParam(required = false) String userInfo,
+                                    @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+                                    @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         return ResultUtil.ok(
                 teachCourseService.findTeacherTeamPage(SystemConstant.convertIdToLong(teachCourseId), userInfo,
                         pageNumber, pageSize));
@@ -161,14 +169,14 @@ public class TeachCourseController {
 
     @ApiOperation(value = "教师团队-根据机构查询")
     @RequestMapping(value = "/find_teacher_by_org", method = RequestMethod.POST)
-    @ApiResponses({ @ApiResponse(code = 200, message = "查询成功", response = Result.class) })
+    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
     public Result findTeachCoursePage(@ApiParam(value = "课程名称(模糊查询)") @RequestParam(required = false) Long orgId) {
         return ResultUtil.ok(teachCourseService.findUserByOrgId(orgId));
     }
 
     @ApiOperation(value = "教学课程-查询课程权重设置状态")
     @RequestMapping(value = "/find_course_weight_setting_status", method = RequestMethod.POST)
-    @ApiResponses({ @ApiResponse(code = 200, message = "查询成功", response = Result.class) })
+    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
     public Result findCourseWeightSettingStatus(@ApiParam(value = "教学课程id", required = true) @RequestParam String teachCourseId) {
         return ResultUtil.ok(
                 teachCourseService.findCourseWeightSettingStatus(SystemConstant.convertIdToLong(teachCourseId)));
@@ -176,9 +184,9 @@ public class TeachCourseController {
 
     @ApiOperation(value = "教师团队管理-分配班级列表查询")
     @RequestMapping(value = "/find_clazz_list", method = RequestMethod.POST)
-    @ApiResponses({ @ApiResponse(code = 200, message = "查询成功", response = Result.class) })
+    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
     public Result findClazzList(@ApiParam(value = "教学课程id", required = true) @RequestParam String teachCourseId,
-            @ApiParam(value = "班级名称") @RequestParam(required = false) String clazzName) {
+                                @ApiParam(value = "班级名称") @RequestParam(required = false) String clazzName) {
         return ResultUtil.ok(
                 teachCourseService.findClazzDistributedStatus(SystemConstant.convertIdToLong(teachCourseId),
                         clazzName));
@@ -186,7 +194,7 @@ public class TeachCourseController {
 
     @ApiOperation(value = "教师团队管理-分配班级")
     @RequestMapping(value = "/assign_clazz", method = RequestMethod.POST)
-    @ApiResponses({ @ApiResponse(code = 200, message = "创建成功", response = EditResult.class) })
+    @ApiResponses({@ApiResponse(code = 200, message = "创建成功", response = EditResult.class)})
     @OperationLogDetail(detail = "分配班级,参数[{{assignClazzParam}}]", operationType = OperationTypeEnum.ADD)
     public Result assignClazz(@Valid @RequestBody AssignClazzParam assignClazzParam, BindingResult bindingResult) {
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();

+ 0 - 3
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkArchiveController.java

@@ -54,9 +54,6 @@ public class MarkArchiveController {
     @ApiOperation(value = "成绩管理列表")
     @RequestMapping(value = "score/list", method = RequestMethod.POST)
     public Result scoreList(@Validated ArchiveScoreQuery query) {
-        if(query.getExamId() == null){
-            throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
-        }
         return ResultUtil.ok(markPaperService.scoreList(query));
     }
 

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

@@ -49,7 +49,7 @@ public class MarkClassController extends BaseController {
      */
     @ApiOperation(value = "提交")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.ADD)
+    @OperationLogDetail(operationType = OperationTypeEnum.ADD,detail = "分班阅提交操作,考试ID:{{markClassUserParams.examId}}、试卷编号:{{markClassUserParams.paperNumber}}")
     public Result save(@RequestBody MarkClassUserParams markClassUserParams) {
         validMarkPaperForMark(markClassUserParams.getExamId(), markClassUserParams.getPaperNumber());
         return ResultUtil.ok(markUserClassService.saveMarkClassUser(markClassUserParams));

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

@@ -3,6 +3,8 @@ package com.qmth.distributed.print.api.mark;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 
+import com.qmth.teachcloud.common.annotation.OperationLogDetail;
+import com.qmth.teachcloud.common.enums.log.OperationTypeEnum;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -64,6 +66,7 @@ public class MarkDocumentController {
 
     @ApiOperation(value = "文档上传")
     @RequestMapping(value = "/import", method = RequestMethod.POST)
+    @OperationLogDetail(operationType = OperationTypeEnum.ADD, detail = "文档上传操作,文档ID:{{id}}")
     public Result importFile(@ApiParam(value = "文档ID", required = true) Long id,
                            @ApiParam(value = "文件md5", required = true) String md5,
                            @ApiParam(value = "文件", required = true) @RequestParam MultipartFile file) {
@@ -72,9 +75,10 @@ public class MarkDocumentController {
 
     @ApiOperation(value = "文档新建")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
+    @OperationLogDetail(operationType = OperationTypeEnum.ADD, detail = "文档新建操作,考试ID:{{examId}}、试卷编号:{{paperNumber}}、文档名称:{{documentName}}")
     public Result save(@ApiParam(value = "考试ID", required = true) Long examId,
                        @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
-                       @ApiParam(value = "文档ID", required = true) String documentName,
+                       @ApiParam(value = "文档名称", required = true) String documentName,
                        @ApiParam(value = "文件md5", required = true) String md5,
                        @ApiParam(value = "文件", required = true) @RequestParam MultipartFile file) {
         return ResultUtil.ok(markDocumentService.save(examId, paperNumber,documentName, file,md5), null);
@@ -82,6 +86,7 @@ public class MarkDocumentController {
 
     @ApiOperation(value = "文档删除")
     @RequestMapping(value = "/delete", method = RequestMethod.POST)
+    @OperationLogDetail(operationType = OperationTypeEnum.DELETE, detail = "文档删除操作,文档ID:{{id}}")
     public Result delete(@ApiParam(value = "文档ID", required = true) Long id) {
         markDocumentService.deleteById(id);
         return ResultUtil.ok(true);
@@ -89,6 +94,7 @@ public class MarkDocumentController {
 
     @ApiOperation(value = "文档下载")
     @RequestMapping(value = "/download", method = RequestMethod.POST)
+    @OperationLogDetail(operationType = OperationTypeEnum.EXPORT, detail = "文档下载操作,文档ID:{{id}}")
     public void download(@ApiParam(value = "文档ID", required = true) Long id, HttpServletResponse response) {
         MarkDocument document = markDocumentService.getById(id);
         if(document==null){

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

@@ -42,12 +42,16 @@ public class MarkEntranceController {
      */
     @ApiOperation(value = "查询")
     @RequestMapping(value = "/list", method = RequestMethod.POST)
-    public Result list(@ApiParam(value = "考试ID") @RequestParam(required = false) Long examId,
+    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 = "试卷编号") @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) {
-        if(examId == null){
+        if (semesterId == null) {
+            throw ExceptionResultEnum.SEMESTER_ID_IS_NULL.exception();
+        }
+        if (examId == null) {
             throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
         }
         IPage<MarkEntranceDto> markEntranceDtoIPage = markUserGroupService.listEntranceGroup(examId, courseCode, paperNumber, pageNumber, pageSize);

+ 6 - 6
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkGroupController.java

@@ -56,7 +56,7 @@ public class MarkGroupController extends BaseController {
      */
     @ApiOperation(value = "新增")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.ADD)
+    @OperationLogDetail(operationType = OperationTypeEnum.ADD, detail = "新增分组操作,考试ID:{{markGroupSingleDto.examId}}、试卷编号:{{markGroupSingleDto.paperNumber}}")
     public Result add(@RequestBody MarkGroupSingleDto markGroupSingleDto) {
         validMarkPaperForMark(markGroupSingleDto.getExamId(), markGroupSingleDto.getPaperNumber());
         return ResultUtil.ok(markGroupService.saveGroup(markGroupSingleDto));
@@ -67,7 +67,7 @@ public class MarkGroupController extends BaseController {
      */
     @ApiOperation(value = "修改")
     @RequestMapping(value = "/update", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "修改分组操作,考试ID:{{markGroupSingleDto.examId}}、试卷编号:{{markGroupSingleDto.paperNumber}}")
     public Result update(@RequestBody MarkGroupSingleDto markGroupSingleDto) {
         validMarkPaperForMark(markGroupSingleDto.getExamId(), markGroupSingleDto.getPaperNumber());
         return ResultUtil.ok(markGroupService.updateGroup(markGroupSingleDto));
@@ -78,7 +78,7 @@ public class MarkGroupController extends BaseController {
      */
     @ApiOperation(value = "删除")
     @RequestMapping(value = "/delete", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.DELETE)
+    @OperationLogDetail(operationType = OperationTypeEnum.DELETE, detail = "删除分组操作,考试ID:{{examId}}、试卷编号:{{paperNumber}}、分组号:{{groupNumber}}")
     public Result delete(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
                          @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
                          @ApiParam(value = "分组号", required = true) @RequestParam Integer groupNumber) {
@@ -92,7 +92,7 @@ public class MarkGroupController extends BaseController {
      */
     @ApiOperation(value = "评卷区设置")
     @RequestMapping(value = "/update_picture_config", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "设置评卷区操作,考试ID:{{examId}}、试卷编号:{{paperNumber}}、分组号:{{groupNumber}}")
     public Result updatePictureConfig(@RequestBody GroupPictureConfigParams groupPictureConfigParams) {
         validMarkPaperForMark(groupPictureConfigParams.getExamId(), groupPictureConfigParams.getPaperNumber());
         markGroupService.updatePicListByExamIdAndPaperNumberAndGroupNumber(groupPictureConfigParams);
@@ -104,7 +104,7 @@ public class MarkGroupController extends BaseController {
      */
     @ApiOperation(value = "开启/关闭分班阅")
     @RequestMapping(value = "/update_open_mark_class", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "开启/关闭分班阅操作,考试ID:{{examId}}、试卷编号:{{paperNumber}}、是否开启分班阅:{{openMarkClass}}")
     public Result delete(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
                          @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
                          @ApiParam(value = "是否开启分班阅", required = true) @RequestParam Boolean openMarkClass) {
@@ -134,7 +134,7 @@ public class MarkGroupController extends BaseController {
                                @ApiParam(value = "班级") @RequestParam(required = false) String className,
                                @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
-        IPage<MarkGroupClassProgressDto> markGroupClassProgressDtoIPage = markGroupService.summaryGroupClassProgress(examId, paperNumber,className, pageNumber, pageSize);
+        IPage<MarkGroupClassProgressDto> markGroupClassProgressDtoIPage = markGroupService.summaryGroupClassProgress(examId, paperNumber, className, pageNumber, pageSize);
         return ResultUtil.ok(markGroupClassProgressDtoIPage);
     }
 

+ 4 - 0
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkInspectedController.java

@@ -3,7 +3,9 @@ package com.qmth.distributed.print.api.mark;
 
 import com.qmth.boot.api.annotation.Aac;
 import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.teachcloud.common.annotation.OperationLogDetail;
 import com.qmth.teachcloud.common.contant.SystemConstant;
+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.mark.dto.mark.manage.Task;
@@ -64,6 +66,7 @@ public class MarkInspectedController {
      */
     @ApiOperation(value = "客观题检查任务保存")
     @RequestMapping(value = "/objective/saveTask", method = RequestMethod.POST)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "保存客观题检查任务操作,考生ID:{{studentId}}")
     public Result saveObjectiveInspectedTask(@ApiParam(value = "考生ID", required = true) @RequestParam Long studentId,
                                          @ApiParam(value = "客观题答案", required = true) @RequestParam String answers) {
         return ResultUtil.ok(markStudentService.saveObjectiveInspectedTask(studentId, answers));
@@ -85,6 +88,7 @@ public class MarkInspectedController {
      */
     @ApiOperation(value = "主观题检查任务保存")
     @RequestMapping(value = "/subjective/saveTask", method = RequestMethod.POST)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "保存主观题检查任务操作,考生ID:{{markResult.studentId}}")
     public Result saveSubjectiveInspectedTask(@RequestBody MarkHeaderResult markResult) {
         markStudentService.saveSubjectiveInspectedTask(markResult);
         return ResultUtil.ok(true);

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

@@ -46,7 +46,7 @@ public class MarkPaperController {
      */
     @ApiOperation(value = "结束/开始阅卷")
     @RequestMapping(value = "/finish", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.SAVE)
+    @OperationLogDetail(operationType = OperationTypeEnum.SAVE, detail = "结束/开始阅卷操作,考试ID:{{examId}}、试卷编号:{{paperNumbers}}、状态:{{status}}")
     public Result finish(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
                          @ApiParam(value = "试卷编号", required = true) @RequestParam List<String> paperNumbers,
                          @ApiParam(value = "状态", required = true) @RequestParam MarkPaperStatus status) {

+ 3 - 0
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkProblemController.java

@@ -3,6 +3,8 @@ package com.qmth.distributed.print.api.mark;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.teachcloud.common.annotation.OperationLogDetail;
+import com.qmth.teachcloud.common.enums.log.OperationTypeEnum;
 import com.qmth.teachcloud.mark.dto.mark.manage.MarkProblemDto;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.util.Result;
@@ -59,6 +61,7 @@ public class MarkProblemController {
      */
     @ApiOperation(value = "重置")
     @RequestMapping(value = "/reset", method = RequestMethod.POST)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "问题卷重置操作,问题卷任务ID集合:{{ids}}")
     public Result reset(@ApiParam(value = "问题卷任务ID集合", required = true) @RequestParam List<Long> ids) {
         markProblemHistoryService.resetProblem(ids);
         return ResultUtil.ok(true);

+ 3 - 0
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkQualityController.java

@@ -3,6 +3,8 @@ package com.qmth.distributed.print.api.mark;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.teachcloud.common.annotation.OperationLogDetail;
+import com.qmth.teachcloud.common.enums.log.OperationTypeEnum;
 import com.qmth.teachcloud.mark.dto.mark.manage.MarkQualityChartDto;
 import com.qmth.teachcloud.mark.dto.mark.manage.MarkQualityDto;
 import com.qmth.teachcloud.common.contant.SystemConstant;
@@ -58,6 +60,7 @@ public class MarkQualityController {
      */
     @ApiOperation(value = "重新计算质量监控")
     @RequestMapping(value = "/update", method = RequestMethod.POST)
+    @OperationLogDetail(operationType = OperationTypeEnum.SAVE, detail = "重新计算质量监控,考试ID:{{examId}}、试卷编号:{{paperNumber}}、分组号:{{groupNumber}}")
     public Result update(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
                          @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
                          @ApiParam(value = "分组号") @RequestParam(required = false) Integer groupNumber) {

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

@@ -88,7 +88,7 @@ public class MarkQuestionController extends BaseController {
      */
     @ApiOperation(value = "提交")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.ADD)
+    @OperationLogDetail(operationType = OperationTypeEnum.ADD, detail = "提交评卷结构,考试ID:{{markQuestionParams.examId}}、试卷编号:{{markQuestionParams.paperNumber}}")
     public Result save(@RequestBody MarkQuestionParams markQuestionParams) {
         validMarkPaperForMark(markQuestionParams.getExamId(), markQuestionParams.getPaperNumber());
         markQuestionService.saveQuestions(markQuestionParams);
@@ -111,7 +111,7 @@ public class MarkQuestionController extends BaseController {
      */
     @ApiOperation(value = "客观题标答提交")
     @RequestMapping(value = "/objective/save", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.ADD)
+    @OperationLogDetail(operationType = OperationTypeEnum.ADD, detail = "客观题标答提交操作,考试ID:{{markObjectiveQuestionParams.examId}}、试卷编号:{{markObjectiveQuestionParams.paperNumber}}")
     public Result saveObjective(@RequestBody MarkObjectiveQuestionParams markObjectiveQuestionParams) {
         markQuestionService.saveObjectiveQuestions(markObjectiveQuestionParams);
         return ResultUtil.ok(true);
@@ -135,6 +135,7 @@ public class MarkQuestionController extends BaseController {
      */
     @ApiOperation(value = "客观题标答导入")
     @RequestMapping(value = "/objective/import", method = RequestMethod.POST)
+    @OperationLogDetail(operationType = OperationTypeEnum.IMPORT, detail = "客观题标答导入操作,考试ID:{{examId}}、试卷编号:{{paperNumber}}")
     public Result objectiveImport(@ApiParam(value = "考试ID", required = true) @RequestParam String examId,
             @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
             @ApiParam(value = "标答excel文件",required = true) @RequestParam MultipartFile file) throws Exception {
@@ -164,7 +165,7 @@ public class MarkQuestionController extends BaseController {
      */
     @ApiOperation(value = "主观题标答文件上传")
     @RequestMapping(value = "/subjective/upload", method = RequestMethod.POST)
-    @OperationLogDetail(operationType = OperationTypeEnum.ADD)
+    @OperationLogDetail(operationType = OperationTypeEnum.ADD, detail = "主观题标答文件上传操作,考试ID:{{examId}}、试卷编号:{{paperNumber}}")
     public Result uploadSubjective(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
                                    @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
                                    @ApiParam(value = "文件", required = true) @RequestParam MultipartFile file,

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

@@ -67,10 +67,16 @@ public class MarkSettingController {
      */
     @ApiOperation(value = "评卷设置数据列表")
     @RequestMapping(value = "/list", method = RequestMethod.POST)
-    public Result list(@ApiParam(value = "考试ID") @RequestParam(required = false) Long examId, @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
-                       @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber, @ApiParam(value = "提交状态") @RequestParam(required = false) Boolean groupStatus,
+    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 = "试卷编号") @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) {
-        if(examId == null){
+        if (semesterId == null) {
+            throw ExceptionResultEnum.SEMESTER_ID_IS_NULL.exception();
+        }
+        if (examId == null) {
             throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
         }
         IPage<MarkSettingDto> markSettingDtoIPage = markPaperService.listPaperSetting(examId, courseCode, paperNumber,
@@ -112,10 +118,17 @@ public class MarkSettingController {
      */
     @ApiOperation(value = "评卷管理数据列表")
     @RequestMapping(value = "/summary", method = RequestMethod.POST)
-    public Result summary(@ApiParam(value = "考试ID") @RequestParam(required = false) Long examId, @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
-                          @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber, @ApiParam(value = "完成进度") @RequestParam(required = false) Boolean progressStatus,
-                          @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber, @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
-        if(examId == null){
+    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 = "试卷编号") @RequestParam(required = false) String paperNumber,
+                          @ApiParam(value = "完成进度") @RequestParam(required = false) Boolean progressStatus,
+                          @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
+                          @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
+        if (semesterId == null) {
+            throw ExceptionResultEnum.SEMESTER_ID_IS_NULL.exception();
+        }
+        if (examId == null) {
             throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
         }
         IPage<MarkManageDto> markManageDtoIPage = markTaskService.listPaperManage(examId, courseCode, paperNumber,
@@ -128,9 +141,15 @@ public class MarkSettingController {
      */
     @ApiOperation(value = "导出评卷员工作量")
     @RequestMapping(value = "/export_marker", method = RequestMethod.POST)
-    public void exportMarker(@ApiParam(value = "考试ID") @RequestParam(required = false) Long examId, @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
-                             @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber, HttpServletResponse response) {
-        if(examId == null){
+    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 = "试卷编号") @RequestParam(required = false) String paperNumber,
+                             HttpServletResponse response) {
+        if (semesterId == null) {
+            throw ExceptionResultEnum.SEMESTER_ID_IS_NULL.exception();
+        }
+        if (examId == null) {
             throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
         }
         markTaskService.exportMarker(examId, courseCode, paperNumber, response);
@@ -141,10 +160,17 @@ public class MarkSettingController {
      */
     @ApiOperation(value = "成绩检查数据列表")
     @RequestMapping(value = "/scoreList", method = RequestMethod.POST)
-    public Result scoreList(@ApiParam(value = "考试ID") @RequestParam(required = false) Long examId, @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
-                            @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) {
-        if(examId == null){
+    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 = "试卷编号") @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) {
+        if (semesterId == null) {
+            throw ExceptionResultEnum.SEMESTER_ID_IS_NULL.exception();
+        }
+        if (examId == null) {
             throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
         }
         IPage<CheckScoreListDto> scoreListDtoIPage = markPaperService.listStudentScoreList(examId, courseCode,
@@ -155,7 +181,7 @@ public class MarkSettingController {
     @ApiOperation(value = "客观题导入")
     @RequestMapping(value = "/objective_struct/import", method = RequestMethod.POST)
     public Result objectiveStructImport(@ApiParam(value = "考试ID", required = true) @RequestParam String examId,
-            @ApiParam(value = "标答excel文件",required = true) @RequestParam MultipartFile file) throws Exception {
+                                        @ApiParam(value = "标答excel文件", required = true) @RequestParam MultipartFile file) throws Exception {
         Map<String, Object> map = printCommonService.saveTask(file, SystemConstant.convertIdToLong(examId), TaskTypeEnum.OBJECTIVE_STRUCT_IMPORT);
         map.put("examId", SystemConstant.convertIdToLong(examId));
         return syncObjectiveStructImportService.importTask(map);
@@ -164,7 +190,7 @@ public class MarkSettingController {
     @ApiOperation(value = "主观题导入")
     @RequestMapping(value = "/subjective_struct/import", method = RequestMethod.POST)
     public Result subjectiveStructImport(@ApiParam(value = "考试ID", required = true) @RequestParam String examId,
-            @ApiParam(value = "标答excel文件",required = true) @RequestParam MultipartFile file) throws Exception {
+                                         @ApiParam(value = "标答excel文件", required = true) @RequestParam MultipartFile file) throws Exception {
         Map<String, Object> map = printCommonService.saveTask(file, SystemConstant.convertIdToLong(examId), TaskTypeEnum.SUBJECTIVE_STRUCT_IMPORT);
         map.put("examId", SystemConstant.convertIdToLong(examId));
         return syncSubjectiveStructImportService.importTask(map);

+ 3 - 0
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkStudentController.java

@@ -2,7 +2,9 @@ package com.qmth.distributed.print.api.mark;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.teachcloud.common.annotation.OperationLogDetail;
 import com.qmth.teachcloud.common.contant.SystemConstant;
+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.mark.dto.mark.score.StudentScoreDetailDto;
@@ -63,6 +65,7 @@ public class MarkStudentController {
 
     @ApiOperation(value = "客观题统分")
     @RequestMapping(value = "/objective/calculate", method = RequestMethod.POST)
+    @OperationLogDetail(operationType = OperationTypeEnum.SAVE, detail = "客观题统分操作,考试ID:{{examId}}、试卷编号:{{paperNumber}}")
     public Result calcObjectiveScore(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId, @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber) {
         return ResultUtil.ok(markStudentService.calcObjectiveScore(examId, paperNumber));
     }

+ 0 - 3
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkTrackController.java

@@ -38,9 +38,6 @@ import io.swagger.annotations.ApiParam;
 @RestController
 @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_MARK + "/track")
 public class MarkTrackController {
-
-    @Resource
-    private MarkTrackService markTrackService;
     @Resource
     private TaskService taskService;
     @Resource

+ 10 - 3
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkUserGroupController.java

@@ -3,8 +3,10 @@ package com.qmth.distributed.print.api.mark;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.teachcloud.common.annotation.OperationLogDetail;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
+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.mark.dto.mark.manage.MarkUserGroupProgressDto;
@@ -71,6 +73,7 @@ public class MarkUserGroupController extends BaseController {
      */
     @ApiOperation(value = "绑定评卷员")
     @RequestMapping(value = "/add", method = RequestMethod.POST)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "绑定评卷员操作,考试ID:{{examId}}、试卷编号:{{paperNumber}}、分组号:{{groupNumber}}、评卷员ID集合:{{userIds}}")
     public Result addMarker(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
                             @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
                             @ApiParam(value = "分组号", required = true) @RequestParam Integer groupNumber,
@@ -85,7 +88,8 @@ public class MarkUserGroupController extends BaseController {
      */
     @ApiOperation(value = "重置评卷员")
     @RequestMapping(value = "/reset", method = RequestMethod.POST)
-    public Result resetMarker(@ApiParam(value = "考试ID", required = true) @RequestParam Long markUserGroupId) {
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "重置评卷员操作,用户分组ID:{{markUserGroupId}}")
+    public Result resetMarker(@ApiParam(value = "用户分组ID", required = true) @RequestParam Long markUserGroupId) {
         MarkUserGroup markUserGroup = markUserGroupService.getById(markUserGroupId);
         if (markUserGroup == null) {
             throw ExceptionResultEnum.ERROR.exception("评卷员不存在");
@@ -99,6 +103,7 @@ public class MarkUserGroupController extends BaseController {
      */
     @ApiOperation(value = "解绑评卷员")
     @RequestMapping(value = "/delete", method = RequestMethod.POST)
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "解绑评卷员操作,用户分组ID:{{markUserGroupId}}")
     public Result deleteMarker(@ApiParam(value = "用户分组ID", required = true) @RequestParam Long markUserGroupId) {
         MarkUserGroup markUserGroup = markUserGroupService.getById(markUserGroupId);
         if (markUserGroup == null) {
@@ -114,7 +119,8 @@ public class MarkUserGroupController extends BaseController {
      */
     @ApiOperation(value = "回收正在评卷的试卷")
     @RequestMapping(value = "/release", method = RequestMethod.POST)
-    public Result releaseMarker(@ApiParam(value = "评卷员ID集合", required = true) @RequestParam List<Long> markUserGroupIds) {
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "回收正在评卷的试卷操作,用户分组ID集合:{{markUserGroupIds}}")
+    public Result releaseMarker(@ApiParam(value = "用户分组ID集合", required = true) @RequestParam List<Long> markUserGroupIds) {
         MarkUserGroup markUserGroup = markUserGroupService.getById(markUserGroupIds.get(0));
         if (markUserGroup == null) {
             throw ExceptionResultEnum.ERROR.exception("评卷员不存在");
@@ -129,7 +135,8 @@ public class MarkUserGroupController extends BaseController {
      */
     @ApiOperation(value = "设置评卷任务")
     @RequestMapping(value = "/setTaskCount", method = RequestMethod.POST)
-    public Result setTaskCount(@ApiParam(value = "评卷员ID集合", required = true) @RequestParam List<Long> markUserGroupIds,
+    @OperationLogDetail(operationType = OperationTypeEnum.UPDATE, detail = "设置评卷任务操作,用户分组ID集合:{{markUserGroupIds}}、评卷任务数:{{topCount}}")
+    public Result setTaskCount(@ApiParam(value = "用户分组ID集合", required = true) @RequestParam List<Long> markUserGroupIds,
                                @ApiParam(value = "评卷任务数", required = true) @RequestParam Integer topCount) {
         MarkUserGroup markUserGroup = markUserGroupService.getById(markUserGroupIds.get(0));
         if (markUserGroup == null) {

+ 71 - 37
teachcloud-common/src/main/java/com/qmth/teachcloud/common/aspect/LogAspect.java

@@ -15,6 +15,8 @@ import com.qmth.teachcloud.common.service.BasicOperationLogService;
 import com.qmth.teachcloud.common.service.SysPrivilegeService;
 import com.qmth.teachcloud.common.util.ResultUtil;
 import com.qmth.teachcloud.common.util.ServletUtil;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.ArrayUtils;
 import org.aspectj.lang.JoinPoint;
 import org.aspectj.lang.ProceedingJoinPoint;
 import org.aspectj.lang.annotation.*;
@@ -30,9 +32,9 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.lang.reflect.Field;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 /**
  * @Description: 日志操作记录拦截aop
@@ -141,16 +143,14 @@ public class LogAspect {
             String detail = annotation.detail();
             if (SystemConstant.strNotNull(detail)) {
                 operationLog.setDetail(getDetail(paramsName, args, detail));
-            } else {
-                operationLog.setDetail(autoCreateOperationLogDetailByUrlAndPrivilegeId(request.getServletPath(), privilegeId));
             }
         }
         // 保存操作日志
         basicOperationLogService.save(operationLog);
     }
 
-    private Map<Object, Object> getTranslateArgs(String[] paramsName, Object[] args) {
-        Map<Object, Object> map = new HashMap<>();
+    private Map<String, Object> getTranslateArgs(String[] paramsName, Object[] args) {
+        Map<String, Object> map = new HashMap<>();
         for (int i = 0; i < args.length; i++) {
             if (Objects.isNull(args[i]) || (Objects.nonNull(args[i]) && (args[i] instanceof HttpServletRequest || args[i] instanceof HttpServletResponse || args[i] instanceof CommonsMultipartFile || args[i] instanceof MultipartFile || args[i] instanceof BeanPropertyBindingResult))) {
                 continue;
@@ -171,7 +171,7 @@ public class LogAspect {
             if (Objects.nonNull(arg) && (arg instanceof HttpServletRequest || arg instanceof HttpServletResponse || arg instanceof MultipartFile || arg instanceof BeanPropertyBindingResult)) {
                 continue;
             }
-            Field[] fields = arg.getClass().getFields();
+            Field[] fields = arg.getClass().getDeclaredFields();
             for (Field field : fields) {
                 EditKey editKey = field.getAnnotation(EditKey.class);
                 if (editKey != null) {
@@ -183,6 +183,21 @@ public class LogAspect {
                     }
                 }
             }
+            Class<?> superclass = arg.getClass().getSuperclass();
+            if (superclass != null) {
+                Field[] superclassDeclaredField = superclass.getDeclaredFields();
+                for (Field field : superclassDeclaredField) {
+                    EditKey editKey = field.getAnnotation(EditKey.class);
+                    if (editKey != null) {
+                        // 捕捉到编辑对象的id
+                        field.setAccessible(true);
+                        Object obj = field.get(arg);
+                        if (Objects.isNull(obj)) {
+                            isAdd = true;
+                        }
+                    }
+                }
+            }
         }
         return isAdd ? OperationTypeEnum.ADD : OperationTypeEnum.UPDATE;
     }
@@ -196,15 +211,37 @@ public class LogAspect {
      * @return 返回处理后的描述
      */
     private String getDetail(String[] paramsName, Object[] args, String detail) {
-        SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
-
-        Map<Object, Object> map = getTranslateArgs(paramsName, args);
+        Map<String, Object> map = getTranslateArgs(paramsName, args);
         try {
-            detail = "'" + requestUser.getRealName() + "'=》" + detail;
-            for (Map.Entry<Object, Object> entry : map.entrySet()) {
-                Object k = entry.getKey();
+            List<String> list = getDetailParamsReg(detail);
+            for (Map.Entry<String, Object> entry : map.entrySet()) {
+                String k = entry.getKey();
                 Object v = entry.getValue();
-                detail = detail.replace("{{" + k + "}}", JSON.toJSONString(v));
+
+                if (CollectionUtils.isNotEmpty(list)) {
+                    for (String s : list) {
+                        s = s.replaceAll("\\{\\{", "").replace("}}", "");
+                        if (s.contains(".")) {
+                            String[] fs = s.split("\\.");
+                            if (k.equals(fs[0])) {
+                                Field[] fields = getAllFields(v);
+                                Field field = Arrays.stream(fields).filter(f -> f.getName().equals(fs[1])).findFirst().orElse(null);
+                                if (field != null) {
+                                    // 捕捉到编辑对象的id
+                                    field.setAccessible(true);
+                                    Object obj = field.get(v);
+                                    detail = detail.replace("{{" + s + "}}", JSON.toJSONString(obj));
+                                }
+                            }
+                        } else {
+                            if (k.equals(s)) {
+                                detail = detail.replace("{{" + s + "}}", JSON.toJSONString(v));
+                            }
+                        }
+                    }
+                } else {
+                    return detail;
+                }
             }
         } catch (Exception e) {
             e.printStackTrace();
@@ -212,29 +249,26 @@ public class LogAspect {
         return detail;
     }
 
-    /**
-     * 根据权限url和所在菜单的权限id自动创建操作日志详情
-     *
-     * @param url         url
-     * @param privilegeId 所属菜单的权限id
-     * @return 操作日志详情
-     */
-    private String autoCreateOperationLogDetailByUrlAndPrivilegeId(String url, Long privilegeId) {
-        String result = "";
-        SysPrivilege menu = sysPrivilegeService.getById(privilegeId);
-        SysPrivilege urlP = sysPrivilegeService.getOne(new QueryWrapper<SysPrivilege>()
-                .lambda()
-                .select(SysPrivilege::getName)
-                .eq(SysPrivilege::getUrl, url)
-                .eq(SysPrivilege::getType, PrivilegeEnum.URL));
-        if (Objects.nonNull(menu) && Objects.nonNull(urlP)) {
-            result = result + menu.getName() + SystemConstant.CATALOG_LINK + urlP.getName();
-        } else if (Objects.nonNull(menu)) {
-            result = result + menu.getName();
-        } else if (Objects.nonNull(urlP)) {
-            result = result + urlP.getName();
+    private Field[] getAllFields(Object obj) {
+        Class<?> clazz = obj.getClass();
+        Field[] fields = clazz.getDeclaredFields();
+        Class<?> superclass = clazz.getSuperclass();
+        if (superclass != null) {
+            Field[] superclassDeclaredField = superclass.getDeclaredFields();
+            fields = ArrayUtils.addAll(fields, superclassDeclaredField);
+        }
+        return fields;
+    }
+
+    private List<String> getDetailParamsReg(String detail) {
+        String reg = "\\{\\{(.*?)\\}\\}";
+        Pattern pattern = Pattern.compile(reg);
+        Matcher matcher = pattern.matcher(detail);
+        List<String> list = new ArrayList<>();
+        while (matcher.find()) {
+            list.add(matcher.group());
         }
-        return result;
+        return list;
     }
 
     /**

+ 5 - 5
teachcloud-common/src/main/java/com/qmth/teachcloud/common/bean/dto/DataPermissionRule.java

@@ -18,7 +18,7 @@ public class DataPermissionRule implements Serializable {
     private Long requestUserId;
 
     @ApiModelProperty("登录用户数据权限(只允许看自己的课程数据)")
-    private Set<Long> courseIdSet;
+    private Long courseUserId;
 
     public Set<Long> getOrgIdSet() {
         return orgIdSet;
@@ -36,11 +36,11 @@ public class DataPermissionRule implements Serializable {
         this.requestUserId = requestUserId;
     }
 
-    public Set<Long> getCourseIdSet() {
-        return courseIdSet;
+    public Long getCourseUserId() {
+        return courseUserId;
     }
 
-    public void setCourseIdSet(Set<Long> courseIdSet) {
-        this.courseIdSet = courseIdSet;
+    public void setCourseUserId(Long courseUserId) {
+        this.courseUserId = courseUserId;
     }
 }

+ 1 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/contant/SystemConstant.java

@@ -325,6 +325,7 @@ public class SystemConstant {
     public static final String COMMA_OF_CHINESE = ",";
     public static final String PAUSE_SIGN = "、";
     public static final String ORG_SPLIT = "/";
+    public static final String ORG_POINT = "\\.";
     public static final String PUSH_OPERATE_NOTICE = "操作成功,请去基础配置 -> 系统设置 -> 同步管理中查看结果";
     public static final String EXCEL_PROTECT_KEY = "Qmth87863577";
     public static final String ZIP_ENCRYPT_PWD = "qmthzip";

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

@@ -71,6 +71,7 @@ public enum ExceptionResultEnum {
 
     EXAM_IS_NULL(HttpStatus.INTERNAL_SERVER_ERROR, 50000026, "考试不存在"),
     EXAM_ID_IS_NULL(HttpStatus.INTERNAL_SERVER_ERROR, 50000026, "请选择考试"),
+    SEMESTER_ID_IS_NULL(HttpStatus.INTERNAL_SERVER_ERROR, 50000026, "请选择学期"),
 
     EXAM_PRINT_CONFIG_IS_NULL(HttpStatus.INTERNAL_SERVER_ERROR, 50000026, "考试设置不存在"),
 

+ 2 - 3
teachcloud-common/src/main/java/com/qmth/teachcloud/common/enums/log/OperationTypeEnum.java

@@ -13,7 +13,7 @@ import java.util.List;
 public enum OperationTypeEnum {
     LOGIN("用户登录"),
     LOGOUT("用户登出"),
-    SAVE("新增修改"),
+    SAVE("新增/修改"),
     ADD("新增"),
     DELETE("删除"),
     UPDATE("修改"),
@@ -21,8 +21,7 @@ public enum OperationTypeEnum {
     EXPORT("导出"),
     SYNC("同步"),
     PREVIEW("预览"),
-    TIKU_SSO("题库单点登录"),
-    REPORT_SSO("教研分析单点登录"),
+    SSO("单点登录"),
     OTHER("其它");
     private final String name;
 

+ 7 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/BasicRoleDataPermissionServiceImpl.java

@@ -120,6 +120,11 @@ public class BasicRoleDataPermissionServiceImpl extends ServiceImpl<BasicRoleDat
     @Override
     public DataPermissionRule findDataPermission(Long privilegeId) {
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
+        if(privilegeId == null){
+            DataPermissionRule dataPermissionRule = new DataPermissionRule();
+            dataPermissionRule.setRequestUserId(requestUser.getId());
+            return dataPermissionRule;
+        }
         SysPrivilege sysPrivilege = sysPrivilegeService.getById(privilegeId);
         return this.analysisDataPermission(sysPrivilege, requestUser.getId(), requestUser.getSchoolId());
     }
@@ -169,7 +174,8 @@ public class BasicRoleDataPermissionServiceImpl extends ServiceImpl<BasicRoleDat
                     result.setRequestUserId(requestUserId);
                     break;
                 case SELF_COURSE:
-                    // todo 课程数据权限
+                    result.setCourseUserId(requestUserId);
+                    break;
                 case SELF_ORG:
                     // 只能看自己所在机构
                     Long orgId = requestUser.getOrgId();

+ 2 - 1
teachcloud-common/src/main/resources/mapper/BasicOperationLogMapper.xml

@@ -13,7 +13,8 @@
             bol.ip,
             bol.operation_type AS operationType,
             bol.create_time AS createTime,
-            sp.name operationTypeName
+            sp.name privilegeName,
+            bol.args
         FROM
             basic_operation_log  bol
                 left join sys_user su on bol.user_id = su.id

+ 9 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/bean/archivescore/ArchiveScoreQuery.java

@@ -5,11 +5,20 @@ import javax.validation.constraints.NotNull;
 import com.qmth.teachcloud.mark.utils.PagerQuery;
 
 public class ArchiveScoreQuery extends PagerQuery {
+	@NotNull(message = "请选择学期")
+	private Long semesterId;
 	@NotNull(message = "请选择考试")
 	private Long examId;
 	
 	private String courseCode;
 
+	public Long getSemesterId() {
+		return semesterId;
+	}
+
+	public void setSemesterId(Long semesterId) {
+		this.semesterId = semesterId;
+	}
 
 	public Long getExamId() {
 		return examId;

+ 9 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/bean/document/ArchivePaperQuery.java

@@ -5,11 +5,20 @@ import javax.validation.constraints.NotNull;
 import com.qmth.teachcloud.mark.utils.PagerQuery;
 
 public class ArchivePaperQuery extends PagerQuery {
+	@NotNull(message = "请选择学期")
+	private Long semesterId;
 	@NotNull(message = "请选择考试")
 	private Long examId;
 	
 	private String courseCode;
 
+	public Long getSemesterId() {
+		return semesterId;
+	}
+
+	public void setSemesterId(Long semesterId) {
+		this.semesterId = semesterId;
+	}
 
 	public Long getExamId() {
 		return examId;

+ 6 - 0
teachcloud-mark/src/main/resources/mapper/MarkPaperMapper.xml

@@ -61,6 +61,9 @@
                 <if test="dpr.requestUserId != null">
                     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)
+                </if>
                 <if test="dpr.orgIdSet != null">
                     AND su.org_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
@@ -104,6 +107,9 @@
             <if test="dpr.requestUserId != null">
                 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)
+            </if>
             <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                 AND su.org_id IN
                 <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">

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

@@ -53,6 +53,7 @@
                 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 sys_user su on mp.user_id = su.id
         <where>
             mp.exam_id = #{examId}
             <if test="courseCode != null and courseCode != ''">
@@ -62,19 +63,18 @@
                 and mp.paper_number = #{paperNumber}
             </if>
             <if test="dpr != null">
-                and exists (
-                    select 1 from sys_user su
-                        where mp.user_id = su.id
                 <if test="dpr.requestUserId != null">
                     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)
+                </if>
                 <if test="dpr.orgIdSet != null">
                     AND su.org_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
                         #{item}
                     </foreach>
                 </if>
-                )
             </if>
             <if test="progressStatus != null">
                 <if test="progressStatus == true">