dangsn
2024-06-05 72c7bbd66b8456db7dabf0dbc15f7aa9c2af2b9d
Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java
@@ -6,9 +6,7 @@
import com.thoughtworks.xstream.io.xml.XppDriver;
import com.vci.client.common.providers.ServiceProvider;
import com.vci.corba.common.PLException;
import com.vci.corba.common.VCIError;
import com.vci.corba.portal.data.PLTabButton;
import com.vci.corba.portal.data.PLUILayout;
import com.vci.corba.portal.data.*;
import com.vci.starter.web.annotation.log.VciUnLog;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.util.BeanUtil;
@@ -26,7 +24,6 @@
import com.vci.web.service.OsBtmServiceI;
import com.vci.web.service.UIEngineServiceI;
import com.vci.web.service.WebBoServiceI;
import com.vci.web.util.Func;
import com.vci.web.util.PlatformClientUtil;
import com.vci.web.util.WebUtil;
import com.vci.web.xmlmodel.UIComponentDefineXO;
@@ -42,12 +39,6 @@
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.PLTabPage;
import com.vci.corba.portal.data.PLAction;
import com.vci.corba.portal.data.PLPageDefination;
import com.vci.corba.portal.data.PLCommandParameter;
import plm.corba.portal.*;
import java.util.*;
import java.util.stream.Collectors;
@@ -873,8 +864,8 @@
   @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()));
      } catch (VCIError vciError) {
         return UIContentDO2VOs(Arrays.stream(platformClientUtil.getPortalService().getAllPLUILayouts()).collect(Collectors.toList()));
      } catch (PLException vciError) {
         throw WebUtil.getVciBaseException(vciError);
      }
   }
@@ -884,10 +875,10 @@
    * @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()));
@@ -1080,7 +1071,7 @@
   public List<UILayoutVO> selectAllUILayout() {
//      try {
//         return UILayoutDO2VOs(Arrays.stream(platformClientUtil.getPortalService().getAllPLTabPages()).collect(Collectors.toList()),true);
//      } catch (VCIError vciError) {
//      } catch (PLException vciError) {
//         throw WebUtil.getVciBaseException(vciError);
//      }
      return null;
@@ -1186,7 +1177,7 @@
   public List<UIComponentVO> selectAllUIComponent() {
//      try {
//         return uiComponentDO2VOs(Arrays.stream(platformClientUtil.getPortalService().getAllPLPageDefinations()).collect(Collectors.toList()),false);
//      } catch (VCIError vciError) {
//      } catch (PLException vciError) {
//         throw WebUtil.getVciBaseException(vciError);
//      }
      return null;