Merge branch 'master' of http://1.14.125.6:3000/mianbin/ops-pro
This commit is contained in:
commit
8a62fe4e1c
@ -101,7 +101,6 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
|||||||
List<PipStage> pipStageList = new ArrayList<>(0);
|
List<PipStage> pipStageList = new ArrayList<>(0);
|
||||||
List<PipTask> pipTaskList = new ArrayList<>(0);
|
List<PipTask> pipTaskList = new ArrayList<>(0);
|
||||||
|
|
||||||
Map<PipStage,Map<PipStage,List<PipTask>>> templateCopyPipelineMap = new HashMap<>();
|
|
||||||
PipPipeline pipeline = pipelineConverter.reqToDO(pipelineReq);
|
PipPipeline pipeline = pipelineConverter.reqToDO(pipelineReq);
|
||||||
|
|
||||||
// 随机颜色
|
// 随机颜色
|
||||||
@ -171,7 +170,6 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
|||||||
//则代表大阶段下存在阶段子节点
|
//则代表大阶段下存在阶段子节点
|
||||||
childStageList.forEach(j->{
|
childStageList.forEach(j->{
|
||||||
PipStage childStage = templateConverter.respToStage(j);
|
PipStage childStage = templateConverter.respToStage(j);
|
||||||
Map<PipStage,List<PipTask>> stageTaskMap = new HashMap<>();
|
|
||||||
|
|
||||||
childStage.setId(idWork.nextUUID(null));
|
childStage.setId(idWork.nextUUID(null));
|
||||||
childStage.setPipelineId(pipeline.getId());
|
childStage.setPipelineId(pipeline.getId());
|
||||||
@ -197,10 +195,8 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
|||||||
pipTask.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
pipTask.setCreator(String.valueOf(WebFrameworkUtils.getLoginUserId()));
|
||||||
taskList.add(pipTask);
|
taskList.add(pipTask);
|
||||||
});
|
});
|
||||||
stageTaskMap.put(childStage,taskList);
|
|
||||||
pipTaskList.addAll(taskList);
|
pipTaskList.addAll(taskList);
|
||||||
}
|
}
|
||||||
templateCopyPipelineMap.put(pipStage,stageTaskMap);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -209,29 +205,6 @@ public class PipelineServiceImpl extends ServiceImpl<PipelineDao, PipPipeline> i
|
|||||||
}
|
}
|
||||||
pipStageDao.insertBatch(pipStageList);
|
pipStageDao.insertBatch(pipStageList);
|
||||||
pipTaskDao.insertBatch(pipTaskList);
|
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();
|
return pipeline.getId();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user