use of io.choerodon.agile.infra.feign.vo.ProjectCategoryDTO in project agile-service by open-hand.
the class ProjectCategory method isWaterfallProject.
public static boolean isWaterfallProject(Long projectId) {
ProjectVO projectVO = ConvertUtil.queryProject(projectId);
List<ProjectCategoryDTO> categories = projectVO.getCategories();
if (CollectionUtils.isEmpty(categories)) {
throw new CommonException(ERROR_CATEGORIES_IS_NULL);
}
Set<String> codes = categories.stream().map(ProjectCategoryDTO::getCode).collect(Collectors.toSet());
return codes.contains(MODULE_WATERFALL) || codes.contains(MODULE_WATERFALL_AGILE);
}
Aggregations