|
|
@@ -808,7 +808,6 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
|
|
|
.map(CoreEduTrainingTask::getId).collect(Collectors.toList());
|
|
|
//删除任务
|
|
|
delTaskByIdList(delTaskIdList);
|
|
|
-
|
|
|
//营业的数据
|
|
|
List<SysWorkTime> workTimeList = listMap.get(WORK);
|
|
|
//营业的机构id
|
|
|
@@ -818,10 +817,12 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
|
|
|
//查询在任务表中不存在的营业机构id,即需要生成任务的机构
|
|
|
List<Long> needTaskOrgIdList = workOrgIdList.stream().filter(orgId -> !taskOrgIdList.contains(orgId)).collect(Collectors.toList());
|
|
|
//查询需要生成任务的机构的计划
|
|
|
+ //每日的情况需要考虑到特殊日子,比如每月一号 一月一号等多周期重合的情况
|
|
|
+ List<Integer> cycleList = DateUtils.checkDate(today);
|
|
|
List<CoreEduTrainingPlan> planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
|
|
|
.eq(CoreEduTrainingPlan::getStandard, 0)
|
|
|
.eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
|
|
|
- .eq(CoreEduTrainingPlan::getPlanCycle, EduTrainingPlanCycleEnum.DAILY.getCode())
|
|
|
+ .in(CoreEduTrainingPlan::getPlanCycle, cycleList)
|
|
|
.eq(CoreEduTrainingPlan::getDeleted, 0)
|
|
|
.in(CoreEduTrainingPlan::getBelongOrgId, needTaskOrgIdList)
|
|
|
.select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanCycle));
|