wangliang 2 anni fa
parent
commit
c81e89670b
69 ha cambiato i file con 84 aggiunte e 2095 eliminazioni
  1. 0 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamTaskDetailMapper.java
  2. 0 57
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamTaskMapper.java
  3. 0 9
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/TCStatisticsTempMapper.java
  4. 0 10
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/TFFlowLogMapper.java
  5. 0 8
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/BasicPrintConfigService.java
  6. 0 9
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/BasicTemplateOrgService.java
  7. 0 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/DataSyncService.java
  8. 0 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamCardService.java
  9. 0 7
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamDetailCourseService.java
  10. 63 53
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamDetailService.java
  11. 4 6
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamPaperStructureService.java
  12. 1 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamPrintPlanService.java
  13. 0 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamStudentService.java
  14. 2 4
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamTaskDetailService.java
  15. 2 5
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamTaskPrintService.java
  16. 0 57
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamTaskService.java
  17. 0 10
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/GradeBatchService.java
  18. 1 13
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/GradePaperDimensionService.java
  19. 0 9
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/PrintCommonService.java
  20. 0 8
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TCStatisticsService.java
  21. 0 9
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TCStatisticsTempService.java
  22. 0 8
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TFCustomFlowEntityService.java
  23. 0 11
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TFFlowLogService.java
  24. 0 17
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicPrintConfigServiceImpl.java
  25. 2 18
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicTemplateOrgServiceImpl.java
  26. 0 24
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/DataSyncServiceImpl.java
  27. 0 6
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamCardServiceImpl.java
  28. 0 7
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamDetailCourseServiceImpl.java
  29. 0 19
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamDetailServiceImpl.java
  30. 0 7
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPaperStructureServiceImpl.java
  31. 0 7
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamStudentServiceImpl.java
  32. 0 5
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskDetailServiceImpl.java
  33. 4 10
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskPrintServiceImpl.java
  34. 1 225
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java
  35. 0 36
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/GradeBatchServiceImpl.java
  36. 0 20
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/GradePaperDimensionServiceImpl.java
  37. 0 43
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/PrintCommonServiceImpl.java
  38. 0 29
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TCStatisticsServiceImpl.java
  39. 0 12
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TCStatisticsServiceTempImpl.java
  40. 0 13
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TFCustomFlowEntityServiceImpl.java
  41. 0 13
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TFFlowLogServiceImpl.java
  42. 1 14
      distributed-print-business/src/main/resources/mapper/ExamTaskDetailMapper.xml
  43. 1 242
      distributed-print-business/src/main/resources/mapper/ExamTaskMapper.xml
  44. 0 46
      distributed-print-business/src/main/resources/mapper/TCStatisticsTempMapper.xml
  45. 0 9
      distributed-print-business/src/main/resources/mapper/TFFlowLogMapper.xml
  46. 0 20
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/mapper/SysOrgMapper.java
  47. 0 24
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/mapper/SysUserMapper.java
  48. 0 45
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/AttachmentCommonService.java
  49. 0 11
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/BasicAttachmentService.java
  50. 0 9
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/BasicCourseService.java
  51. 2 27
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysOrgService.java
  52. 0 29
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysPrivilegeService.java
  53. 0 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysRoleCourseService.java
  54. 0 3
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysRoleService.java
  55. 0 2
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysUserRoleService.java
  56. 0 35
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysUserService.java
  57. 0 44
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/TeachcloudCommonService.java
  58. 0 140
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/AttachmentCommonServiceImpl.java
  59. 0 31
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/BasicAttachmentServiceImpl.java
  60. 0 22
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/BasicCourseServiceImpl.java
  61. 0 32
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysOrgServiceImpl.java
  62. 0 49
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysPrivilegeServiceImpl.java
  63. 0 7
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysRoleCourseServiceImpl.java
  64. 0 50
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysRoleServiceImpl.java
  65. 0 28
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysUserRoleServiceImpl.java
  66. 0 86
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysUserServiceImpl.java
  67. 0 202
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/TeachcloudCommonServiceImpl.java
  68. 0 29
      teachcloud-common/src/main/resources/mapper/SysOrgMapper.xml
  69. 0 46
      teachcloud-common/src/main/resources/mapper/SysUserMapper.xml

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

@@ -22,7 +22,5 @@ import java.util.Set;
 public interface ExamTaskDetailMapper extends BaseMapper<ExamTaskDetail> {
     IPage<ExamTaskDetailDto> listPage(Page<ExamTaskDetailDto> page, @Param("schoolId") Long schoolId, @Param("relateType") String relateType, @Param("printPlanIdList") List<Long> printPlanIdList, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("userName") String userName, @Param("cardRuleId") Long cardRuleId, @Param("orgIds") Set<Long> orgIds);
 
-    List<ExamTaskDetail> listByTemplateId(Long templateId);
-
     List<String> listExamDetailCourse(@Param("schoolId") Long schoolId, @Param("paperType") String paperType, @Param("printPlanId") Long printPlanId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber);
 }

+ 0 - 57
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamTaskMapper.java

