| | |
| | | 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) { |
| | | if(null != null){ |
| | | |
| | | } |
| | | UITableDefineVO tableDefineVO = new UITableDefineVO(); |
| | | tableDefineVO.setOid(portal.id); |
| | | tableDefineVO.setId(portal.viName); |
| | |
| | | if(StringUtils.isBlank(componentOid)){ |
| | | return null; |
| | | } |
| | | // if(!QUERY_BY_CACHE){ |
| | | // try { |
| | | // return uiComponentDO2VO(platformClientUtil.getPortalService().getPLPageDefinationById(componentOid),true); |
| | | // } catch (VCIError vciError) { |
| | | // throw WebUtil.getVciBaseException(vciError); |
| | | // } |
| | | // }else{ |
| | | // List<UIComponentVO> componentVOS = self.selectAllUIComponent(); |
| | | // List<UIComponentVO> componentVOList = Optional.ofNullable(componentVOS).orElseGet(() -> new ArrayList<>()).stream().filter(s -> s.getOid().equalsIgnoreCase(componentOid)).collect(Collectors.toList()); |
| | | // if(!CollectionUtils.isEmpty(componentVOList)){ |
| | | // return componentVOList.get(0); |
| | | // } |
| | | // } |
| | | if(!QUERY_BY_CACHE){ |
| | | try { |
| | | platformClientUtil.getPortalService().getPLPageDefinationById(componentOid); |
| | | return uiComponentDO2VO(null,true); |
| | | } catch (VCIError vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | | }else{ |
| | | List<UIComponentVO> componentVOS = self.selectAllUIComponent(); |
| | | List<UIComponentVO> componentVOList = Optional.ofNullable(componentVOS).orElseGet(() -> new ArrayList<>()).stream().filter(s -> s.getOid().equalsIgnoreCase(componentOid)).collect(Collectors.toList()); |
| | | if(!CollectionUtils.isEmpty(componentVOList)){ |
| | | return componentVOList.get(0); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | |
| | | }else{ |
| | | try { |
| | | componentVO.setTableDefineVO(tableDO2VO(ServiceProvider.getUIService().getPortalVIByTypeNameAndVIName(btmType,componentDefineXO.getTemplateId()),true)); |
| | | // componentVO.setTableDefineVO(tableDO2VO(platformClientUtil.getPortalService().getPortalVIByTypeNameAndVIName(btmType,componentDefineXO.getTemplateId()),true)); |
| | | //componentVO.setTableDefineVO(tableDO2VO(platformClientUtil.getPortalService().getPortalVIByTypeNameAndVIName(btmType,componentDefineXO.getTemplateId()),true)); |
| | | } catch (VCIError vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 按钮的数据对象转换为显示对象 |
| | | * @param buttons 按钮的数据对象 |
| | |
| | | public UIButtonDefineVO buttonDO2VO(com.vci.corba.portal.data.PLTabButton button) { |
| | | UIButtonDefineVO buttonVO = new UIButtonDefineVO(); |
| | | Map<String, UIActionVO> actionVOMap = self.selectAllActionMap(); |
| | | // Map<String, UIActionVO> actionVOMap = ServiceProvider.getUIService().getAllPLAction(); |
| | | //Map<String, UIActionVO> actionVOMap = ServiceProvider.getUIService().getAllPLAction(); |
| | | if(button !=null){ |
| | | buttonVO.setOid(button.plOId); |
| | | buttonVO.setPkComponent(button.plTableOId); |
| | |
| | | break; |
| | | } |
| | | } |
| | | // return UIContentDO2VO(context,true); |
| | | //return UIContentDO2VO(context,true); |
| | | return UIContentDO2VO(null,true); |
| | | } |
| | | |
| | | } |
| | | |