Explorar o código

Merge branch 'pre'

dzx hai 8 meses
pai
achega
ee291fa3ef
Modificáronse 27 ficheiros con 141 adicións e 13 borrados
  1. 2 0
      src/main/java/com/xjrsoft/module/banding/service/IBandingTaskClassService.java
  2. 71 0
      src/main/java/com/xjrsoft/module/banding/service/impl/BandingTaskClassServiceImpl.java
  3. 5 1
      src/main/java/com/xjrsoft/module/base/controller/BaseCourseSubjectController.java
  4. 5 0
      src/main/java/com/xjrsoft/module/base/dto/BaseCourseSubjectPageDto.java
  5. 6 1
      src/main/java/com/xjrsoft/module/base/service/impl/BaseClassServiceImpl.java
  6. 2 0
      src/main/java/com/xjrsoft/module/job/ActivityInfoTask.java
  7. 2 0
      src/main/java/com/xjrsoft/module/job/AttenDanceWarnNoticeTask.java
  8. 2 0
      src/main/java/com/xjrsoft/module/job/AttendanceMessageTask.java
  9. 2 0
      src/main/java/com/xjrsoft/module/job/AttendanceRecordTask.java
  10. 2 0
      src/main/java/com/xjrsoft/module/job/BaseNewStudentTask.java
  11. 3 1
      src/main/java/com/xjrsoft/module/job/EnrollmentStatisticsInfoTask.java
  12. 2 0
      src/main/java/com/xjrsoft/module/job/EvaluateTask.java
  13. 2 0
      src/main/java/com/xjrsoft/module/job/ExamScoreDataTask.java
  14. 2 0
      src/main/java/com/xjrsoft/module/job/HikvisionBaseDataTask.java
  15. 2 0
      src/main/java/com/xjrsoft/module/job/HikvisionLeaveTask.java
  16. 2 0
      src/main/java/com/xjrsoft/module/job/HolidayTask.java
  17. 2 0
      src/main/java/com/xjrsoft/module/job/InsertOutInRecordTask.java
  18. 2 0
      src/main/java/com/xjrsoft/module/job/JianyuekbBaseDataTask.java
  19. 2 0
      src/main/java/com/xjrsoft/module/job/JianyuekbScheduleTask.java
  20. 2 0
      src/main/java/com/xjrsoft/module/job/ProcessNotProcessingAlertTask.java
  21. 2 0
      src/main/java/com/xjrsoft/module/job/ProcessTimeoutAlertTask.java
  22. 2 0
      src/main/java/com/xjrsoft/module/job/StudentDropOutTask.java
  23. 2 0
      src/main/java/com/xjrsoft/module/job/StudentLeaveNoticeTask.java
  24. 2 0
      src/main/java/com/xjrsoft/module/job/StudentReportPlanTask.java
  25. 2 1
      src/main/java/com/xjrsoft/module/job/WfCourseAdjustTask.java
  26. 2 0
      src/main/java/com/xjrsoft/module/job/WhitelistTask.java
  27. 9 9
      src/main/java/com/xjrsoft/module/workflow/utils/WorkFlowUtil.java

+ 2 - 0
src/main/java/com/xjrsoft/module/banding/service/IBandingTaskClassService.java

@@ -70,4 +70,6 @@ public interface IBandingTaskClassService extends MPJBaseService<BandingTaskClas
     Boolean deleteClass(List<Long> ids);
 
     BandingTaskClassReportStatisticsVo getTryReadingReportClassStatistics(Long classId);
+
+    Boolean removeByBaseClass(BaseClass baseClass);
 }

+ 71 - 0
src/main/java/com/xjrsoft/module/banding/service/impl/BandingTaskClassServiceImpl.java

@@ -5,13 +5,17 @@ import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.NumberUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
+import com.xjrsoft.common.constant.GlobalConstant;
 import com.xjrsoft.common.enums.DeleteMark;
 import com.xjrsoft.common.enums.EnabledMark;
 import com.xjrsoft.common.enums.GenderDictionaryEnum;
