|  | @@ -112,24 +112,14 @@ public class CoreEduTrainingPlanServiceImpl extends ServiceImpl<CoreEduTrainingP
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          String roleNameList = coreEduTrainingPlanToRoleMapper.selectRoleNameByPlanId(record.getId()).stream().map(CoreEduTrainingPlanRoleVo::getRoleName).collect(Collectors.joining(","));
 | 
	
		
			
				|  |  |          record.setPlanRoleNameList(roleNameList);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -       /* List<CoreEduTrainingPlan> planList = coreEduTrainingPlanMapper.selectList(new LambdaQueryWrapper<CoreEduTrainingPlan>().eq(CoreEduTrainingPlan::getParentId, record.getId()));
 | 
	
		
			
				|  |  | -        List<CoreEduTrainingPlanPageVo> children = BeanHelper.copyProperties(planList, CoreEduTrainingPlanPageVo.class);*/
 | 
	
		
			
				|  |  |          request.setId(record.getId());
 | 
	
		
			
				|  |  |          List<CoreEduTrainingPlanPageVo> children = coreEduTrainingPlanMapper.selectChildrenPlan(request);
 | 
	
		
			
				|  |  | -/*        final List<Long> collect = children.stream().map(CoreEduTrainingPlanPageVo::getUpdateBy).map(Long::valueOf).distinct().collect(Collectors.toList());
 | 
	
		
			
				|  |  | -        final List<IdNameVo> idNameVos = RemoteCallHandlerExecutor.executeRemoteCall(() -> remoteRoleService.getNames(new RoleConditionEto(collect)), ErrorMsgConstants.QUERY_ROLE_DATA_ERROR);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        //将idNameVos使用steam转为map
 | 
	
		
			
				|  |  | -        final Map<Long, String> idNameMap = idNameVos.stream().collect(Collectors.toMap(IdNameVo::getId, IdNameVo::getName));*/
 | 
	
		
			
				|  |  |          record.setChildren(children);
 | 
	
		
			
				|  |  |          record.setHasChildren(ObjectUtil.isNotEmpty(children));
 | 
	
		
			
				|  |  |          for (CoreEduTrainingPlanPageVo child : children) {
 | 
	
		
			
				|  |  |              if (ObjectUtil.equal(child.getCreateOrgId(), orgId)) {
 | 
	
		
			
				|  |  |                  child.setCreateByTopOrg(1);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            /*final String name = idNameMap.get(Long.valueOf(child.getUpdateBy()));
 | 
	
		
			
				|  |  | -            child.setUpdateBy(name);*/
 | 
	
		
			
				|  |  |              child.setPlanRoleNameList(roleNameList);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -266,13 +256,22 @@ public class CoreEduTrainingPlanServiceImpl extends ServiceImpl<CoreEduTrainingP
 | 
	
		
			
				|  |  |          final Integer done = coreEduTrainingTaskMapper.checkHasTaskIsDone(Arrays.asList(plan.getId()));
 | 
	
		
			
				|  |  |          if (ObjectUtil.equal(1,done)){
 | 
	
		
			
				|  |  |              //此为情况二, 计划生成了任务且执行 不能删除任务,只允许修改计划信息,所以直接返回
 | 
	
		
			
				|  |  | +            //TODO 考虑是否同步修改已生成的任务的名称
 | 
	
		
			
				|  |  |              return i;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        final Integer hasTask = coreEduTrainingTaskMapper.checkHasTask(plan.getId());
 | 
	
		
			
				|  |  | +        if (ObjectUtil.equal(1,plan.getBuildTaskNow())){
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          //此为情况一,计划没有生成任务或者生成了任务但未执行
 | 
	
		
			
				|  |  |          coreEduTrainingTaskMapper.deleteByMap(MapUtil.of("plan_id", request.getId()));
 | 
	
		
			
				|  |  | -        //说明有任务并且都没执行过,需要重新生成任务
 | 
	
		
			
				|  |  | -        final CoreEduTrainingPlanDataVo dataVo = getCoreEduTrainingPlanDataVo(request.getId());
 | 
	
		
			
				|  |  | -        coreEduTrainingTaskService.createTaskForNow(dataVo, plan.getStartDate(), plan.getEndDate());
 | 
	
		
			
				|  |  | +        CompletableFuture.runAsync(()->{
 | 
	
		
			
				|  |  | +            //说明有任务并且都没执行过,需要重新生成任务
 | 
	
		
			
				|  |  | +            final CoreEduTrainingPlanDataVo dataVo = getCoreEduTrainingPlanDataVo(request.getId());
 | 
	
		
			
				|  |  | +            coreEduTrainingTaskService.createTaskForNow(dataVo, plan.getStartDate(), plan.getEndDate());
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  |          return i;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 |