@@ -42,39 +42,6 @@ public interface ExamTaskMapper extends BaseMapper<ExamTask> {
 
     ExamTaskDetailCardDto applyGetOne(@Param("examTaskId") Long examTaskId, @Param("source") String source);
 
-    /**
-     * 查询我的工作台
-     *
-     * @param iPage
-     * @param userId
-     * @param schoolId
-     * @param status
-     * @return
-     */
-    IPage<WorkResult> queryByMyWork(IPage<Map> iPage,
-                                    @Param("userId") Long userId,
-                                    @Param("schoolId") Long schoolId,
-                                    @Param("status") String... status);
-
-    IPage<WorkResult> queryUserByMyWork(IPage<Map> iPage,
-                                        @Param("userId") Long userId,
-                                        @Param("schoolId") Long schoolId,
-                                        @Param("status") String... status);
-
-    /**
-     * 查询我的工作台
-     *
-     * @param iPage
-     * @param userId
-     * @param schoolId
-     * @param status
-     * @return
-     */
-    IPage<WorkResult> queryByMyWorkSubmit(IPage<Map> iPage,
-                                          @Param("userId") Long userId,
-                                          @Param("schoolId") Long schoolId,
-                                          @Param("status") String... status);
-
     IPage<ClientExamTaskDto> listClientExamTaskPage(Page<ClientExamTaskDto> page, @Param("schoolId") Long schoolId, @Param("machineCode") String machineCode, @Param("printPlanId") Long printPlanId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("isTry") Boolean isTry, @Param("isPass") Boolean isPass, @Param("orgId") Long orgId, @Param("printPlanStatus") String printPlanStatus, @Param("examDetailStatus") String[] examDetailStatus);
 
     List<ClientExamTaskDto> listClientExamTaskPage(@Param("schoolId") Long schoolId, @Param("machineCode") String machineCode, @Param("printPlanId") Long printPlanId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("isTry") Boolean isTry, @Param("isPass") Boolean isPass, @Param("orgId") Long orgId, @Param("printPlanStatus") String printPlanStatus, @Param("examDetailStatus") String[] examDetailStatus);
@@ -114,22 +81,6 @@ public interface ExamTaskMapper extends BaseMapper<ExamTask> {
      */
     List<ExamTask> findByFlowStatus(@Param("schoolId") Long schoolId, @Param("courseCode") String courseCode, @Param("courseName") String courseName, @Param("paperNumber") String paperNumber, @Param("flowStatus") String flowStatus);
 
-    /**
-     * 获取自己可以审核的流程id集合
-     *
-     * @param currentUserId
-     * @return
-     */
-    List<Long> findFlowIdToMySelf(@Param("currentUserId") Long currentUserId);
-
-    /**
-     * 获取不是自己可以审核的流程id集合
-     *
-     * @param currentUserId
-     * @return
-     */
-    List<Long> findFlowIdToNotMySelf(@Param("currentUserId") Long currentUserId);
-
     /**
      * 根据试卷编号查询考场详细数据集(印刷计划状态为‘PRINTING’、‘PRINTING_FINISH‘的)
      *
@@ -141,14 +92,6 @@ public interface ExamTaskMapper extends BaseMapper<ExamTask> {
 
     ExamTask findByFlowId(@Param("flowId") Long flowId);
 
-    /**
-     * 获取ProcessDefinitionId
-     *
-     * @param key
-     * @return
-     */
-    String getProcessDefinitionIdByMaxVersion(@Param("key") String key);
-
     ExamTaskDto getByExamTaskId(Long examTaskId);
 
     IPage<ExamTaskDetailDto> listExamTaskDetailDownload(@Param("page") Page<ExamTaskDetailDto> page, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("courseName") String courseName, @Param("orgIds") Set<Long> orgIds);

+ 0 - 9
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/TCStatisticsTempMapper.java

@@ -17,15 +17,6 @@ import java.util.List;
  */
 public interface TCStatisticsTempMapper extends BaseMapper<TCStatisticsTemp> {
 
-    /**
-     * 根据批次号查找印刷计划信息
-     *
-     * @param schoolId
-     * @param batchNo
-     * @return
-     */
-    public List<TCStatisticsTemp> findByBatchNo(@Param("schoolId") Long schoolId, @Param("batchNo") String batchNo);
-
     /**
      * 根据批次号查找印刷计划信息
      *

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

@@ -35,16 +35,6 @@ public interface TFFlowLogMapper extends BaseMapper<TFFlowLog> {
      */
     List<TFFlowLogResult> findByObjectId(@Param("objectId") Long objectId);
 
-    /**
-     * 查找最后一条审批记录
-     *
-     * @param flowId
-     * @param schoolId
-     * @param approveOperation
-     * @return
-     */
-    TFFlowLog findByLast(@Param("flowId") Long flowId, @Param("schoolId") Long schoolId, @Param("approveOperation") String approveOperation);
-
     /**
      * 根据流程id查询审批表
      *

+ 0 - 8
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/BasicPrintConfigService.java

@@ -30,14 +30,6 @@ public interface BasicPrintConfigService extends IService<BasicPrintConfig> {
      */
     BasicPrintConfig getByExamIdAndCourseCode(Long examId, String courseCode);
 
-    /**
-     * 根据课程代码和试卷编号获取印品
-     * @param courseCode 课程代码
-     * @param paperNumber 试卷编号
-     * @return BasicPrintConfig
-     */
-    BasicPrintConfig getByCourseCodeAndPaperNumber(String courseCode, String paperNumber);
-
     /**
      * 根据examId和orgId查询印品
      *

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

@@ -31,13 +31,4 @@ public interface BasicTemplateOrgService extends IService<BasicTemplateOrg> {
      * @return 模板信息集合
      */
     List<TemplatePrintInfoResult> findTemplateInfoByOrgIds(List<Long> ids);
-
-    /**
-     * 查询基础机构模板对应关系根据课程编号
-     * @param courseCode 课程编号
-     * @param templateTypeEnum 类型
-     * @param schoolId 学校id
-     * @return 对应关系
-     */
-    List<BasicTemplateOrg> findByCourseCodeAndType(String courseCode,TemplateTypeEnum templateTypeEnum,Long schoolId);
 }

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

@@ -8,8 +8,6 @@ import com.qmth.teachcloud.common.entity.SysUser;
  * 同步数据到云阅卷 服务类
  */
 public interface DataSyncService {
-    void syncToCloudReview();
-
     void syncExamAndStudentAndCard(Long relateId, String thirdRelateName, Long examEndTime, TBSyncTask tbSyncTask, SysUser sysUser);
 
     void syncPaperStructureAndGroup(ExamPaperStructure examPaperStructure, TBSyncTask tbSyncTask);

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

@@ -33,8 +33,6 @@ public interface ExamCardService extends IService<ExamCard> {
 
     ExamCard getOneByTemplateId(Long id);
 
-    boolean usedCardByTemplateId(Long id);
-
     List<ExamCard> listSelectCard(String courseCode, Long cardRuleId);
 
     void downloadFiles(HttpServletResponse response, ArraysParams arraysParams) throws Exception;

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

@@ -18,13 +18,6 @@ import java.util.Set;
  */
 public interface ExamDetailCourseService extends IService<ExamDetailCourse> {
 
-    /**
-     * 根据考务场次id查询卷袋数
-     * @param examDetailId 考务数据场次id
-     * @return 该场次下卷代数
-     */
-    double calculatePackagesByDetailId(Long examDetailId);
-
     List<Map<String, Object>> listByExamDetailId(Long examDetailId);
 
     void updatePaperNumber(List<Long> examDetailCourseIds, String paperNumber, String relatePaperType);

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

@@ -28,8 +28,10 @@ import java.util.Set;
  * @since 2021-03-23
  */
 public interface ExamDetailService extends IService<ExamDetail> {
+
     /**
      * 计算印刷计划下的总科次
+     *
      * @param printPlanId 印刷计划id
      * @return 该印刷计划下总科次
      */
@@ -37,19 +39,21 @@ public interface ExamDetailService extends IService<ExamDetail> {
 
     /**
      * 计算印刷计划下的总卷袋数
+     *
      * @param printPlanId 印刷计划id
      * @return 该印刷计划下总卷袋数
      */
     double calculateTotalPackages(Long printPlanId);
 
-    IPage<PrintTaskDto> listPrintTask(Long printPlanId, String status, String courseCode, String paperNumber, String examPlace, String examRoom, Long examStartTime, Long examEndTime, Long printStartTime, Long printEndTime,Long printHouseId, Integer pageNumber, Integer pageSize);
+    IPage<PrintTaskDto> listPrintTask(Long printPlanId, String status, String courseCode, String paperNumber, String examPlace, String examRoom, Long examStartTime, Long examEndTime, Long printStartTime, Long printEndTime, Long printHouseId, Integer pageNumber, Integer pageSize);
 
-    PrintTaskTotalDto taskTotalData(Long printPlanId, String status, String courseCode, String paperNumber, String examPlace, String examRoom, Long examStartTime, Long examEndTime, Long printStartTime, Long printEndTime,Long printHouseId);
+    PrintTaskTotalDto taskTotalData(Long printPlanId, String status, String courseCode, String paperNumber, String examPlace, String examRoom, Long examStartTime, Long examEndTime, Long printStartTime, Long printEndTime, Long printHouseId);
 
     List<JSONObject> taskViewPDF(Long examDetailId);
 
     /**
      * 查询有效的考务字段
+     *
      * @param schoolId 学校id
      * @return 考务字段
      */
@@ -57,6 +61,7 @@ public interface ExamDetailService extends IService<ExamDetail> {
 
     /**
      * 考务数据模板下载
+     *
      * @param schoolId 学校id
      * @return 是否成功
      */
@@ -65,73 +70,78 @@ public interface ExamDetailService extends IService<ExamDetail> {
 
     /**
      * 查询考务数据-简略
-     * @param schoolId 学校id
+     *
+     * @param schoolId        学校id
      * @param printPlanIdList 印刷计划id集合
-     * @param courseCode 课程代码
-     * @param paperNumber 试卷编号
-     * @param examPlace 考点
-     * @param examRoom 考场
-     * @param packageCode 卷袋编号
-     * @param pageNumber 分页页码
-     * @param startDate 考试开始日期
-     * @param endDate 考试结束日期
-     * @param pageSize 分页数量
-     * @param orgIds 权限控制参数
+     * @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, List<Long> printPlanIdList, String courseCode, String paperNumber,
-                                                      String examPlace, String examRoom, String packageCode,Long startDate,Long endDate, int pageNumber, int pageSize, Set<Long> orgIds);
+                                                      String examPlace, String examRoom, String packageCode, Long startDate, Long endDate, int pageNumber, int pageSize, Set<Long> orgIds);
 
     /**
      * 查询考务数据-汇总数据查询
-     * @param schoolId 学校id
+     *
+     * @param schoolId        学校id
      * @param printPlanIdList 印刷计划id集合
-     * @param courseCode 课程代码
-     * @param paperNumber 试卷编号
-     * @param examPlace 考点
-     * @param examRoom 考场
-     * @param packageCode 卷袋编号
-     * @param startDate 考试日期-起始
-     * @param endDate 考试日期-终止
-     * @param orgIds 权限控制参数
+     * @param courseCode      课程代码
+     * @param paperNumber     试卷编号
+     * @param examPlace       考点
+     * @param examRoom        考场
+     * @param packageCode     卷袋编号
+     * @param startDate       考试日期-起始
+     * @param endDate         考试日期-终止
+     * @param orgIds          权限控制参数
      * @return 查询结果
      */
-    SummarizedDataResult findSummarizedData(Long schoolId,List<Long> printPlanIdList,String courseCode,String paperNumber,
-                                            String examPlace,String examRoom,String packageCode,Long startDate,Long endDate,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 printPlanIdList 印刷计划id集合
-     * @param courseCode 课程代码
-     * @param paperNumber 试卷编号
-     * @param examPlace 考点
-     * @param examRoom 考场
-     * @param studentParams 学生查询参数
-     * @param startDate 考试日期-起始
-     * @param endDate 考试日期-终止
-     * @param pageNumber 分页页码
-     * @param pageSize 分页数量
+     * @param courseCode      课程代码
+     * @param paperNumber     试卷编号
+     * @param examPlace       考点
+     * @param examRoom        考场
+     * @param studentParams   学生查询参数
+     * @param startDate       考试日期-起始
+     * @param endDate         考试日期-终止
+     * @param pageNumber      分页页码
+     * @param pageSize        分页数量
      * @return 查询结果
      */
-    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 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);
 
     /**
      * 查询印刷计划下考点数据源
-     * @return 考点集合
+     *
      * @param param
      * @param printPlanIdList
+     * @return 考点集合
      */
     List<String> findExamPlaceDatasource(String param, List<Long> printPlanIdList);
 
     /**
      * 查询印刷计划下考场数据源
-     * @return 考场集合
+     *
      * @param param
      * @param printPlanId
+     * @return 考场集合
      */
     List<String> findExamRoomDatasource(String param, List<Long> printPlanId);
 
@@ -143,8 +153,9 @@ public interface ExamDetailService extends IService<ExamDetail> {
 
     /**
      * 根据考务数据Excel数据处理考务-场次表
-     * @param dataList Excel处理后的数据
-     * @param userId 当前用户id
+     *
+     * @param dataList           Excel处理后的数据
+     * @param userId             当前用户id
      * @param serialNumberParams 序列号生成参数
      * @param sysUser
      */
@@ -152,34 +163,33 @@ public interface ExamDetailService extends IService<ExamDetail> {
 
     /**
      * 根据考务数据Excel数据处理考务-科目表
+     *
      * @param dataList Excel处理后的数据
-     * @param userId 当前用户id
+     * @param userId   当前用户id
      */
-    void disposeExamDetailCourseByExaminationExcel(List<ExaminationImportDto> dataList,Long userId, SysUser sysUser);
+    void disposeExamDetailCourseByExaminationExcel(List<ExaminationImportDto> dataList, Long userId, SysUser sysUser);
 
     /**
      * 根据考务数据Excel数据处理考务-学生表
+     *
      * @param dataList Excel处理后的数据
-     * @param userId 当前用户id
+     * @param userId   当前用户id
      */
-    void disposeExamStudentByExaminationExcel(List<ExaminationImportDto> dataList,Long userId, SysUser sysUser);
+    void disposeExamStudentByExaminationExcel(List<ExaminationImportDto> dataList, Long userId, SysUser sysUser);
 
     /**
      * 删除考务数据
+     *
      * @param printPlanId 印刷计划id
      * @param source
      */
     void deleteExaminationData(Long printPlanId, ExamDataSourceEnum source);
 
-
-
     List<ExamDetail> listByPrintPlanIdAndCourseCodeAndPaperNumber(Long schoolId, Long printPlanId, String courseCode, String paperNumber);
 
-
-    List<ExamDetail> listByExamPrintId(Long printPlanId);
-
     /**
      * 查询考务数据-场次导出数据源
+     *
      * @param map 考务数据查询条件键值对
      * @return 导出数据源
      */
@@ -191,8 +201,6 @@ public interface ExamDetailService extends IService<ExamDetail> {
 
     List<Map> listStudentByExamDetailCourseId(Long schoolId, Long examDetailCourseId, String ticketNumber, String type);
 
-    List<ExamDetail> listByCourseCodeAndPaperNumberAndPaperTypeIsNull(Long schoolId, String courseCode, String paperNumber);
-
     List<ExamDetail> listByCourseCodeAndPaperNumber(Long schoolId, String courseCode, String paperNumber);
 
     List<ExamDetailCourse> listSyncPaperNumberByPrintPlanId(Long printPlanId);
@@ -201,7 +209,8 @@ public interface ExamDetailService extends IService<ExamDetail> {
 
     /**
      * 根据班级id组查找班级名称组
-     * @param clazzIds 班级id组(字符串)
+     *
+     * @param clazzIds  班级id组(字符串)
      * @param separator 分隔符 默认","
      * @return 班级名称组
      */
@@ -209,8 +218,9 @@ public interface ExamDetailService extends IService<ExamDetail> {
 
     /**
      * 根据班级id组查找班级名称组
+     *
      * @param clazzIdList 班级id组(集合)
-     * @param separator 分隔符 默认","
+     * @param separator   分隔符 默认","
      * @return 班级名称组
      */
     String findClazzNamesByClazzIds(List<Long> clazzIdList, String separator);

+ 4 - 6
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamPaperStructureService.java

@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.distributed.print.business.bean.marking.CardJpgResult;
 import com.qmth.distributed.print.business.bean.marking.Question;
 import com.qmth.distributed.print.business.entity.ExamPaperStructure;
-import com.qmth.distributed.print.business.enums.ExamPaperStructureStatusEnum;
 import com.qmth.teachcloud.common.bean.dto.stmms.ExamCloudPaperStructDto;
 import com.qmth.teachcloud.common.entity.SysUser;
 import com.qmth.teachcloud.common.enums.QuestionType;
@@ -29,17 +28,15 @@ public interface ExamPaperStructureService extends IService<ExamPaperStructure>
 
     ExamPaperStructure uploadAnswer(String id, String md5, MultipartFile file);
 
-    void updateStatusById(Long id, ExamPaperStructureStatusEnum startSync);
-
     List<Map> preStructure(Long id);
 
-
     /**
      * 解析云阅卷试卷结构
+     *
      * @param examCloudPaperStructDtoList 云阅卷试卷结构集合
      * @return 标准题目集合 <OBJECTIVE,list> <SUBJECTIVE,list>
      */
-    Map<QuestionType,List<Question>> parseExamCloudPaperStruct(List<ExamCloudPaperStructDto> examCloudPaperStructDtoList);
+    Map<QuestionType, List<Question>> parseExamCloudPaperStruct(List<ExamCloudPaperStructDto> examCloudPaperStructDtoList);
 
     long countByPropositionTeacherId();
 
@@ -47,7 +44,7 @@ public interface ExamPaperStructureService extends IService<ExamPaperStructure>
      * 评卷参数提交
      *
      * @param evaluationParameterStr 评卷参数
-     * @param requestUser          请求人(命题老师)
+     * @param requestUser            请求人(命题老师)
      * @return 试卷结构
      */
     ExamPaperStructure submitExamPaperParams(String evaluationParameterStr, SysUser requestUser);
@@ -72,6 +69,7 @@ public interface ExamPaperStructureService extends IService<ExamPaperStructure>
 
     /**
      * 绑定科组长
+     *
      * @param data data
      */
     ExamPaperStructure bindMarkLeader(String data);

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

@@ -25,6 +25,7 @@ import java.util.Map;
  * @since 2021-03-23
  */
 public interface ExamPrintPlanService extends IService<ExamPrintPlan> {
+
     /**
      * 印刷计划分页查询
      *

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

@@ -21,8 +21,6 @@ import java.util.Map;
  */
 public interface ExamStudentService extends IService<ExamStudent> {
 
-    void updatePaperType(List<Long> examDetailCourseIds, String relatePaperType);
-
     List<String> listByExamDetailCourseId(String examDetailCourseId);
 
     Map<String, Object> getStudentDetail(Long id);

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

@@ -25,7 +25,7 @@ public interface ExamTaskDetailService extends IService<ExamTaskDetail> {
 
     boolean updatePaper(RelatePaperParam paperParam) throws IOException;
 
-    IPage<ExamTaskDetailDto> list(String relateType, List<Long> printPlanId, String courseCode, String paperNumber,String userName,Long cardRuleId, Integer pageNumber, Integer pageSize);
+    IPage<ExamTaskDetailDto> list(String relateType, List<Long> printPlanId, String courseCode, String paperNumber, String userName, Long cardRuleId, Integer pageNumber, Integer pageSize);
 
     List<ExamTaskDetail> listByCardId(Long cardId);
 
@@ -33,9 +33,7 @@ public interface ExamTaskDetailService extends IService<ExamTaskDetail> {
 
     void resetCardId(Long id);
 
-    List<ExamTaskDetail> listByTemplateId(Long templateId);
-
-    List<Map<String, String>>  getPaperUrl(Long schoolId, Long printPlanId, Long examTaskId);
+    List<Map<String, String>> getPaperUrl(Long schoolId, Long printPlanId, Long examTaskId);
 
     boolean paperUpdate(ExamTaskDetail examTaskDetail);
 

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

@@ -1,15 +1,13 @@
 package com.qmth.distributed.print.business.service;
 
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.distributed.print.business.bean.dto.ExamTaskPrintDto;
-import com.qmth.teachcloud.common.bean.dto.TaskPrintClassDto;
 import com.qmth.distributed.print.business.bean.dto.TaskPrintExtendFieldsDto;
 import com.qmth.distributed.print.business.bean.dto.TaskPrintHouseDto;
 import com.qmth.distributed.print.business.bean.params.ExamTaskPrintParams;
-import com.qmth.teachcloud.common.entity.BasicStudent;
 import com.qmth.distributed.print.business.entity.ExamDetail;
 import com.qmth.distributed.print.business.entity.ExamTaskPrint;
+import com.qmth.teachcloud.common.bean.dto.TaskPrintClassDto;
 
 import java.io.IOException;
 import java.util.List;
@@ -23,8 +21,6 @@ import java.util.List;
  * @since 2021-08-02
  */
 public interface ExamTaskPrintService extends IService<ExamTaskPrint> {
-    IPage<BasicStudent> listStudentByClass(String classId, Integer pageNumber, Integer pageSize);
-
     void remove(Long examTaskPrintId);
 
     ExamTaskPrintDto listTaskPrint(Long printPlanId, String courseCode, String paperNumber);
@@ -46,6 +42,7 @@ public interface ExamTaskPrintService extends IService<ExamTaskPrint> {
      * 考务数据选择班级,优先查看基础信息里是否有当前用户自己在基础管理里创建的数据,如果没有选择字典
      * 如果基础管理创建的班级数据,无命题老师想选择的,选择班级下拉列表应该有一个选项,创建班级
      * </p>
+     *
      * @param courseCode 课程编号
      * @return 结果
      */

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

@@ -12,7 +12,6 @@ import com.qmth.distributed.print.business.entity.ExamTask;
 import com.qmth.distributed.print.business.entity.ExamTaskApplyTemp;
 import com.qmth.distributed.print.business.entity.ExamTaskDetail;
 import com.qmth.distributed.print.business.entity.ExamTaskReviewLog;
-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;
@@ -37,7 +36,6 @@ public interface ExamTaskService extends IService<ExamTask> {
 
     List<ExamTask> listByCourseCode(Long schoolId, String code);
 
-
     IPage<ExamTaskDto> list(Long semesterId, Long examId, 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, List<Long> printPlanIdList);
@@ -48,9 +46,6 @@ public interface ExamTaskService extends IService<ExamTask> {
 
     boolean enable(ExamTask examTask);
 
-    @Deprecated
-    ExamTask saveExamTask(ExamTask examTask);
-
     /**
      * 保存命题任务新
      *
@@ -71,8 +66,6 @@ public interface ExamTaskService extends IService<ExamTask> {
 
     boolean taskReviewSave(ExamTaskReviewLog taskReviewLog) throws IOException;
 
-    boolean taskReviewSaveBatch(ExamTaskReviewLog taskReviewLog) throws IOException;
-
     IPage<ExamTaskDetailDto> listTaskPaper(Long semesterId, Long examId, String courseCode, String paperNumber, Long startTime, Long endTime, MakeMethodEnum makeMethodEnum, Long cardRuleId, Integer pageNumber, Integer pageSize);
 
     List<RelatePaperDto> listPaperTypes(Long examTaskId, Long printPlanId, String courseCode);
@@ -83,30 +76,6 @@ public interface ExamTaskService extends IService<ExamTask> {
 
     ExamTaskDetailCardDto applyGetOne(Long examTaskId, String source);
 
-    /**
-     * 查询我的工作台
-     *
-     * @param iPage
-     * @param userId
-     * @param schoolId
-     * @param status
-     * @return
-     */
-    IPage<WorkResult> queryByMyWork(IPage<Map> iPage, Long userId, Long schoolId, String... status);
-
-    IPage<WorkResult> queryUserByMyWork(IPage<Map> iPage, Long userId, Long schoolId, String... status);
-
-    /**
-     * 查询我的工作台-审核待办
-     *
-     * @param iPage
-     * @param userId
-     * @param schoolId
-     * @param status
-     * @return
-     */
-    IPage<WorkResult> queryByMyWorkSubmit(IPage<Map> iPage, Long userId, Long schoolId, ExamStatusEnum status);
-
     void paperDownload(HttpServletResponse response, Long examTaskId) throws Exception;
 
     ExamTask getByCourseCodeAndPaperNumber(Long schoolId, String courseCode, String paperNumber);
@@ -193,22 +162,6 @@ public interface ExamTaskService extends IService<ExamTask> {
      */
     String findCardTitle(Long cardRuleId);
 
-    /**
-     * 获取自己可以审核的流程id集合
-     *
-     * @param currentUserId
-     * @return
-     */
-    List<Long> findFlowIdToMySelf(Long currentUserId);
-
-    /**
-     * 获取不是自己可以审核的流程id集合
-     *
-     * @param currentUserId
-     * @return
-     */
-    List<Long> findFlowIdToNotMySelf(Long currentUserId);
-
     /**
      * 新增命题申请
      *
@@ -244,14 +197,6 @@ public interface ExamTaskService extends IService<ExamTask> {
      */
     public ExamTask findByFlowId(Long flowId);
 
-    /**
-     * 获取ProcessDefinitionId
-     *
-     * @param key
-     * @return
-     */
-    public String getProcessDefinitionIdByMaxVersion(String key);
-
     /**
      * 印刷员驳回,命题老师重新提交
      *
@@ -260,6 +205,4 @@ public interface ExamTaskService extends IService<ExamTask> {
     void applyResave(ExamTaskReApplyParam map);
 
     ExamTaskDto getByExamTaskId(Long examTaskId);
-
-
 }

+ 0 - 10
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/GradeBatchService.java

@@ -10,7 +10,6 @@ import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
-import java.util.List;
 
 /**
  * <p>
@@ -42,15 +41,6 @@ public interface GradeBatchService extends IService<GradeBatch> {
      */
     Long editGradeBatch(GradeBatchParam gradeBatchParam, SysUser requestUser);
 
-    /**
-     * 批量删除教研分析批次
-     *
-     * @param id          批次id
-     * @param requestUser 请求的用户
-     */
-    @Deprecated
-    void deleteGradeBatch(Long id, SysUser requestUser);
-
     void downloadFile(Long batchId, HttpServletResponse response) throws IOException;
 
     void uploadFile(Long batchId, MultipartFile file) throws IOException, NoSuchFieldException;

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

@@ -4,10 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.distributed.print.business.bean.dto.open.PaperDimension;
 import com.qmth.distributed.print.business.bean.params.analyze.GradePaperDimensionParam;
 import com.qmth.distributed.print.business.bean.result.analyze.GradePaperDimensionResult;
-import com.qmth.distributed.print.business.bean.result.analyze.SecondDimensionResult;
 import com.qmth.distributed.print.business.entity.GradePaperDimension;
-import com.qmth.teachcloud.common.enums.DimensionEnum;
 import com.qmth.teachcloud.common.entity.SysUser;
+import com.qmth.teachcloud.common.enums.DimensionEnum;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.io.IOException;
@@ -72,16 +71,5 @@ public interface GradePaperDimensionService extends IService<GradePaperDimension
      */
     void exportGradePaperDimensionTemplate(String courseCode, String courseName, DimensionEnum dimensionType) throws Exception;
 
-    /**
-     * 分析 - 查询二级维度集合
-     *
-     * @param paperNumber   试卷编号
-     * @param paperType     试卷类型
-     * @param dimensionType 维度类型
-     * @param requestUser   请求用户
-     * @return 结果
-     */
-    List<SecondDimensionResult> findSecondDimensionList(String paperNumber, String paperType, DimensionEnum dimensionType, SysUser requestUser);
-
     List<PaperDimension> findBySchoolIdAndPaperNumberAndPaperType(Long schoolId, String paperNumber, String paperType);
 }

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

@@ -107,15 +107,6 @@ public interface PrintCommonService {
      */
     boolean remove(Long id);
 
-    /**
-     * 保存科目
-     *
-     * @param course
-     * @param userId
-     * @return
-     */
-    boolean saveCourse(BasicCourse course, Long userId);
-
     /**
      * 分页查询
      *

+ 0 - 8
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TCStatisticsService.java

@@ -63,14 +63,6 @@ public interface TCStatisticsService extends IService<TCStatistics> {
      */
     public void removeImportData(Long examId, Long userId);
 
-    /**
-     * 刷新数据
-     *
-     * @return
-     */
-    @Deprecated
-    public Result freshenData();
-
     /**
      * 删除数据
      *

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

@@ -20,15 +20,6 @@ import java.util.Map;
  */
 public interface TCStatisticsTempService extends IService<TCStatisticsTemp> {
 
-    /**
-     * 根据批次号查找印刷计划信息
-     *
-     * @param schoolId
-     * @param batchNo
-     * @return
-     */
-    public List<TCStatisticsTemp> findByBatchNo(Long schoolId, String batchNo);
-
     /**
      * 根据批次号查找印刷计划信息
      *

+ 0 - 8
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TFCustomFlowEntityService.java

@@ -15,14 +15,6 @@ import java.util.List;
  */
 public interface TFCustomFlowEntityService extends IService<TFCustomFlowEntity> {
 
-    /**
-     * 根据自定义流程id查找
-     *
-     * @param customFlowId
-     * @return
-     */
-    TFCustomFlowEntity findByCustomFlowId(Long customFlowId);
-
     /**
      * 根据流程id查找
      *

+ 0 - 11
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TFFlowLogService.java

@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.distributed.print.business.bean.dto.approvalForm.ApprovalInfo;
 import com.qmth.distributed.print.business.bean.result.TFFlowLogResult;
 import com.qmth.distributed.print.business.entity.TFFlowLog;
-import com.qmth.teachcloud.common.enums.FlowApproveOperationEnum;
 
 import java.util.List;
 
@@ -35,16 +34,6 @@ public interface TFFlowLogService extends IService<TFFlowLog> {
      */
     List<TFFlowLogResult> findByObjectId(Long objectId);
 
-    /**
-     * 查找最后一条审批记录
-     *
-     * @param flowId
-     * @param schoolId
-     * @param flowApproveOperationEnum
-     * @return
-     */
-    TFFlowLog findByLast(Long flowId, Long schoolId, FlowApproveOperationEnum flowApproveOperationEnum);
-
     /**
      * 根据流程id查询审批表
      *

+ 0 - 17
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicPrintConfigServiceImpl.java

@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.distributed.print.business.bean.dto.BasicPrintConfigDto;
 import com.qmth.distributed.print.business.entity.BasicTemplateOrg;
-import com.qmth.distributed.print.business.entity.ExamTask;
 import com.qmth.distributed.print.business.enums.TemplateTypeEnum;
 import com.qmth.distributed.print.business.mapper.BasicPrintConfigMapper;
 import com.qmth.distributed.print.business.service.BasicExamService;
@@ -178,22 +177,6 @@ public class BasicPrintConfigServiceImpl extends ServiceImpl<BasicPrintConfigMap
         return printConfig;
     }
 
-    @Override
-    public BasicPrintConfig getByCourseCodeAndPaperNumber(String courseCode, String paperNumber) {
-        Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
-
-        // 查询科目所属教研室
-        Long orgId = basicCourseService.getOrgIdBySchoolIdAndCourseCode(schoolId, courseCode);
-        if (orgId == null) {
-            throw ExceptionResultEnum.ERROR.exception("未找到课程所属机构");
-        }
-        ExamTask examTask = examTaskService.getByCourseCodeAndPaperNumber(schoolId, courseCode, paperNumber);
-        if (examTask == null) {
-            throw ExceptionResultEnum.ERROR.exception("命题任务不存在");
-        }
-        return getByExamIdAndOrgId(examTask.getExamId(), orgId);
-    }
-
     @Override
     public BasicPrintConfig getByExamIdAndOrgId(Long examId, Long orgId) {
         BasicExam basicExam = basicExamService.getById(examId);

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

@@ -1,16 +1,13 @@
 package com.qmth.distributed.print.business.service.impl;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.distributed.print.business.bean.result.TemplatePrintInfoResult;
 import com.qmth.distributed.print.business.entity.BasicTemplateOrg;
+import com.qmth.distributed.print.business.enums.TemplateTypeEnum;
 import com.qmth.distributed.print.business.mapper.BasicTemplateOrgMapper;
 import com.qmth.distributed.print.business.service.BasicTemplateOrgService;
-import com.qmth.distributed.print.business.enums.TemplateTypeEnum;
-import com.qmth.teachcloud.common.entity.BasicCourse;
 import com.qmth.teachcloud.common.entity.SysOrg;
-import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.common.service.BasicCourseService;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -18,8 +15,6 @@ import org.springframework.transaction.annotation.Transactional;
 import javax.annotation.Resource;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
-import java.util.Objects;
 
 /**
  * <p>
@@ -31,6 +26,7 @@ import java.util.Objects;
  */
 @Service
 public class BasicTemplateOrgServiceImpl extends ServiceImpl<BasicTemplateOrgMapper, BasicTemplateOrg> implements BasicTemplateOrgService {
+
     @Resource
     private BasicTemplateOrgMapper basicTemplateOrgMapper;
     @Resource
@@ -68,16 +64,4 @@ public class BasicTemplateOrgServiceImpl extends ServiceImpl<BasicTemplateOrgMap
     public List<TemplatePrintInfoResult> findTemplateInfoByOrgIds(List<Long> ids) {
         return basicTemplateOrgMapper.templateListByOrgIds(ids);
     }
-
-    @Override
-    public List<BasicTemplateOrg> findByCourseCodeAndType(String courseCode, TemplateTypeEnum templateTypeEnum, Long schoolId) {
-        BasicCourse basicCourse = basicCourseService.getOne(new QueryWrapper<BasicCourse>().lambda().eq(BasicCourse::getSchoolId,schoolId).eq(BasicCourse::getCode,courseCode));
-        if (Objects.isNull(basicCourse)){
-            throw ExceptionResultEnum.ERROR.exception("未找到基础课程信息");
-        }
-        return this.list(new QueryWrapper<BasicTemplateOrg>().lambda()
-                .eq(BasicTemplateOrg::getSchoolId,schoolId)
-                .eq(BasicTemplateOrg::getType,templateTypeEnum)
-                .eq(BasicTemplateOrg::getOrgId,basicCourse.getTeachingRoomId()));
-    }
 }

+ 0 - 24
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/DataSyncServiceImpl.java

@@ -2,7 +2,6 @@ package com.qmth.distributed.print.business.service.impl;
 
 import cn.hutool.core.date.DateUtil;
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.qmth.boot.api.exception.ApiException;
 import com.qmth.distributed.print.business.bean.dto.SyncExamCardDto;
@@ -10,7 +9,6 @@ import com.qmth.distributed.print.business.bean.dto.SyncExamStudentDto;
 import com.qmth.distributed.print.business.entity.*;
 import com.qmth.distributed.print.business.enums.ExamPaperStructureStatusEnum;
 import com.qmth.distributed.print.business.enums.ExamPrintPlanSyncStatusEnum;
-import com.qmth.distributed.print.business.enums.PrintPlanStatusEnum;
 import com.qmth.distributed.print.business.service.*;
 import com.qmth.teachcloud.common.bean.dto.stmms.GroupDetailDTO;
 import com.qmth.teachcloud.common.bean.dto.stmms.PicConfig;
@@ -28,7 +26,6 @@ import com.qmth.teachcloud.common.enums.TaskStatusEnum;
 import com.qmth.teachcloud.common.service.BasicAttachmentService;
 import com.qmth.teachcloud.common.service.TeachcloudCommonService;
 import com.qmth.teachcloud.common.sync.CloudMarkingTaskUtils;
-import com.qmth.teachcloud.common.util.ServletUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -67,7 +64,6 @@ public class DataSyncServiceImpl implements DataSyncService {
     @Resource
     private ExamPaperStructureService examPaperStructureService;
 
-
     @Resource
     private TeachcloudCommonService teachcloudCommonService;
 
@@ -83,29 +79,9 @@ public class DataSyncServiceImpl implements DataSyncService {
     @Resource
     private CloudMarkingTaskUtils cloudMarkingTaskUtils;
 
-//    ExecutorService executorService = Executors.newFixedThreadPool(5);
-
     @Resource
     DictionaryConfig dictionaryConfig;
 
-    /**
-     * 定时任务批量同步
-     */
-    @Override
-    public void syncToCloudReview() {
-        // 查询可同步计划(同步状态为空:未同步,false:同步失败)
-        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        QueryWrapper<ExamPrintPlan> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(ExamPrintPlan::getStatus, PrintPlanStatusEnum.END)
-                .and(q -> q.isNull(ExamPrintPlan::getSyncStatus).or().eq(ExamPrintPlan::getSyncStatus, false));
-        List<ExamPrintPlan> examPrintPlans = examPrintPlanService.list(queryWrapper);
-        if (!CollectionUtils.isEmpty(examPrintPlans)) {
-            for (ExamPrintPlan examPrintPlan : examPrintPlans) {
-//                executorService.execute(syncBaseData(examPrintPlan, null, examPrintPlan.getName(), sysUser));
-            }
-        }
-    }
-
     @Async
     @Override
     public void syncExamAndStudentAndCard(Long thirdRelateId, String thirdRelateName, Long examEndTime, TBSyncTask tbSyncTask, SysUser sysUser) {

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

@@ -235,12 +235,6 @@ public class ExamCardServiceImpl extends ServiceImpl<ExamCardMapper, ExamCard> i
         return this.getOne(queryWrapper);
     }
 
-    @Override
-    public boolean usedCardByTemplateId(Long templateId) {
-        List<ExamTaskDetail> list = examTaskDetailService.listByTemplateId(templateId);
-        return !list.isEmpty();
-    }
-
     @Override
     public List<ExamCard> listSelectCard(String courseCode, Long cardRuleId) {
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());

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

@@ -28,13 +28,6 @@ import java.util.Set;
 @Service
 public class ExamDetailCourseServiceImpl extends ServiceImpl<ExamDetailCourseMapper, ExamDetailCourse> implements ExamDetailCourseService {
 
-    @Transactional(rollbackFor = Exception.class)
-    @Override
-    public double calculatePackagesByDetailId(Long examDetailId) {
-        System.out.println(this.count(new QueryWrapper<ExamDetailCourse>().lambda().eq(ExamDetailCourse::getExamDetailId, examDetailId)));
-        return this.count(new QueryWrapper<ExamDetailCourse>().lambda().eq(ExamDetailCourse::getExamDetailId, examDetailId));
-    }
-
     @Override
     public List<Map<String, Object>> listByExamDetailId(Long examDetailId) {
         return this.baseMapper.listByExamDetailId(examDetailId, ExamDetailStatusEnum.FINISH.name());

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

@@ -678,14 +678,6 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
         return null;
     }
 
-    @Override
-    public List<ExamDetail> listByExamPrintId(Long printPlanId) {
-        QueryWrapper<ExamDetail> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(ExamDetail::getPrintPlanId, printPlanId)
-                .ne(ExamDetail::getStatus, ExamDetailStatusEnum.READY);
-        return this.list(queryWrapper);
-    }
-
     @Transactional(rollbackFor = Exception.class)
     @Override
     public List<ExaminationExportDto> findExaminationExportDtoDatasource(Map<String, Object> map) {
@@ -817,17 +809,6 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
         return this.baseMapper.listStudentByExamDetailCourseId(schoolId, examDetailCourseId, ticketNumber, type);
     }
 
-    @Override
-    public List<ExamDetail> listByCourseCodeAndPaperNumberAndPaperTypeIsNull(Long schoolId, String courseCode, String paperNumber) {
-        List<ExamDetailCourse> examDetailCourses = examDetailCourseService.listByCourseCodeAndPaperNumber(schoolId, courseCode, paperNumber);
-        examDetailCourses = examDetailCourses.stream().filter(m -> StringUtils.isBlank(m.getPaperType())).collect(Collectors.toList());
-        if (examDetailCourses.size() > 0) {
-            Set<Long> examDetailIds = examDetailCourses.stream().map(ExamDetailCourse::getExamDetailId).collect(Collectors.toSet());
-            return this.listByIds(examDetailIds);
-        }
-        return null;
-    }
-
     @Override
     public List<ExamDetail> listByCourseCodeAndPaperNumber(Long schoolId, String courseCode, String paperNumber) {
         List<ExamDetailCourse> examDetailCourses = examDetailCourseService.listByCourseCodeAndPaperNumber(schoolId, courseCode, paperNumber);

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

@@ -258,13 +258,6 @@ public class ExamPaperStructureServiceImpl extends ServiceImpl<ExamPaperStructur
         return examPaperStructure;
     }
 
-    @Override
-    public void updateStatusById(Long id, ExamPaperStructureStatusEnum status) {
-        UpdateWrapper<ExamPaperStructure> updateWrapper = new UpdateWrapper<>();
-        updateWrapper.lambda().set(ExamPaperStructure::getStatus, status).eq(ExamPaperStructure::getId, id);
-        this.update(updateWrapper);
-    }
-
     @Override
     public List<Map> preStructure(Long id) {
         if (Objects.isNull(id)) {

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

@@ -41,13 +41,6 @@ public class ExamStudentServiceImpl extends ServiceImpl<ExamStudentMapper, ExamS
     @Resource
     ExamDetailCourseMapper examDetailCourseMapper;
 
-    @Override
-    public void updatePaperType(List<Long> examDetailCourseIds, String relatePaperType) {
-        UpdateWrapper<ExamStudent> updateWrapper = new UpdateWrapper<>();
-        updateWrapper.lambda().set(ExamStudent::getPaperType, relatePaperType).in(ExamStudent::getExamDetailCourseId, examDetailCourseIds);
-        this.update(updateWrapper);
-    }
-
     @Override
     public List<String> listByExamDetailCourseId(String examDetailCourseId) {
         QueryWrapper<ExamStudent> queryWrapper = new QueryWrapper<>();

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

@@ -285,11 +285,6 @@ public class ExamTaskDetailServiceImpl extends ServiceImpl<ExamTaskDetailMapper,
         this.update(updateWrapper);
     }
 
-    @Override
-    public List<ExamTaskDetail> listByTemplateId(Long templateId) {
-        return this.baseMapper.listByTemplateId(templateId);
-    }
-
     @Override
     public List<Map<String, String>> getPaperUrl(Long schoolId, Long printPlanId, Long examTaskId) {
         ExamTask examTask = examTaskService.getById(examTaskId);

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

@@ -3,8 +3,6 @@ package com.qmth.distributed.print.business.service.impl;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.distributed.print.business.bean.dto.ExamTaskPrintDetailDto;
 import com.qmth.distributed.print.business.bean.dto.ExamTaskPrintDto;
@@ -21,7 +19,10 @@ import com.qmth.distributed.print.business.service.*;
 import com.qmth.teachcloud.common.bean.dto.MqDto;
 import com.qmth.teachcloud.common.bean.dto.TaskPrintClassDto;
 import com.qmth.teachcloud.common.contant.SystemConstant;
-import com.qmth.teachcloud.common.entity.*;
+import com.qmth.teachcloud.common.entity.BasicCourse;
+import com.qmth.teachcloud.common.entity.BasicUserCourse;
+import com.qmth.teachcloud.common.entity.SysUser;
+import com.qmth.teachcloud.common.entity.TBTask;
 import com.qmth.teachcloud.common.enums.*;
 import com.qmth.teachcloud.common.service.*;
 import com.qmth.teachcloud.common.util.RedisUtil;
@@ -89,13 +90,6 @@ public class ExamTaskPrintServiceImpl extends ServiceImpl<ExamTaskPrintMapper, E
     @Resource
     private BasicCourseService basicCourseService;
 
-    @Override
-    public IPage<BasicStudent> listStudentByClass(String classId, Integer pageNumber, Integer pageSize) {
-        Page<BasicStudent> page = new Page<>(pageNumber, pageSize);
-        IPage<BasicStudent> studentIPage = basicStudentService.listPage(page, classId);
-        return studentIPage;
-    }
-
     @Transactional
     @Override
     public void remove(Long examTaskPrintId) {

+ 1 - 225
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java

@@ -346,44 +346,6 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
         return this.update(updateWrapper);
     }
 
-    @Deprecated
-    @Override
-    public ExamTask saveExamTask(ExamTask examTask) {
-        Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
-        examTask.setSchoolId(schoolId);
-        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-
-        if (StringUtils.isNotBlank(examTask.getPaperNumber())) {
-            QueryWrapper<ExamTask> taskQueryWrapper = new QueryWrapper<>();
-            taskQueryWrapper.lambda().eq(ExamTask::getSchoolId, schoolId).eq(ExamTask::getPaperNumber, examTask.getPaperNumber());
-            ExamTask task = this.getOne(taskQueryWrapper);
-            if (task != null) {
-                throw ExceptionResultEnum.ERROR.exception("试卷编号已存在");
-            }
-        } else {
-            // 试卷编号生成规则:年月日(例如:20100419)+0000(例如:0001)顺序编号
-            String paperNumber = printCommonService.createPaperNumber(schoolId);
-            examTask.setPaperNumber(paperNumber);
-        }
-
-        QueryWrapper<BasicExamRule> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(BasicExamRule::getSchoolId, examTask.getSchoolId());
-        BasicExamRule basicExamRule = basicExamRuleService.getOne(queryWrapper);
-        if (basicExamRule == null) {
-            throw ExceptionResultEnum.ERROR.exception("通用规则未设置");
-        }
-//        if (examTask.getUserId() == null) {
-//            examTask.setStatus(ExamStatusEnum.NEW);
-//        } else {
-//            examTask.setStatus(ExamStatusEnum.READY);
-//        }
-        examTask.setEnable(true);
-        examTask.insertInfo(sysUser.getId());
-        examTask.setReview(basicExamRule.getReview());
-        this.save(examTask);
-        return examTask;
-    }
-
     /**
      * 保存命题任务新
      *
@@ -816,113 +778,15 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
             if (!ExamStatusEnum.SUBMIT.equals(examTask.getStatus())) {
                 throw ExceptionResultEnum.ERROR.exception("当前状态不能审核");
             }
-
-//            // 更新命题任务状态
-//            UpdateWrapper<ExamTask> updateWrapper = new UpdateWrapper<>();
-//            ExamStatusEnum statusEnum;
-//            if (taskReviewLog.getReviewStatus().name().equals(ReviewStatusEnum.PASS.name())) {
-//                statusEnum = ExamStatusEnum.FINISH;
-//            } else {
-//                statusEnum = ExamStatusEnum.STAGE;
-//            }
-//            updateWrapper.lambda().set(ExamTask::getStatus, statusEnum).set(ExamTask::getReviewStatus, taskReviewLog.getReviewStatus()).eq(ExamTask::getId, taskReviewLog.getExamTaskId());
-//            this.update(updateWrapper);
-//        } else {
-//             更新记录表状态
-//            taskAfterPass(taskReviewLog.getReviewStatus(), taskReviewLog.getExamTaskId(), examTaskPaperLog, sysUser);
         }
         return true;
     }
 
-    @Transactional
-    @Override
-    public boolean taskReviewSaveBatch(ExamTaskReviewLog taskReviewLog) {
-        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-
-        ExamStatusEnum statusEnum;
-//        if (taskReviewLog.getReviewStatus().name().equals(ReviewStatusEnum.PASS.name())) {
-//            statusEnum = ExamStatusEnum.FINISH;
-//        } else {
-//            statusEnum = ExamStatusEnum.STAGE;
-//        }
-//        for (Long examTaskId : taskReviewLog.getExamTaskIds()) {
-//            ExamTaskPaperLog examTaskPaperLog = examTaskPaperLogService.getByExamTaskIdAndReview(examTaskId, false);
-//            if (examTaskPaperLog == null) {
-//                // 校验状态,可能被撤回
-//                ExamTask examTask = this.getById(examTaskId);
-//                if (!ExamStatusEnum.SUBMIT.equals(examTask.getStatus())) {
-//                    throw ExceptionResultEnum.ERROR.exception("当前状态不能审核");
-//                }
-//                // 审核日志
-//                taskReviewLog.setOperateId(sysUser.getId());
-//                taskReviewLog.setOperateTime(System.currentTimeMillis());
-//                taskReviewLog.setExamTaskId(examTaskId);
-//                taskReviewLog.setId(SystemConstant.getDbUuid());
-//                examTaskReviewLogService.save(taskReviewLog);
-//
-//                // 更新命题任务状态
-//                UpdateWrapper<ExamTask> updateWrapper = new UpdateWrapper<>();
-//                updateWrapper.lambda().set(ExamTask::getStatus, statusEnum).set(ExamTask::getReviewStatus, taskReviewLog.getReviewStatus()).eq(ExamTask::getId, taskReviewLog.getExamTaskId());
-//                this.update(updateWrapper);
-//            } else {
-//                // 更新记录表状态
-//                taskAfterPass(taskReviewLog.getReviewStatus(), examTaskId, examTaskPaperLog, sysUser);
-//            }
-//
-//            if (taskReviewLog.getReviewStatus().name().equals(ReviewStatusEnum.PASS.name())) {
-//                // 校验是否可以提交打印状态
-//                ExamTask examTask = this.getById(examTaskId);
-//                try {
-//                    printCommonService.checkData(examTask.getSchoolId(), examTask.getCourseCode(), examTask.getPaperNumber(), sysUser);
-//                } catch (IOException e) {
-
-//                }
-//            }
-//        }
-        return true;
-    }
-
-    private void taskAfterPass(ReviewStatusEnum statusEnum, Long examTaskId, ExamTaskPaperLog
-            examTaskPaperLog, SysUser sysUser) {
-        // 更新记录表状态
-        examTaskPaperLog.setReview(true);
-        examTaskPaperLog.setReviewStatus(statusEnum);
-        examTaskPaperLog.setUpdateId(sysUser.getId());
-        examTaskPaperLog.setUpdateTime(System.currentTimeMillis());
-        examTaskPaperLogService.updateById(examTaskPaperLog);
-
-        if (statusEnum.name().equals(ReviewStatusEnum.PASS.name())) {
-            ExamTaskDetail examTaskDetail = examTaskDetailService.getByExamTaskId(examTaskId);
-            String exposedPaperType = examTaskDetail.getExposedPaperType();
-            Set<String> exposedPaperSet = StringUtils.isBlank(exposedPaperType) ? new HashSet<>() : new HashSet<>(Arrays.asList(exposedPaperType.split(",")));
-            String unexposedPaperType = examTaskPaperLog.getPaperType();
-            Set<String> unexposedPaperSet = StringUtils.isBlank(unexposedPaperType) ? new HashSet<>() : new HashSet<>(Arrays.asList(unexposedPaperType.split(",")));
-            String newUnexposedPaperType;
-            //未曝光类型
-            if (!exposedPaperSet.isEmpty()) {
-                for (String exposedPaper : exposedPaperSet) {
-                    unexposedPaperSet.remove(exposedPaper);
-                }
-                newUnexposedPaperType = String.join(",", unexposedPaperSet);
-            } else {
-                newUnexposedPaperType = unexposedPaperType;
-            }
-            // 通过,更新正式表数据
-            UpdateWrapper<ExamTaskDetail> examTaskDetailUpdateWrapper = new UpdateWrapper<>();
-            examTaskDetailUpdateWrapper.lambda().set(ExamTaskDetail::getPaperType, examTaskPaperLog.getPaperType())
-                    .set(ExamTaskDetail::getPaperAttachmentIds, examTaskPaperLog.getPaperAttachmentIds())
-                    .set(ExamTaskDetail::getCardId, examTaskPaperLog.getCardId())
-                    .set(ExamTaskDetail::getUnexposedPaperType, newUnexposedPaperType)
-                    .eq(ExamTaskDetail::getExamTaskId, examTaskId);
-            examTaskDetailService.update(examTaskDetailUpdateWrapper);
-        }
-    }
-
     @Override
     public IPage<ExamTaskDetailDto> listTaskPaper(Long semesterId, Long examId, String courseCode, String paperNumber, Long startTime, Long endTime, MakeMethodEnum makeMethod, Long cardRuleId, Integer pageNumber, Integer pageSize) {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         // 查询用户角色是否包含命题老师
-        List<SysRole> list = sysUserRoleService.listRoleByUserId(sysUser.getId());
+//        List<SysRole> list = sysUserRoleService.listRoleByUserId(sysUser.getId());
 //        boolean containsQuestionTeacher = list.stream().anyMatch(m -> RoleTypeEnum.QUESTION_TEACHER.equals(m.getType()));
         boolean containsQuestionTeacher = false;
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
@@ -946,30 +810,6 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
             }
         }
         return list;
-
-        /*QueryWrapper<ExamTaskDetail> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(ExamTaskDetail::getExamTaskId, examTaskId).eq(ExamTaskDetail::getEnable, true);
-        ExamTaskDetail examTaskDetail = this.examTaskDetailService.getOne(queryWrapper);
-        List<RelatePaperDto> list = new ArrayList<>();
-        if (examTaskDetail != null) {
-            // 抽取规则
-            ExamPrintPlan examPrintPlan = examPrintPlanService.getById(printPlanId);
-            DrawRuleEnum drawRule = examPrintPlan.getDrawRule();
-
-            RelatePaperDto relatePaperDto = new RelatePaperDto();
-            // 抽取一次
-            String paperTypes;
-            if (DrawRuleEnum.ONE.equals(drawRule)) {
-                // 未曝光类型
-                paperTypes = examTaskDetail.getUnexposedPaperType();
-            } else {
-                // 所有类型
-                paperTypes = examTaskDetail.getPaperType();
-            }
-            relatePaperDto.setPaperTypes(StringUtils.isBlank(paperTypes) ? null : Arrays.asList(paperTypes.split(",")));
-            list.add(relatePaperDto);
-        }
-        return list;*/
     }
 
     @Transactional
@@ -1075,40 +915,6 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
         return this.baseMapper.applyGetOne(examTaskId, source);
     }
 
-    /**
-     * 查询我的工作台
-     *
-     * @param iPage
-     * @param userId
-     * @param schoolId
-     * @param status
-     * @return
-     */
-    @Override
-    public IPage<WorkResult> queryByMyWork(IPage<Map> iPage, Long userId, Long schoolId, String... status) {
-        return examTaskMapper.queryByMyWork(iPage, userId, schoolId, status);
-    }
-
-    @Override
-    public IPage<WorkResult> queryUserByMyWork(IPage<Map> iPage, Long userId, Long schoolId, String... status) {
-        return examTaskMapper.queryUserByMyWork(iPage, userId, schoolId, status);
-    }
-
-    /**
-     * 查询我的工作台-审核待办
-     *
-     * @param iPage
-     * @param userId
-     * @param schoolId
-     * @param status
-     * @return
-     */
-    @Override
-    public IPage<WorkResult> queryByMyWorkSubmit(IPage<Map> iPage, Long userId, Long schoolId, ExamStatusEnum
-            status) {
-        return examTaskMapper.queryByMyWorkSubmit(iPage, userId, schoolId, Objects.nonNull(status) ? status.name() : null);
-    }
-
     @Override
     public void paperDownload(HttpServletResponse response, Long examTaskId) throws Exception {
         String schoolId = ServletUtil.getRequestHeaderSchoolId().toString();
@@ -1602,25 +1408,6 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
         return title;
     }
 
-    /**
-     * 获取自己可以审核的流程id集合
-     *
-     * @param currentUserId
-     * @return
-     */
-    @Override
-    public List<Long> findFlowIdToMySelf(Long currentUserId) {
-        return examTaskMapper.findFlowIdToMySelf(currentUserId);
-    }
-
-    /**
-     * 获取不是自己可以审核的流程id集合
-     */
-    @Override
-    public List<Long> findFlowIdToNotMySelf(Long currentUserId) {
-        return examTaskMapper.findFlowIdToNotMySelf(currentUserId);
-    }
-
     @Transactional
     @Override
     public ExamTask submitTaskApply(ExamTaskApplyTemp examTaskApplyTemp) {
@@ -2003,17 +1790,6 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
         return examTask;
     }
 
-    /**
-     * 获取ProcessDefinitionId
-     *
-     * @param key
-     * @return
-     */
-    @Override
-    public String getProcessDefinitionIdByMaxVersion(String key) {
-        return examTaskMapper.getProcessDefinitionIdByMaxVersion(key);
-    }
-
     @Transactional
     @Override
     public void applyResave(ExamTaskReApplyParam examTaskReApplyParam) {

+ 0 - 36
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/GradeBatchServiceImpl.java

@@ -136,42 +136,6 @@ public class GradeBatchServiceImpl extends ServiceImpl<GradeBatchMapper, GradeBa
         return id;
     }
 
-    @Override
-    public void deleteGradeBatch(Long id, SysUser requestUser) {
-        Long schoolId = requestUser.getSchoolId();
-        if (!SystemConstant.longNotNull(id)) {
-            throw ExceptionResultEnum.ERROR.exception("请选择要删除的批次对象");
-        }
-        GradeBatch gradeBatch = this.getById(id);
-        if (Objects.isNull(gradeBatch)) {
-            throw ExceptionResultEnum.ERROR.exception("要删除的批次不存在");
-        }
-
-        // 要删除的批次试卷集合
-        List<GradeBatchPaper> gradeBatchPaperList = gradeBatchPaperService.list(new QueryWrapper<GradeBatchPaper>()
-                .lambda()
-                .eq(GradeBatchPaper::getSchoolId, schoolId)
-                .eq(GradeBatchPaper::getBatchId, id));
-
-        if (gradeBatchPaperList != null && gradeBatchPaperList.size() > 0) {
-            List<GradeBatchPaper> enableGradeBatchPaperList = gradeBatchPaperList.stream().filter(GradeBatchPaper::getEnable).collect(Collectors.toList());
-            if (enableGradeBatchPaperList.size() > 0) {
-                List<String> cantDeleteBatchNameList = enableGradeBatchPaperList.stream().map(GradeBatchPaper::getPaperNumber).collect(Collectors.toList());
-                throw ExceptionResultEnum.ERROR.exception("成绩分析批次存在分析课程【" + String.join(",", cantDeleteBatchNameList) + "】,不能删除,请先删除分析课程");
-            } else {
-                throw ExceptionResultEnum.ERROR.exception("请先提交该分析批次数据再删除批次");
-            }
-        }
-        boolean result = true;
-        Long thirdExamId = gradeBatch.getThirdExamId();
-        if (SystemConstant.longNotNull(thirdExamId)) {
-            result = teachCloudReportTaskUtils.syncDeleteExam(schoolId, thirdExamId);
-        }
-        if (result) {
-            this.removeById(id);
-        }
-    }
-
     @Override
     public void downloadFile(Long batchId, HttpServletResponse response) throws IOException {
         GradeBatch gradeBatch = this.getById(batchId);

+ 0 - 20
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/GradePaperDimensionServiceImpl.java

@@ -180,26 +180,6 @@ public class GradePaperDimensionServiceImpl extends ServiceImpl<GradePaperDimens
         }
     }
 
-    @Override
-    public List<SecondDimensionResult> findSecondDimensionList(String paperNumber, String paperType, DimensionEnum dimensionType, SysUser requestUser) {
-        return this.list(new QueryWrapper<GradePaperDimension>()
-                        .lambda()
-                        .eq(GradePaperDimension::getSchoolId, requestUser.getSchoolId())
-                        .eq(GradePaperDimension::getPaperNumber, paperNumber)
-                        .eq(GradePaperDimension::getPaperType, paperType)
-                        .eq(GradePaperDimension::getDimensionType, dimensionType))
-                .stream()
-                .distinct()
-                .flatMap(e -> {
-                    SecondDimensionResult cell = new SecondDimensionResult();
-                    cell.setCode(e.getCodeSecond());
-                    cell.setName(e.getNameSecond());
-                    cell.setType(e.getDimensionType());
-                    return Stream.of(cell);
-                })
-                .collect(Collectors.toList());
-    }
-
     @Override
     public List<PaperDimension> findBySchoolIdAndPaperNumberAndPaperType(Long schoolId, String paperNumber, String paperType) {
         return this.baseMapper.findBySchoolIdAndPaperNumberAndPaperType(schoolId, paperNumber, paperType);

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

@@ -641,49 +641,6 @@ public class PrintCommonServiceImpl implements PrintCommonService {
         return basicCourseService.removeById(id);
     }
 
-    /**
-     * 保存科目
-     *
-     * @param course
-     * @param userId
-     * @return
-     */
-    @Override
-    public boolean saveCourse(BasicCourse course, Long userId) {
-        Long schoolId = course.getSchoolId();
-        course.setSchoolId(schoolId);
-
-        QueryWrapper<BasicCourse> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(BasicCourse::getSchoolId, course.getSchoolId()).eq(BasicCourse::getCode, course.getCode());
-        BasicCourse basicCourse = basicCourseService.getOne(queryWrapper);
-
-        // 新增
-        if (Objects.isNull(course.getId())) {
-            if (basicCourse != null) {
-                throw ExceptionResultEnum.ERROR.exception("课程已存在");
-            }
-            course.setId(SystemConstant.getDbUuid());
-            course.setCreateId(userId);
-            course.setCreateTime(System.currentTimeMillis());
-        }
-        // 修改
-        else {
-            if (basicCourse != null && basicCourse.getId().longValue() != course.getId().longValue()) {
-                throw ExceptionResultEnum.ERROR.exception("课程已存在");
-            }
-
-            // 旧code是否已有命题任务
-            BasicCourse oldCourse = basicCourseService.getById(course.getId());
-            List<ExamTask> taskList = examTaskService.listByCourseCode(oldCourse.getSchoolId(), oldCourse.getCode());
-            if (taskList != null && taskList.size() > 0) {
-                throw ExceptionResultEnum.ERROR.exception("课程绑定命题任务,不能修改");
-            }
-            course.setUpdateId(userId);
-            course.setUpdateTime(System.currentTimeMillis());
-        }
-        return basicCourseService.saveOrUpdate(course);
-    }
-
     /**
      * 分页查询
      *

+ 0 - 29
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TCStatisticsServiceImpl.java

@@ -239,35 +239,6 @@ public class TCStatisticsServiceImpl extends ServiceImpl<TCStatisticsMapper, TCS
         tcStatisticsTempService.remove(tcStatisticsTempQueryWrapper);
     }
 
-    @Override
-    @Transactional
-    public Result freshenData() {
-        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        QueryWrapper<TCStatistics> tcStatisticsQueryWrapper = new QueryWrapper<>();
-        tcStatisticsQueryWrapper.select(" DISTINCT batch_no ").eq("create_id", sysUser.getId());
-        List<TCStatistics> tcStatisticsList = this.list(tcStatisticsQueryWrapper);
-        if (Objects.nonNull(tcStatisticsList) && tcStatisticsList.size() > 0) {
-            Set<String> batchNoSet = tcStatisticsList.stream().map(s -> s.getBatchNo()).collect(Collectors.toSet());
-            boolean lock = redisUtil.lock(SystemConstant.REDIS_LOCK_BATCH_NO_PREFIX + Math.abs(batchNoSet.toString().hashCode()), SystemConstant.REDIS_LOCK_BATCH_NO_TIME_OUT);
-            if (!lock) {
-                throw ExceptionResultEnum.ERROR.exception("正在刷新数据,请稍候再试!");
-            }
-            try {
-                this.freshenJoinData(sysUser, batchNoSet);
-            } catch (Exception e) {
-                log.error(SystemConstant.LOG_ERROR, e);
-                if (e instanceof ApiException) {
-                    return ResultUtil.error((ApiException) e, e.getMessage());
-                } else {
-                    return ResultUtil.error(e.getMessage());
-                }
-            } finally {
-                redisUtil.releaseLock(SystemConstant.REDIS_LOCK_BATCH_NO_PREFIX + Math.abs(batchNoSet.toString().hashCode()));
-            }
-        }
-        return ResultUtil.ok(true);
-    }
-
     @Override
     @Transactional
     public Result deleteData(List<Long> ids) {

+ 0 - 12
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TCStatisticsServiceTempImpl.java

@@ -23,18 +23,6 @@ public class TCStatisticsServiceTempImpl extends ServiceImpl<TCStatisticsTempMap
     @Resource
     TCStatisticsTempMapper tcStatisticsTempMapper;
 
-    /**
-     * 根据批次号查找印刷计划信息
-     *
-     * @param schoolId
-     * @param batchNo
-     * @return
-     */
-    @Override
-    public List<TCStatisticsTemp> findByBatchNo(Long schoolId, String batchNo) {
-        return tcStatisticsTempMapper.findByBatchNo(schoolId, batchNo);
-    }
-
     /**
      * 根据批次号查找印刷计划信息
      *

+ 0 - 13
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TFCustomFlowEntityServiceImpl.java

@@ -20,19 +20,6 @@ import java.util.List;
 @Service
 public class TFCustomFlowEntityServiceImpl extends ServiceImpl<TFCustomFlowEntityMapper, TFCustomFlowEntity> implements TFCustomFlowEntityService {
 
-    /**
-     * 根据自定义流程id查找
-     *
-     * @param customFlowId
-     * @return
-     */
-    @Override
-    public TFCustomFlowEntity findByCustomFlowId(Long customFlowId) {
-        QueryWrapper<TFCustomFlowEntity> tfCustomFlowListQueryWrapper = new QueryWrapper<>();
-        tfCustomFlowListQueryWrapper.lambda().eq(TFCustomFlowEntity::gettFCustomFlowId, customFlowId);
-        return this.getOne(tfCustomFlowListQueryWrapper);
-    }
-
     /**
      * 根据流程id查找
      *

+ 0 - 13
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TFFlowLogServiceImpl.java

@@ -58,19 +58,6 @@ public class TFFlowLogServiceImpl extends ServiceImpl<TFFlowLogMapper, TFFlowLog
         return tfFlowLogMapper.findByObjectId(objectId);
     }
 
-    /**
-     * 查找最后一条审批记录
-     *
-     * @param flowId
-     * @param schoolId
-     * @param flowApproveOperationEnum
-     * @return
-     */
-    @Override
-    public TFFlowLog findByLast(Long flowId, Long schoolId, FlowApproveOperationEnum flowApproveOperationEnum) {
-        return tfFlowLogMapper.findByLast(flowId, schoolId, Objects.nonNull(flowApproveOperationEnum) ? flowApproveOperationEnum.name() : null);
-    }
-
     @Override
     public List<ApprovalInfo> findApprovalInfoByFlowId(Long flowId) {
         return this.baseMapper.findApprovalInfoByFlowId(flowId);

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

@@ -105,20 +105,7 @@
             </if>
         </where>
     </select>
-    <select id="listByTemplateId" resultMap="BaseResultMap">
-        SELECT
-            *
-        FROM
-            exam_task_detail a
-        WHERE
-            EXISTS( SELECT
-                    1
-                FROM
-                    exam_card b
-                WHERE
-                    a.card_id = b.id
-                        AND b.template_id = #{templateId})
-    </select>
+
     <select id="listExamDetailCourse" resultType="java.lang.String">
         SELECT
             b.id

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

@@ -634,29 +634,6 @@
         where e.id = #{examTaskId}
     </select>
 
-    <select id="queryByMyWork" resultType="com.qmth.distributed.print.business.bean.result.WorkResult">
-        <include refid="myworkCommonHead"/>
-        <include refid="myworkCommonMiddle"/>
-        <where>
-            <include refid="myworkSubmitCommonFoot"/>
-        </where>
-    </select>
-
-    <select id="queryUserByMyWork" resultType="com.qmth.distributed.print.business.bean.result.WorkResult">
-        <include refid="myworkCommonHead"/>
-        <include refid="myworkCommonMiddle"/>
-        <where>
-            <include refid="myworkCommonFoot"/>
-        </where>
-    </select>
-
-    <select id="queryByMyWorkSubmit" resultType="com.qmth.distributed.print.business.bean.result.WorkResult">
-        <include refid="myworkCommonHead"/>
-        <include refid="myworkCommonMiddle"/>
-        <where>
-            <include refid="myworkSubmitCommonFootNew"/>
-        </where>
-    </select>
     <select id="listClientExamTaskPage"
             resultType="com.qmth.distributed.print.business.bean.dto.ClientExamTaskDto">
         SELECT
@@ -789,95 +766,6 @@
         </where>
     </select>
 
-    <sql id="myworkCommonHead">
-        SELECT
-            et.id,
-            et.school_id schoolId,
-            et.course_code courseCode,
-            et.course_name courseName,
-            et.specialty,
-            et.paper_number paperNumber,
-            et.card_rule_id cardRuleId,
-            case et.card_rule_id when -1 then '全部通卡' else b.name end cardRuleName,
-            et.user_id userId,
-            c.real_name userName,
-            et.start_time startTime,
-            et.end_time endTime,
-            et.status,
-            et.enable,
-            et.create_id createId,
-            et.create_time createTime
-    </sql>
-
-    <sql id="myworkCommonMiddle">
-        FROM
-            exam_task et
-                LEFT JOIN
-            basic_card_rule b ON et.card_rule_id = b.id
-                LEFT JOIN
-            exam_task_paper_log d ON et.id = d.exam_task_id and d.review = false
-                LEFT JOIN
-            sys_user c ON et.user_id = c.id
-    </sql>
-
-    <sql id="myworkCommonFoot">
-        <choose>
-            <when test="userId != null and userId != ''">
-                and et.user_id = #{userId}
-            </when>
-            <otherwise>
-                and et.user_id is null
-            </otherwise>
-        </choose>
-        <if test="schoolId != null and schoolId != ''">
-            and et.school_id = #{schoolId}
-        </if>
-        <if test="status != null and status != ''">
-            and et.status in
-            <foreach item="item" collection="status" separator="," open="(" close=")" index="">
-                #{item}
-            </foreach>
-        </if>
-        and et.enable = 1
-    </sql>
-
-    <sql id="myworkSubmitCommonFoot">
-        <choose>
-            <when test="userId != null and userId != ''">
-                and et.create_id = #{userId}
-            </when>
-        </choose>
-        <if test="schoolId != null and schoolId != ''">
-            and et.school_id = #{schoolId}
-        </if>
-        <if test="status != null and status != ''">
-            and et.status in
-            <foreach item="item" collection="status" separator="," open="(" close=")" index="">
-                #{item}
-            </foreach>
-        </if>
-        and et.enable = 1
-    </sql>
-
-    <sql id="myworkSubmitCommonFootNew">
-        <choose>
-            <when test="userId != null and userId != ''">
-                and et.create_id = #{userId}
-            </when>
-        </choose>
-        <if test="schoolId != null and schoolId != ''">
-            and et.school_id = #{schoolId}
-        </if>
-        <if test="status != null and status != ''">
-            and (et.status in
-            <foreach item="item" collection="status" separator="," open="(" close=")" index="">
-                #{item}
-            </foreach>
-            or (et.status = 'FINISH' and d.id is not null))
-        </if>
-        and et.enable = 1
-    </sql>
-
     <sql id="findAllFlowId">
         (select
 			DISTINCT t.PARENT_ID_
@@ -1017,80 +905,7 @@
                 and art.ASSIGNEE_ is null
                 and ari.USER_ID_ = cast(#{userId} as char)
                 and ari.TYPE_ = 'candidate'
-                and et.school_id = #{schoolId}
-            <!--union all
-                    select
-                et.id,
-                et.school_id schoolId,
-                et.org_id as orgId,
-                et.course_code courseCode,
-                et.course_name courseName,
-                et.specialty,
-                et.paper_number paperNumber,
-                et.card_rule_id cardRuleId,
-                case
-                    et.card_rule_id when -1 then '全部通卡'
-                    else b.name
-                end cardRuleName,
-                et.userId,
-                c.real_name userName,
-                et.start_time startTime,
-                et.end_time endTime,
-                et.flowStatus as status,
-                et.flowStatus as auditStatus,
-                et.enable,
-                et.create_time as createTime,
-                et.update_time as updateTime,
-                et.EXECUTION_ID_ as executionId,
-                et.PROC_INST_ID_ as flowId,
-                et.NAME_ as taskName,
-                et.TASK_DEF_KEY_ as taskDefKey,
-                et.ID_ as taskId,
-                et.setup,
-                et.teacher_name teacherName,
-                et.lecturer_name lecturerName,
-                c.real_name as propositionName,
-                so.name teachingRoomName
-            from
-                (
-                select
-                    et.*,
-                    et.user_id as userId
-                from
-                    (
-                    select
-                        et.*,
-                        tffa.status as flowStatus,
-                        art.EXECUTION_ID_,
-                        art.NAME_,
-                        art.TASK_DEF_KEY_,
-                        art.ID_,
-                        art.PROC_INST_ID_,
-                        tffa.setup
-                    from
-                        exam_task et
-                    left join ACT_RU_TASK art on
-                        find_in_set(art.PROC_INST_ID_ ,et.flow_id)
-                    left join t_f_flow_approve tffa on
-                        find_in_set(tffa.flow_id ,et.flow_id)
-                    where
-                        et.school_id = #{schoolId}
-                        and et.user_id = #{userId}
-                        and et.flow_id is null) et
-                         ) et
-            left join basic_card_rule b ON
-                et.card_rule_id = b.id
-            left join sys_user c ON
-                et.userId = c.id
-            LEFT JOIN exam_task_detail det ON
-                    det.exam_task_id = et.id
-            LEFT JOIN
-                sys_org so ON et.teaching_room_id = so.id -->
-                ) t order by t.updateTime desc
-    </select>
-
-    <select id="findFlowIdToMySelf" resultType="java.lang.Long">
-     <include refid="findFlowIdToMySelfSql" />
+                and et.school_id = #{schoolId} ) t order by t.updateTime desc
     </select>
 
     <sql id="findFlowIdToMySelfSql">
@@ -1112,56 +927,6 @@
             and ari.TYPE_ = 'candidate'
     </sql>
 
-    <sql id="findFlowIdToNotMySelfSql">
-        select
-            cast(t.flowId as Decimal(24)) as flowId
-        from
-            (
-            select
-                art.PROC_INST_ID_ as flowId
-            from
-                ACT_RU_TASK art
-        UNION
-            select
-                art.PROC_INST_ID_ as flowId
-            from
-                ACT_RU_TASK art
-            left join act_ru_identitylink ari on
-                ari.TASK_ID_ = art.ID_
-            where
-                art.ASSIGNEE_ is null
-                and ari.TYPE_ = 'candidate') t
-        where
-             NOT EXISTS(
-            select
-                *
-            from
-                (
-                select
-                    art.PROC_INST_ID_ as flowId
-                from
-                    ACT_RU_TASK art
-                where
-                    art.ASSIGNEE_ = cast(#{currentUserId} as char)
-            UNION all
-                select
-                    art.PROC_INST_ID_ as flowId
-                from
-                    ACT_RU_TASK art
-                left join act_ru_identitylink ari on
-                    ari.TASK_ID_ = art.ID_
-                where
-                    art.ASSIGNEE_ is null
-                    and ari.USER_ID_ = cast(#{currentUserId} as char)
-                    and ari.TYPE_ = 'candidate') temp
-            where
-                t.flowId = temp.flowId)
-    </sql>
-
-    <select id="findFlowIdToNotMySelf" resultType="java.lang.Long">
-        <include refid="findFlowIdToNotMySelfSql" />
-    </select>
-
     <select id="findByFlowStatus" resultType="com.qmth.distributed.print.business.entity.ExamTask">
         select
         et.*
@@ -1247,12 +1012,6 @@
             )
     </select>
 
-    <select id="getProcessDefinitionIdByMaxVersion" resultType="java.lang.String">
-        select t.ID_ from ACT_RE_PROCDEF t
-            where t.KEY_ = #{key}
-            and t.VERSION_ = (select max(t.VERSION_) from ACT_RE_PROCDEF t
-            where t.KEY_ = #{key})
-    </select>
     <select id="getByExamTaskId" resultType="com.qmth.distributed.print.business.bean.dto.ExamTaskDto">
         SELECT
             a.id,

+ 0 - 46
distributed-print-business/src/main/resources/mapper/TCStatisticsTempMapper.xml

@@ -2,52 +2,6 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.qmth.distributed.print.business.mapper.TCStatisticsTempMapper">
 
-    <select id="findByBatchNo" resultType="com.qmth.distributed.print.business.entity.TCStatisticsTemp">
-        select distinct
-        tcst.college_id as collegeId,
-        tcst.college_name as collegeName,
-        tcst.course_name as courseName,
-        tcst.course_code as courseCode,
-        tcst.teaching_room_id as teachingRoomId,
-        tcst.teaching_room_name as teachingRoomName,
-        tcst.teacher_name as teacherName,
-        tcst.clazz_id as clazzId,
-        tcst.clazz_name as clazzName,
-        et.paper_number as paperNumber,
-        epp.id as printPlanId,
-        edc.id as examDetailCourseId,
-        etd.id as examTaskDetailId,
-        ed.id as examDetailId,
-        'JOIN' as dataSource
-        from
-        t_c_statistics_temp tcst
-        INNER JOIN
-        exam_detail_course edc ON edc.course_code = tcst.course_code
-        AND edc.clazz_id = tcst.clazz_id
-        LEFT JOIN
-        exam_detail ed ON ed.id = edc.exam_detail_id
-        LEFT JOIN
-        exam_print_plan epp ON epp.id = ed.print_plan_id
-        LEFT JOIN
-        exam_task et ON et.course_code = tcst.course_code
-        AND edc.paper_number = et.paper_number
-        AND epp.exam_id = et.exam_id
-        AND et.teaching_room_id = tcst.teaching_room_id
-        LEFT JOIN
-        exam_task_detail etd ON etd.exam_task_id = et.id
-        <where>
-            <if test="batchNo != null and batchNo != ''">
-                and tcst.batch_no = #{batchNo}
-            </if>
-            and IF(epp.id is null, true,
-            et.enable = true
-            and etd.enable = true
-            <if test="schoolId != null and schoolId != ''">
-                and et.school_id = #{schoolId}
-            </if>)
-        </where>
-    </select>
-
     <select id="findByBatchNoJoin" resultType="com.qmth.distributed.print.business.entity.TCStatisticsTemp">
         select distinct
         tcst.college_id as collegeId,

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

@@ -54,15 +54,6 @@
             tffl.create_time
     </select>
 
-    <select id="findByLast" resultType="com.qmth.distributed.print.business.entity.TFFlowLog">
-        select * from t_f_flow_log tffl
-                          join t_f_flow_join tffj on
-            tffj.flow_id = tffl.flow_id
-        where tffl.school_id = #{schoolId} and tffl.flow_id = #{flowId}
-        and tffl.approve_operation = #{approveOperation}
-        order by tffl.create_time desc
-        limit 1
-    </select>
     <select id="findApprovalInfoByFlowId"
             resultType="com.qmth.distributed.print.business.bean.dto.approvalForm.ApprovalInfo">
         SELECT

+ 0 - 20
teachcloud-common/src/main/java/com/qmth/teachcloud/common/mapper/SysOrgMapper.java

@@ -3,7 +3,6 @@ package com.qmth.teachcloud.common.mapper;
 import com.qmth.teachcloud.common.base.CustomBaseMapper;
 import com.qmth.teachcloud.common.bean.dto.OrgDto;
 import com.qmth.teachcloud.common.entity.SysOrg;
-import com.qmth.teachcloud.common.entity.SysUser;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -18,16 +17,6 @@ import java.util.List;
  */
 public interface SysOrgMapper extends CustomBaseMapper<SysOrg> {
 
-    /**
-     * 根据机构类型查找用户
-     *
-     * @param schoolId
-     * @param orgId
-     * @param orgTypeEnum
-     * @return
-     */
-    List<SysUser> findUserByOrgType(@Param("schoolId") Long schoolId, @Param("orgId") Long orgId, @Param("orgTypeEnum") String orgTypeEnum);
-
     /**
      * 递归树查询(同级及以上)
      *
@@ -38,15 +27,6 @@ public interface SysOrgMapper extends CustomBaseMapper<SysOrg> {
      */
     List<SysOrg> findByConnectByParentId(@Param("orgId") Long orgId, @Param("school") Boolean school, @Param("college") Boolean college);
 
-    /**
-     * 递归树查询(同级及以上)
-     *
-     * @param orgId
-     * @param orgType
-     * @return
-     */
-    List<SysOrg> findByJxzyyConnectByParentId(@Param("orgId") Long orgId, @Param("orgType") String orgType);
-
     /**
      * 递归树查询(同级及以下)
      *

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

@@ -77,14 +77,6 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
      */
     int updateVerifyCodeExpiredTime(@Param("userId") Long userId, @Param("mobileNumber") String mobileNumber);
 
-    /**
-     * 根据机构id获取
-     *
-     * @param orgIdSet
-     * @return
-     */
-    List<ApproveUserResult> findByOrgIds(@Param("orgIdSet") Set<Long> orgIdSet);
-
     /**
      * 查找用户角色名
      *
@@ -93,22 +85,6 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
      */
     List<UserRoleNameResult> selectRoleNames(@Param("userIds") List<Long> userIds);
 
-    /**
-     * 根据角色ids查找用户
-     *
-     * @param roleIds
-     * @return
-     */
-    List<SysUser> findByRoleIds(@Param("roleIds") List<Long> roleIds);
-
-    /**
-     * 根据角色ids查找用户
-     *
-     * @param roleIds
-     * @return
-     */
-    List<ApproveUserResult> findByRoleIdsForResult(@Param("roleIds") List<Long> roleIds);
-
     /**
      * 根据id集合获取
      *

+ 0 - 45
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/AttachmentCommonService.java

@@ -5,48 +5,12 @@ import com.qmth.teachcloud.common.entity.BasicAttachment;
 import javax.servlet.http.HttpServletResponse;
 import java.io.File;
 import java.util.List;
-import java.util.Map;
 
 /**
  * 试卷、题卡下载、预览等操作公共服务service
  */
 public interface AttachmentCommonService {
 
-
-    /**
-     * 文件预览
-     *
-     * @param path 文件路径(json格式)
-     * @return String
-     */
-    public String previewFile(String path);
-
-    /**
-     * 文件预览
-     *
-     * @param path 文件路径
-     * @return String
-     */
-    public String previewFile(String path, String type, Boolean isExpire);
-
-    /**
-     * 文件预览
-     *
-     * @param attachmentId 附件ID
-     * @return Map
-     */
-    public Map<String, String> previewFile(Long attachmentId, Boolean isExpire);
-
-
-    /**
-     * 下载文件
-     *
-     * @param rootPath     文件本地存储路径(支持多级)
-     * @param fileName     保存本地文件名
-     * @param attachmentId 附件表对象ID
-     */
-    public File downloadFile(String rootPath, String fileName, Long attachmentId) throws Exception;
-
     /**
      * 下载文件
      *
@@ -65,13 +29,4 @@ public interface AttachmentCommonService {
      * @param files    需要下载的文件集合
      */
     public void zipFiles(HttpServletResponse response, String filePath, String zipName, List<File> files);
-
-    /**
-     * 下载文件到本地并压缩返回
-     *
-     * @param response response对象
-     * @param filePath 文件根目录
-     * @param zipName  zip文件名
-     */
-    public void zipFiles(HttpServletResponse response, String filePath, String zipName);
 }

+ 0 - 11
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/BasicAttachmentService.java

@@ -5,7 +5,6 @@ import com.qmth.teachcloud.common.entity.BasicAttachment;
 import com.qmth.teachcloud.common.enums.UploadFileEnum;
 import org.springframework.web.multipart.MultipartFile;
 
-import java.io.File;
 import java.io.IOException;
 import java.util.List;
 
@@ -19,16 +18,6 @@ import java.util.List;
  */
 public interface BasicAttachmentService extends IService<BasicAttachment> {
 
-    /**
-     * 保存html文件
-     *
-     * @param rootPath    文件路径
-     * @param fileName    文件名
-     * @param htmlContent 文件内容
-     * @return
-     */
-    public File saveAttachmentHtml(String rootPath, String fileName, String htmlContent);
-
     /**
      * 保存附件
      *

+ 0 - 9
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/BasicCourseService.java

@@ -34,15 +34,6 @@ public interface BasicCourseService extends IService<BasicCourse> {
      */
     void verifyCourseInfo(Long schoolId, String courseCode, String courseName, Long userId);
 
-    /**
-     * 根据用户登录名和真实名称查找其可命的课程
-     *
-     * @param loginName 登录名
-     * @param realName  真实名
-     * @return 课程集合
-     */
-    List<CourseInfoDto> findByUserLoginNameAndRealName(String loginName, String realName);
-
     BasicCourse findByCourseCode(String courseCode);
 
     BasicCourse findByCourseCode(String courseCode,Long schoolId);

+ 2 - 27
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysOrgService.java

@@ -3,7 +3,6 @@ package com.qmth.teachcloud.common.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.teachcloud.common.bean.dto.OrgDto;
 import com.qmth.teachcloud.common.entity.SysOrg;
-import com.qmth.teachcloud.common.entity.SysUser;
 import com.qmth.teachcloud.common.enums.OrgTypeEnum;
 import com.qmth.teachcloud.common.enums.userPush.SpecialPrivilegeEnum;
 
@@ -62,16 +61,6 @@ public interface SysOrgService extends IService<SysOrg> {
      */
     Long searchOrInsert(Long schoolId, String collegeName);
 
-    /**
-     * 根据机构类型查找用户
-     *
-     * @param schoolId
-     * @param orgId
-     * @param orgTypeEnum
-     * @return
-     */
-    List<SysUser> findUserByOrgType(Long schoolId, Long orgId, OrgTypeEnum orgTypeEnum);
-
     /**
      * 递归树查询(同级及以上)
      *
@@ -82,15 +71,6 @@ public interface SysOrgService extends IService<SysOrg> {
      */
     List<SysOrg> findByConnectByParentId(Long orgId, Boolean school, Boolean college);
 
-    /**
-     * 递归树查询(同级及以上)
-     *
-     * @param orgId
-     * @param orgType
-     * @return
-     */
-    List<SysOrg> findByJxzyyConnectByParentId(Long orgId, OrgTypeEnum orgType);
-
     /**
      * 递归树查询(同级及以下)
      *
@@ -119,6 +99,7 @@ public interface SysOrgService extends IService<SysOrg> {
 
     /**
      * 根据用户id查找其所在的机构和下属机构集合
+     *
      * @param userId 用户id
      * @return 机构id集合
      */
@@ -126,15 +107,9 @@ public interface SysOrgService extends IService<SysOrg> {
 
     /**
      * 根据机构集合查询其下属机构id集合
+     *
      * @param orgIdList 机构id集合
      * @return 机构id集合
      */
     Set<Long> findDeepOrgIdListByOrgIdList(List<Long> orgIdList);
-
-    /**
-     *  根据ID查询
-     * @param useOrgIds id集合
-     * @return list
-     */
-    List<SysOrg> findByOrgIds(List<Long> useOrgIds);
 }

+ 0 - 29
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysPrivilegeService.java

@@ -34,37 +34,8 @@ public interface SysPrivilegeService extends IService<SysPrivilege> {
 
     List<PrivilegeDto> listPrivilegeTreeAuth();
 
-    /**
-     * 是否包含某个权限
-     *
-     * @param urls
-     * @return
-     */
-    boolean existsPrivilege(String... urls);
-
     List<SysPrivilege> getClientUrlByUserId(Long userId);
 
-//    /**
-//     * 获取所有角色权限
-//     *
-//     * @return
-//     */
-//    List<SysRolePrivilegeDto> getRolePrivilegeList();
-//
-//    /**
-//     * 获取所有角色权限数量
-//     *
-//     * @return
-//     */
-//    Integer getRolePrivilegeCount();
-//
-//    /**
-//     * 查找默认菜单权限
-//     *
-//     * @return
-//     */
-//    List<SysPrivilege> findByDefault();
-
     /**
      * 递归树查询(同级及以上)
      *

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

@@ -13,5 +13,4 @@ import com.qmth.teachcloud.common.entity.SysRoleCourse;
  */
 public interface SysRoleCourseService extends IService<SysRoleCourse> {
 
-    void removeByRoleId(Long id);
 }

+ 0 - 3
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysRoleService.java

@@ -19,9 +19,6 @@ public interface SysRoleService extends IService<SysRole> {
 
     IPage<SysRole> list(String name, Boolean enable, Integer pageNumber, Integer pageSize);
 
-    @Deprecated
-    boolean saveRole(SysRole role);
-
     /**
      * 新增角色
      *

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

@@ -25,6 +25,4 @@ public interface SysUserRoleService extends IService<SysUserRole> {
     void removeByUserId(Long id);
 
     MenuResult listByUserId();
-
-    void rebindPrivileges(Long id);
 }

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

@@ -119,17 +119,6 @@ public interface SysUserService extends IService<SysUser> {
      */
     Map<String, Object> executeSysUserImportLogic(List<LinkedMultiValueMap<Integer, Object>> finalList, Map<String, Object> map) throws NoSuchAlgorithmException;
 
-    /**
-     * 获取同级别下一级审批人
-     *
-     * @param courseCode
-     * @param orgIds
-     * @param realName
-     * @param flowApproveNameEnum
-     * @return
-     */
-    public List<ApproveUserResult> findByRootApprove(String courseCode, List<Long> orgIds, String realName, FlowApproveNameEnum flowApproveNameEnum);
-
     /**
      * 根据id获取
      *
@@ -146,14 +135,6 @@ public interface SysUserService extends IService<SysUser> {
      */
     public ApproveUserResult findByIds(List<Long> ids);
 
-    /**
-     * 根据机构id获取
-     *
-     * @param orgIdSet
-     * @return
-     */
-    public List<ApproveUserResult> findByOrgIds(Set<Long> orgIdSet);
-
     /**
      * 校验短信验证码
      *
@@ -219,22 +200,6 @@ public interface SysUserService extends IService<SysUser> {
      */
     List<UserRoleNameResult> selectRoleNames(List<Long> userIds);
 
-    /**
-     * 根据角色ids查找用户
-     *
-     * @param roleIds
-     * @return
-     */
-    List<SysUser> findByRoleIds(List<Long> roleIds);
-
-    /**
-     * 根据角色ids查找用户
-     *
-     * @param roleIds
-     * @return
-     */
-    List<ApproveUserResult> findByRoleIdsForResult(List<Long> roleIds);
-
     /**
      * 根据id集合获取
      *

+ 0 - 44
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/TeachcloudCommonService.java

@@ -1,10 +1,8 @@
 package com.qmth.teachcloud.common.service;
 
 import com.qmth.teachcloud.common.bean.auth.AuthBean;
-import com.qmth.teachcloud.common.bean.dto.PrivilegeCacheDto;
 import com.qmth.teachcloud.common.bean.result.LoginResult;
 import com.qmth.teachcloud.common.bean.result.MenuResult;
-import com.qmth.teachcloud.common.bean.result.RolePrivilegeResult;
 import com.qmth.teachcloud.common.entity.BasicAttachment;
 import com.qmth.teachcloud.common.entity.SysRolePrivilege;
 import com.qmth.teachcloud.common.entity.SysUser;
@@ -15,7 +13,6 @@ import com.qmth.teachcloud.common.enums.SystemCodeEnum;
 
 import javax.servlet.http.HttpServletResponse;
 import java.io.File;
-import java.io.InputStream;
 import java.security.NoSuchAlgorithmException;
 import java.util.List;
 import java.util.Map;
@@ -104,13 +101,6 @@ public interface TeachcloudCommonService {
      */
     public Set<String> getPrivilegeUrl(PrivilegePropertyEnum privilegePropertyEnum, Long schoolId);
 
-    /**
-     * 给学校赋予权限的公共方法(权限是否启用跟学校联动)
-     *
-     * @param schoolIdSet 所有学校主键set
-     */
-    public void addSchoolPrivilege(Set<Long> schoolIdSet);
-
     /**
      * 删除用户信息
      *
@@ -127,22 +117,6 @@ public interface TeachcloudCommonService {
      */
     public void removeUserInfoBatch(List<Long> userIds, boolean all);
 
-    /**
-     * 修改角色状态
-     *
-     * @param roleIds
-     * @param enable
-     */
-    public void updateRoleEnable(Long[] roleIds, Boolean enable);
-
-    /**
-     * 查询用户或角色权限信息
-     *
-     * @param privilegeCacheDtoList
-     * @return
-     */
-    public RolePrivilegeResult getUserOrRolePrivilege(List<PrivilegeCacheDto> privilegeCacheDtoList);
-
     /**
      * 文件预览
      *
@@ -175,24 +149,6 @@ public interface TeachcloudCommonService {
      */
     public String readFileContent(String path);
 
-    /**
-     * 获取文件流
-     *
-     * @param path
-     * @param pdf
-     * @return
-     */
-    public InputStream getFileInputStream(String path, boolean pdf) throws Exception;
-
-    /**
-     * 获取文件byte数据
-     *
-     * @param path
-     * @param pdf
-     * @return
-     */
-    public byte[] getFileByte(String path, boolean pdf) throws Exception;
-
     /**
      * 获取文件
      *

+ 0 - 140
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/AttachmentCommonServiceImpl.java

@@ -21,10 +21,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.net.URLEncoder;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
-import java.util.Objects;
 
 /**
  * 试卷、题卡下载、预览等操作公共服务service impl
@@ -47,112 +44,6 @@ public class AttachmentCommonServiceImpl implements AttachmentCommonService {
     @Resource
     FileStoreUtil fileStoreUtil;
 
-    /**
-     * 文件预览
-     *
-     * @param path 预览路径
-     * @return String
-     */
-    @Override
-    public String previewFile(String path) {
-        String url;
-        JSONObject jsonObject = JSONObject.parseObject(path);
-        String attachmentType = (String) jsonObject.get(SystemConstant.TYPE);
-        String filePath = (String) jsonObject.get(SystemConstant.PATH);
-        UploadFileEnum uploadFileEnum = UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
-        if (Objects.equals(attachmentType, SystemConstant.LOCAL)) {
-            String hostUrl = SystemConstant.getLocalFileHost(dictionaryConfig.sysDomain().getFileHost());
-            filePath = SystemConstant.getLocalFilePath(hostUrl, filePath);
-            if (filePath.startsWith("/")) {
-                url = hostUrl + filePath;
-            } else {
-                url = hostUrl + File.separator + filePath;
-            }
-        } else {
-            url = fileStoreUtil.getPrivateUrl(filePath, uploadFileEnum.getFssType());
-        }
-        return url;
-    }
-
-    /**
-     * 文件预览
-     *
-     * @param path     附件路径
-     * @param type     保存类型:本地、OSS
-     * @param isExpire url是否带过期时间
-     * @return String
-     */
-    @Override
-    public String previewFile(String path, String type, Boolean isExpire) {
-        if (StringUtils.isBlank(path)) {
-            return null;
-        }
-
-        String pathUrl;
-        if (Objects.equals(type, SystemConstant.LOCAL)) {
-            String hostUrl = SystemConstant.getLocalFileHost(dictionaryConfig.sysDomain().getFileHost());
-            path = SystemConstant.getLocalFilePath(hostUrl, path);
-            if (path.startsWith("/")) {
-                pathUrl = hostUrl + path;
-            } else {
-                pathUrl = hostUrl + File.separator + path;
-            }
-        } else {
-            pathUrl = fileStoreUtil.getPrivateUrl(path, fileStoreUtil.getUploadEnumByPath(path).getFssType());
-
-        }
-        return pathUrl;
-    }
-
-    /**
-     * 文件预览
-     *
-     * @param attachmentId 附件ID
-     * @param isExpire     url是否带过期时间
-     * @return String
-     */
-    @Override
-    public Map<String, String> previewFile(Long attachmentId, Boolean isExpire) {
-        BasicAttachment attachment = basicAttachmentService.getById(attachmentId);
-        if (attachment == null) {
-            return null;
-        }
-
-        Map<String, String> map = new HashMap<>();
-
-        String pathUrl;
-        JSONObject jsonObject = JSONObject.parseObject(attachment.getPath());
-        String attachmentType = (String) jsonObject.get(SystemConstant.TYPE);
-        String filePath = (String) jsonObject.get(SystemConstant.PATH);
-        UploadFileEnum uploadFileEnum = jsonObject.get(SystemConstant.UPLOAD_TYPE).toString().contains(UploadFileEnum.HTML.name()) ? UploadFileEnum.HTML : UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
-
-        if (Objects.equals(attachmentType, SystemConstant.LOCAL)) {
-            String hostUrl = SystemConstant.getLocalFileHost(dictionaryConfig.sysDomain().getFileHost());
-            filePath = SystemConstant.getLocalFilePath(hostUrl, filePath);
-            if (filePath.startsWith("/")) {
-                pathUrl = hostUrl + filePath;
-            } else {
-                pathUrl = hostUrl + File.separator + filePath;
-            }
-        } else {
-            pathUrl = fileStoreUtil.getPrivateUrl(filePath, uploadFileEnum.getFssType());
-        }
-        map.put("url", pathUrl);
-        if (attachment.getType().equals(".html")) {
-            String htmlMd5 = (String) jsonObject.get("htmlMd5");
-            map.put("md5", htmlMd5);
-        } else {
-            map.put("md5", attachment.getMd5());
-        }
-        return map;
-    }
-
-    @Override
-    public File downloadFile(String rootPath, String fileName, Long attachmentId) throws Exception {
-        BasicAttachment basicAttachment = basicAttachmentService.getById(attachmentId);
-        return downloadFile(rootPath, fileName, basicAttachment);
-    }
-
     @Override
     public File downloadFile(String rootPath, String fileName, BasicAttachment basicAttachment) throws Exception {
         if (basicAttachment == null) {
@@ -221,37 +112,6 @@ public class AttachmentCommonServiceImpl implements AttachmentCommonService {
         }
     }
 
-    @Override
-    public void zipFiles(HttpServletResponse response, String filePath, String zipName) {
-        File rootFile = new File(filePath);
-        // 创建保存目录
-        if (!rootFile.exists()) {
-            throw ExceptionResultEnum.ERROR.exception("根目录不存在");
-        }
-        File zipFile = null;
-        try {
-            zipName = StringUtils.isNotBlank(zipName) ? zipName : UUID.fastUUID() + ".zip";
-            if (!zipName.endsWith(".zip")) {
-                throw ExceptionResultEnum.ERROR.exception("压缩文件必须为zip");
-            }
-            zipFile = FileUtil.file(TEMP_DIR, zipName);
-            // 压缩文件
-            if (!zipFile.exists()) {
-                zipFile.createNewFile();
-            }
-            ZipUtil.zip(filePath, zipFile.getAbsolutePath(), true);
-            outputFile(response, zipFile, zipName);
-        } catch (Exception e) {
-            throw ExceptionResultEnum.ERROR.exception("下载失败");
-        } finally {
-            // 删除zip文件
-            FileUtil.del(zipFile);
-            // 删除压缩内容
-            FileUtil.del(filePath);
-        }
-    }
-
-
     public static void outputFile(HttpServletResponse response, File file, String fileName) {
         try {
             if (!file.exists()) {

+ 0 - 31
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/BasicAttachmentServiceImpl.java

@@ -46,43 +46,12 @@ import java.util.StringJoiner;
 public class BasicAttachmentServiceImpl extends ServiceImpl<BasicAttachmentMapper, BasicAttachment> implements BasicAttachmentService {
     private final static Logger log = LoggerFactory.getLogger(BasicAttachmentServiceImpl.class);
 
-//    @Resource
-//    OssUtil ossUtil;
-
     @Resource
     private FileStoreUtil fileStoreUtil;
 
     @Autowired
     private DictionaryConfig dictionaryConfig;
 
-
-    /**
-     * 保存html附件
-     *
-     * @param fileName
-     * @param htmlContent
-     * @return
-     * @throws IOException
-     */
-    @Override
-    public File saveAttachmentHtml(String rootPath, String fileName, String htmlContent) {
-        File file = null;
-        try {
-            byte[] bytes = htmlContent.getBytes();
-            //上传至服务器
-            File mkdir = new File(rootPath);
-            if (!mkdir.exists()) {
-                mkdir.mkdirs();
-            }
-            file = new File(rootPath, fileName);
-            FileCopyUtils.copy(bytes, file);
-            //计算html文件md5
-        } catch (Exception e) {
-            log.error(SystemConstant.LOG_ERROR, e);
-        }
-        return file;
-    }
-
     /**
      * 保存附件
      *

+ 0 - 22
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/BasicCourseServiceImpl.java

@@ -70,32 +70,10 @@ public class BasicCourseServiceImpl extends ServiceImpl<BasicCourseMapper, Basic
                         .exception("课程代码和课程名称不匹配,课程代码为 :'" + courseCode + "',输入的课程名称 :'" + courseName + "',实际该代码对应的课程名称 :'" + tmp.getName() + "'。");
             }
         } else {
-//            BasicCourse basicCourse = new BasicCourse();
-//            basicCourse.setName(courseName);
-//            basicCourse.setCode(courseCode);
-//            basicCourse.setSchoolId(schoolId);
-//            basicCourse.setId(SystemConstant.getDbUuid());
-//            basicCourse.setCreateId(userId);
-//            basicCourse.setOrgId(sysUserService.getById(userId).getOrgId());
-//            basicCourse.setCreateTime(System.currentTimeMillis());
-//            basicCourse.setTeachingRoomId();
-//            this.saveOrUpdate(basicCourse);
             throw ExceptionResultEnum.ERROR.exception("考务文件中 【课程代码】为 :" + courseCode + ",【课程名称】为 : " + courseName + ",在基础课程信息中不存在,请先添加课程");
         }
     }
 
-    @Override
-    public List<CourseInfoDto> findByUserLoginNameAndRealName(String loginName, String realName) {
-        System.out.println("---");
-        if (loginName == null) {
-            loginName = "";
-        }
-        if (realName == null) {
-            realName = "";
-        }
-        return basicCourseMapper.findByUserLoginNameAndRealName(loginName, realName);
-    }
-
     @Deprecated
     @Override
     public BasicCourse findByCourseCode(String courseCode) {

+ 0 - 32
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysOrgServiceImpl.java

@@ -321,19 +321,6 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
         return orgId;
     }
 
-    /**
-     * 根据机构类型查找用户
-     *
-     * @param schoolId
-     * @param orgId
-     * @param orgTypeEnum
-     * @return
-     */
-    @Override
-    public List<SysUser> findUserByOrgType(Long schoolId, Long orgId, OrgTypeEnum orgTypeEnum) {
-        return sysOrgMapper.findUserByOrgType(schoolId, orgId, orgTypeEnum.name());
-    }
-
     /**
      * 递归树查询(同级及以上)
      *
@@ -347,18 +334,6 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
         return sysOrgMapper.findByConnectByParentId(orgId, school, college);
     }
 
-    /**
-     * 递归树查询(同级及以下)
-     *
-     * @param orgId
-     * @param orgType
-     * @return
-     */
-    @Override
-    public List<SysOrg> findByJxzyyConnectByParentId(Long orgId, OrgTypeEnum orgType) {
-        return sysOrgMapper.findByJxzyyConnectByParentId(orgId, Objects.nonNull(orgType) ? orgType.name() : null);
-    }
-
     /**
      * 递归树查询(同级及以下)
      *
@@ -417,13 +392,6 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
         return finishedIdSet;
     }
 
-    @Override
-    public List<SysOrg> findByOrgIds(List<Long> useOrgIds) {
-        QueryWrapper<SysOrg> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().in(SysOrg::getId, useOrgIds);
-        return this.list(queryWrapper);
-    }
-
     /**
      * 根据子机构id深度优先搜索其父机构们
      *

+ 0 - 49
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysPrivilegeServiceImpl.java

@@ -199,24 +199,6 @@ public class SysPrivilegeServiceImpl extends ServiceImpl<SysPrivilegeMapper, Sys
         return new ArrayList<>(map.values());
     }
 
-    /**
-     * 是否包含某个权限
-     *
-     * @param urls
-     * @return
-     */
-    @Override
-    public boolean existsPrivilege(String... urls) {
-//        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        QueryWrapper<SysPrivilege> sysPrivilegeQueryWrapper = new QueryWrapper<>();
-        sysPrivilegeQueryWrapper.lambda().in(SysPrivilege::getUrl, urls)
-                .eq(SysPrivilege::getType, PrivilegeEnum.URL)
-                .eq(SysPrivilege::getDefaultAuth, true)
-                .eq(SysPrivilege::getEnable, true);
-//                .eq(SysPrivilege::getSchoolId, sysUser.getSchoolId());
-        return this.count(sysPrivilegeQueryWrapper) > 0 ? true : false;
-    }
-
     @Override
     public List<SysPrivilege> getClientUrlByUserId(Long userId) {
         return this.baseMapper.getClientUrlByUserId(userId);
@@ -233,37 +215,6 @@ public class SysPrivilegeServiceImpl extends ServiceImpl<SysPrivilegeMapper, Sys
         return sysPrivilegeMapper.findByConnectByParentId(privilegeId);
     }
 
-//    /**
-//     * 获取所有角色权限
-//     *
-//     * @return
-//     */
-//    @Override
-//    public List<SysRolePrivilegeDto> getRolePrivilegeList() {
-//        return sysPrivilegeMapper.getRolePrivilegeList();
-//    }
-//
-//
-//    /**
-//     * 获取所有角色权限数量
-//     *
-//     * @return
-//     */
-//    @Override
-//    public Integer getRolePrivilegeCount() {
-//        return sysPrivilegeMapper.getRolePrivilegeCount();
-//    }
-//
-//    /**
-//     * 查找默认菜单权限
-//     *
-//     * @return
-//     */
-//    @Override
-//    public List<SysPrivilege> findByDefault() {
-//        return sysPrivilegeMapper.findByDefault();
-//    }
-
     /**
      * 获取菜单树公用
      *

+ 0 - 7
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysRoleCourseServiceImpl.java

@@ -1,6 +1,5 @@
 package com.qmth.teachcloud.common.service.impl;
 
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.teachcloud.common.entity.SysRoleCourse;
 import com.qmth.teachcloud.common.mapper.SysRoleCourseMapper;
@@ -18,10 +17,4 @@ import org.springframework.stereotype.Service;
 @Service
 public class SysRoleCourseServiceImpl extends ServiceImpl<SysRoleCourseMapper, SysRoleCourse> implements SysRoleCourseService {
 
-    @Override
-    public void removeByRoleId(Long id) {
-        UpdateWrapper<SysRoleCourse> updateWrapper = new UpdateWrapper<>();
-        updateWrapper.lambda().eq(SysRoleCourse::getRoleId, id);
-        this.remove(updateWrapper);
-    }
 }

+ 0 - 50
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysRoleServiceImpl.java

@@ -75,56 +75,6 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
         return this.baseMapper.listPage(new Page<>(pageNumber, pageSize), schoolId, SystemConstant.translateSpecificSign(name), enable);
     }
 
-    @Transactional
-    @Override
-    @Deprecated
-    public boolean saveRole(SysRole role) {
-        Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
-        role.setSchoolId(schoolId);
-        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-
-        QueryWrapper<SysRole> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(SysRole::getSchoolId, role.getSchoolId()).eq(SysRole::getName, role.getName());
-        SysRole sysRole = this.getOne(queryWrapper);
-        boolean isSuccess;
-        // 新增
-        if (Objects.isNull(role.getId())) {
-            if (sysRole != null) {
-                throw ExceptionResultEnum.ERROR.exception("角色已存在");
-            }
-            role.setId(SystemConstant.getDbUuid());
-            role.setCreateId(sysUser.getId());
-            role.setCreateTime(System.currentTimeMillis());
-            isSuccess = this.save(role);
-        }
-        // 修改
-        else {
-            if (sysRole != null && sysRole.getId().longValue() != role.getId().longValue()) {
-                throw ExceptionResultEnum.ERROR.exception("角色已存在");
-            }
-
-            role.setUpdateId(sysUser.getId());
-            role.setUpdateTime(System.currentTimeMillis());
-
-            //删除权限
-            sysRolePrivilegeService.removeByRoleId(role.getId());
-            isSuccess = this.updateById(role);
-
-        }
-
-        // 新增权限
-        sysRolePrivilegeService.saveBatch(role);
-
-        // 更新sys_user_role
-        sysUserRoleService.rebindPrivileges(role.getId());
-
-        // 清除缓存
-        commonCacheService.removeUserAuthCache(sysUser.getId());
-        commonCacheService.removeRolePrivilegeCache(role.getId());
-
-        return isSuccess;
-    }
-
     /**
      * 新增角色
      *

+ 0 - 28
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysUserRoleServiceImpl.java

@@ -58,32 +58,4 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         return commonCacheService.userMenuCache(sysUser.getId());
     }
-
-    @Override
-    public void rebindPrivileges(Long roleId) {
-        // 查询绑定该角色的所有用户
-        List<SysUserRole> sysUserRoles = this.listByRoleId(roleId);
-        Set<Long> userIds = sysUserRoles.stream().map(m -> m.getUserId()).collect(Collectors.toSet());
-        //删除
-        UpdateWrapper<SysUserRole> userRoleUpdateWrapper = new UpdateWrapper<>();
-        userRoleUpdateWrapper.lambda().in(SysUserRole::getUserId, userIds);
-        List<SysUserRole> list = new ArrayList<>();
-
-        for (Long userId : userIds) {
-            List<SysRole> sysRoles = this.listRoleByUserId(userId);
-            for (SysRole role : sysRoles) {
-                List<SysRolePrivilege> rolePrivileges = commonCacheService.rolePrivilegeCache(role.getId());
-                for (SysRolePrivilege rolePrivilege : rolePrivileges) {
-                    SysUserRole userRole = new SysUserRole();
-                    userRole.setUserId(userId);
-                    userRole.setRoleId(role.getId());
-                    userRole.setPrivilegeId(rolePrivilege.getPrivilegeId());
-                    list.add(userRole);
-                }
-            }
-
-        }
-
-        this.saveBatch(list);
-    }
 }

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

@@ -758,62 +758,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
             }
         }
         map.put("userPushParamList", userPushParamList);
-//        UserBatchDisposeResult userBatchDisposeResult = this.disposeUserInfoHelp(userSaveParamsList, sysUser);
-//        List<SysUser> sysUserList = userBatchDisposeResult.getUserList();
-//        List<SysUserRole> sysUserRoleList = userBatchDisposeResult.getUserRoleList();
-//        Set<Long> removeUserIdSet = userBatchDisposeResult.getRemoveIdSet();
-//        Set<Long> updateUserIdSet = userBatchDisposeResult.getUpdateIdSet();
-//        // 保存用户
-//        this.saveOrUpdateBatch(sysUserList);
-//        // 要更新的用户删除原先的权限
-//        for (Long id : removeUserIdSet) {
-//            QueryWrapper<SysUserRole> sysUserRoleQueryWrapper = new QueryWrapper<>();
-//            sysUserRoleQueryWrapper.lambda().eq(SysUserRole::getUserId, id);
-//            sysUserRoleService.remove(sysUserRoleQueryWrapper);
-//            commonCacheService.removeUserRolePrivilegeCache(id);
-//        }
-//        // 更新用户角色权限
-//        sysUserRoleService.saveOrUpdateBatch(sysUserRoleList);
-//        // 要更新的角色删除缓存
-//        for (Long id : removeUserIdSet) {
-//            commonService.removeUserInfo(id, true);
-//        }
-//        // 基础数据变更更新缓存
-//        for (Long id : updateUserIdSet) {
-//            commonCacheService.updateUserCache(id);
-//            commonCacheService.updateUserAuthCache(id);
-//        }
         return map;
     }
 
-    /**
-     * 获取同级别下一级审批人
-     *
-     * @param courseCode          courseCode
-     * @param orgIds              orgIds
-     * @param realName            realName
-     * @param flowApproveNameEnum flowApproveNameEnum
-     * @return return
-     */
-    @Override
-    public List<ApproveUserResult> findByRootApprove(String courseCode, List<Long> orgIds, String realName, FlowApproveNameEnum flowApproveNameEnum) {
-        Long schoolId = SystemConstant.getHeadOrUserSchoolId();
-        Set<Long> orgIdsSet = new HashSet<>();
-        if (Objects.nonNull(courseCode)) {
-            QueryWrapper<BasicCourse> basicCourseQueryWrapper = new QueryWrapper<>();
-            basicCourseQueryWrapper.lambda().eq(BasicCourse::getSchoolId, schoolId)
-                    .eq(BasicCourse::getCode, courseCode);
-            BasicCourse basicCourse = basicCourseService.getOne(basicCourseQueryWrapper);
-            Optional.ofNullable(basicCourse).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("课程数据为空"));
-            Optional.ofNullable(basicCourse.getTeachingRoomId()).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("课程机构为空"));
-            List<SysOrg> sysOrgList = sysOrgService.findByConnectByParentId(basicCourse.getTeachingRoomId(), true, true);
-            orgIdsSet.addAll(sysOrgList.stream().map(BaseEntity::getId).collect(Collectors.toSet()));
-        } else {
-            orgIdsSet.addAll(orgIds);
-        }
-        return sysUserService.filterFlowPrivilege(schoolId, orgIdsSet, true, flowApproveNameEnum, realName);
-    }
-
     /**
      * 根据id获取
      *
@@ -836,17 +783,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
         return sysUserMapper.findByIds(ids);
     }
 
-    /**
-     * 根据机构id获取
-     *
-     * @param orgIdSet
-     * @return
-     */
-    @Override
-    public List<ApproveUserResult> findByOrgIds(Set<Long> orgIdSet) {
-        return sysUserMapper.findByOrgIds(orgIdSet);
-    }
-
     @Override
     public void checkSmsCode(Long userId, String mobileNumber, String code) {
         SysConfig value = sysConfigService.getByKey("sys.code.enable");
@@ -1039,28 +975,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
         return sysUserMapper.selectRoleNames(userIds);
     }
 
-    /**
-     * 根据角色ids查找用户
-     *
-     * @param roleIds
-     * @return
-     */
-    @Override
-    public List<SysUser> findByRoleIds(List<Long> roleIds) {
-        return sysUserMapper.findByRoleIds(roleIds);
-    }
-
-    /**
-     * 根据角色ids查找用户
-     *
-     * @param roleIds
-     * @return
-     */
-    @Override
-    public List<ApproveUserResult> findByRoleIdsForResult(List<Long> roleIds) {
-        return sysUserMapper.findByRoleIdsForResult(roleIds);
-    }
-
     /**
      * 根据id集合获取
      *

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

@@ -5,7 +5,6 @@ import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.util.ZipUtil;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.google.common.reflect.TypeToken;
 import com.google.gson.Gson;
 import com.qmth.boot.core.enums.Platform;
@@ -14,7 +13,6 @@ import com.qmth.teachcloud.common.bean.auth.ExpireTimeBean;
 import com.qmth.teachcloud.common.bean.dto.MenuDto;
 import com.qmth.teachcloud.common.bean.dto.MenuPrivilegeDto;
 import com.qmth.teachcloud.common.bean.dto.OrgDto;
-import com.qmth.teachcloud.common.bean.dto.PrivilegeCacheDto;
 import com.qmth.teachcloud.common.bean.result.*;
 import com.qmth.teachcloud.common.config.DictionaryConfig;
 import com.qmth.teachcloud.common.contant.SpringContextHolder;
@@ -24,12 +22,10 @@ import com.qmth.teachcloud.common.enums.*;
 import com.qmth.teachcloud.common.service.*;
 import com.qmth.teachcloud.common.util.*;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.tomcat.util.http.fileupload.IOUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.LinkedMultiValueMap;
 
 import javax.annotation.Resource;
@@ -341,58 +337,6 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
         return Objects.nonNull(sysPrivilegeList) && sysPrivilegeList.size() > 0 ? sysPrivilegeList.stream().map(s -> s.getUrl()).collect(Collectors.toSet()) : null;
     }
 
-    @Transactional
-    @Override
-    public void addSchoolPrivilege(Set<Long> schoolIdSet) {
-//        Set<Long> pidSet = sysPrivilegeService.list().stream().map(SysPrivilege::getSchoolId).collect(Collectors.toSet());
-//        // 权限表里没有该学校主键的
-//        Set<Long> targetSchoolIdSet = schoolIdSet.stream().filter(e -> !pidSet.contains(e)).collect(Collectors.toSet());
-        QueryWrapper<SysPrivilege> queryWrapper = new QueryWrapper<>();
-//        queryWrapper.lambda().eq(SysPrivilege::getSchoolId, SystemConstant.DEFAULT_PRIVILEGE_SCHOOL);
-        queryWrapper.lambda().eq(SysPrivilege::getDefaultAuth, true)
-                .eq(SysPrivilege::getEnable, true);
-        List<SysPrivilege> sysPrivileges = sysPrivilegeService.list(queryWrapper);
-        if (sysPrivileges.size() == 0) {
-            throw ExceptionResultEnum.ERROR.exception("默认学校权限不存在");
-        }
-//        for (Long newSchoolId : targetSchoolIdSet) {
-//            // 一个学校一个学校的权限加 如果放在外面的话必须在map的key中关联进学校主键
-//            Map<Long, Long> map = new HashMap<>();
-//            List<SysPrivilege> newList = new ArrayList<>();
-//            BasicSchool basicSchool = basicSchoolService.getById(newSchoolId);
-//            if (Objects.isNull(basicSchool)) {
-//                throw ExceptionResultEnum.ERROR.exception("未找到学校信息");
-//            }
-//            for (SysPrivilege sysPrivilege : sysPrivileges) {
-//                SysPrivilege cell = new SysPrivilege();
-//                BeanUtils.copyProperties(sysPrivilege, cell);
-//                Long id = SystemConstant.getDbUuid();
-//                map.put(cell.getId(), id);
-//                cell.setId(id);
-//                cell.setSchoolId(newSchoolId);
-//                cell.setEnable(basicSchool.getEnable());
-//                newList.add(cell);
-//            }
-//            for (SysPrivilege sysPrivilege : newList) {
-//                if (Objects.nonNull(sysPrivilege.getParentId())) {
-//                    sysPrivilege.setParentId(map.get(sysPrivilege.getParentId()));
-//                }
-//                String relateId = sysPrivilege.getRelated();
-//                if (StringUtils.isNotBlank(relateId)) {
-//                    String[] relateIds = relateId.split(",");
-//                    List<String> newRelateIds = new ArrayList<>();
-//                    for (String id : relateIds) {
-//                        Long lid = Long.valueOf(id.trim());
-//                        newRelateIds.add(String.valueOf(map.get(lid)));
-//                    }
-//                    String newRelateId = String.join(",", newRelateIds);
-//                    sysPrivilege.setRelated(newRelateId);
-//                }
-//            }
-//            sysPrivilegeService.saveBatch(newList);
-//        }
-    }
-
     /**
      * 删除用户信息
      *
@@ -484,97 +428,6 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
         }).start();
     }
 
-    /**
-     * 修改角色状态
-     *
-     * @param roleIds
-     * @param enable
-     */
-    @Override
-    public void updateRoleEnable(Long[] roleIds, Boolean enable) {
-        SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
-        List<SysRole> dbRoleList = sysRoleService.listByIds(Arrays.asList(roleIds));
-        if (Objects.isNull(dbRoleList) || dbRoleList.size() == 0) {
-            throw ExceptionResultEnum.ROLE_NO_DATA.exception();
-        }
-
-        //修改角色
-        UpdateWrapper<SysRole> sysRoleUpdateWrapper = new UpdateWrapper<>();
-        sysRoleUpdateWrapper.lambda().in(SysRole::getId, roleIds)
-                .set(SysRole::getEnable, enable)
-                .set(SysRole::getUpdateId, requestUser.getId())
-                .set(SysRole::getUpdateTime, System.currentTimeMillis());
-        sysRoleService.update(sysRoleUpdateWrapper);
-
-        //修改角色权限
-        UpdateWrapper<SysRolePrivilege> sysRolePrivilegeUpdateWrapper = new UpdateWrapper<>();
-        sysRolePrivilegeUpdateWrapper.lambda().in(SysRolePrivilege::getRoleId, roleIds)
-                .set(SysRolePrivilege::getEnable, enable);
-        sysRolePrivilegeService.update(sysRolePrivilegeUpdateWrapper);
-
-        //修改用户角色权限
-        UpdateWrapper<SysUserRole> sysUserRoleUpdateWrapper = new UpdateWrapper<>();
-        sysUserRoleUpdateWrapper.lambda().in(SysUserRole::getRoleId, roleIds)
-                .set(SysUserRole::getEnable, enable);
-        sysUserRoleService.update(sysUserRoleUpdateWrapper);
-
-        List<Long> updateRoleIds = new ArrayList<>();
-        for (SysRole dbRole : dbRoleList) {
-            //如果数据库的状态和修改的状态不同
-            if (Objects.nonNull(dbRole.getEnable()) && dbRole.getEnable().booleanValue() != enable.booleanValue()) {
-                //更新角色权限
-                commonCacheService.updateRolePrivilegeCache(dbRole.getId());
-                updateRoleIds.add(dbRole.getId());
-            }
-        }
-        //更新用户权限状态
-        QueryWrapper<SysUserRole> sysUserRoleQueryWrapper = new QueryWrapper<>();
-        sysUserRoleQueryWrapper.lambda().eq(SysUserRole::getRoleId, updateRoleIds);
-        List<SysUserRole> sysUserRoleList = sysUserRoleService.list(sysUserRoleQueryWrapper);
-        Set<Long> userIds = sysUserRoleList.stream().map(s -> s.getUserId()).collect(Collectors.toSet());
-        for (Long l : userIds) {
-            commonCacheService.updateUserRolePrivilegeCache(l);
-            commonCacheService.updateUserAuthCache(l);
-        }
-    }
-
-    /**
-     * 查询用户或者角色权限信息
-     *
-     * @param privilegeCacheDtoList
-     * @return
-     */
-    @Override
-    public RolePrivilegeResult getUserOrRolePrivilege(List<PrivilegeCacheDto> privilegeCacheDtoList) {
-        LinkedMultiValueMap<Long, PrivilegeResult> buttonsLinkedMultiValueMap = new LinkedMultiValueMap<>(), linksLinkedMultiValueMap = new LinkedMultiValueMap<>();
-        List<PrivilegeCacheDto> buttonsFilterList = new ArrayList<>(), linksFilterList = new ArrayList<>();
-
-        for (PrivilegeCacheDto privilegeCacheDto : privilegeCacheDtoList) {
-            if (privilegeCacheDto.getPrivilegeType() == PrivilegeEnum.BUTTON) {
-                buttonsFilterList.add(privilegeCacheDto);
-                buttonsLinkedMultiValueMap.add(privilegeCacheDto.getParentId(), new PrivilegeResult(privilegeCacheDto));
-            } else if (privilegeCacheDto.getPrivilegeType() == PrivilegeEnum.LINK) {
-                linksFilterList.add(privilegeCacheDto);
-                linksLinkedMultiValueMap.add(privilegeCacheDto.getParentId(), new PrivilegeResult(privilegeCacheDto));
-            }
-        }
-
-        privilegeCacheDtoList.removeAll(buttonsFilterList);
-        privilegeCacheDtoList.removeAll(linksFilterList);
-
-        RolePrivilegeResult rolePrivilegeResult = new RolePrivilegeResult();
-        List<PrivilegeResult> privilegeResultList = new ArrayList<>();
-        for (PrivilegeCacheDto privilegeCacheDto : privilegeCacheDtoList) {
-            rolePrivilegeResult.setInfo(privilegeCacheDto);
-            PrivilegeResult privilegeResult = new PrivilegeResult(privilegeCacheDto);
-            privilegeResult.setButtons(buttonsLinkedMultiValueMap.get(privilegeResult.getId()));
-            privilegeResult.setLinks(linksLinkedMultiValueMap.get(privilegeResult.getId()));
-            privilegeResultList.add(privilegeResult);
-        }
-        rolePrivilegeResult.setPrivileges(privilegeResultList);
-        return rolePrivilegeResult;
-    }
-
     /**
      * 文件预览
      *
@@ -714,61 +567,6 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
         return null;
     }
 
-    /**
-     * 获取文件流
-     *
-     * @param path
-     * @param pdf
-     * @return
-     */
-    @Override
-    public InputStream getFileInputStream(String path, boolean pdf) throws Exception {
-        InputStream inputStream = null;
-        JSONObject jsonObject = JSONObject.parseObject(path);
-        String attachmentType = (String) jsonObject.get(SystemConstant.TYPE);
-        String filePath = pdf ? (String) jsonObject.get(SystemConstant.PDF_PATH) : (String) jsonObject.get(SystemConstant.PATH);
-        UploadFileEnum uploadType = Enum.valueOf(UploadFileEnum.class, (String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
-
-        if (Objects.equals(attachmentType, SystemConstant.OSS)) {
-//            byte[] data = ossUtil.ossDownload(filePath);
-//            inputStream = new ByteArrayInputStream(data);
-            inputStream = fileStoreUtil.ossDownloadIs(filePath, uploadType.getFssType());
-        } else {
-            StringJoiner localPath = new StringJoiner("").add(SystemConstant.TEMP_FILES_DIR).add(File.separator).add(filePath);
-            inputStream = new FileInputStream(new File(localPath.toString()));
-        }
-        return inputStream;
-    }
-
-    /**
-     * 获取文件数组
-     *
-     * @param path
-     * @param pdf
-     * @return
-     * @throws IOException
-     */
-    @Override
-    public byte[] getFileByte(String path, boolean pdf) throws Exception {
-        byte[] data = null;
-        JSONObject jsonObject = JSONObject.parseObject(path);
-        String attachmentType = (String) jsonObject.get(SystemConstant.TYPE);
-        String filePath = pdf ? (String) jsonObject.get(SystemConstant.PDF_PATH) : (String) jsonObject.get(SystemConstant.PATH);
-        UploadFileEnum uploadType = Enum.valueOf(UploadFileEnum.class, (String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
-
-        if (Objects.equals(attachmentType, SystemConstant.OSS)) {
-//            data = ossUtil.ossDownload(filePath);
-            data = fileStoreUtil.ossDownload(filePath, uploadType.getFssType());
-        } else {
-            StringJoiner localPath = new StringJoiner("").add(SystemConstant.TEMP_FILES_DIR).add(File.separator).add(filePath);
-            InputStream inputStream = new FileInputStream(new File(localPath.toString()));
-            ByteArrayOutputStream ou = new ByteArrayOutputStream();
-            IOUtils.copy(inputStream, ou);
-            data = ou.toByteArray();
-        }
-        return data;
-    }
-
     /**
      * 获取文件
      *

+ 0 - 29
teachcloud-common/src/main/resources/mapper/SysOrgMapper.xml

@@ -2,26 +2,6 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.qmth.teachcloud.common.mapper.SysOrgMapper">
 
-    <select id="findUserByOrgType" resultType="com.qmth.teachcloud.common.entity.SysUser">
-        select
-        *
-        from
-        sys_user su
-        join sys_org so on
-        su.org_id = so.id
-        <where>
-            <if test="schoolId != null and schoolId != ''">
-                and so.school_id = #{schoolId}
-            </if>
-            <if test="orgId != null and orgId != ''">
-                and so.id = #{orgId}
-            </if>
-            <if test="orgTypeEnum != null and orgTypeEnum != ''">
-                and so.`type` = #{orgTypeEnum}
-            </if>
-        </where>
-    </select>
-
     <select id="findByConnectByParentId" resultType="com.qmth.teachcloud.common.entity.SysOrg">
         SELECT su.* FROM (SELECT @a AS _id, (SELECT @a := so.parent_id FROM sys_org so WHERE so.id = _id) AS parent_id FROM (SELECT @a := #{orgId}) vars, sys_org h WHERE @a <![CDATA[ <> ]]> 0) temp JOIN sys_org su ON temp._id = su.id
         <where>
@@ -34,15 +14,6 @@
         </where>
     </select>
 
-    <select id="findByJxzyyConnectByParentId" resultType="com.qmth.teachcloud.common.entity.SysOrg">
-        SELECT su.* FROM (SELECT @a AS _id, (SELECT @a := so.parent_id FROM sys_org so WHERE so.id = _id) AS parent_id FROM (SELECT @a := #{orgId}) vars, sys_org h WHERE @a <![CDATA[ <> ]]> 0) temp JOIN sys_org su ON temp._id = su.id
-        <where>
-            <if test="orgType != null and orgType != ''">
-                and su.type = #{orgType}
-            </if>
-        </where>
-    </select>
-
     <select id="findByConnectByRootOrgId" resultType="com.qmth.teachcloud.common.entity.SysOrg">
         SELECT so.* FROM sys_org so WHERE FIND_IN_SET(id, getRootChildId(#{orgId}))
     </select>

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

@@ -204,19 +204,6 @@
         </where>
     </select>
 
-    <select id="findByOrgIds" resultType="com.qmth.teachcloud.common.bean.params.ApproveUserResult">
-        <include refid="approveUserResultHeaderCommon" />
-        <where>
-            <if test="orgIdSet != null and orgIdSet != '' and orgIdSet.size > 0">
-                AND su.org_id IN
-                <foreach collection="orgIdSet" item="item" index="index" open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
-                and su.enable = 1
-        </where>
-    </select>
-
     <select id="selectRoleNames" resultType="com.qmth.teachcloud.common.bean.result.UserRoleNameResult">
         select group_concat(sr.name) as roleNames
              ,sur.user_id as userId from sys_role sr
@@ -232,39 +219,6 @@
         group by sur.user_id
     </select>
 
-    <select id="findByRoleIds" resultType="com.qmth.teachcloud.common.entity.SysUser">
-        select distinct su.* from sys_user su
-        join sys_user_role sur on
-            sur.user_id = su.id
-        join sys_role sr on
-            sr.id = sur.role_id
-        <where>
-            <if test="roleIds != null and roleIds != '' and roleIds.size > 0">
-                AND sr.id IN
-                <foreach collection="roleIds" item="item" index="index" open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
-            and su.enable = 1
-            and sr.enable = 1
-        </where>
-    </select>
-
-    <select id="findByRoleIdsForResult" resultType="com.qmth.teachcloud.common.bean.params.ApproveUserResult">
-        <include refid="approveUserResultHeaderCommon" />
-        join sys_role sr on sr.id = sur.role_id
-        <where>
-            <if test="roleIds != null and roleIds != '' and roleIds.size > 0">
-                AND sr.id IN
-                <foreach collection="roleIds" item="item" index="index" open="(" separator="," close=")">
-                    #{item}
-                </foreach>
-            </if>
-            and su.enable = 1
-            and sr.enable = 1
-        </where>
-    </select>
-
     <select id="findByIdsForResult" resultType="com.qmth.teachcloud.common.bean.params.ApproveUserResult">
         <include refid="approveUserResultHeaderCommon" />
         <where>