+import com.xjrsoft.common.enums.RoleEnum;
 import com.xjrsoft.common.enums.YesOrNoEnum;
 import com.xjrsoft.common.exception.MyException;
+import com.xjrsoft.common.utils.RedisUtil;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.module.banding.dto.BandingTaskClassPageDto;
 import com.xjrsoft.module.banding.dto.BandingTaskClassStudentPageDto;
@@ -36,6 +40,8 @@ import com.xjrsoft.module.base.mapper.BaseGradeMapper;
 import com.xjrsoft.module.base.service.IBaseClassroomService;
 import com.xjrsoft.module.base.service.IBaseMajorSetService;
 import com.xjrsoft.module.organization.entity.User;
+import com.xjrsoft.module.organization.entity.UserRoleRelation;
+import com.xjrsoft.module.organization.service.IUserRoleRelationService;
 import com.xjrsoft.module.organization.service.IUserService;
 import com.xjrsoft.module.student.dto.StudentTryReadingReportPageDto;
 import com.xjrsoft.module.student.entity.EnrollmentPlan;
@@ -61,6 +67,7 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.CompletableFuture;
 import java.util.stream.Collectors;
 
 /**
@@ -84,6 +91,8 @@ public class BandingTaskClassServiceImpl extends MPJBaseServiceImpl<BandingTaskC
     private final EnrollmentPlanMapper enrollmentPlanMapper;
     private final IStudentReportPlanService reportPlanService;
     private final BaseGradeMapper gradeMapper;
+    private final IUserRoleRelationService roleRelationService;
+    private final RedisUtil redisUtil;
 
 
     @Override
@@ -305,6 +314,23 @@ public class BandingTaskClassServiceImpl extends MPJBaseServiceImpl<BandingTaskC
                         baseClass.setCode(baseGrade.getTitle().replace("年", "") + String.format("%03d", i));
                     }
                     classMapper.updateById(baseClass);
+
+                    //给该老师添加班主任角色
+                    if (baseClass.getTeacherId() != null) {
+                        long count = roleRelationService.count(
+                                new QueryWrapper<UserRoleRelation>().lambda()
+                                        .eq(UserRoleRelation::getUserId, baseClass.getTeacherId())
+                                        .eq(UserRoleRelation::getRoleId, RoleEnum.CLASSTE.getCode())
+                        );
+                        if (count == 0) {
+                            roleRelationService.save(
+                                    new UserRoleRelation() {{
+                                        setRoleId(RoleEnum.CLASSTE.getCode());
+                                        setUserId(baseClass.getTeacherId());
+                                    }}
+                            );
+                        }
+                    }
                 }else{
                     i ++;
                     BaseClass baseClass = new BaseClass();
@@ -323,6 +349,22 @@ public class BandingTaskClassServiceImpl extends MPJBaseServiceImpl<BandingTaskC
                     baseClass.setCode(baseGrade.getTitle().replace("年", "") + String.format("%03d", i));
                     classMapper.insert(baseClass);
                     sourceObj.setBaseClassId(baseClass.getId());
+
+                    if (baseClass.getTeacherId() != null) {
+                        long count = roleRelationService.count(
+                                new QueryWrapper<UserRoleRelation>().lambda()
+                                        .eq(UserRoleRelation::getUserId, baseClass.getTeacherId())
+                                        .eq(UserRoleRelation::getRoleId, RoleEnum.CLASSTE.getCode())
+                        );
+                        if (count == 0) {
+                            roleRelationService.save(
+                                    new UserRoleRelation() {{
+                                        setRoleId(RoleEnum.CLASSTE.getCode());
+                                        setUserId(baseClass.getTeacherId());
+                                    }}
+                            );
+                        }
+                    }
                 }
                 if(sourceObj.getSortCode() == null){
                     updNullList.add(sourceObj);
@@ -350,6 +392,21 @@ public class BandingTaskClassServiceImpl extends MPJBaseServiceImpl<BandingTaskC
                 baseClass.setCreateDate(new Date());
                 baseClass.setCode(baseGrade.getTitle().replace("年", "") + String.format("%03d", i));
                 classMapper.insert(baseClass);
+                if (baseClass.getTeacherId() != null) {
+                    long count = roleRelationService.count(
+                            new QueryWrapper<UserRoleRelation>().lambda()
+                                    .eq(UserRoleRelation::getUserId, baseClass.getTeacherId())
+                                    .eq(UserRoleRelation::getRoleId, RoleEnum.CLASSTE.getCode())
+                    );
+                    if (count == 0) {
+                        roleRelationService.save(
+                                new UserRoleRelation() {{
+                                    setRoleId(RoleEnum.CLASSTE.getCode());
+                                    setUserId(baseClass.getTeacherId());
+                                }}
+                        );
+                    }
+                }
 
                 taskClass.setBaseClassId(baseClass.getId());
                 insList.add(taskClass);
@@ -363,11 +420,16 @@ public class BandingTaskClassServiceImpl extends MPJBaseServiceImpl<BandingTaskC
             this.updateNull(updNullList);
         }
 
+        CompletableFuture.runAsync(() -> {
+            List<UserRoleRelation> userRoleRelationList = roleRelationService.list(Wrappers.lambdaQuery(UserRoleRelation.class));
+            redisUtil.set(GlobalConstant.USER_ROLE_RELATION_CACHE_KEY, userRoleRelationList);
+        });
 
         this.saveBatch(insList);
         return this.updateBatchById(updList);
     }
 
+
     /**
      * 班级管理中,修改信息时同步修改新生分班中的班级信息
      */
