|
|
@@ -276,8 +276,8 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
|
|
|
task.setOrgPath(sysOrg.getPath());
|
|
|
BeanUtils.copyProperties(request, task);
|
|
|
task.setStartDate(DateUtil.beginOfDay(new Date()));
|
|
|
- Long endTime= (new Date()).getTime();
|
|
|
- task.setEndDate(DateUtil.endOfDay(new Date(endTime+7*24*60*60*1000-1000)));
|
|
|
+ Long endTime = (new Date()).getTime();
|
|
|
+ task.setEndDate(DateUtil.endOfDay(new Date(endTime + 7 * 24 * 60 * 60 * 1000 - 1000)));
|
|
|
// task.setEndDate(DateUtil.endOfDay(new Date()));
|
|
|
|
|
|
task.setCreateTime(DateUtils.getNowDate());
|
|
|
@@ -328,8 +328,8 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
|
|
|
coreEduTrainingTask.setTitle(request.getTitle());
|
|
|
coreEduTrainingTask.setStartDate(DateUtil.beginOfDay(new Date()));
|
|
|
// 临时添加的任务 特殊把任务的开始结束时间设置为当前时间的一周,否则待办查询不到
|
|
|
- Long endTime=coreEduTrainingTask.getStartDate().getTime();
|
|
|
- Date end=new Date(endTime+7*24*60*60*1000-1000);
|
|
|
+ Long endTime = coreEduTrainingTask.getStartDate().getTime();
|
|
|
+ Date end = new Date(endTime + 7 * 24 * 60 * 60 * 1000 - 1000);
|
|
|
coreEduTrainingTask.setEndDate(end);
|
|
|
// coreEduTrainingTask.setEndDate(DateUtils.toDate(request.getTrainingEndDateTime()));
|
|
|
|
|
|
@@ -849,6 +849,9 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+ public static void main(String[] args) {
|
|
|
+ System.out.println(DateUtils.checkDate(new Date()));
|
|
|
+ }
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@@ -856,22 +859,14 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
|
|
|
if (ObjectUtil.isNull(date)) {
|
|
|
date = new Date();
|
|
|
}
|
|
|
- List<Integer> cycleList = DateUtils.checkDate(date);
|
|
|
+
|
|
|
List<CoreEduTrainingPlan> planList;
|
|
|
+
|
|
|
if (null == cycle) {
|
|
|
- planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
|
|
|
- .eq(CoreEduTrainingPlan::getStandard, 0)
|
|
|
- .eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
|
|
|
- .in(CoreEduTrainingPlan::getPlanCycle, cycleList)
|
|
|
- .eq(CoreEduTrainingPlan::getDeleted, 0)
|
|
|
- .select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanCycle));
|
|
|
+ List<Integer> cycleList = DateUtils.checkDate(date);
|
|
|
+ planList = coreEduTrainingPlanMapper.selectNeedBuildTaskPlanList(null, cycleList);
|
|
|
} else {
|
|
|
- planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>()
|
|
|
- .eq(CoreEduTrainingPlan::getStandard, 0)
|
|
|
- .eq(CoreEduTrainingPlan::getPlanStatus, EduTrainingPlanStatus.USING.getCode())
|
|
|
- .eq(CoreEduTrainingPlan::getPlanCycle, cycle)
|
|
|
- .eq(CoreEduTrainingPlan::getDeleted, 0)
|
|
|
- .select(CoreEduTrainingPlan::getId, CoreEduTrainingPlan::getPlanCycle));
|
|
|
+ planList = coreEduTrainingPlanMapper.selectNeedBuildTaskPlanList(cycle, null);
|
|
|
}
|
|
|
//此list中Plan对象仅id与planCycle字段有值,其他字段为空
|
|
|
if (ObjectUtil.isEmpty(planList)) {
|
|
|
@@ -924,7 +919,7 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
|
|
|
.list();
|
|
|
List<Long> taskIdList = taskList.stream().map(CoreEduTrainingTask::getId).collect(Collectors.toList());
|
|
|
delTaskByIdList(taskIdList);
|
|
|
- list=taskIdList;
|
|
|
+ list = taskIdList;
|
|
|
}
|
|
|
return list;
|
|
|
}
|