Compare commits
No commits in common. "ba1aec39755383bf4d081a0b024905c8f828cf20" and "fb6bb22dcf3eb255d42f9a57bad59500ca02a1b5" have entirely different histories.
ba1aec3975
...
fb6bb22dcf
@ -100,6 +100,7 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
||||
List<PipStage> pipStageList = new ArrayList<>(0);
|
||||
List<PipTask> pipTaskList = new ArrayList<>(0);
|
||||
|
||||
Map<PipStage,Map<PipStage,List<PipTask>>> templateCopyPipelineMap = new HashMap<>();
|
||||
PipPipeline pipeline = pipelineConverter.reqToDO(pipelineReq);
|
||||
|
||||
// 随机颜色
|
||||
@ -169,6 +170,7 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
||||
//则代表大阶段下存在阶段子节点
|
||||
childStageList.forEach(j->{
|
||||
PipStage childStage = templateConverter.respToStage(j);
|
||||
Map<PipStage,List<PipTask>> stageTaskMap = new HashMap<>();
|
||||
|
||||
childStage.setId(idWork.nextUUID(null));
|
||||
childStage.setPipelineId(pipeline.getId());
|
||||
@ -194,8 +196,10 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
||||
pipTask.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||
taskList.add(pipTask);
|
||||
});
|
||||
stageTaskMap.put(childStage,taskList);
|
||||
pipTaskList.addAll(taskList);
|
||||
}
|
||||
templateCopyPipelineMap.put(pipStage,stageTaskMap);
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -204,6 +208,29 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
||||
}
|
||||
pipStageDao.insertBatch(pipStageList);
|
||||
pipTaskDao.insertBatch(pipTaskList);
|
||||
|
||||
//清空数组
|
||||
// pipStageList.clear();
|
||||
// pipTaskList.clear();
|
||||
//
|
||||
// templateCopyPipelineMap.forEach((parentStage, childStages) -> {
|
||||
//
|
||||
// childStages.forEach((childStage, tasks) -> {
|
||||
// childStage.setParentId(parentStage.getId());
|
||||
// pipStageList.add(childStage);
|
||||
//
|
||||
// tasks.forEach(task -> {
|
||||
// task.setStageId(childStage.getId());
|
||||
// pipTaskList.add(task);
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
// if (!CollectionUtils.isEmpty(pipStageList)){
|
||||
// pipStageDao.updateBatch(pipStageList);
|
||||
// }
|
||||
// if (!CollectionUtils.isEmpty(pipTaskList)){
|
||||
// pipTaskDao.updateBatch(pipTaskList);
|
||||
// }
|
||||
}
|
||||
|
||||
return pipeline.getId();
|
||||
|
Loading…
x
Reference in New Issue
Block a user