| | |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import plm.corba.portal.*; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | @Cacheable(value = VCI_OBJECT_SERVICE,key = CacheKeyConstant.ALL_UI,unless = "#result == null") |
| | | public List<UIContentVO> selectAllUIContent() { |
| | | try { |
| | | return UIContentDO2VOs(Arrays.stream(platformClientUtil.getPortalService().getAllPLPageLayoutDefinations()).collect(Collectors.toList())); |
| | | return UIContentDO2VOs(Arrays.stream(platformClientUtil.getPortalService().getAllPLUILayouts()).collect(Collectors.toList())); |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | |
| | | * @param pageLayoutDefinations 上下文UI对象 |
| | | * @return 显示对象 |
| | | */ |
| | | private List<UIContentVO> UIContentDO2VOs(Collection<PLPageLayoutDefination> pageLayoutDefinations){ |
| | | private List<UIContentVO> UIContentDO2VOs(Collection<PLUILayout> pageLayoutDefinations){ |
| | | List<UIContentVO> contentVOS = new ArrayList<>(); |
| | | Optional.ofNullable(pageLayoutDefinations).orElseGet(()->new ArrayList<PLPageLayoutDefination>()).stream().forEach(pageLayout->{ |
| | | // contentVOS.add(UIContentDO2VO(pageLayout,false)); |
| | | Optional.ofNullable(pageLayoutDefinations).orElseGet(()->new ArrayList<PLUILayout>()).stream().forEach(pageLayout->{ |
| | | contentVOS.add(UIContentDO2VO(pageLayout,false)); |
| | | }); |
| | | if(!CollectionUtils.isEmpty(contentVOS)) { |
| | | Map<String, List<UILayoutVO>> layoutMap = batchListLayoutByContent(contentVOS.stream().map(UIContentVO::getOid).collect(Collectors.toSet())); |