Explorar o código

Merge branch 'dev_v2.2.0' of http://git.qmth.com.cn/wangliang/distributed-print-service into dev_v2.2.0

xiaof %!s(int64=3) %!d(string=hai) anos
pai
achega
5a4ce9845b
Modificáronse 40 ficheiros con 581 adicións e 192 borrados
  1. 16 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExamTaskDetailDto.java
  2. 6 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamDetailMapper.java
  3. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamPrintPlanMapper.java
  4. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamTaskDetailMapper.java
  5. 6 5
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamTaskMapper.java
  6. 15 9
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamDetailService.java
  7. 2 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamPrintPlanService.java
  8. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamTaskDetailService.java
  9. 6 5
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamTaskService.java
  10. 13 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicExamRuleServiceImpl.java
  11. 9 7
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamDetailServiceImpl.java
  12. 2 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPrintPlanServiceImpl.java
  13. 10 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskDetailServiceImpl.java
  14. 22 11
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java
  15. 32 14
      distributed-print-business/src/main/resources/mapper/ExamDetailMapper.xml
  16. 5 2
      distributed-print-business/src/main/resources/mapper/ExamPrintPlanMapper.xml
  17. 14 2
      distributed-print-business/src/main/resources/mapper/ExamTaskDetailMapper.xml
  18. 43 1
      distributed-print-business/src/main/resources/mapper/ExamTaskMapper.xml
  19. 27 27
      distributed-print/src/main/java/com/qmth/distributed/print/api/BasicCourseController.java
  20. 1 4
      distributed-print/src/main/java/com/qmth/distributed/print/api/BasicExamRuleController.java
  21. 28 12
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamDetailController.java
  22. 19 13
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamPrintPlanController.java
  23. 4 28
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamPrintPlanSyncController.java
  24. 28 9
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamTaskController.java
  25. 7 11
      distributed-print/src/main/java/com/qmth/distributed/print/api/SysPrivilegeController.java
  26. 2 3
      distributed-print/src/main/java/com/qmth/distributed/print/api/SysUserController.java
  27. 78 0
      distributed-print/src/test/java/com/qmth/distributed/print/AuthHelpTest.java
  28. 53 4
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/bean/dto/PrivilegeDto.java
  29. 6 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/bean/result/MenuResult.java
  30. 12 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/entity/SysPrivilege.java
  31. 1 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/mapper/SysUserMapper.java
  32. 2 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/mapper/TBTaskMapper.java
  33. 10 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysPrivilegeService.java
  34. 1 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysUserService.java
  35. 87 4
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysPrivilegeServiceImpl.java
  36. 2 2
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysUserServiceImpl.java
  37. 2 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/TBTaskServiceImpl.java
  38. 1 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/TeachcloudCommonServiceImpl.java
  39. 3 0
      teachcloud-common/src/main/resources/mapper/SysUserMapper.xml
  40. 3 0
      teachcloud-common/src/main/resources/mapper/TBTaskMapper.xml

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

@@ -1,5 +1,8 @@
 package com.qmth.distributed.print.business.bean.dto;
 
+import com.qmth.distributed.print.business.enums.MakeMethodEnum;
+import io.swagger.annotations.ApiModelProperty;
+
 /**
  * @Date: 2021/3/31.
  */