@@ -555,4 +617,13 @@ public class BandingTaskClassServiceImpl extends MPJBaseServiceImpl<BandingTaskC
 
         return result;
     }
+
+    @Override
+    public Boolean removeByBaseClass(BaseClass baseClass) {
+        boolean remove = this.remove(
+                new QueryWrapper<BandingTaskClass>().lambda()
+                        .eq(BandingTaskClass::getBaseClassId, baseClass.getId())
+        );
+        return remove;
+    }
 }

+ 5 - 1
src/main/java/com/xjrsoft/module/base/controller/BaseCourseSubjectController.java

@@ -3,6 +3,7 @@ package com.xjrsoft.module.base.controller;
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.StrUtil;
 import com.alibaba.excel.EasyExcel;
 import com.alibaba.excel.support.ExcelTypeEnum;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -57,7 +58,10 @@ public class BaseCourseSubjectController {
         MPJLambdaWrapper<BaseCourseSubject> queryWrapper = new MPJLambdaWrapper<>();
         queryWrapper
                 .orderByDesc(BaseCourseSubject::getId)
-                .select(BaseCourseSubject.class, x -> VoToColumnUtil.fieldsToColumns(BaseCourseSubjectPageVo.class).contains(x.getProperty()));
+                .select(BaseCourseSubject::getId)
+                .select(BaseCourseSubject.class, x -> VoToColumnUtil.fieldsToColumns(BaseCourseSubjectPageVo.class).contains(x.getProperty()))
+                .like(StrUtil.isNotEmpty(dto.getName()), BaseCourseSubject::getName, dto.getName())
+                .like(StrUtil.isNotEmpty(dto.getCode()), BaseCourseSubject::getCode, dto.getCode());
         IPage<BaseCourseSubject> page = baseCourseSubjectService.page(ConventPage.getPage(dto), queryWrapper);
         PageOutput<BaseCourseSubjectPageVo> pageOutput = ConventPage.getPageOutput(page, BaseCourseSubjectPageVo.class);
         return RT.ok(pageOutput);

+ 5 - 0
src/main/java/com/xjrsoft/module/base/dto/BaseCourseSubjectPageDto.java

@@ -1,6 +1,7 @@
 package com.xjrsoft.module.base.dto;
 
 import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -15,5 +16,9 @@ import lombok.EqualsAndHashCode;
 @EqualsAndHashCode(callSuper = false)
 public class BaseCourseSubjectPageDto extends PageInput {
 
+    @ApiModelProperty("课程学科名称")
+    private String name;
 
+    @ApiModelProperty("课程学科代码")
+    private String code;
 }

+ 6 - 1
src/main/java/com/xjrsoft/module/base/service/impl/BaseClassServiceImpl.java

@@ -233,7 +233,12 @@ public class BaseClassServiceImpl extends MPJBaseServiceImpl<BaseClassMapper, Ba
         baseClass.setModifyUserId(StpUtil.getLoginIdAsLong());
         boolean update = this.updateById(baseClass);
         if (update) {
-            bandingTaskClassService.updateByBaseClass(baseClass);
+            if(baseClass.getIsGraduate() != null && baseClass.getIsGraduate() == 1){
+                bandingTaskClassService.updateByBaseClass(baseClass);
+            }else{
+                bandingTaskClassService.removeByBaseClass(baseClass);
+            }
+
 
             BaseClassMajorSet majorSet = majorSetService.getOne(
                     new QueryWrapper<BaseClassMajorSet>().lambda()

+ 2 - 0
src/main/java/com/xjrsoft/module/job/ActivityInfoTask.java

@@ -2,6 +2,7 @@ package com.xjrsoft.module.job;
 
 import com.xjrsoft.common.mybatis.SqlRunnerAdapter;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -13,6 +14,7 @@ import org.springframework.stereotype.Component;
 @Slf4j
 public class ActivityInfoTask {
 
+    @Async
     @Scheduled(cron = "0 */5 * * * ?")
     public void RefreshConnectionPool() {
 //        String active = SpringUtil.getActiveProfile();

+ 2 - 0
src/main/java/com/xjrsoft/module/job/AttenDanceWarnNoticeTask.java

@@ -19,6 +19,7 @@ import com.xjrsoft.module.organization.service.IWeChatService;
 import com.xjrsoft.module.teacher.entity.XjrUser;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -56,6 +57,7 @@ public class AttenDanceWarnNoticeTask {
     @Autowired
     private IHolidayDateService holidayDateService;
 
+    @Async
     @Scheduled(cron = "0 */1 * * * ?")
     public void execute() {
         RefreshConnectionPool();

+ 2 - 0
src/main/java/com/xjrsoft/module/job/AttendanceMessageTask.java

@@ -31,6 +31,7 @@ import com.xjrsoft.module.teacher.entity.BaseTeacher;
 import com.xjrsoft.module.teacher.entity.XjrUser;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -77,6 +78,7 @@ public class AttendanceMessageTask {
     @Autowired
     private WeChatUtil weChatUtil;
 
+    @Async
     @Scheduled(cron = "0 */1 * * * ?")
     public void RefreshConnectionPool() {
         String active = SpringUtil.getActiveProfile();

+ 2 - 0
src/main/java/com/xjrsoft/module/job/AttendanceRecordTask.java

@@ -25,6 +25,7 @@ import com.xjrsoft.module.teacher.entity.WfTeacherleave;
 import com.xjrsoft.module.teacher.service.IWfTeacherleaveService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -68,6 +69,7 @@ public class AttendanceRecordTask {
     private IHolidayDateService holidayDateService;
 
 
+    @Async
     @Scheduled(cron = "0 */30 * * * ?")
     public void execute() {
         String active = SpringUtil.getActiveProfile();

+ 2 - 0
src/main/java/com/xjrsoft/module/job/BaseNewStudentTask.java

@@ -17,6 +17,7 @@ import com.xjrsoft.module.student.service.IPbCseFeeobjupdateService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -50,6 +51,7 @@ public class BaseNewStudentTask {
     @Autowired
     private IBaseMajorSetService majorSetService;
 
+    @Async
     @Scheduled(cron = "0 */15 * * * ?")
     public void execute() {
         doExecute();

+ 3 - 1
src/main/java/com/xjrsoft/module/job/EnrollmentStatisticsInfoTask.java

@@ -14,6 +14,7 @@ import com.xjrsoft.module.student.vo.EnrollmentStatisticsInfoVo;
 import com.yomahub.liteflow.util.JsonUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -40,7 +41,8 @@ public class EnrollmentStatisticsInfoTask {
     @Autowired
     private EnrollmentStatisticsInfoMapper enrollmentStatisticsInfoMapper;
 
-    @Scheduled(cron = "0 */15 * * * ?")
+    @Async
+    @Scheduled(cron = "00 0/15 * * * ?")
     public void execute() {
         doExecute();
     }

+ 2 - 0
src/main/java/com/xjrsoft/module/job/EvaluateTask.java

@@ -5,6 +5,7 @@ import com.xjrsoft.common.utils.DateUtils;
 import com.xjrsoft.common.utils.SqlRunnerAdapterUtil;
 import com.xjrsoft.module.evaluate.entity.EvaluateManage;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -22,6 +23,7 @@ public class EvaluateTask {
     /**
      * 需要重复评价的,每天凌晨1点自动生成新的评价提交记录
      */
+    @Async
     @Scheduled(cron = "0 0 1 * * ?")
     public void addSubmitRecord() {
         System.out.printf("定时新增评价提交记录:%s", DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN));

+ 2 - 0
src/main/java/com/xjrsoft/module/job/ExamScoreDataTask.java

@@ -7,6 +7,7 @@ import com.xjrsoft.module.xycxedu.service.IXycxeduExamListService;
 import com.xjrsoft.module.xycxedu.util.DataUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -27,6 +28,7 @@ public class ExamScoreDataTask {
     @Autowired
     private IBaseCourseSubjectService courseService;
 
+    @Async
     @Scheduled(cron = "0 */15 * * * ?")
     public void RefreshConnectionPool() {
         String active = SpringUtil.getActiveProfile();

+ 2 - 0
src/main/java/com/xjrsoft/module/job/HikvisionBaseDataTask.java

@@ -9,6 +9,7 @@ import com.xjrsoft.module.hikvision.mapper.HikvisionDataMapper;
 import com.xjrsoft.module.hikvision.util.DataUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -25,6 +26,7 @@ public class HikvisionBaseDataTask {
     @Autowired
     private HikvisionDataMapper hikvisionDataMapper;
 
+    @Async
     @Scheduled(cron = "0 */15 * * * ?")
     public void execute() {
         String active = SpringUtil.getActiveProfile();

+ 2 - 0
src/main/java/com/xjrsoft/module/job/HikvisionLeaveTask.java

@@ -15,6 +15,7 @@ import com.xjrsoft.module.teacher.entity.WfTeacherleave;
 import com.xjrsoft.module.teacher.service.IWfTeacherleaveService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -40,6 +41,7 @@ public class HikvisionLeaveTask {
     @Autowired
     private HikvisionDataMapper hikvisionDataMapper;
 
+    @Async
     @Scheduled(cron = "0 */15 * * * ?")
     public void execute() {
         doExecute();

+ 2 - 0
src/main/java/com/xjrsoft/module/job/HolidayTask.java

@@ -4,6 +4,7 @@ import com.xjrsoft.common.utils.DateUtils;
 import com.xjrsoft.module.holiday.service.IHolidayDateService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -20,6 +21,7 @@ public class HolidayTask {
     /**
      * 定时拉取节假日数据
      */
+    @Async
     @Scheduled(cron = "0 0 1 * * ?")
     public void RefreshHoliday() {
         System.out.printf("定时拉取节假日数据:%s", DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN));

+ 2 - 0
src/main/java/com/xjrsoft/module/job/InsertOutInRecordTask.java

@@ -6,6 +6,7 @@ import com.xjrsoft.module.hikvision.util.OutInRecordUtil;
 import com.xjrsoft.module.teacher.mapper.FaceImportMapper;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -24,6 +25,7 @@ public class InsertOutInRecordTask {
     @Autowired
     private IHikvisionDataService hikvisionDataService;
 
+    @Async
     @Scheduled(cron = "0 */30 * * * ?")
     public void execute() {
         String active = SpringUtil.getActiveProfile();

+ 2 - 0
src/main/java/com/xjrsoft/module/job/JianyuekbBaseDataTask.java

@@ -7,6 +7,7 @@ import com.xjrsoft.common.utils.SqlRunnerAdapterUtil;
 import com.xjrsoft.module.schedule.entity.JianyueData;
 import com.xjrsoft.module.schedule.util.DataUtil;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -21,6 +22,7 @@ import java.util.*;
 public class JianyuekbBaseDataTask {
 
 
+    @Async
     @Scheduled(cron = "0 */15 * * * ?")
     public void RefreshConnectionPool() {
         String active = SpringUtil.getActiveProfile();

+ 2 - 0
src/main/java/com/xjrsoft/module/job/JianyuekbScheduleTask.java

@@ -61,6 +61,7 @@ import org.camunda.bpm.engine.runtime.ActivityInstance;
 import org.camunda.bpm.engine.runtime.ProcessInstance;
 import org.camunda.bpm.engine.task.Task;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -129,6 +130,7 @@ public class JianyuekbScheduleTask {
     @Autowired
     private IBaseGradeService gradeService;
 
+    @Async
     @Scheduled(cron = "0 */10 * * * ?")
     public void execute() {
         doExecute();

+ 2 - 0
src/main/java/com/xjrsoft/module/job/ProcessNotProcessingAlertTask.java

@@ -8,6 +8,7 @@ import com.xjrsoft.common.utils.DateUtils;
 import com.xjrsoft.module.oa.utils.SendMessageUtil;
 import com.xjrsoft.module.workflow.entity.WorkflowExtra;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -27,6 +28,7 @@ public class ProcessNotProcessingAlertTask {
     /**
      * 流程未处理提醒
      */
+    @Async
     @Scheduled(cron = "0 0 14 * * ?")
     public void alertProcessNotProcessing() {
         System.out.printf("定时提醒流程未处理:%s", DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN));

+ 2 - 0
src/main/java/com/xjrsoft/module/job/ProcessTimeoutAlertTask.java

@@ -14,6 +14,7 @@ import org.camunda.bpm.engine.HistoryService;
 import org.camunda.bpm.engine.history.HistoricProcessInstance;
 import org.camunda.bpm.engine.history.HistoricProcessInstanceQuery;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -43,6 +44,7 @@ public class ProcessTimeoutAlertTask {
     @Autowired
     private IWorkflowAlertRecordService alertRecordService;
 
+    @Async
     @Scheduled(cron = "0 0 * * * ?")
     public void execute() {
         doExecute();

+ 2 - 0
src/main/java/com/xjrsoft/module/job/StudentDropOutTask.java

@@ -15,6 +15,7 @@ import com.xjrsoft.module.personnel.service.IStundentFaceProcessService;
 import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -34,6 +35,7 @@ public class StudentDropOutTask {
     @Autowired
     private IHikvisionDataService hikvisionDataService;
 
+    @Async
     @Scheduled(cron = "0 */30 * * * ?")
     public void execute() {
         String active = SpringUtil.getActiveProfile();

+ 2 - 0
src/main/java/com/xjrsoft/module/job/StudentLeaveNoticeTask.java

@@ -19,6 +19,7 @@ import com.xjrsoft.module.student.vo.NoBackStudentInfoVo;
 import lombok.extern.slf4j.Slf4j;
 import me.zhyd.oauth.log.Log;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -43,6 +44,7 @@ public class StudentLeaveNoticeTask {
     @Autowired
     private IWeChatService weChatService;
 
+    @Async
     @Scheduled(cron = "0 */15 * * * ?")
     public void execute() {
         //doExecute();

+ 2 - 0
src/main/java/com/xjrsoft/module/job/StudentReportPlanTask.java

@@ -8,6 +8,7 @@ import com.xjrsoft.module.student.entity.StudentReportPlanClassRelation;
 import com.xjrsoft.module.student.service.IStudentReportPlanService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -28,6 +29,7 @@ public class StudentReportPlanTask {
     private IStudentReportPlanService planService;
 
 
+    @Async
     @Scheduled(cron = "0 */5 * * * ?")
     public void execute() {
         doExecute();

+ 2 - 1
src/main/java/com/xjrsoft/module/job/WfCourseAdjustTask.java

@@ -12,6 +12,7 @@ import com.xjrsoft.module.workflow.entity.WorkflowFormRelation;
 import lombok.extern.slf4j.Slf4j;
 import org.camunda.bpm.engine.history.HistoricProcessInstance;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -32,7 +33,7 @@ public class WfCourseAdjustTask {
     @Autowired
     private ICourseTableService courseTableService;
 
-
+    @Async
     @Scheduled(cron = "0 */10 * * * ?")
     public void execute() {
         List<WfCourseAdjust> list = wfCourseAdjustService.list(

+ 2 - 0
src/main/java/com/xjrsoft/module/job/WhitelistTask.java

@@ -6,6 +6,7 @@ import com.xjrsoft.module.base.entity.WhitelistManagement;
 import com.xjrsoft.module.base.service.IWhitelistManagementService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -27,6 +28,7 @@ public class WhitelistTask {
     @Autowired
     private RedisUtil redisUtil;
 
+    @Async
     @Scheduled(cron = "0 */15 * * * ?")
     public void execute() {
         doExecute();

+ 9 - 9
src/main/java/com/xjrsoft/module/workflow/utils/WorkFlowUtil.java

@@ -239,10 +239,10 @@ public class WorkFlowUtil {
      * @return
      */
     public static List<Long> getUserIdsByMemberConfig(List<MemberConfig> memberConfigs, List<Map<String, Object>> childNodeConfig, String processId) {
-        List<Long> result = new ArrayList<>();
+        Set<Long> result = new HashSet<>();
 
-        if (memberConfigs.size() == 0) {
-            return result;
+        if (memberConfigs.isEmpty()) {
+            return new ArrayList<>();
         }
 
         RedisUtil redisUtil = SpringUtil.getBean(RedisUtil.class);
@@ -330,7 +330,7 @@ public class WorkFlowUtil {
                 Optional<Map<String, Object>> nodeMap = childNodeConfig.stream().filter(x -> x.get(GlobalConstant.DEFAULT_PK).equals(leaderConfig.getNodeId())).findFirst();
 
                 if (!nodeMap.isPresent()) {
-                    return result;
+                    return new ArrayList<>(result);
                 }
 
                 //如果是开始节点
@@ -344,7 +344,7 @@ public class WorkFlowUtil {
                     //获取到发起人用户信息
                     Optional<User> startUserOp = users.stream().filter(x -> x.getId().equals(startUserId)).findFirst();
                     if (!startUserOp.isPresent()) {
-                        return result;
+                        return new ArrayList<>(result);
                     }
 
                     Long postId;
@@ -362,7 +362,7 @@ public class WorkFlowUtil {
 
                     Optional<Post> thisApproveOp = posts.stream().filter(x -> x.getId().equals(postId)).findFirst();
                     if (!thisApproveOp.isPresent()) {
-                        return result;
+                        return new ArrayList<>(result);
                     }
 
                     Post thisUserPost = thisApproveOp.get();
@@ -374,7 +374,7 @@ public class WorkFlowUtil {
 
                         //如果当前循环次数 找不到上级
                         if (!parentPostOp.isPresent()) {
-                            return result;
+                            return new ArrayList<>(result);
                         } else {
                             thisUserPost = parentPostOp.get();
                         }
@@ -405,7 +405,7 @@ public class WorkFlowUtil {
 //                            }
 //                        }
 //                    }
-                    return result;
+                    return new ArrayList<>(result);
 
                 } else {
                     //将map 转为 java类  默认只有用户任务节点才有审批人
@@ -496,7 +496,7 @@ public class WorkFlowUtil {
 
             }
         }
-        return result;
+        return new ArrayList<>(result);
     }