ludc
2024-04-08 9f086e6027543c597cd53e95d15777875c7d28e6
UIEngineServiceImpl类中相关修改
已修改2个文件
52 ■■■■ 文件已修改
Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/UIEngineServiceI.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/UIEngineServiceI.java
@@ -131,7 +131,7 @@
     * @param action 数据对象
     * @return 显示对象
     */
    UIActionVO actionDO2VO(com.vci.corba.portal.data.PLAction action);
    UIActionVO actionDO2VO(PLAction action);
    /**
Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java
@@ -6,6 +6,7 @@
import com.thoughtworks.xstream.io.xml.XppDriver;
import com.vci.client.common.providers.ServiceProvider;
import com.vci.corba.common.VCIError;
import com.vci.corba.portal.data.PLTabButton;
import com.vci.corba.portal.data.PLUILayout;
import com.vci.starter.web.annotation.log.VciUnLog;
import com.vci.starter.web.exception.VciBaseException;
@@ -40,10 +41,10 @@
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 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.*;
@@ -165,13 +166,13 @@
    @Override
    @VciUnLog
    public List<UIFormDefineVO> selectAllForm() {
        com.vci.corba.portal.data.PortalVI[] portalVIS = null;
        PortalVI[] portalVIS = null;
        try {
            portalVIS = ServiceProvider.getUIService().getAllPortalVI();
        } catch (VCIError vciError) {
            throw WebUtil.getVciBaseException(vciError);
        }
        List<com.vci.corba.portal.data.PortalVI> portalVIList = Arrays.stream(portalVIS).filter(portal -> 1 == portal.viType).collect(Collectors.toList());
        List<PortalVI> portalVIList = Arrays.stream(portalVIS).filter(portal -> 1 == portal.viType).collect(Collectors.toList());
        return formDO2VOs(portalVIList);
    }
@@ -193,9 +194,9 @@
     * @return 显示对象
     */
    @Override
    public List<UIFormDefineVO> formDO2VOs(Collection<com.vci.corba.portal.data.PortalVI> portalVIS) {
    public List<UIFormDefineVO> formDO2VOs(Collection<PortalVI> portalVIS) {
        List<UIFormDefineVO> formDefineVOList = new ArrayList<>();
        Optional.ofNullable(portalVIS).orElseGet(()->new ArrayList<com.vci.corba.portal.data.PortalVI>()).stream().forEach(portal->{
        Optional.ofNullable(portalVIS).orElseGet(()->new ArrayList<PortalVI>()).stream().forEach(portal->{
            try {
                UIFormDefineVO defineVO = formDO2VO(portal);
                formDefineVOList.add(defineVO);
@@ -216,7 +217,7 @@
     */
    @Override
    @VciUnLog
    public UIFormDefineVO formDO2VO(com.vci.corba.portal.data.PortalVI portal) {
    public UIFormDefineVO formDO2VO(PortalVI portal) {
        if(portal == null ||StringUtils.isBlank(portal.prm)){
            throw new VciBaseException("表单可能不存在,因为未能获取到它的信息");
        }
@@ -416,7 +417,7 @@
            return null;
        }
        if(!QUERY_BY_CACHE){
            com.vci.corba.portal.data.PortalVI portalVI = null;
            PortalVI portalVI = null;
            try {
                portalVI = ServiceProvider.getUIService().getPortalVIByTypeNameAndVIName(btmId, id);
            } catch (VCIError vciError) {
@@ -459,13 +460,13 @@
    @Cacheable(value = VCI_OBJECT_SERVICE,key = CacheKeyConstant.ALL_TABLE,unless = "#result == null")
    @VciUnLog
    public List<UITableDefineVO> selectAllTable() {
        com.vci.corba.portal.data.PortalVI[] portalVIS = null;
        PortalVI[] portalVIS = null;
        try {
            portalVIS = ServiceProvider.getUIService().getAllPortalVI();
        } catch (VCIError vciError) {
            throw WebUtil.getVciBaseException(vciError);
        }
        List<com.vci.corba.portal.data.PortalVI> portalVIList = Arrays.stream(portalVIS).filter(portal -> 0 == portal.viType).collect(Collectors.toList());
        List<PortalVI> portalVIList = Arrays.stream(portalVIS).filter(portal -> 0 == portal.viType).collect(Collectors.toList());
        return tableDO2VOs(portalVIList,false);
    }
@@ -490,7 +491,7 @@
    @VciUnLog
    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->{
        Optional.ofNullable(prms).orElseGet(()->new ArrayList<PortalVI>()).stream().forEach(portal->{
            UITableDefineVO defineVO = tableDO2VO(portal,queryDetail);
            tableDefineVOList.add(defineVO);
        });
@@ -739,7 +740,7 @@
            return null;
        }
        if(!QUERY_BY_CACHE){
            com.vci.corba.portal.data.PortalVI portalVI = null;
            PortalVI portalVI = null;
            try {
                portalVI = ServiceProvider.getUIService().getPortalVIByTypeNameAndVIName(btmId, id);
            } catch (VCIError vciError) {
@@ -808,7 +809,7 @@
     */
    @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);
@@ -825,7 +826,7 @@
     */
    @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);
@@ -1091,9 +1092,9 @@
     * @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);
@@ -1117,7 +1118,7 @@
     * @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);
@@ -1205,8 +1206,7 @@
        }
        if(!QUERY_BY_CACHE){
            try {
                platformClientUtil.getPortalService().getPLPageDefinationById(componentOid);
                return uiComponentDO2VO(null,true);
                return uiComponentDO2VO(ServiceProvider.getUIService().getPLPageDefinationById(componentOid),true);
            } catch (VCIError vciError) {
                throw WebUtil.getVciBaseException(vciError);
            }
@@ -1225,7 +1225,7 @@
     * @param pages 数据对象
     * @return 显示对象
     */
    private List<UIComponentVO> uiComponentDO2VOs(Collection<com.vci.corba.portal.data.PLPageDefination> pages, boolean queryDetail){
    private List<UIComponentVO> uiComponentDO2VOs(Collection<PLPageDefination> pages, boolean queryDetail){
        List<UIComponentVO> componentVOS = new ArrayList<>();
        pages.stream().forEach(page->{
            componentVOS.add(uiComponentDO2VO(page,queryDetail));
@@ -1239,7 +1239,7 @@
     * @return 显示对象
     */
    @VciUnLog
    private UIComponentVO uiComponentDO2VO(com.vci.corba.portal.data.PLPageDefination page, boolean queryDetail){
    private UIComponentVO uiComponentDO2VO(PLPageDefination page, boolean queryDetail){
        UIComponentVO componentVO = new UIComponentVO();
        if(page !=null){
            componentVO.setOid(page.plOId);
@@ -1456,7 +1456,7 @@
     * @return 显示对象
     */
    @Override
    public UIButtonDefineVO buttonDO2VO(com.vci.corba.portal.data.PLTabButton button)  {
    public UIButtonDefineVO buttonDO2VO(PLTabButton button)  {
        UIButtonDefineVO buttonVO = new UIButtonDefineVO();
        Map<String, UIActionVO> actionVOMap = self.selectAllActionMap();
        //Map<String, UIActionVO> actionVOMap = ServiceProvider.getUIService().getAllPLAction();
@@ -1491,9 +1491,9 @@
                Map<String,String> params = new HashMap<>();
                try {
//                    PLCommandParameter[] parameters = platformClientUtil.getPortalService().getPLCommandParametersByCommandOId(buttonVO.getOid());
                    com.vci.corba.portal.data.PLCommandParameter[] parameters = ServiceProvider.getUIService().getPLCommandParametersByCommandOId(buttonVO.getOid());
                    PLCommandParameter[] parameters = ServiceProvider.getUIService().getPLCommandParametersByCommandOId(buttonVO.getOid());
                    if(parameters!=null && parameters.length > 0){
                        for(com.vci.corba.portal.data.PLCommandParameter parameter: parameters){
                        for(PLCommandParameter parameter: parameters){
                            params.put(parameter.plKey,parameter.plValue);
                        }
                    }