@@ -14,6 +17,8 @@ public class ExamTaskDetailDto {
     private String courseName;
     private String specialty;
     private String cardRuleId;
+
+    @ApiModelProperty(value = "题卡规则名称")
     private String cardRuleName;
     private String userId;
     private String userName;
@@ -28,6 +33,9 @@ public class ExamTaskDetailDto {
     private Integer totalSubjects;
     private String examDetailCourseIds;
 
+    @ApiModelProperty(value = "题卡制作方式:SELECT-选择已有题卡,SELF-自助创建,CUST-客户制卡")
+    private MakeMethodEnum makeMethod;
+
     public String getId() {
         return id;
     }
@@ -203,4 +211,12 @@ public class ExamTaskDetailDto {
     public void setExamDetailCourseIds(String examDetailCourseIds) {
         this.examDetailCourseIds = examDetailCourseIds;
     }
+
+    public MakeMethodEnum getMakeMethod() {
+        return makeMethod;
+    }
+
+    public void setMakeMethod(MakeMethodEnum makeMethod) {
+        this.makeMethod = makeMethod;
+    }
 }

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

@@ -28,22 +28,26 @@ public interface ExamDetailMapper extends BaseMapper<ExamDetail> {
 
     IPage<ExaminationResult> findBriefPage(@Param("page") Page<ExaminationResult> page,
                                            @Param("schoolId") Long schoolId,
-                                           @Param("printPlanId") Long printPlanId,
+                                           @Param("printPlanIdList") List<Long> printPlanIdList,
                                            @Param("courseCode") String courseCode,
                                            @Param("paperNumber") String paperNumber,
                                            @Param("examPlace") String examPlace,
                                            @Param("examRoom") String examRoom,
                                            @Param("packageCode") String packageCode,
+                                           @Param("startDate") Long startDate,
+                                           @Param("endDate") Long endDate,
                                            @Param("orgIds") Set<Long> orgIds);
 
     IPage<ExaminationDetailResult> findDetailPage(@Param("page") Page<ExaminationDetailResult> page,
                                                   @Param("schoolId") Long schoolId,
-                                                  @Param("printPlanId") Long printPlanId,
+                                                  @Param("printPlanIdList") List<Long> printPlanIdList,
                                                   @Param("courseCode") String courseCode,
                                                   @Param("paperNumber") String paperNumber,
                                                   @Param("examPlace") String examPlace,
                                                   @Param("examRoom") String examRoom,
                                                   @Param("studentParams") String studentParams,
+                                                  @Param("startDate") Long startDate,
+                                                  @Param("endDate") Long endDate,
                                                   @Param("orgIds") Set<Long> orgIds);
 
     IPage<ExaminationDetailResult> findDetailPageById(@Param("page") Page<ExaminationDetailResult> page,

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

@@ -27,7 +27,7 @@ import java.util.Set;
 public interface ExamPrintPlanMapper extends BaseMapper<ExamPrintPlan> {
     IPage<PrintPlanResult> findPrintPlanPage(@Param("iPage") Page<PrintPlanResult> iPage,
                                              @Param("schoolId") Long schoolId,
-                                             @Param("printPlanId") Long printPlanId,
+                                             @Param("printPlanIdList") List<Long> printPlanIdList,
                                              @Param("status") PrintPlanStatusEnum status,
                                              @Param("startTime") Long startTime,
                                              @Param("endTime") Long endTime,

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

@@ -20,7 +20,7 @@ import java.util.Set;
  * @since 2021-03-23
  */
 public interface ExamTaskDetailMapper extends BaseMapper<ExamTaskDetail> {
-    IPage<ExamTaskDetailDto> listPage(Page<ExamTaskDetailDto> page, @Param("schoolId") Long schoolId, @Param("relateType") String relateType, @Param("printPlanId") Long printPlanId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("orgIds") Set<Long> orgIds);
+    IPage<ExamTaskDetailDto> listPage(Page<ExamTaskDetailDto> page, @Param("schoolId") Long schoolId, @Param("relateType") String relateType, @Param("printPlanIdList") List<Long> printPlanIdList, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber,@Param("userName")String userName,@Param("cardRuleName")String cardRuleName, @Param("orgIds") Set<Long> orgIds);
 
     List<ExamTaskDetail> listByTemplateId(Long templateId);
 

+ 6 - 5
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamTaskMapper.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.qmth.distributed.print.business.bean.dto.*;
 import com.qmth.distributed.print.business.bean.result.WorkResult;
 import com.qmth.distributed.print.business.entity.ExamTask;
+import com.qmth.distributed.print.business.enums.MakeMethodEnum;
 import com.qmth.teachcloud.common.bean.dto.BlurryUserDto;
 import org.apache.ibatis.annotations.Param;
 
@@ -23,17 +24,17 @@ import java.util.Set;
  */
 public interface ExamTaskMapper extends BaseMapper<ExamTask> {
 
-    IPage<ExamTaskDto> listPage(Page<ExamTaskDto> page, @Param("schoolId") Long schoolId, @Param("enable") Boolean enable, @Param("status") String status, @Param("cardRuleId") Long cardRuleId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("orgIds") Set<Long> orgIds);
+    IPage<ExamTaskDto> listPage(Page<ExamTaskDto> page, @Param("schoolId") Long schoolId, @Param("enable") Boolean enable, @Param("status") String status, @Param("cardRuleId") Long cardRuleId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("orgIds") Set<Long> orgIds,@Param("userName") String userName,@Param("createName") String createName);
 
     List<BlurryUserDto> listUser(@Param("schoolId") Long schoolId, @Param("param") String param);
 
-    IPage<ExamTaskDto> listTaskApply(Page<ExamTaskDto> page, @Param("schoolId") Long schoolId, @Param("auditStatus") String auditStatus, @Param("reviewStatus") String reviewStatus, @Param("cardRuleId") Long cardRuleId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("status") String[] status, @Param("userId") Long userId, @Param("orgIds") Set<Long> orgIds);
+    IPage<ExamTaskDto> listTaskApply(Page<ExamTaskDto> page, @Param("schoolId") Long schoolId, @Param("auditStatus") String auditStatus, @Param("reviewStatus") String reviewStatus, @Param("cardRuleId") Long cardRuleId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("status") String[] status, @Param("userId") Long userId, @Param("orgIds") Set<Long> orgIds,@Param("userName") String userName);
 
-    IPage<ExamTaskDto> listTaskReviewUnaudited(Page<ExamTaskDto> page, @Param("schoolId") Long schoolId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("userId") Long userId, @Param("cardRuleId") Long cardRuleId, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("orgIds") Set<Long> orgIds);
+    IPage<ExamTaskDto> listTaskReviewUnaudited(Page<ExamTaskDto> page, @Param("schoolId") Long schoolId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("userId") Long userId, @Param("cardRuleId") Long cardRuleId, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("orgIds") Set<Long> orgIds,@Param("startCreateTime") Long startCreateTime,@Param("endCreateTime")Long endCreateTime,@Param("createName")String createName);
 
-    IPage<ExamTaskDto> listTaskReviewAudited(Page<ExamTaskDto> page, @Param("schoolId") Long schoolId, @Param("reviewStatus") String reviewStatus, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("userId") Long userId, @Param("cardRuleId") Long cardRuleId, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("orgIds") Set<Long> orgIds);
+    IPage<ExamTaskDto> listTaskReviewAudited(Page<ExamTaskDto> page, @Param("schoolId") Long schoolId, @Param("reviewStatus") String reviewStatus, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("userId") Long userId, @Param("cardRuleId") Long cardRuleId, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("orgIds") Set<Long> orgIds,@Param("startCreateTime") Long startCreateTime,@Param("endCreateTime")Long endCreateTime,@Param("createName")String createName);
 
-    IPage<ExamTaskDetailDto> listTaskPaper(Page<ExamTaskDetailDto> page, @Param("schoolId") Long schoolId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("orgIds") Set<Long> orgIds, @Param("containsQuestionTeacher") boolean containsQuestionTeacher, @Param("userId") Long userId);
+    IPage<ExamTaskDetailDto> listTaskPaper(Page<ExamTaskDetailDto> page, @Param("schoolId") Long schoolId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("orgIds") Set<Long> orgIds, @Param("containsQuestionTeacher") boolean containsQuestionTeacher, @Param("userId") Long userId, @Param("makeMethod")MakeMethodEnum makeMethod,@Param("cardRuleName") String cardRuleName);
 
     List<RelatePaperDto> listPaperNumbers(@Param("schoolId") Long schoolId, @Param("courseCode") String courseCode, @Param("status") String status);
 

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

@@ -64,50 +64,56 @@ public interface ExamDetailService extends IService<ExamDetail> {
     /**
      * 查询考务数据-简略
      * @param schoolId 学校id
-     * @param printPlanId 印刷计划id
+     * @param printPlanIdList 印刷计划id集合
      * @param courseCode 课程代码
      * @param paperNumber 试卷编号
      * @param examPlace 考点
      * @param examRoom 考场
      * @param packageCode 卷袋编号
      * @param pageNumber 分页页码
+     * @param startDate 考试开始日期
+     * @param endDate 考试结束日期
      * @param pageSize 分页数量
      * @param orgIds 权限控制参数
      * @return 查询结果
      */
-    IPage<ExaminationResult> findExaminationBriefPage(Long schoolId, Long printPlanId, String courseCode, String paperNumber,
-                                                      String examPlace, String examRoom, String packageCode, int pageNumber, int pageSize, Set<Long> orgIds);
+    IPage<ExaminationResult> findExaminationBriefPage(Long schoolId, List<Long> printPlanIdList, String courseCode, String paperNumber,
+                                                      String examPlace, String examRoom, String packageCode,Long startDate,Long endDate, int pageNumber, int pageSize, Set<Long> orgIds);
 
     /**
      * 查询考务数据-汇总数据查询
      * @param schoolId 学校id
-     * @param printPlanId 印刷计划id
+     * @param printPlanIdList 印刷计划id集合
      * @param courseCode 课程代码
      * @param paperNumber 试卷编号
      * @param examPlace 考点
      * @param examRoom 考场
      * @param packageCode 卷袋编号
+     * @param startDate 考试日期-起始
+     * @param endDate 考试日期-终止
      * @param orgIds 权限控制参数
      * @return 查询结果
      */
-    SummarizedDataResult findSummarizedData(Long schoolId,Long printPlanId,String courseCode,String paperNumber,
-                                            String examPlace,String examRoom,String packageCode,Set<Long> orgIds);
+    SummarizedDataResult findSummarizedData(Long schoolId,List<Long> printPlanIdList,String courseCode,String paperNumber,
+                                            String examPlace,String examRoom,String packageCode,Long startDate,Long endDate,Set<Long> orgIds);
 
 
     /**
      * 查询考务数据-明细
-     * @param printPlanId 印刷计划id
+     * @param printPlanIdList 印刷计划id集合
      * @param courseCode 课程代码
      * @param paperNumber 试卷编号
      * @param examPlace 考点
      * @param examRoom 考场
      * @param studentParams 学生查询参数
+     * @param startDate 考试日期-起始
+     * @param endDate 考试日期-终止
      * @param pageNumber 分页页码
      * @param pageSize 分页数量
      * @return 查询结果
      */
-    IPage<ExaminationDetailResult> findExaminationDetail(Long schoolId, Long printPlanId,String courseCode,String paperNumber,String examPlace,
-                                                         String examRoom,String studentParams,int pageNumber,int pageSize);
+    IPage<ExaminationDetailResult> findExaminationDetail(Long schoolId, List<Long> printPlanIdList,String courseCode,String paperNumber,String examPlace,
+                                                         String examRoom,String studentParams,Long startDate,Long endDate, int pageNumber,int pageSize);
 
     IPage<ExaminationDetailResult> findExaminationDetail(Long convertIdToLong, int pageNumber, int pageSize);
 

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

@@ -32,7 +32,7 @@ public interface ExamPrintPlanService extends IService<ExamPrintPlan> {
      * 印刷计划分页查询
      *
      * @param schoolId   学校id
-     * @param printPlanId  印刷计划名称
+     * @param printPlanIdList  印刷计划id集合
      * @param status     印刷计划状态
      * @param startTime  印刷计划创建时间开始
      * @param endTime    印刷计划创建时间结束
@@ -40,7 +40,7 @@ public interface ExamPrintPlanService extends IService<ExamPrintPlan> {
      * @param pageSize   分页容量
      * @return 分页查询结果
      */
-    IPage<PrintPlanResult> printPlanPage(Long schoolId, Long printPlanId, PrintPlanStatusEnum status, Long startTime, Long endTime, int pageNumber, int pageSize);
+    IPage<PrintPlanResult> printPlanPage(Long schoolId, List<Long> printPlanIdList, PrintPlanStatusEnum status, Long startTime, Long endTime, int pageNumber, int pageSize);
 
     /**
      * 印刷计划模糊名称

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

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

+ 6 - 5
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamTaskService.java

@@ -9,6 +9,7 @@ import com.qmth.distributed.print.business.entity.ExamTaskDetail;
 import com.qmth.distributed.print.business.entity.ExamTaskReviewLog;
 import com.qmth.distributed.print.business.entity.TFFlow;
 import com.qmth.distributed.print.business.enums.ExamStatusEnum;
+import com.qmth.distributed.print.business.enums.MakeMethodEnum;
 import com.qmth.teachcloud.common.bean.dto.BlurryUserDto;
 import com.qmth.teachcloud.common.entity.SysUser;
 import com.qmth.teachcloud.common.entity.TBTask;
@@ -31,7 +32,7 @@ public interface ExamTaskService extends IService<ExamTask> {
 
     List<ExamTask> listByCourseCode(Long schoolId, String code);
 
-    IPage<ExamTaskDto> list(Boolean enable, String status, Long cardRuleId, String courseCode, String paperNumber, Long startTime, Long endTime, Integer pageNumber, Integer pageSize);
+    IPage<ExamTaskDto> list(Boolean enable, String status, Long cardRuleId, String courseCode, String paperNumber, Long startTime, Long endTime,String userName,String createName, Integer pageNumber, Integer pageSize);
 
     List<String> listPaperNumber(String param, Long printPlanId);
 
@@ -56,17 +57,17 @@ public interface ExamTaskService extends IService<ExamTask> {
 
     List<ExamTask> saveBatch(ExamTask task);
 
-    IPage<ExamTaskDto> listTaskApply(String auditStatus, String reviewStatus, Long cardRuleId, String courseCode, String paperNumber, Long startTime, Long endTime, Integer pageNumber, Integer pageSize);
+    IPage<ExamTaskDto> listTaskApply(String auditStatus, String reviewStatus, Long cardRuleId, String courseCode, String paperNumber, Long startTime, Long endTime,String userName, Integer pageNumber, Integer pageSize);
 
-    IPage<ExamTaskDto> listTaskReviewUnaudited(String courseCode, String paperNumber, Long userId, Long cardRuleId, Long startTime, Long endTime, Integer pageNumber, Integer pageSize);
+    IPage<ExamTaskDto> listTaskReviewUnaudited(String courseCode, String paperNumber, Long userId, Long cardRuleId, Long startTime, Long endTime,Long startCreateTime,Long endCreateTime,String createName,Integer pageNumber, Integer pageSize);
 
-    IPage<ExamTaskDto> listTaskReviewAudited(String reviewStatus, String courseCode, String paperNumber, Long userId, Long cardRuleId, Long startTime, Long endTime, Integer pageNumber, Integer pageSize);
+    IPage<ExamTaskDto> listTaskReviewAudited(String reviewStatus, String courseCode, String paperNumber, Long userId, Long cardRuleId, Long startTime, Long endTime,Long startCreateTime,Long endCreateTime,String createName, Integer pageNumber, Integer pageSize);
 
     boolean taskReviewSave(ExamTaskReviewLog taskReviewLog) throws IOException;
 
     boolean taskReviewSaveBatch(ExamTaskReviewLog taskReviewLog) throws IOException;
 
-    IPage<ExamTaskDetailDto> listTaskPaper(String courseCode, String paperNumber, Long startTime, Long endTime, Integer pageNumber, Integer pageSize);
+    IPage<ExamTaskDetailDto> listTaskPaper(String courseCode, String paperNumber, Long startTime, Long endTime, MakeMethodEnum makeMethodEnum,String cardRuleName, Integer pageNumber, Integer pageSize);
 
     List<RelatePaperDto> listPaperTypes(Long examTaskId, Long printPlanId, String courseCode);
 

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

@@ -12,7 +12,6 @@ import com.qmth.distributed.print.business.service.ExamPrintPlanService;
 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.util.JacksonUtil;
 import com.qmth.teachcloud.common.util.ServletUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -55,7 +54,6 @@ public class BasicExamRuleServiceImpl extends ServiceImpl<BasicExamRuleMapper, B
         examRule.setSchoolId(schoolId);
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
 
-        // 已开始新建印刷计划,不能新增、删除扩展字段
         // 新增
         if (examRule.getId() == null) {
             examRule.setId(SystemConstant.getDbUuid());
@@ -70,6 +68,7 @@ public class BasicExamRuleServiceImpl extends ServiceImpl<BasicExamRuleMapper, B
             queryWrapper.lambda().eq(ExamPrintPlan::getSchoolId, schoolId).ne(ExamPrintPlan::getStatus, PrintPlanStatusEnum.END);
             List<ExamPrintPlan> examPrintPlanList = examPrintPlanService.list(queryWrapper);
             if (examPrintPlanList != null && examPrintPlanList.size() > 0) {
+                // -- 可直接抛出异常下面的判断均可不用执行
                 BasicExamRule basicExamRule = this.getById(examRule.getId());
                 // 匹配扩展字段是否有变动
                 String oldExtends = basicExamRule.getExtendFields();
@@ -98,6 +97,18 @@ public class BasicExamRuleServiceImpl extends ServiceImpl<BasicExamRuleMapper, B
                         throw ExceptionResultEnum.ERROR.exception("有未结束的印刷计划,不能修改扩展字段");
                     }
                 }
+                if (!basicExamRule.getReview().equals(examRule.getReview())){
+                    throw ExceptionResultEnum.ERROR.exception("有未结束的印刷计划,不能修改入库审核控制");
+                }
+                if (!basicExamRule.getIncludePaper().equals(examRule.getIncludePaper())){
+                    throw ExceptionResultEnum.ERROR.exception("有未结束的印刷计划,不能修改包含试卷控制");
+                }
+                if (!basicExamRule.getCustomCard().equals(examRule.getCustomCard())){
+                    throw ExceptionResultEnum.ERROR.exception("有未结束的印刷计划,不能修改客服制卡控制");
+                }
+                if (!basicExamRule.getPrintMethod().equals(examRule.getPrintMethod())){
+                    throw ExceptionResultEnum.ERROR.exception("有未结束的印刷计划,不能修改印刷方式控制");
+                }
             }
             examRule.setUpdateId(sysUser.getId());
             examRule.setUpdateTime(System.currentTimeMillis());

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

@@ -223,8 +223,8 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
 
     @Transactional(rollbackFor = Exception.class)
     @Override
-    public IPage<ExaminationResult> findExaminationBriefPage(Long schoolId, Long printPlanId, String courseCode, String paperNumber, String examPlace, String examRoom, String packageCode, int pageNumber, int pageSize, Set<Long> orgIds) {
-        IPage<ExaminationResult> page = examDetailMapper.findBriefPage(new Page<>(pageNumber, pageSize), schoolId, printPlanId, courseCode, paperNumber, examPlace, examRoom, packageCode, orgIds);
+    public IPage<ExaminationResult> findExaminationBriefPage(Long schoolId, List<Long> printPlanIdList, String courseCode, String paperNumber, String examPlace, String examRoom, String packageCode,Long startDate,Long endDate, int pageNumber, int pageSize, Set<Long> orgIds) {
+        IPage<ExaminationResult> page = examDetailMapper.findBriefPage(new Page<>(pageNumber, pageSize), schoolId, printPlanIdList, courseCode, paperNumber, examPlace, examRoom, packageCode,startDate,endDate, orgIds);
         List<ExaminationResult> list = page.getRecords();
         for (ExaminationResult examinationResult : list) {
             String examDetailCourseIds = examinationResult.getExamDetailCourseIds();
@@ -264,8 +264,8 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
 
     @Transactional(rollbackFor = Exception.class)
     @Override
-    public SummarizedDataResult findSummarizedData(Long schoolId, Long printPlanId, String courseCode, String paperNumber, String examPlace, String examRoom, String packageCode, Set<Long> orgIds) {
-        IPage<ExaminationResult> page = this.findExaminationBriefPage(schoolId, printPlanId, courseCode, paperNumber, examPlace, examRoom, packageCode, SystemConstant.PAGE_NUMBER, SystemConstant.PAGE_SIZE, orgIds);
+    public SummarizedDataResult findSummarizedData(Long schoolId, List<Long> printPlanIdList, String courseCode, String paperNumber, String examPlace, String examRoom, String packageCode,Long startDate,Long endDate, Set<Long> orgIds) {
+        IPage<ExaminationResult> page = this.findExaminationBriefPage(schoolId, printPlanIdList, courseCode, paperNumber, examPlace, examRoom, packageCode,startDate,endDate, SystemConstant.PAGE_NUMBER, SystemConstant.PAGE_SIZE, orgIds);
         List<ExaminationResult> list = page.getRecords();
         int totalSubjects = 0;
         for (ExaminationResult examinationResult : list) {
@@ -281,9 +281,9 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
 
     @Transactional(rollbackFor = Exception.class)
     @Override
-    public IPage<ExaminationDetailResult> findExaminationDetail(Long schoolId, Long printPlanId, String courseCode, String paperNumber, String examPlace, String examRoom, String studentParams, int pageNumber, int pageSize) {
+    public IPage<ExaminationDetailResult> findExaminationDetail(Long schoolId, List<Long> printPlanIdList, String courseCode, String paperNumber, String examPlace, String examRoom, String studentParams,Long startDate,Long endDate, int pageNumber, int pageSize) {
         Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(null);
-        return examDetailMapper.findDetailPage(new Page<>(pageNumber, pageSize), schoolId, printPlanId, courseCode, paperNumber, examPlace, examRoom, SystemConstant.translateSpecificSign(studentParams), orgIds);
+        return examDetailMapper.findDetailPage(new Page<>(pageNumber, pageSize), schoolId, printPlanIdList, courseCode, paperNumber, examPlace, examRoom, SystemConstant.translateSpecificSign(studentParams),startDate,endDate, orgIds);
     }
 
     @Transactional(rollbackFor = Exception.class)
@@ -646,8 +646,10 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
         Long userId = tbTask.getCreateId();
         Long schoolId = tbTask.getSchoolId();
 
+        List<Long> printPlanIdList = new ArrayList<>();
+        printPlanIdList.add(printPlanId);
         List<ExaminationResult> examinationResultList = this.findExaminationBriefPage(schoolId,
-                printPlanId, courseCode, paperNumber, examPlace, examRoom, packageCode,
+                printPlanIdList, courseCode, paperNumber, examPlace, examRoom, packageCode,null,null,
                 SystemConstant.PAGE_NUMBER, SystemConstant.PAGE_SIZE, orgIds).getRecords();
         int index = 0;
         List<ExaminationExportDto> examinationExportDtoList = new ArrayList<>();

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

@@ -85,9 +85,9 @@ public class ExamPrintPlanServiceImpl extends ServiceImpl<ExamPrintPlanMapper, E
 
     @Transactional(rollbackFor = Exception.class)
     @Override
-    public IPage<PrintPlanResult> printPlanPage(Long schoolId, Long printPlanId, PrintPlanStatusEnum status, Long startTime, Long endTime, int pageNumber, int pageSize) {
+    public IPage<PrintPlanResult> printPlanPage(Long schoolId, List<Long> printPlanIdList, PrintPlanStatusEnum status, Long startTime, Long endTime, int pageNumber, int pageSize) {
         Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(null);
-        IPage<PrintPlanResult> page = examPrintPlanMapper.findPrintPlanPage(new Page<>(pageNumber, pageSize), schoolId, printPlanId, status, startTime, endTime, orgIds);
+        IPage<PrintPlanResult> page = examPrintPlanMapper.findPrintPlanPage(new Page<>(pageNumber, pageSize), schoolId, printPlanIdList, status, startTime, endTime, orgIds);
         List<PrintPlanResult> list = page.getRecords();
         for (PrintPlanResult printPlanResult : list) {
             List<Map> variableContent = JSONObject.parseArray(printPlanResult.getVariableContentTemp(), Map.class);

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

@@ -226,11 +226,19 @@ public class ExamTaskDetailServiceImpl extends ServiceImpl<ExamTaskDetailMapper,
     }
 
     @Override
-    public IPage<ExamTaskDetailDto> list(String relateType, Long printPlanId, String courseCode, String paperNumber, Integer pageNumber, Integer pageSize) {
+    public IPage<ExamTaskDetailDto> list(String relateType, List<Long> printPlanIdList, String courseCode, String paperNumber,String userName,String cardRuleName, Integer pageNumber, Integer pageSize) {
+        userName = SystemConstant.translateSpecificSign(userName);
+        if (SystemConstant.strNotNull(cardRuleName)){
+            if (cardRuleName.equals("全部通卡")){
+                cardRuleName = "-1";
+            }else {
+                cardRuleName = SystemConstant.translateSpecificSign(cardRuleName);
+            }
+        }
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(null);
         Page<ExamTaskDetailDto> page = new Page<>(pageNumber, pageSize);
-        IPage<ExamTaskDetailDto> examDetailDtoIPage = this.baseMapper.listPage(page, schoolId, relateType, printPlanId, courseCode, paperNumber, orgIds);
+        IPage<ExamTaskDetailDto> examDetailDtoIPage = this.baseMapper.listPage(page, schoolId, relateType, printPlanIdList, courseCode, paperNumber,userName,cardRuleName, orgIds);
         examDetailDtoIPage.getRecords().stream().map(m -> {
             String paperType = StringUtils.isBlank(m.getRelatePaperType()) ? null : m.getRelatePaperType();
             Long printPlanIdT = Long.valueOf(m.getPrintPlanId());

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

@@ -135,11 +135,13 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
     }
 
     @Override
-    public IPage<ExamTaskDto> list(Boolean enable, String status, Long cardRuleId, String courseCode, String paperNumber, Long startTime, Long endTime, Integer pageNumber, Integer pageSize) {
+    public IPage<ExamTaskDto> list(Boolean enable, String status, Long cardRuleId, String courseCode, String paperNumber, Long startTime, Long endTime,String userName,String createName, Integer pageNumber, Integer pageSize) {
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
+        userName = SystemConstant.translateSpecificSign(userName);
+        createName = SystemConstant.translateSpecificSign(createName);
         Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(null);
         Page<ExamTaskDto> page = new Page<>(pageNumber, pageSize);
-        IPage<ExamTaskDto> examTaskDtoIPage = this.baseMapper.listPage(page, schoolId, enable, status, cardRuleId, courseCode, paperNumber, startTime, endTime, orgIds);
+        IPage<ExamTaskDto> examTaskDtoIPage = this.baseMapper.listPage(page, schoolId, enable, status, cardRuleId, courseCode, paperNumber, startTime, endTime, orgIds,userName,createName);
         return examTaskDtoIPage;
     }
 
@@ -670,33 +672,36 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
 
     @Override
     public IPage<ExamTaskDto> listTaskApply(String auditStatus, String reviewStatus, Long cardRuleId, String
-            courseCode, String paperNumber, Long startTime, Long endTime, Integer pageNumber, Integer pageSize) {
+            courseCode, String paperNumber, Long startTime, Long endTime,String userName, Integer pageNumber, Integer pageSize) {
+        userName = SystemConstant.translateSpecificSign(userName);
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(null);
         Page<ExamTaskDto> page = new Page<>(pageNumber, pageSize);
         String[] strings = new String[]{ExamStatusEnum.NEW.name(), ExamStatusEnum.FINISH.name()};
-        IPage<ExamTaskDto> examTaskDtoIPage = this.baseMapper.listTaskApply(page, schoolId, auditStatus, reviewStatus, cardRuleId, courseCode, paperNumber, startTime, endTime, strings, sysUser.getId(), orgIds);
+        IPage<ExamTaskDto> examTaskDtoIPage = this.baseMapper.listTaskApply(page, schoolId, auditStatus, reviewStatus, cardRuleId, courseCode, paperNumber, startTime, endTime, strings, sysUser.getId(), orgIds,userName);
         return examTaskDtoIPage;
     }
 
     @Override
     public IPage<ExamTaskDto> listTaskReviewUnaudited(String courseCode, String paperNumber, Long userId, Long
-            cardRuleId, Long startTime, Long endTime, Integer pageNumber, Integer pageSize) {
+            cardRuleId, Long startTime, Long endTime,Long startCreateTime,Long endCreateTime,String createName, Integer pageNumber, Integer pageSize) {
+        createName = SystemConstant.translateSpecificSign(createName);
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(null);
         Page<ExamTaskDto> page = new Page<>(pageNumber, pageSize);
-        IPage<ExamTaskDto> examTaskDtoIPage = this.baseMapper.listTaskReviewUnaudited(page, schoolId, courseCode, paperNumber, userId, cardRuleId, startTime, endTime, orgIds);
+        IPage<ExamTaskDto> examTaskDtoIPage = this.baseMapper.listTaskReviewUnaudited(page, schoolId, courseCode, paperNumber, userId, cardRuleId, startTime, endTime, orgIds,startCreateTime,endCreateTime,createName);
         return examTaskDtoIPage;
     }
 
     @Override
     public IPage<ExamTaskDto> listTaskReviewAudited(String reviewStatus, String courseCode, String
-            paperNumber, Long userId, Long cardRuleId, Long startTime, Long endTime, Integer pageNumber, Integer pageSize) {
+            paperNumber, Long userId, Long cardRuleId, Long startTime, Long endTime,Long startCreateTime,Long endCreateTime,String createName, Integer pageNumber, Integer pageSize) {
+        createName = SystemConstant.translateSpecificSign(createName);
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(null);
         Page<ExamTaskDto> page = new Page<>(pageNumber, pageSize);
-        IPage<ExamTaskDto> examTaskDtoIPage = this.baseMapper.listTaskReviewAudited(page, schoolId, reviewStatus, courseCode, paperNumber, userId, cardRuleId, startTime, endTime, orgIds);
+        IPage<ExamTaskDto> examTaskDtoIPage = this.baseMapper.listTaskReviewAudited(page, schoolId, reviewStatus, courseCode, paperNumber, userId, cardRuleId, startTime, endTime, orgIds, startCreateTime, endCreateTime, createName);
         return examTaskDtoIPage;
     }
 
@@ -821,8 +826,14 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
     }
 
     @Override
-    public IPage<ExamTaskDetailDto> listTaskPaper(String courseCode, String paperNumber, Long startTime, Long
-            endTime, Integer pageNumber, Integer pageSize) {
+    public IPage<ExamTaskDetailDto> listTaskPaper(String courseCode, String paperNumber, Long startTime, Long endTime,MakeMethodEnum makeMethod,String cardRuleName, Integer pageNumber, Integer pageSize) {
+        if (SystemConstant.strNotNull(cardRuleName)){
+            if (cardRuleName.equals("全部通卡")){
+                cardRuleName = "-1";
+            }else {
+                cardRuleName = SystemConstant.translateSpecificSign(cardRuleName);
+            }
+        }
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         // 查询用户角色是否包含命题老师
         List<SysRole> list = sysUserRoleService.listRoleByUserId(sysUser.getId());
@@ -830,7 +841,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(null);
         Page<ExamTaskDetailDto> page = new Page<>(pageNumber, pageSize);
-        IPage<ExamTaskDetailDto> examTaskDtoIPage = this.baseMapper.listTaskPaper(page, schoolId, courseCode, paperNumber, startTime, endTime, orgIds, containsQuestionTeacher, sysUser.getId());
+        IPage<ExamTaskDetailDto> examTaskDtoIPage = this.baseMapper.listTaskPaper(page, schoolId, courseCode, paperNumber, startTime, endTime, orgIds, containsQuestionTeacher, sysUser.getId(),makeMethod,cardRuleName);
         return examTaskDtoIPage;
     }
 

+ 32 - 14
distributed-print-business/src/main/resources/mapper/ExamDetailMapper.xml

@@ -134,18 +134,27 @@
             <if test="schoolId != null and schoolId > 0">
                 AND det.school_id = #{schoolId}
             </if>
-            <if test="printPlanId != null and printPlanId > 0">
-                AND det.print_plan_id = #{printPlanId}
+            <if test="printPlanIdList != null and printPlanIdList.size() > 0">
+                AND det.print_plan_id = IN
+                <foreach collection="printPlanIdList" item="item" index="index" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
             </if>
-            <if test="examPlace != null and examPlace.length > 0">
+            <if test="examPlace != null and examPlace != ''">
                 AND det.exam_place = #{examPlace}
             </if>
-            <if test="examRoom != null and examRoom.length > 0">
+            <if test="examRoom != null and examRoom != ''">
                 AND det.exam_room = #{examRoom}
             </if>
-            <if test="packageCode != null and packageCode.length > 0">
+            <if test="packageCode != null and packageCode != ''">
                 AND det.package_code = #{packageCode}
             </if>
+            <if test="startDate != null and startDate > 0">
+                AND det.exam_start_time >= #{startDate}
+            </if>
+            <if test="endDate != null and endDate > 0">
+                AND #{endDate} >= det.exam_end_time
+            </if>
             <if test="orgIds != null and orgIds.size() > 0">
                 AND b.org_id IN
                 <foreach collection="orgIds" item="item" index="index" open="(" separator="," close=")">
@@ -155,10 +164,10 @@
         </where>
         GROUP BY det.id
         <trim prefix="having" suffixOverrides="and">
-            <if test="courseCode != null and courseCode.length > 0">
+            <if test="courseCode != null and courseCode != ''">
                 find_in_set(#{courseCode},courseCodes) and
             </if>
-            <if test="paperNumber != null and paperNumber.length > 0">
+            <if test="paperNumber != null and paperNumber != ''">
                 find_in_set(#{paperNumber},paperNumbers) and
             </if>
         </trim>
@@ -204,24 +213,33 @@
             <if test="schoolId != null and schoolId > 0">
                 AND det.school_id = #{schoolId}
             </if>
-            <if test="printPlanId != null and printPlanId > 0">
-                AND det.print_plan_id = #{printPlanId}
+            <if test="printPlanIdList != null and printPlanIdList.size() > 0">
+                AND det.print_plan_id = IN
+                <foreach collection="printPlanIdList" item="item" index="index" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
             </if>
-            <if test="courseCode != null and courseCode.length > 0">
+            <if test="courseCode != null and courseCode != ''">
                 AND cou.course_code = #{courseCode}
             </if>
-            <if test="paperNumber != null and paperNumber.length > 0">
+            <if test="paperNumber != null and paperNumber != ''">
                 AND cou.paper_number = #{paperNumber}
             </if>
-            <if test="examPlace != null and examPlace.length > 0">
+            <if test="examPlace != null and examPlace != ''">
                 AND det.exam_place = #{examPlace}
             </if>
-            <if test="examRoom != null and examRoom.length > 0">
+            <if test="examRoom != null and examRoom != ''">
                 AND det.exam_room = #{examRoom}
             </if>
-            <if test="studentParams != null and studentParams.length > 0">
+            <if test="studentParams != null and studentParams != ''">
                 AND (stu.ticket_number LIKE CONCAT('%',#{studentParams},'%') OR stu.student_code LIKE CONCAT('%',#{studentParams},'%') OR stu.student_name LIKE CONCAT('%',#{studentParams},'%'))
             </if>
+            <if test="startDate != null and startDate > 0">
+                AND det.exam_start_time >= #{startDate}
+            </if>
+            <if test="endDate != null and endDate > 0">
+                AND #{endDate} >= det.exam_end_time
+            </if>
             <if test="orgIds != null">
                 AND b.org_id IN
                 <foreach collection="orgIds" item="item" index="index" open="(" separator="," close=")">

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

@@ -61,8 +61,11 @@
             <if test="schoolId != null and schoolId > 0">
                 and a.school_id = #{schoolId}
             </if>
-            <if test="printPlanId != null and printPlanId > 0">
-                and a.id = #{printPlanId}
+            <if test="printPlanIdList.size() > 0">
+                and a.id = IN
+                <foreach collection="printPlanIdList" item="item" index="index" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
             </if>
             <if test="status != null">
                 and a.status = #{status}

+ 14 - 2
distributed-print-business/src/main/resources/mapper/ExamTaskDetailMapper.xml

@@ -79,8 +79,11 @@
                     and a.paper_type is null
                 </if>
             </if>
-            <if test="printPlanId != null and printPlanId != ''">
-                and a.print_plan_id = #{printPlanId}
+            <if test="printPlanIdList != null and printPlanIdList.size() > 0">
+                and a.print_plan_id = IN
+                <foreach collection="printPlanIdList" item="item" index="index" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
             </if>
             <if test="courseCode != null and courseCode != ''">
                 and c.course_code = #{courseCode}
@@ -88,6 +91,15 @@
             <if test="paperNumber != null and paperNumber != ''">
                 and c.paper_number = #{paperNumber}
             </if>
+            <if test="cardRuleName != null and cardRuleName != ''">
+                and e.name like concat('%',#{cardRuleName},'%')
+            </if>
+            <if test="cardRuleName != null and cardRuleName = -1">
+                and c.card_rule_id = -1
+            </if>
+            <if test="userName != null and userName != ''">
+                and f.real_name like concat('%',#{userName},'%')
+            </if>
             <if test="orgIds != null">
                 AND g.org_id IN
                 <foreach collection="orgIds" item="item" index="index" open="(" separator="," close=")">

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

@@ -87,6 +87,12 @@
             <if test="endTime != null and endTime != ''">
                 and a.start_time &lt;= #{endTime}
             </if>
+            <if test="userName != null and userName != ''">
+                and c.real_name like concat('%',#{userName},'%')
+            </if>
+            <if test="createName != null and createName != ''">
+                and d.real_name like concat('%',#{createName},'%')
+            </if>
         </where>
         order by a.create_time desc
     </select>
@@ -175,6 +181,9 @@
             <if test="endTime != null and endTime != ''">
                 and a.startTime &lt;= #{endTime}
             </if>
+            <if test="userName != null and userName != ''">
+                and a.userName like concat('%',#{userName},'%')
+            </if>
         </where>
     </select>
     <select id="listTaskReviewUnaudited" resultType="com.qmth.distributed.print.business.bean.dto.ExamTaskDto">
@@ -240,6 +249,15 @@
             <if test="endTime != null and endTime != ''">
                 and a.start_time &lt;= #{endTime}
             </if>
+            <if test="startCreateTime != null and startCreateTime > 0">
+                and a.create_time >= #{startCreateTime}
+            </if>
+            <if test="endCreateTime != null and endCreateTime > 0">
+                and #{endCreateTime} >= a.create_time
+            </if>
+            <if test="createName != null and createName != ''">
+                and d.real_name like concat('%',#{createName},'%')
+            </if>
             <if test="orgIds != null">
                 AND d.org_id IN
                 <foreach collection="orgIds" item="item" index="index" open="(" separator="," close=")">
@@ -312,6 +330,15 @@
             <if test="endTime != null and endTime != ''">
                 and a.start_time &lt;= #{endTime}
             </if>
+            <if test="startCreateTime != null and startCreateTime > 0">
+                and a.create_time >= #{startCreateTime}
+            </if>
+            <if test="endCreateTime != null and endCreateTime > 0">
+                and #{endCreateTime} >= a.create_time
+            </if>
+            <if test="createName != null and createName != ''">
+                and d.real_name like concat('%',#{createName},'%')
+            </if>
             <if test="orgIds != null">
                 AND d.org_id IN
                 <foreach collection="orgIds" item="item" index="index" open="(" separator="," close=")">
@@ -340,7 +367,9 @@
         b.enable,
         b.paper_type paperType,
         b.exposed_paper_type exposedPaperType,
-        b.unexposed_paper_type unexposedPaperType
+        b.unexposed_paper_type unexposedPaperType,
+        case a.card_rule_id when -1 then '全部通卡' else e.name end cardRuleName,
+        f.make_method makeMethod
         FROM
         exam_task a
         LEFT JOIN
@@ -355,6 +384,10 @@
         sys_user c ON a.user_id = c.id
         LEFT JOIN
         sys_user d ON a.create_id = d.id
+        LEFT JOIN
+        basic_card_rule e ON a.card_rule_id = e.id
+        LEFT JOIN
+        exam_card f ON b.card_id = f.id
         <where>
             a.status = 'FINISH'
             <if test="schoolId != null and schoolId != ''">
@@ -381,6 +414,15 @@
                     #{item}
                 </foreach>
             </if>
+            <if test="makeMethod != null and makeMethod != ''">
+                and f.make_method = #{makeMethod}
+            </if>
+            <if test="cardRuleName != null and cardRuleName != ''">
+                and e.name like concat('%',#{cardRuleName},'%')
+            </if>
+            <if test="cardRuleName != null and cardRuleName = -1">
+                and a.card_rule_id = -1
+            </if>
         </where>
         order by a.create_time desc
     </select>

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

@@ -49,38 +49,38 @@ public class BasicCourseController {
     @Resource
     private AsyncCourseDataImportService asyncCourseDataImportService;
 
-    /**
-     * 查询
-     *
-     * @param code
-     * @param name
-     * @param pageNumber
-     * @param pageSize
-     * @return
-     */
-    @ApiOperation(value = "查询")
-    @RequestMapping(value = "/list", method = RequestMethod.POST)
-    public Result list(@RequestParam(value = "code", required = false) String code,
-                       @RequestParam(value = "name", required = false) String name,
-                       @RequestParam Integer pageNumber,
-                       @RequestParam Integer pageSize) {
-        IPage<BasicCourse> userDtos = printCommonService.list(code, name, pageNumber, pageSize);
-        return ResultUtil.ok(userDtos);
-    }
-
 //    /**
-//     * 模糊查询
+//     * 查询
 //     *
-//     * @param param
+//     * @param code
+//     * @param name
+//     * @param pageNumber
+//     * @param pageSize
 //     * @return
 //     */
-//    @ApiOperation(value = "模糊查询")
-//    @RequestMapping(value = "/query", method = RequestMethod.POST)
-//    public Result query(@RequestParam(value = "param", required = false) String param,
-//                        @RequestParam(value = "printPlanId", required = false) Long printPlanId) {
-//        List<BasicCourse> userDtos = printCommonService.list(param, printPlanId);
+//    @ApiOperation(value = "查询")
+//    @RequestMapping(value = "/list", method = RequestMethod.POST)
+//    public Result list(@RequestParam(value = "code", required = false) String code,
+//                       @RequestParam(value = "name", required = false) String name,
+//                       @RequestParam Integer pageNumber,
+//                       @RequestParam Integer pageSize) {
+//        IPage<BasicCourse> userDtos = printCommonService.list(code, name, pageNumber, pageSize);
 //        return ResultUtil.ok(userDtos);
 //    }
+
+    /**
+     * 模糊查询
+     *
+     * @param param
+     * @return
+     */
+    @ApiOperation(value = "模糊查询")
+    @RequestMapping(value = "/query", method = RequestMethod.POST)
+    public Result query(@RequestParam(value = "param", required = false) String param,
+                        @RequestParam(value = "printPlanId", required = false) Long printPlanId) {
+        List<BasicCourse> userDtos = printCommonService.list(param, printPlanId);
+        return ResultUtil.ok(userDtos);
+    }
 //
 //    /**
 //     * 新增/修改
@@ -113,7 +113,7 @@ public class BasicCourseController {
 
 
     @ApiOperation(value = "课程管理-查询")
-    @RequestMapping(value = "/query", method = RequestMethod.POST)
+    @RequestMapping(value = "/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
     public Result findBasicCampusList(@ApiParam(value = "课程名称(模糊查询)") @RequestParam(required = false) String courseName,
                                       @ApiParam(value = "创建时间(起始位置)") @RequestParam(required = false) String startCreateTime,

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

@@ -1,8 +1,6 @@
 package com.qmth.distributed.print.api;
 
 
-import com.qmth.boot.api.annotation.Aac;
-import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.distributed.print.business.entity.BasicExamRule;
 import com.qmth.distributed.print.business.service.BasicExamRuleService;
@@ -57,5 +55,4 @@ public class BasicExamRuleController {
         return ResultUtil.ok(id, "");
     }
 
-}
-
+}

+ 28 - 12
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamDetailController.java

@@ -24,9 +24,8 @@ import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
 import java.io.IOException;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Set;
+import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -70,52 +69,69 @@ public class ExamDetailController {
     @ApiOperation(value = "考务数据导入-查询")
     @RequestMapping(value = "/data_list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
-    public Result findExaminationBrief(@ApiParam(value = "印刷计划id") @RequestParam(required = false) String printPlanId,
+    public Result findExaminationBrief(@ApiParam(value = "印刷计划id集合") @RequestParam(required = false) List<String> printPlanIdList,
                                        @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
                                        @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                        @ApiParam(value = "考点") @RequestParam(required = false) String examPlace,
                                        @ApiParam(value = "考场") @RequestParam(required = false) String examRoom,
                                        @ApiParam(value = "卷袋号") @RequestParam(required = false) String packageCode,
+                                       @ApiParam(value = "考试日期-起始") @RequestParam(required = false) Long startDate,
+                                       @ApiParam(value = "考试日期-终止") @RequestParam(required = false) Long endDate,
                                        @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
                                        @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
 
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
+        if (Objects.isNull(printPlanIdList)){
+            printPlanIdList = new ArrayList<>();
+        }
+        List<Long> idList = printPlanIdList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList());
         Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(null);
         return ResultUtil.ok(examDetailService.findExaminationBriefPage(schoolId,
-                SystemConstant.convertIdToLong(printPlanId), courseCode, paperNumber, examPlace, examRoom, packageCode, pageNumber, pageSize, orgIds));
+                idList, courseCode, paperNumber, examPlace, examRoom, packageCode,startDate,endDate, pageNumber, pageSize, orgIds));
     }
 
     @ApiOperation(value = "考务数据导入-汇总数据查询")
     @RequestMapping(value = "/data_total", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
-    public Result findSummarizedData(@ApiParam(value = "印刷计划id") @RequestParam(required = false) String printPlanId,
+    public Result findSummarizedData(@ApiParam(value = "印刷计划id集合") @RequestParam(required = false) List<String> printPlanIdList,
                                      @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
                                      @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                      @ApiParam(value = "考点") @RequestParam(required = false) String examPlace,
                                      @ApiParam(value = "考场") @RequestParam(required = false) String examRoom,
-                                     @ApiParam(value = "卷袋号") @RequestParam(required = false) String packageCode) {
+                                     @ApiParam(value = "卷袋号") @RequestParam(required = false) String packageCode,
+                                     @ApiParam(value = "考试日期-起始") @RequestParam(required = false) Long startDate,
+                                     @ApiParam(value = "考试日期-终止") @RequestParam(required = false) Long endDate) {
 
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
+        if (Objects.isNull(printPlanIdList)){
+            printPlanIdList = new ArrayList<>();
+        }
+        List<Long> idList = printPlanIdList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList());
         Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(null);
-        return ResultUtil.ok(examDetailService.findSummarizedData(schoolId,
-                SystemConstant.convertIdToLong(printPlanId), courseCode, paperNumber, examPlace, examRoom, packageCode, orgIds));
+        return ResultUtil.ok(examDetailService.findSummarizedData(schoolId, idList, courseCode, paperNumber, examPlace, examRoom, packageCode,startDate,endDate, orgIds));
     }
 
     @ApiOperation(value = "考务数据导入-查看明细")
     @RequestMapping(value = "/data_detail", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
-    public Result findExaminationDetail(@ApiParam(value = "印刷计划主键") @RequestParam(required = false) String printPlanId,
+    public Result findExaminationDetail(@ApiParam(value = "印刷计划主键集合") @RequestParam(required = false) List<String> printPlanIdList,
                                         @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
                                         @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                         @ApiParam(value = "考点") @RequestParam(required = false) String examPlace,
                                         @ApiParam(value = "考场") @RequestParam(required = false) String examRoom,
                                         @ApiParam(value = "学生查询参数") @RequestParam(required = false) String studentParams,
+                                        @ApiParam(value = "考试日期-起始") @RequestParam(required = false) Long startDate,
+                                        @ApiParam(value = "考试日期-终止") @RequestParam(required = false) Long endDate,
                                         @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
                                         @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
 
+        if (Objects.isNull(printPlanIdList)){
+            printPlanIdList = new ArrayList<>();
+        }
+        List<Long> idList = printPlanIdList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList());
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
-        return ResultUtil.ok(examDetailService.findExaminationDetail(schoolId, SystemConstant.convertIdToLong(printPlanId),
-                courseCode, paperNumber, examPlace, examRoom, studentParams, pageNumber, pageSize));
+        return ResultUtil.ok(examDetailService.findExaminationDetail(schoolId, idList,
+                courseCode, paperNumber, examPlace, examRoom, studentParams,startDate,endDate, pageNumber, pageSize));
     }
 
     @ApiOperation(value = "查看考生明细")

+ 19 - 13
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamPrintPlanController.java

@@ -1,8 +1,6 @@
 package com.qmth.distributed.print.api;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.qmth.boot.api.annotation.Aac;
-import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.distributed.print.business.bean.dto.ExamTaskDetailDto;
 import com.qmth.distributed.print.business.bean.dto.PrintTaskDto;
@@ -11,7 +9,6 @@ import com.qmth.distributed.print.business.bean.dto.RelatePaperDto;
 import com.qmth.distributed.print.business.bean.params.DeleteParams;
 import com.qmth.distributed.print.business.bean.params.PrintPlanParams;
 import com.qmth.distributed.print.business.bean.params.RelatePaperParam;
-import com.qmth.distributed.print.business.bean.params.SyncDataParam;
 import com.qmth.distributed.print.business.bean.result.EditResult;
 import com.qmth.distributed.print.business.entity.ExamDetail;
 import com.qmth.distributed.print.business.enums.ExamDetailStatusEnum;
@@ -39,10 +36,8 @@ import org.springframework.web.bind.annotation.*;
 import javax.annotation.Resource;
 import javax.validation.Valid;
 import java.io.IOException;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
+import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -76,7 +71,7 @@ public class ExamPrintPlanController {
     @ApiOperation(value = "印刷计划查询")
     @RequestMapping(value = "/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
-    public Result findPrintPlanPage(@ApiParam(value = "印刷计划id") @RequestParam(required = false) String printPlanId,
+    public Result findPrintPlanPage(@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,
@@ -84,7 +79,11 @@ public class ExamPrintPlanController {
                                     @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
 
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
-        return ResultUtil.ok(examPrintPlanService.printPlanPage(schoolId, SystemConstant.convertIdToLong(printPlanId), status, startTime, endTime, pageNumber, pageSize));
+        if (Objects.isNull(printPlanIdList)){
+            printPlanIdList = new ArrayList<>();
+        }
+        List<Long> idList = printPlanIdList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList());
+        return ResultUtil.ok(examPrintPlanService.printPlanPage(schoolId, idList, status, startTime, endTime, pageNumber, pageSize));
     }
 
     @ApiOperation(value = "印刷计划模糊查询")
@@ -129,11 +128,12 @@ public class ExamPrintPlanController {
 
     /**
      * 关联试卷管理-查询
-     *
      * @param relateType
-     * @param printPlanId
+     * @param printPlanIdList 印刷计划id集合
      * @param courseCode
      * @param paperNumber
+     * @param userName 命题老师
+     * @param cardRuleName 题卡规则
      * @param pageNumber
      * @param pageSize
      * @return
@@ -141,12 +141,18 @@ public class ExamPrintPlanController {
     @ApiOperation(value = "关联试卷管理-查询")
     @RequestMapping(value = "/relate_list", method = RequestMethod.POST)
     public Result relateList(@RequestParam(value = "relateType", required = false) String relateType,
-                             @RequestParam(value = "printPlanId", required = false) Long printPlanId,
+                             @RequestParam(value = "printPlanId", required = false) List<String> printPlanIdList,
                              @RequestParam(value = "courseCode", required = false) String courseCode,
                              @RequestParam(value = "paperNumber", required = false) String paperNumber,
+                             @RequestParam(value = "userName", required = false) String userName,
+                             @RequestParam(value = "cardRuleName", required = false) String cardRuleName,
                              @RequestParam Integer pageNumber,
                              @RequestParam Integer pageSize) {
-        IPage<ExamTaskDetailDto> examTasks = examTaskDetailService.list(relateType, printPlanId, courseCode, paperNumber, pageNumber, pageSize);
+        if (Objects.isNull(printPlanIdList)){
+            printPlanIdList = new ArrayList<>();
+        }
+        List<Long> idList = printPlanIdList.stream().map(SystemConstant::convertIdToLong).collect(Collectors.toList());
+        IPage<ExamTaskDetailDto> examTasks = examTaskDetailService.list(relateType, idList, courseCode, paperNumber,userName,cardRuleName, pageNumber, pageSize);
         return ResultUtil.ok(examTasks);
     }
 

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

@@ -1,48 +1,22 @@
 package com.qmth.distributed.print.api;
 
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.qmth.boot.api.annotation.Aac;
 import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.boot.api.constant.ApiConstant;
-import com.qmth.distributed.print.business.bean.dto.ExamTaskDetailDto;
-import com.qmth.distributed.print.business.bean.dto.PrintTaskDto;
-import com.qmth.distributed.print.business.bean.dto.PrintTaskTotalDto;
-import com.qmth.distributed.print.business.bean.dto.RelatePaperDto;
-import com.qmth.distributed.print.business.bean.params.DeleteParams;
-import com.qmth.distributed.print.business.bean.params.PrintPlanParams;
-import com.qmth.distributed.print.business.bean.params.RelatePaperParam;
 import com.qmth.distributed.print.business.bean.params.SyncDataParam;
 import com.qmth.distributed.print.business.bean.result.EditResult;
-import com.qmth.distributed.print.business.entity.ExamDetail;
-import com.qmth.distributed.print.business.enums.ExamDetailStatusEnum;
 import com.qmth.distributed.print.business.enums.PrintPlanStatusEnum;
-import com.qmth.distributed.print.business.service.ExamDetailService;
 import com.qmth.distributed.print.business.service.ExamPrintPlanService;
-import com.qmth.distributed.print.business.service.ExamTaskDetailService;
-import com.qmth.distributed.print.business.service.ExamTaskService;
-import com.qmth.distributed.print.business.templete.execute.AsyncDownloadPdfTempleteService;
-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.service.TBTaskService;
 import com.qmth.teachcloud.common.util.Result;
 import com.qmth.teachcloud.common.util.ResultUtil;
 import com.qmth.teachcloud.common.util.ServletUtil;
 import io.swagger.annotations.*;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
-import javax.validation.Valid;
-import java.io.IOException;
-import java.util.Arrays;
+import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
-import java.util.Objects;
 
 /**
  * <p>
@@ -80,7 +54,9 @@ public class ExamPrintPlanSyncController {
                                     @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
 
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
-        return ResultUtil.ok(examPrintPlanService.printPlanPage(schoolId, SystemConstant.convertIdToLong(printPlanId), status, startTime, endTime, pageNumber, pageSize));
+        List<Long> idList = new ArrayList<>();
+        idList.add(SystemConstant.convertIdToLong(printPlanId));
+        return ResultUtil.ok(examPrintPlanService.printPlanPage(schoolId,idList , status, startTime, endTime, pageNumber, pageSize));
     }
 
     @ApiOperation(value = "云阅卷考试ID查询")

+ 28 - 9
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamTaskController.java

@@ -10,6 +10,7 @@ import com.qmth.distributed.print.business.bean.params.ExamTaskApplyParam;
 import com.qmth.distributed.print.business.bean.result.EditResult;
 import com.qmth.distributed.print.business.entity.*;
 import com.qmth.distributed.print.business.enums.ExamStatusEnum;
+import com.qmth.distributed.print.business.enums.MakeMethodEnum;
 import com.qmth.distributed.print.business.enums.MessageEnum;
 import com.qmth.distributed.print.business.enums.ReviewStatusEnum;
 import com.qmth.distributed.print.business.service.*;
@@ -54,7 +55,7 @@ import java.util.*;
 @Api(tags = "命题任务Controller")
 @RestController
 @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/${prefix.url.exam}/task")
-@Aac(strict = BOOL.FALSE, auth = BOOL.FALSE)
+//@Aac(strict = BOOL.FALSE, auth = BOOL.FALSE)
 public class ExamTaskController {
 
     @Autowired
@@ -91,7 +92,6 @@ public class ExamTaskController {
     AsyncCreatePdfTempleteService asyncCreatePdfTempleteService;
 
     /**
-     * 查询
      *
      * @param enable
      * @param status
@@ -100,6 +100,8 @@ public class ExamTaskController {
      * @param paperNumber
      * @param startTime
      * @param endTime
+     * @param userName 命题教师姓名
+     * @param createName 创建人姓名
      * @param pageNumber
      * @param pageSize
      * @return
@@ -108,14 +110,16 @@ public class ExamTaskController {
     @RequestMapping(value = "/list", method = RequestMethod.POST)
     public Result list(@RequestParam(required = false) Boolean enable,
                        @RequestParam(required = false) String status,
-                       @RequestParam(required = false) Long cardRuleId,
+                       @RequestParam(required = false) String cardRuleId,
                        @RequestParam(required = false) String courseCode,
                        @RequestParam(required = false) String paperNumber,
                        @RequestParam(required = false) Long startTime,
                        @RequestParam(required = false) Long endTime,
+                       @RequestParam(required = false) String userName,
+                       @RequestParam(required = false) String createName,
                        @RequestParam Integer pageNumber,
                        @RequestParam Integer pageSize) {
-        IPage<ExamTaskDto> examTasks = examTaskService.list(enable, status, cardRuleId, courseCode, paperNumber, startTime, endTime, pageNumber, pageSize);
+        IPage<ExamTaskDto> examTasks = examTaskService.list(enable, status, SystemConstant.convertIdToLong(cardRuleId), courseCode, paperNumber, startTime, endTime,userName,createName, pageNumber, pageSize);
         return ResultUtil.ok(examTasks);
     }
 
@@ -256,7 +260,6 @@ public class ExamTaskController {
 
     /**
      * 入库申请查询
-     *
      * @param auditStatus
      * @param reviewStatus
      * @param cardRuleId
@@ -264,6 +267,7 @@ public class ExamTaskController {
      * @param paperNumber
      * @param startTime
      * @param endTime
+     * @param userName 命题老师名称
      * @param pageNumber
      * @param pageSize
      * @return
@@ -277,9 +281,10 @@ public class ExamTaskController {
                                 @RequestParam(value = "paperNumber", required = false) String paperNumber,
                                 @RequestParam(value = "startTime", required = false) Long startTime,
                                 @RequestParam(value = "endTime", required = false) Long endTime,
+                                @RequestParam(value = "userName",required = false) String userName,
                                 @RequestParam("pageNumber") Integer pageNumber,
                                 @RequestParam("pageSize") Integer pageSize) {
-        IPage<ExamTaskDto> list = examTaskService.listTaskApply(auditStatus, reviewStatus, cardRuleId, courseCode, paperNumber, startTime, endTime, pageNumber, pageSize);
+        IPage<ExamTaskDto> list = examTaskService.listTaskApply(auditStatus, reviewStatus, cardRuleId, courseCode, paperNumber, startTime, endTime,userName, pageNumber, pageSize);
         return ResultUtil.ok(list);
     }
 
@@ -344,6 +349,9 @@ public class ExamTaskController {
      * @param cardRuleId
      * @param startTime
      * @param endTime
+     * @param startCreateTime 申请时间-起始
+     * @param endCreateTime 申请时间-终止
+     * @param createName 创建人
      * @param pageNumber
      * @param pageSize
      * @return
@@ -356,9 +364,12 @@ public class ExamTaskController {
                                           @RequestParam(value = "cardRuleId", required = false) Long cardRuleId,
                                           @RequestParam(value = "startTime", required = false) Long startTime,
                                           @RequestParam(value = "endTime", required = false) Long endTime,
+                                          @RequestParam(value = "startCreateTime",required = false) Long startCreateTime,
+                                          @RequestParam(value = "endCreateTime",required = false) Long endCreateTime,
+                                          @RequestParam(value = "createName",required = false) String createName,
                                           @RequestParam("pageNumber") Integer pageNumber,
                                           @RequestParam("pageSize") Integer pageSize) {
-        IPage<ExamTaskDto> examTaskDtoIPage = examTaskService.listTaskReviewUnaudited(courseCode, paperNumber, userId, cardRuleId, startTime, endTime, pageNumber, pageSize);
+        IPage<ExamTaskDto> examTaskDtoIPage = examTaskService.listTaskReviewUnaudited(courseCode, paperNumber, userId, cardRuleId, startTime, endTime,startCreateTime,endCreateTime,createName, pageNumber, pageSize);
         return ResultUtil.ok(examTaskDtoIPage);
     }
 
@@ -371,6 +382,9 @@ public class ExamTaskController {
      * @param cardRuleId
      * @param startTime
      * @param endTime
+     * @param startCreateTime 申请时间-起始
+     * @param endCreateTime 申请时间-终止
+     * @param createName 创建人
      * @param pageNumber
      * @param pageSize
      * @return
@@ -384,9 +398,12 @@ public class ExamTaskController {
                                         @RequestParam(value = "cardRuleId", required = false) Long cardRuleId,
                                         @RequestParam(value = "startTime", required = false) Long startTime,
                                         @RequestParam(value = "endTime", required = false) Long endTime,
+                                        @RequestParam(value = "startCreateTime",required = false) Long startCreateTime,
+                                        @RequestParam(value = "endCreateTime",required = false) Long endCreateTime,
+                                        @RequestParam(value = "createName",required = false) String createName,
                                         @RequestParam("pageNumber") Integer pageNumber,
                                         @RequestParam("pageSize") Integer pageSize) {
-        IPage<ExamTaskDto> examTaskDtoIPage = examTaskService.listTaskReviewAudited(reviewStatus, courseCode, paperNumber, userId, cardRuleId, startTime, endTime, pageNumber, pageSize);
+        IPage<ExamTaskDto> examTaskDtoIPage = examTaskService.listTaskReviewAudited(reviewStatus, courseCode, paperNumber, userId, cardRuleId, startTime, endTime,startCreateTime,endCreateTime,createName,pageNumber, pageSize);
         return ResultUtil.ok(examTaskDtoIPage);
     }
 
@@ -469,9 +486,11 @@ public class ExamTaskController {
                                 @RequestParam(value = "paperNumber", required = false) String paperNumber,
                                 @RequestParam(value = "startTime", required = false) Long startTime,
                                 @RequestParam(value = "endTime", required = false) Long endTime,
+                                @RequestParam(value = "makeMethod", required = false) MakeMethodEnum makeMethod,
+                                @RequestParam(value = "cardRuleName", required = false) String cardRuleName,
                                 @RequestParam("pageNumber") Integer pageNumber,
                                 @RequestParam("pageSize") Integer pageSize) {
-        IPage<ExamTaskDetailDto> examTaskDtoIPage = examTaskService.listTaskPaper(courseCode, paperNumber, startTime, endTime, pageNumber, pageSize);
+        IPage<ExamTaskDetailDto> examTaskDtoIPage = examTaskService.listTaskPaper(courseCode, paperNumber, startTime, endTime,makeMethod,cardRuleName, pageNumber, pageSize);
         return ResultUtil.ok(examTaskDtoIPage);
     }
 

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

@@ -3,6 +3,7 @@ package com.qmth.distributed.print.api;
 import com.qmth.boot.api.annotation.Aac;
 import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.distributed.print.business.bean.result.EditResult;
 import com.qmth.teachcloud.common.bean.dto.PrivilegeDto;
 import com.qmth.teachcloud.common.entity.SysPrivilege;
 import com.qmth.teachcloud.common.service.SysPrivilegeService;
@@ -40,8 +41,7 @@ public class SysPrivilegeController {
     @ApiOperation(value = "查询")
     @RequestMapping(value = "/list", method = RequestMethod.POST)
     public Result list() {
-        List<PrivilegeDto> privilegeDtoList = sysPrivilegeService.listPrivilegeTree();
-        return ResultUtil.ok(privilegeDtoList);
+        return ResultUtil.ok(sysPrivilegeService.listPrivilegeTreeNew());
     }
 
     /**
@@ -52,8 +52,7 @@ public class SysPrivilegeController {
     @ApiOperation(value = "查询需要授权的菜单")
     @RequestMapping(value = "/list_auth", method = RequestMethod.POST)
     public Result listAuth() {
-        List<PrivilegeDto> privilegeDtoList = sysPrivilegeService.listPrivilegeTreeAuth();
-        return ResultUtil.ok(privilegeDtoList);
+        return ResultUtil.ok(sysPrivilegeService.listPrivilegeTreeAuth());
     }
 
     /**
@@ -64,9 +63,8 @@ public class SysPrivilegeController {
      */
     @ApiOperation(value = "新增/修改")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
-    public Result save( @RequestBody SysPrivilege privilege) {
-        String id = sysPrivilegeService.savePrivilege(privilege);
-        return ResultUtil.ok(id,"");
+    public Result save(@RequestBody SysPrivilege privilege) {
+        return ResultUtil.ok(new EditResult(sysPrivilegeService.savePrivilege(privilege)));
     }
 
     /**
@@ -78,8 +76,7 @@ public class SysPrivilegeController {
     @ApiOperation(value = "删除")
     @RequestMapping(value = "/remove", method = RequestMethod.POST)
     public Result remove(@RequestBody SysPrivilege privilege) {
-        boolean isSuccess = sysPrivilegeService.remove(privilege.getId());
-        return ResultUtil.ok(isSuccess);
+        return ResultUtil.ok(sysPrivilegeService.remove(privilege.getId()));
     }
 
     /**
@@ -91,8 +88,7 @@ public class SysPrivilegeController {
     @ApiOperation(value = "角色已绑定权限列表")
     @RequestMapping(value = "/get_role_privileges", method = RequestMethod.POST)
     public Result getRolePrivileges(@RequestParam(value = "roleId", required = true) Long roleId) {
-        List<String> list = sysPrivilegeService.getRolePrivileges(roleId);
-        return ResultUtil.ok(list);
+        return ResultUtil.ok(sysPrivilegeService.getRolePrivileges(roleId));
     }
 }
 

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

@@ -1,9 +1,7 @@
 package com.qmth.distributed.print.api;
 
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.teachcloud.common.bean.dto.BlurryUserDto;
-import com.qmth.teachcloud.common.bean.dto.UserDto;
 import com.qmth.teachcloud.common.bean.params.UserSaveParams;
 import com.qmth.teachcloud.common.entity.SysUser;
 import com.qmth.teachcloud.common.service.SysUserService;
@@ -52,9 +50,10 @@ public class SysUserController {
     public Result list(@RequestParam(value = "loginName", required = false) String loginName,
                        @RequestParam(value = "roleId", required = false) String roleId,
                        @RequestParam(value = "enable", required = false) Boolean enable,
+                       @RequestParam(value = "realName", required = false) String realName,
                        @RequestParam(value = "pageNumber", required = true) Integer pageNumber,
                        @RequestParam(value = "pageSize", required = true) Integer pageSize) {
-        return ResultUtil.ok(sysUserService.list(loginName, roleId, enable, pageNumber, pageSize));
+        return ResultUtil.ok(sysUserService.list(loginName, roleId, enable,realName, pageNumber, pageSize));
     }
 
     /**

+ 78 - 0
distributed-print/src/test/java/com/qmth/distributed/print/AuthHelpTest.java

@@ -0,0 +1,78 @@
+package com.qmth.distributed.print;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.qmth.teachcloud.common.contant.SystemConstant;
+import com.qmth.teachcloud.common.entity.*;
+import com.qmth.teachcloud.common.enums.PrivilegeEnum;
+import com.qmth.teachcloud.common.service.*;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * @Description: 专门用来插入权限的帮助类
+ * @Author: CaoZixuan
+ * @Date: 2021-08-11
+ */
+@SpringBootTest
+@RunWith(SpringRunner.class)
+public class AuthHelpTest {
+    @Resource
+    SysUserService sysUserService;
+    @Resource
+    SysRoleService sysRoleService;
+    @Resource
+    SysUserRoleService sysUserRoleService;
+    @Resource
+    SysRolePrivilegeService sysRolePrivilegeService;
+    @Resource
+    SysPrivilegeService sysPrivilegeService;
+
+    @Test
+    public void createUserPrivilege(){
+        Long userId = 10L;
+        Long roleId = 2L;
+        List<Long> privilegeIdList = new ArrayList<>();
+        for (int i = 1; i<378 ;i ++){
+            privilegeIdList.add((long) i);
+        }
+
+
+        List<SysRolePrivilege> sysRolePrivilegeList = new ArrayList<>();
+        List<SysUserRole> sysUserRoleList = new ArrayList<>();
+
+
+        for (Long privilegeId : privilegeIdList) {
+            SysPrivilege sysPrivilege = sysPrivilegeService.getById(privilegeId);
+            if (Objects.isNull(sysPrivilege) || sysPrivilege.getType().equals(PrivilegeEnum.MENU)){
+                continue;
+            }
+            // 创建'sys_role_privilege' 表
+            SysRolePrivilege sysRolePrivilege = new SysRolePrivilege();
+            sysRolePrivilege.setEnable(true);
+            sysRolePrivilege.setId(SystemConstant.getDbUuid());
+            sysRolePrivilege.setPrivilegeId(privilegeId);
+            sysRolePrivilege.setRoleId(roleId);
+            sysRolePrivilegeList.add(sysRolePrivilege);
+
+            // 创建 'sys_user_role' 表
+            SysUserRole sysUserRole = new SysUserRole();
+            sysUserRole.setEnable(true);
+            sysUserRole.setId(SystemConstant.getDbUuid());
+            sysUserRole.setPrivilegeId(privilegeId);
+            sysUserRole.setRoleId(roleId);
+            sysUserRole.setUserId(userId);
+            sysUserRoleList.add(sysUserRole);
+        }
+        sysRolePrivilegeService.remove(new QueryWrapper<SysRolePrivilege>().lambda().eq(SysRolePrivilege::getRoleId,roleId));
+        sysUserRoleService.remove(new QueryWrapper<SysUserRole>().lambda().eq(SysUserRole::getUserId,userId));
+        sysRolePrivilegeService.saveBatch(sysRolePrivilegeList);
+        sysUserRoleService.saveBatch(sysUserRoleList);
+    }
+}

+ 53 - 4
teachcloud-common/src/main/java/com/qmth/teachcloud/common/bean/dto/PrivilegeDto.java

@@ -1,18 +1,23 @@
 package com.qmth.teachcloud.common.bean.dto;
 
+import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import com.qmth.teachcloud.common.enums.PrivilegeEnum;
+import io.swagger.annotations.ApiModelProperty;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
 /**
  * @Date: 2021/3/29.
  */
-public class PrivilegeDto {
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class PrivilegeDto implements Serializable {
 
-    private String id;
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long id;
     private String name;
     private String url;
     private PrivilegeEnum type;
@@ -22,11 +27,55 @@ public class PrivilegeDto {
     private Integer sequence;
     private List<PrivilegeDto> children = new ArrayList<>();
 
-    public String getId() {
+    @ApiModelProperty(value = "按钮权限集合")
+    List<MenuDto> buttons;
+
+    @ApiModelProperty(value = "链接权限集合")
+    List<MenuDto> links;
+
+    @ApiModelProperty(value = "数据列表权限集合")
+    List<MenuDto> lists;
+
+    @ApiModelProperty(value = "查询列表权限集合")
+    List<MenuDto> conditions;
+
+    public List<MenuDto> getButtons() {
+        return buttons;
+    }
+
+    public void setButtons(List<MenuDto> buttons) {
+        this.buttons = buttons;
+    }
+
+    public List<MenuDto> getLinks() {
+        return links;
+    }
+
+    public void setLinks(List<MenuDto> links) {
+        this.links = links;
+    }
+
+    public List<MenuDto> getLists() {
+        return lists;
+    }
+
+    public void setLists(List<MenuDto> lists) {
+        this.lists = lists;
+    }
+
+    public List<MenuDto> getConditions() {
+        return conditions;
+    }
+
+    public void setConditions(List<MenuDto> conditions) {
+        this.conditions = conditions;
+    }
+
+    public Long getId() {
         return id;
     }
 
-    public void setId(String id) {
+    public void setId(Long id) {
         this.id = id;
     }
 

+ 6 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/bean/result/MenuResult.java

@@ -1,5 +1,6 @@
 package com.qmth.teachcloud.common.bean.result;
 
+import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import com.qmth.teachcloud.common.bean.dto.MenuDto;
@@ -17,6 +18,7 @@ import java.util.Set;
  * @Author: wangliang
  * @Date: 2021/7/28
  */
+@JsonInclude(JsonInclude.Include.NON_NULL)
 public class MenuResult implements Serializable {
 
     @JsonSerialize(using = ToStringSerializer.class)
@@ -35,6 +37,10 @@ public class MenuResult implements Serializable {
         this.privileges = privileges;
     }
 
+    public MenuResult(List<MenuPrivilegeDto> privileges) {
+        this.privileges = privileges;
+    }
+
     public Long getUserId() {
         return userId;
     }

+ 12 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/entity/SysPrivilege.java

@@ -69,6 +69,18 @@ public class SysPrivilege extends BaseEntity implements Serializable {
     @TableField(value = "enable")
     private Boolean enable;
 
+    @ApiModelProperty(value = "是否显示,0:不显示,1:显示")
+    @TableField(value = "display")
+    private Boolean display;
+
+    public Boolean getDisplay() {
+        return display;
+    }
+
+    public void setDisplay(Boolean display) {
+        this.display = display;
+    }
+
     public Long getSchoolId() {
         return schoolId;
     }

+ 1 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/mapper/SysUserMapper.java

@@ -21,7 +21,7 @@ import java.util.Set;
  */
 public interface SysUserMapper extends BaseMapper<SysUser> {
 
-    IPage<UserDto> listPage(Page<UserDto> page, @Param("schoolId") Long schoolId, @Param("loginName") String loginName, @Param("roleId") String roleId, @Param("enable") Boolean enable);
+    IPage<UserDto> listPage(Page<UserDto> page, @Param("schoolId") Long schoolId, @Param("loginName") String loginName, @Param("roleId") String roleId, @Param("enable") Boolean enable,@Param("realName")String realName);
 
     List<BlurryUserDto> listUser(@Param("schoolId") Long schoolId, @Param("type") String type, @Param("courseCode") String courseCode, @Param("param") String param, @Param("orgIds") Set<Long> orgIds);
 

+ 2 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/mapper/TBTaskMapper.java

@@ -23,5 +23,6 @@ public interface TBTaskMapper extends BaseMapper<TBTask> {
                                        @Param("printPlanId") Long printPlanId,
                                        @Param("status") String status,
                                        @Param("type") String type,
-                                       @Param("result") String result);
+                                       @Param("result") String result,
+                                       @Param("createId")Long createId);
 }

+ 10 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysPrivilegeService.java

@@ -2,6 +2,7 @@ package com.qmth.teachcloud.common.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.teachcloud.common.bean.dto.PrivilegeDto;
+import com.qmth.teachcloud.common.bean.result.MenuResult;
 import com.qmth.teachcloud.common.entity.SysPrivilege;
 
 import java.util.List;
@@ -16,9 +17,17 @@ import java.util.List;
  */
 public interface SysPrivilegeService extends IService<SysPrivilege> {
 
+    @Deprecated
     List<PrivilegeDto> listPrivilegeTree();
 
-    String savePrivilege(SysPrivilege privilege);
+    /**
+     * 获取所有权限
+     *
+     * @return
+     */
+    List<PrivilegeDto> listPrivilegeTreeNew();
+
+    Long savePrivilege(SysPrivilege privilege);
 
     boolean remove(Long id);
 

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

@@ -21,7 +21,7 @@ import java.util.List;
  */
 public interface SysUserService extends IService<SysUser> {
 
-    IPage<UserDto> list(String loginName, String roleId, Boolean enable, Integer pageNumber, Integer pageSize);
+    IPage<UserDto> list(String loginName, String roleId, Boolean enable,String realName, Integer pageNumber, Integer pageSize);
 
     boolean saveUser(UserSaveParams userSaveParams);
 

+ 87 - 4
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysPrivilegeServiceImpl.java

@@ -2,7 +2,12 @@ package com.qmth.teachcloud.common.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.google.common.reflect.TypeToken;
+import com.google.gson.Gson;
+import com.qmth.teachcloud.common.bean.dto.MenuDto;
+import com.qmth.teachcloud.common.bean.dto.MenuPrivilegeDto;
 import com.qmth.teachcloud.common.bean.dto.PrivilegeDto;
+import com.qmth.teachcloud.common.bean.result.MenuResult;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.SysPrivilege;
 import com.qmth.teachcloud.common.entity.SysRolePrivilege;
@@ -13,9 +18,11 @@ import com.qmth.teachcloud.common.enums.PrivilegePropertyEnum;
 import com.qmth.teachcloud.common.mapper.SysPrivilegeMapper;
 import com.qmth.teachcloud.common.service.SysPrivilegeService;
 import com.qmth.teachcloud.common.service.SysRolePrivilegeService;
+import com.qmth.teachcloud.common.util.JacksonUtil;
 import com.qmth.teachcloud.common.util.ServletUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.LinkedMultiValueMap;
 
 import java.util.*;
 import java.util.stream.Collectors;
@@ -35,6 +42,7 @@ public class SysPrivilegeServiceImpl extends ServiceImpl<SysPrivilegeMapper, Sys
     private SysRolePrivilegeService sysRolePrivilegeService;
 
     @Override
+    @Deprecated
     public List<PrivilegeDto> listPrivilegeTree() {
         QueryWrapper<SysPrivilege> queryWrapper = new QueryWrapper<>();
         queryWrapper.lambda().orderByAsc(SysPrivilege::getParentId, SysPrivilege::getSequence)
@@ -43,7 +51,7 @@ public class SysPrivilegeServiceImpl extends ServiceImpl<SysPrivilegeMapper, Sys
         Map<Long, PrivilegeDto> map = new LinkedHashMap<>();
         for (SysPrivilege privilege : orgList) {
             PrivilegeDto privilegeDto = new PrivilegeDto();
-            privilegeDto.setId(String.valueOf(privilege.getId()));
+            privilegeDto.setId(privilege.getId());
             privilegeDto.setName(privilege.getName());
             privilegeDto.setUrl(privilege.getUrl());
             privilegeDto.setType(privilege.getType());
@@ -64,12 +72,87 @@ public class SysPrivilegeServiceImpl extends ServiceImpl<SysPrivilegeMapper, Sys
         for (Long key : deleteKeys) {
             map.remove(key);
         }
+        return new ArrayList<>(map.values());
+    }
+
+    /**
+     * 获取所有权限
+     *
+     * @return
+     */
+    @Override
+    public List<PrivilegeDto> listPrivilegeTreeNew() {
+        Long schoolId = SystemConstant.getHeadOrUserSchoolId();
+        QueryWrapper<SysPrivilege> sysPrivilegeQueryWrapper = new QueryWrapper<>();
+        sysPrivilegeQueryWrapper.lambda().eq(SysPrivilege::getSchoolId, schoolId)
+                .ne(SysPrivilege::getType, PrivilegeEnum.URL)
+                .eq(SysPrivilege::getDisplay, true);
+        List<SysPrivilege> sysPrivilegeList = this.list(sysPrivilegeQueryWrapper);
 
+        LinkedMultiValueMap<Long, MenuDto> linkedMultiValueMap = new LinkedMultiValueMap<>();
+        Map<Long, PrivilegeDto> map = new LinkedHashMap<>();
+        Gson gson = new Gson();
+        List<MenuDto> menuDtoList = gson.fromJson(JacksonUtil.parseJson(sysPrivilegeList), new TypeToken<List<MenuDto>>() {
+        }.getType());
+        for (MenuDto m : menuDtoList) {
+            if (Objects.isNull(m.getParentId()) || m.getType() == PrivilegeEnum.MENU) {
+                PrivilegeDto privilegeDto = new PrivilegeDto();
+                privilegeDto.setId(m.getId());
+                privilegeDto.setName(m.getName());
+                privilegeDto.setUrl(m.getUrl());
+                privilegeDto.setType(m.getType());
+                privilegeDto.setParentId(m.getParentId());
+                privilegeDto.setSequence(m.getSequence());
+                map.put(m.getId(), privilegeDto);
+            } else {
+                if (!linkedMultiValueMap.containsKey(m.getParentId())) {
+                    linkedMultiValueMap.add(m.getParentId(), m);
+                } else {
+                    List<MenuDto> menuDtos = linkedMultiValueMap.get(m.getParentId());
+                    menuDtos.add(m);
+                    linkedMultiValueMap.put(m.getParentId(), menuDtos);
+                }
+            }
+        }
+
+        Set<Long> deleteKeys = new HashSet<>();
+        map.forEach((k, v) -> {
+            List<MenuDto> menuDtos = linkedMultiValueMap.get(k);
+            List<MenuDto> buttons = null, links = null, lists = null, conditions = null;
+            if (Objects.nonNull(menuDtos)) {
+                for (MenuDto menuDto : menuDtos) {
+                    if (v.getId().longValue() == menuDto.getParentId().longValue() && menuDto.getType() == PrivilegeEnum.BUTTON) {
+                        buttons = Objects.isNull(buttons) ? new ArrayList<>() : buttons;
+                        buttons.add(gson.fromJson(gson.toJson(menuDto), MenuPrivilegeDto.class));
+                        v.setButtons(buttons);
+                    } else if (v.getId().longValue() == menuDto.getParentId().longValue() && menuDto.getType() == PrivilegeEnum.LINK) {
+                        links = Objects.isNull(links) ? new ArrayList<>() : links;
+                        links.add(gson.fromJson(gson.toJson(menuDto), MenuPrivilegeDto.class));
+                        v.setLinks(links);
+                    } else if (v.getId().longValue() == menuDto.getParentId().longValue() && menuDto.getType() == PrivilegeEnum.LIST) {
+                        lists = Objects.isNull(lists) ? new ArrayList<>() : lists;
+                        lists.add(gson.fromJson(gson.toJson(menuDto), MenuPrivilegeDto.class));
+                        v.setLists(lists);
+                    } else if (v.getId().longValue() == menuDto.getParentId().longValue() && menuDto.getType() == PrivilegeEnum.CONDITION) {
+                        conditions = Objects.isNull(conditions) ? new ArrayList<>() : conditions;
+                        conditions.add(gson.fromJson(gson.toJson(menuDto), MenuPrivilegeDto.class));
+                        v.setConditions(conditions);
+                    }
+                }
+            }
+            if (v.getParentId() > 0 && v.getType() == PrivilegeEnum.MENU) {
+                map.get(v.getParentId()).getChildren().add(v);
+                deleteKeys.add(k);
+            }
+        });
+        for (Long key : deleteKeys) {
+            map.remove(key);
+        }
         return new ArrayList<>(map.values());
     }
 
     @Override
-    public String savePrivilege(SysPrivilege privilege) {
+    public Long savePrivilege(SysPrivilege privilege) {
         QueryWrapper<SysPrivilege> queryWrapper = new QueryWrapper<>();
         queryWrapper.lambda().eq(SysPrivilege::getParentId, privilege.getParentId()).eq(SysPrivilege::getName, privilege.getName());
         SysPrivilege sysPrivilege = this.getOne(queryWrapper);
@@ -90,7 +173,7 @@ public class SysPrivilegeServiceImpl extends ServiceImpl<SysPrivilegeMapper, Sys
             }
             this.updateById(privilege);
         }
-        return String.valueOf(privilege.getId());
+        return privilege.getId();
     }
 
     @Override
@@ -126,7 +209,7 @@ public class SysPrivilegeServiceImpl extends ServiceImpl<SysPrivilegeMapper, Sys
         Map<Long, PrivilegeDto> map = new LinkedHashMap<>();
         for (SysPrivilege privilege : orgList) {
             PrivilegeDto privilegeDto = new PrivilegeDto();
-            privilegeDto.setId(String.valueOf(privilege.getId()));
+            privilegeDto.setId(privilege.getId());
             privilegeDto.setName(privilege.getName());
             privilegeDto.setUrl(privilege.getUrl());
             privilegeDto.setType(privilege.getType());

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

@@ -72,11 +72,11 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
     SysUserService sysUserService;
 
     @Override
-    public IPage<UserDto> list(String loginName, String roleId, Boolean enable, Integer pageNumber, Integer pageSize) {
+    public IPage<UserDto> list(String loginName, String roleId, Boolean enable,String realName, Integer pageNumber, Integer pageSize) {
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
 
         Page<UserDto> page = new Page<>(pageNumber, pageSize);
-        IPage<UserDto> userDtoIPage = this.baseMapper.listPage(page, schoolId, SystemConstant.translateSpecificSign(loginName), roleId, enable);
+        IPage<UserDto> userDtoIPage = this.baseMapper.listPage(page, schoolId, SystemConstant.translateSpecificSign(loginName), roleId, enable,SystemConstant.translateSpecificSign(realName));
         if (userDtoIPage.getRecords().size() > 0) {
             userDtoIPage.getRecords().forEach(m -> {
                 //角色

+ 2 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/TBTaskServiceImpl.java

@@ -199,7 +199,8 @@ public class TBTaskServiceImpl extends ServiceImpl<TBTaskMapper, TBTask> impleme
      */
     @Override
     public IPage<TaskListResult> query(IPage<Map> iPage, Long schoolId, Long printPlanId, TaskStatusEnum status, TaskTypeEnum type, TaskResultEnum result) {
-        return tbTaskMapper.query(iPage, schoolId, printPlanId, Objects.nonNull(status) ? status.name() : null, Objects.nonNull(type) ? type.name() : null, Objects.nonNull(result) ? result.name() : null);
+        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+        return tbTaskMapper.query(iPage, schoolId, printPlanId, Objects.nonNull(status) ? status.name() : null, Objects.nonNull(type) ? type.name() : null, Objects.nonNull(result) ? result.name() : null,sysUser.getId());
     }
 
     /**

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

@@ -755,7 +755,7 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
         redisUtil.setUserSession(sessionId, tbSession, expireTime.getExpireSeconds());
 
         LoginResult loginResult = new LoginResult(sysUser, sessionId, test, Objects.nonNull(roleTypes) && roleTypes.size() > 0 ? roleTypes : roleNames, appSource);
-//        LoginResult loginResult = new LoginResult(sysUser, sessionId, token, roleTypes, appSource);
+//        LoginResult loginResult = new LoginResult(sysUser, sessionId, token, Objects.nonNull(roleTypes) && roleTypes.size() > 0 ? roleTypes : roleNames, appSource);
         loginResult.setSchoolInfo(Objects.nonNull(authBean.getSchool()) ? loginResult.new SchoolNativeBean(authBean.getSchool()) : null);
         loginResult.setOrgInfo(Objects.nonNull(authBean.getOrg()) ? loginResult.new OrgNativeBean(authBean.getOrg()) : null);
         loginResult.setTime(System.currentTimeMillis());

+ 3 - 0
teachcloud-common/src/main/resources/mapper/SysUserMapper.xml

@@ -50,6 +50,9 @@
             <if test="enable != null">
                 and a.enable = #{enable}
             </if>
+            <if test="realName != null and realName != ''">
+                and a.real_name like concat('%', #{realName} , '%')
+            </if>
         </where>
         order by a.create_time desc
     </select>

+ 3 - 0
teachcloud-common/src/main/resources/mapper/TBTaskMapper.xml

@@ -43,6 +43,9 @@
                 <if test="result != null and result != ''">
                     and tbt.result = #{result}
                 </if>
+                <if test="createId != null and createId != ''">
+                    and tbt.create_id = #{createId}
+                </if>
             </where>
             order by tbt.create_time desc
     </select>