| | |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import com.vci.corba.portal.data.PortalVI; |
| | | import com.vci.corba.portal.data.PLAction; |
| | | import com.vci.corba.portal.data.PLTabPage; |
| | | import com.vci.corba.portal.data.PLTabButton; |
| | | import plm.corba.portal.*; |
| | | |
| | | import java.util.*; |
| | |
| | | public void checkInvalidXmlVI() { |
| | | PortalVI[] portalVIS = null; |
| | | try { |
| | | portalVIS = platformClientUtil.getPortalService().getAllPortalVI(); |
| | | portalVIS = ServiceProvider.getUIService().getAllPortalVI(); |
| | | // portalVIS = platformClientUtil.getPortalService().getAllPortalVI(); |
| | | } catch (VCIError vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public List<UITableDefineVO> tableDO2VOs(Collection<com.vci.corba.portal.data.PortalVI> prms, boolean queryDetail) { |
| | | public List<UITableDefineVO> tableDO2VOs(Collection<PortalVI> prms, boolean queryDetail) { |
| | | List<UITableDefineVO> tableDefineVOList = new ArrayList<>(); |
| | | Optional.ofNullable(prms).orElseGet(()->new ArrayList<com.vci.corba.portal.data.PortalVI>()).stream().forEach(portal->{ |
| | | UITableDefineVO defineVO = tableDO2VO(portal,queryDetail); |
| | |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public UITableDefineVO tableDO2VO(com.vci.corba.portal.data.PortalVI portal, boolean queryDetail) { |
| | | public UITableDefineVO tableDO2VO(PortalVI portal, boolean queryDetail) { |
| | | |
| | | UITableDefineVO tableDefineVO = new UITableDefineVO(); |
| | | tableDefineVO.setOid(portal.id); |
| | | tableDefineVO.setId(portal.viName); |
| | |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public List<UIActionVO> actionDO2VOs(Collection<com.vci.corba.portal.data.PLAction> actions) { |
| | | public List<UIActionVO> actionDO2VOs(Collection<PLAction> actions) { |
| | | List<UIActionVO> actionVOS = new ArrayList<>(); |
| | | Optional.ofNullable(actions).orElseGet(()->new ArrayList<>()).stream().forEach(action->{ |
| | | UIActionVO actionVO = actionDO2VO(action); |
| | |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public UIActionVO actionDO2VO(com.vci.corba.portal.data.PLAction action) { |
| | | public UIActionVO actionDO2VO(PLAction action) { |
| | | UIActionVO actionVO = new UIActionVO(); |
| | | if(action!=null){ |
| | | actionVO.setOid(action.plOId); |
| | |
| | | return contentVO; |
| | | } |
| | | |
| | | // private List<UILayoutVO> swapLayArea(List<UILayoutVO> layoutVOS){ |
| | | // List<UILayoutVO> layoutVOList = new ArrayList<>(); |
| | | // //1 导航区 |
| | | // //2 主内容区 |
| | | // //3 页签区 |
| | | // if(!CollectionUtils.isEmpty(layoutVOS)){ |
| | | // //只有一个区域的时候,都放在center里,哪怕本身是导航区 |
| | | // if(layoutVOS.size() == 1){ |
| | | // layoutVOS.get(0).setLayoutAreaType(UILayoutAreaTypeEnum.CENTER.getValue()); |
| | | // layoutVOList.add(layoutVOS.get(0)); |
| | | // }else{ |
| | | // Map<String,List<UILayoutVO>> layoutAreaMap = layoutVOS.stream().collect(Collectors.groupingBy(UILayoutVO::getLayoutAreaType)); |
| | | // if(layoutAreaMap.containsKey("1")){ |
| | | // // |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // private List<UILayoutVO> swapLayArea(List<UILayoutVO> layoutVOS){ |
| | | // List<UILayoutVO> layoutVOList = new ArrayList<>(); |
| | | // //1 导航区 |
| | | // //2 主内容区 |
| | | // //3 页签区 |
| | | // if(!CollectionUtils.isEmpty(layoutVOS)){ |
| | | // //只有一个区域的时候,都放在center里,哪怕本身是导航区 |
| | | // if(layoutVOS.size() == 1){ |
| | | // layoutVOS.get(0).setLayoutAreaType(UILayoutAreaTypeEnum.CENTER.getValue()); |
| | | // layoutVOList.add(layoutVOS.get(0)); |
| | | // }else{ |
| | | // Map<String,List<UILayoutVO>> layoutAreaMap = layoutVOS.stream().collect(Collectors.groupingBy(UILayoutVO::getLayoutAreaType)); |
| | | // if(layoutAreaMap.containsKey("1")){ |
| | | // // |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | /** |
| | | * 获取某个UI上下文的区域 |
| | |
| | | * @param pages 区域的数据对象 |
| | | * @return 显示对象 |
| | | */ |
| | | private List<UILayoutVO> UILayoutDO2VOs(Collection<com.vci.corba.portal.data.PLTabPage> pages, boolean queryDetail){ |
| | | private List<UILayoutVO> UILayoutDO2VOs(Collection<PLTabPage> pages, boolean queryDetail){ |
| | | List<UILayoutVO> contentVOS = new ArrayList<>(); |
| | | Optional.ofNullable(pages).orElseGet(()->new ArrayList<com.vci.corba.portal.data.PLTabPage>()).stream().forEach(page->{ |
| | | Optional.ofNullable(pages).orElseGet(()->new ArrayList<PLTabPage>()).stream().forEach(page->{ |
| | | UILayoutVO layoutVO = UILayoutDO2VO(page, queryDetail); |
| | | if(layoutVO.isEnableStatus()) { |
| | | contentVOS.add(layoutVO); |
| | |
| | | * @return 区域的显示对象 |
| | | */ |
| | | @VciUnLog |
| | | private UILayoutVO UILayoutDO2VO(com.vci.corba.portal.data.PLTabPage page, boolean queryDetail){ |
| | | private UILayoutVO UILayoutDO2VO(PLTabPage page, boolean queryDetail){ |
| | | UILayoutVO layoutVO = new UILayoutVO(); |
| | | if(page !=null ){ |
| | | layoutVO.setOid(page.plOId); |
| | |
| | | * @return 显示对象 |
| | | */ |
| | | @Override |
| | | public List<UIButtonDefineVO> buttonDO2VOs(Collection<com.vci.corba.portal.data.PLTabButton> buttons){ |
| | | public List<UIButtonDefineVO> buttonDO2VOs(Collection<PLTabButton> buttons){ |
| | | List<UIButtonDefineVO> buttonDefineVOS = new ArrayList<>(); |
| | | Optional.ofNullable(buttons).orElseGet(()->new ArrayList<>()).stream().forEach(button->{ |
| | | buttonDefineVOS.add(buttonDO2VO(button)); |