ui定义:区域定义:页面表格查询、添加、修改、删除。
页面设计:添加、修改、查询等接口上传
已修改6个文件
已添加2个文件
2585 ■■■■■ 文件已修改
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/PLDefination.java 494 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PLDefinationVO.java 226 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PLUILayoutCloneVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIManagerServiceI.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java 1183 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/UITools.java 466 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/model/PLDefination.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,494 @@
package com.vci.model;
/**
 * @author ludc
 * @date 2024/9/5 10:47
 */
public class PLDefination {
    /**
     * 1:导航树; 2:主内容区; 3:页签区
     */
    private int type = 0;
    private String id = "";
    private String name = "";
    private String description = "";
    /**
     * æ˜¾ç¤ºå±žæ€§
     */
    private String showAbs = "";
    /**
     * åˆ†éš”符
     */
    private String separator = "";
    /**
     * æ˜¾ç¤ºlink属性
     */
    private String showLinkAbs = "";
    /**
     * æœç´¢ç›®æ ‡
     */
    private String searchTarger = "";
    /**
     * æ¨¡æ¿ç±»åž‹
     */
    private String templateType = "";
    /**
     * æ˜¾ç¤ºç±»åž‹
     */
    private String showType = "";
    /**
     * æ¨¡æ¿ID
     */
    private String templateId = "";
    /**
     * é€‰æ‹©æ–¹å‘
     */
    private String orientation = "";
    /**
     * æœ‰æ•ˆæ€§
     */
    private String validity = "";
    /**
     * æŽ’序字段
     */
    private String orderField = "";
    /**
     * æŽ’序方向
     */
    private String orderMode = "";
    /**
     * è¿”回数据条目
     */
    private String returnRows = "";
    /**
     * æŽ§åˆ¶è·¯å¾„
     */
    private String controlPath = "";
    /**
     * å±•开形式:逐级:1;全部展开0
     */
    private String expandMode = "";
    /**
     * é“¾æŽ¥ç±»åž‹
     */
    private String linkType = "";
    /**
     * æ˜¯å¦æ˜¾ç¤ºå›¾æ ‡
     */
    private String isShowImage = "";
    /**
     * æ ‘展示列
     */
    private String expandCols = "";
    /**
     * æ˜¾ç¤ºå†…容
     */
    private String showContent = "";
    /**
     * ç±»åž‹
     */
    private String showContentType = "";
    /**
     * å…³ç³»
     */
    private String showContentRelation = "";
    /**
     * table
     */
    private String showContentTable = "";
    /**
     * å¯¼èˆªæ ‘类型 1代表folder 2代表角色 3代表不显示
     */
    private String navigatorType = "";
    /**
     * äº‹ä»¶key
     */
    private String eventKey = "";
    /**
     * äº‹ä»¶è‡ªå®šä¹‰ç±»å…¨è·¯å¾„
     */
    private String eventValue = "";
    /**
     * æ ¹èŠ‚ç‚¹æ˜¾ç¤ºå†…å®¹
     */
    private String rootContent = "";
    /**
     * <p>UI解析器,用分号;分隔各组值,即:java_cs、java_bs、net_cs、net_bs、mobile_cs、mobile_bs</p>
     * <p>值格式示例:java_cs:xxx;java_bs:xxx;net_cs:xxx;net_bs:xxx;mobile_cs:xx;mobile_bs:xxx; </p>
     */
    private String uiParser = "";
    /**
     * <p>扩展属性,用分号;分隔各组值,每组用冒号:分隔扩展属性名称与扩展属性值,可以定义任意组</p>
     * <p>值格式示例:ext1:xx;ext2;ext3:xx;ext4:xxx;extn:xxx;</p>
     */
    private String extAttr = "";
    /**
     * ç»„件上设置的查询模板名称
     */
    private String queryTemplateName = "";
    /**
     * å­UI的业务类型
     */
    private String subUiObjType = "";
    /**
     * å…³è”子UI
     */
    private String subUILayout = "";
    public String getEventKey() {
        return eventKey;
    }
    public void setEventKey(String eventKey) {
        this.eventKey = eventKey;
    }
    public String getEventValue() {
        return eventValue;
    }
    public void setEventValue(String eventValue) {
        this.eventValue = eventValue;
    }
    public int getType() {
        return type;
    }
    public void setType(int type) {
        this.type = type;
    }
    public String getShowAbs() {
        return showAbs;
    }
    public void setShowAbs(String showAbs) {
        this.showAbs = showAbs;
    }
    public String getSeparator() {
        return separator;
    }
    public void setSeparator(String separator) {
        this.separator = separator;
    }
    public String getShowLinkAbs() {
        return showLinkAbs;
    }
    public void setShowLinkAbs(String showLinkAbs) {
        this.showLinkAbs = showLinkAbs;
    }
    public String getSearchTarger() {
        return searchTarger;
    }
    public void setSearchTarger(String searchTarger) {
        this.searchTarger = searchTarger;
    }
    public String getTemplateType() {
        return templateType;
    }
    public void setTemplateType(String templateType) {
        this.templateType = templateType;
    }
    public String getShowType() {
        return showType;
    }
    public void setShowType(String showType) {
        this.showType = showType;
    }
    public String getTemplateId() {
        return templateId;
    }
    public void setTemplateId(String templateId) {
        this.templateId = templateId;
    }
    public String getOrientation() {
        return orientation;
    }
    public void setOrientation(String orientation) {
        this.orientation = orientation;
    }
    public String getValidity() {
        return validity;
    }
    public void setValidity(String validity) {
        this.validity = validity;
    }
    public String getOrderField() {
        return orderField;
    }
    public void setOrderField(String orderField) {
        this.orderField = orderField;
    }
    public String getOrderMode() {
        return orderMode;
    }
    public void setOrderMode(String orderMode) {
        this.orderMode = orderMode;
    }
    public String getReturnRows() {
        return returnRows;
    }
    public void setReturnRows(String returnRows) {
        this.returnRows = returnRows;
    }
    public String getControlPath() {
        return controlPath;
    }
    public void setControlPath(String controlPath) {
        this.controlPath = controlPath;
    }
    public String getExpandMode() {
        return expandMode;
    }
    public void setExpandMode(String expandMode) {
        this.expandMode = expandMode;
    }
    public String getLinkType() {
        return linkType;
    }
    public void setLinkType(String linkType) {
        this.linkType = linkType;
    }
    public String getIsShowImage() {
        return isShowImage;
    }
    public void setIsShowImage(String isShowImage) {
        this.isShowImage = isShowImage;
    }
    public String getExpandCols() {
        return expandCols;
    }
    public void setExpandCols(String expandCols) {
        this.expandCols = expandCols;
    }
    public String getShowContent() {
        return showContent;
    }
    public void setShowContent(String showContent) {
        this.showContent = showContent;
    }
    public String getShowContentType() {
        return showContentType;
    }
    public void setShowContentType(String showContentType) {
        this.showContentType = showContentType;
    }
    public String getShowContentRelation() {
        return showContentRelation;
    }
    public void setShowContentRelation(String showContentRelation) {
        this.showContentRelation = showContentRelation;
    }
    public String getShowContentTable() {
        return showContentTable;
    }
    public void setShowContentTable(String showContentTable) {
        this.showContentTable = showContentTable;
    }
    public String getNavigatorType() {
        return navigatorType;
    }
    public void setNavigatorType(String navigatorType) {
        this.navigatorType = navigatorType;
    }
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }
    /**
     * è¿”回 æ ¹èŠ‚ç‚¹ æ˜¾ç¤ºå†…容
     * @return
     */
    public String getRootContent() {
        return rootContent;
    }
    /**
     * è®¾ç½® æ ¹èŠ‚ç‚¹ æ˜¾ç¤ºå†…容
     * @param rootContent æ ¹èŠ‚ç‚¹æ˜¾ç¤ºå†…å®¹
     */
    public void setRootContent(String rootContent) {
        this.rootContent = rootContent;
    }
    /**
     * è¿”回
     * <p>UI解析器,用分号;分隔各组值,即:java_cs、java_bs、net_cs、net_bs、mobile_cs、mobile_bs</p>
     * <p>值格式示例:java_cs:xxx;java_bs:xxx;net_cs:xxx;net_bs:xxx;mobile_cs:xx;mobile_bs:xxx; </p>
     * @return
     */
    public String getUiParser() {
        return uiParser;
    }
    /**
     * è¿”回
     * <p>UI解析器,用分号;分隔各组值,即:java_cs、java_bs、net_cs、net_bs、mobile_cs、mobile_bs</p>
     * <p>值格式示例:java_cs:xxx;java_bs:xxx;net_cs:xxx;net_bs:xxx;mobile_cs:xx;mobile_bs:xxx; </p>
     * @param uiParser
     */
    public void setUiParser(String uiParser) {
        this.uiParser = uiParser;
    }
    /**
     * è¿”回
     * <p>扩展属性,用分号;分隔各组值,每组用冒号:分隔扩展属性名称与扩展属性值,可以定义任意组</p>
     * <p>值格式示例:ext1:xx;ext2;ext3:xx;ext4:xxx;extn:xxx;</p>
     * @return
     */
    public String getExtAttr() {
        return extAttr;
    }
    /**
     * è®¾ç½®
     * <p>扩展属性,用分号;分隔各组值,每组用冒号:分隔扩展属性名称与扩展属性值,可以定义任意组</p>
     * <p>值格式示例:ext1:xx;ext2;ext3:xx;ext4:xxx;extn:xxx;</p>
     */
    public void setExtAttr(String extAttr) {
        this.extAttr = extAttr;
    }
    /**
     * è®¾ç½® åœ¨ç»„件上设置的查询模板名称
     * @return
     */
    public String getQueryTemplateName() {
        return queryTemplateName;
    }
    /**
     * è¿”回在组件上定义的查询模板名称
     * @param queryTemplateName
     */
    public void setQueryTemplateName(String queryTemplateName) {
        this.queryTemplateName = queryTemplateName;
    }
    /**
     * @return the subUiBtName
     */
    public String getSubUiObjType() {
        return subUiObjType;
    }
    /**
     * @param subUiBtName the subUiBtName to set
     */
    public void setSubUiObjType(String subUiBtName) {
        this.subUiObjType = subUiBtName;
    }
    /**
     * @return the subUILayout
     */
    public String getSubUILayout() {
        return subUILayout;
    }
    /**
     * @param subUILayout the subUILayout to set
     */
    public void setSubUILayout(String subUILayout) {
        this.subUILayout = subUILayout;
    }
}
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PLDefinationVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,226 @@
package com.vci.pagemodel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Map;
/**
 * @author ludc
 * @date 2024/9/5 11:45
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PLDefinationVO {
    /**
     * 1:导航树; 2:主内容区; 3:页签区
     */
    private int type = 0;
    private String id = "";
    private String name = "";
    private String description = "";
    /**
     * æ˜¾ç¤ºå±žæ€§
     */
    private String showAbs = "";
    /**
     * åˆ†éš”符
     */
    private String separator = "";
    /**
     * æ˜¾ç¤ºlink属性
     */
    private String showLinkAbs = "";
    /**
     * æœç´¢ç›®æ ‡ï¼šæœç´¢ç±»åž‹ï¼šæœ¬å¯¹è±¡å±žæ€§ï¼š1,关联对象属性:2
     */
    private String searchTarger = "";
    /**
     * æ¨¡æ¿ç±»åž‹: table:1 custom:2 treetable:3 from:4 tree:5 UILayout:6
     */
    private String templateType = "";
    /**
     * æ˜¾ç¤ºç±»åž‹
     */
    private String showType = "";
    /**
     * æ¨¡æ¿ID
     */
    private String templateId = "";
    /**
     * é€‰æ‹©æ–¹å‘
     */
    private String orientation = "";
    /**
     * æœ‰æ•ˆæ€§
     */
    private String validity = "";
    /**
     * æŽ’序字段
     */
    private String orderField = "";
    /**
     * æŽ’序方向
     */
    private String orderMode = "";
    /**
     * è¿”回数据条目
     */
    private String returnRows = "";
    /**
     * æŽ§åˆ¶è·¯å¾„
     */
    private String controlPath = "";
    /**
     * å±•开形式
     */
    private String expandMode = "";
    /**
     * ä¸šåŠ¡ç±»åž‹
     */
    private String btmType = "";
    /**
     * é“¾æŽ¥ç±»åž‹
     */
    private String linkType = "";
    /**
     * æ ¹èŠ‚ç‚¹æ˜¾ç¤ºè¡¨è¾¾å¼
     */
    private String showExpressionRoot = "";
    /**
     * æ ‘节点显示表达式
     */
    private String showExpression = "";
    /**
     * å‚照树设置
     */
    private String refTreeSet = "";
    /**
     * æ˜¯å¦æ˜¾ç¤ºå›¾æ ‡
     */
    private String isShowImage = "";
    /**
     * æ ‘展示列
     */
    private String expandCols = "";
    /**
     * æ˜¾ç¤ºå†…容
     */
    private String showContent = "";
    /**
     * ç±»åž‹
     */
    private String showContentType = "";
    /**
     * å…³ç³»
     */
    private String showContentRelation = "";
    /**
     * table
     */
    private String showContentTable = "";
    /**
     * å¯¼èˆªæ ‘类型 1代表folder 2代表角色 3代表不显示
     */
    private String navigatorType = "";
    /**
     * äº‹ä»¶key
     */
    private String eventKey = "";
    /**
     * äº‹ä»¶è‡ªå®šä¹‰ç±»å…¨è·¯å¾„
     */
    private String eventValue = "";
    /**
     * æ ¹èŠ‚ç‚¹æ˜¾ç¤ºå†…å®¹
     */
    private String rootContent = "";
    /**
     * <p>UI解析器,用分号;分隔各组值,即:java_cs、java_bs、net_cs、net_bs、mobile_cs、mobile_bs</p>
     * <p>值格式示例:java_cs:xxx;java_bs:xxx;net_cs:xxx;net_bs:xxx;mobile_cs:xx;mobile_bs:xxx; </p>
     */
    private String uiParser = "";
    /**
     * <p>扩展属性,用分号;分隔各组值,每组用冒号:分隔扩展属性名称与扩展属性值,可以定义任意组</p>
     * <p>值格式示例:ext1:xx;ext2;ext3:xx;ext4:xxx;extn:xxx;</p>
     */
    private String extAttr = "";
    /**
     * æŸ¥è¯¢å¯¹è±¡ç±»åž‹
     */
    private String qryType;
    /**
     * ç»„件上设置的查询模板名称
     */
    private String queryTemplateName = "";
    /**
     * å­UI的业务类型
     */
    private String subUIObjType = "";
    /**
     * å…³è”子UI
     */
    private String subUILayout = "";
    /**
     * UI定义
     */
    private String uiLayout;
    /**
     * ç¼–号
     */
    private String seq;
    /**
     * åŒºåŸŸé…ç½®é¡µé¢ä¸»é”®
     */
    private String tabPageOId;
    /**
     * äº‹ä»¶é”®å€¼å¯¹
     */
    private Map<String,String> eventMap;
}
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/PLUILayoutCloneVO.java
@@ -16,9 +16,9 @@
public class PLUILayoutCloneVO {
    /**
     * å…‹éš†ç›®æ ‡ä¸»é”®
     * å…‹éš†ç›®æ ‡ä¸šåŠ¡ç±»åž‹åç§°
     */
    private String cloneTargetOid;
    private String cloneTargetName;
    /**
     * å…‹éš†çš„æºå¯¹è±¡çš„信息
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java
@@ -1,10 +1,13 @@
package com.vci.web.controller;
import com.vci.corba.common.PLException;
import com.vci.corba.portal.data.PLTabPage;
import com.vci.corba.portal.data.PLUILayout;
import com.vci.dto.OsBtmTypeDTO;
import com.vci.pagemodel.PLUILayoutCloneVO;
import com.vci.starter.web.annotation.controller.VciUnCheckRight;
import com.vci.starter.web.annotation.log.VciBusinessLog;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseQueryObject;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.util.VciBaseUtil;
@@ -14,8 +17,12 @@
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
/**
 * UI定义控制层
@@ -121,9 +128,9 @@
     * @return åˆ é™¤ç»“æžœ
     */
    @DeleteMapping("/delUIContextData")
    public BaseResult delUIContextData(String[] oids){
    public BaseResult delUIContextData(String[] oids,String plRelatedType){
        try {
            return uiManagerService.delUIContextData(oids) ? BaseResult.success("UI上下文删除成功!"):BaseResult.fail("UI上下文删除失败!");
            return uiManagerService.delUIContextData(oids,plRelatedType) ? BaseResult.success("UI上下文删除成功!"):BaseResult.fail("UI上下文删除失败!");
        } catch (PLException e) {
            e.printStackTrace();
            String exceptionMessage = "删除UI上下文时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
@@ -137,10 +144,10 @@
     * pluiLayoutCloneVO å…‹éš†å‚数对象
     * @return å…‹éš†ç»“æž„
     */
    @PostMapping("/cloneUiContextData")
    public BaseResult cloneUiContextData(@RequestBody PLUILayoutCloneVO pluiLayoutCloneVO){
    @PostMapping("/cloneUIContextData")
    public BaseResult cloneUIContextData(@RequestBody PLUILayoutCloneVO pluiLayoutCloneVO){
        try {
            return uiManagerService.cloneUiContextData(pluiLayoutCloneVO) ? BaseResult.success("UI上下文克隆成功!"):BaseResult.fail("UI上下文克隆失败!");
            return uiManagerService.cloneUIContextData(pluiLayoutCloneVO) ? BaseResult.success("UI上下文克隆成功!"):BaseResult.fail("UI上下文克隆失败!");
        } catch (PLException e) {
            e.printStackTrace();
            String exceptionMessage = "UI上下文克隆时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
@@ -149,6 +156,114 @@
        }
    }
    /**
     * å¯¼å‡ºUI上下文
     * name é“¾æŽ¥ç±»åž‹åç§°
     * @return
     */
    @GetMapping("/expUIContextData")
    public void expUIContextData(String[] oids, HttpServletResponse response) throws PLException, IOException {
        uiManagerService.expUIContextData(oids, response);
    }
    /**
     * å¯¼å…¥UI上下文
     * @param file ä¸Šä¼ çš„æ–‡ä»¶
     * @return
     */
    @PostMapping("/impUiContextData")
    public BaseResult impUIContextData(MultipartFile file){try {
        return uiManagerService.impUIContextData(file);
    }catch (Throwable e) {
        throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e);
    }
    }
    /**
     * æ ¹æ®ä¸Šä¸‹æ–‡ID和区域类型,按顺序获取当前区域的tab页
     * @param contextId
     * @param areaType
     * @return
     */
    @GetMapping( "/getTabByContextIdAndType")
    @VciBusinessLog(operateName = "根据上下文ID和区域类型,按顺序获取当前区域的tab页")
    public BaseResult<List<PLTabPage>> getTabByContextIdAndType(String contextId, int areaType){
        try {
            return BaseResult.dataList(uiManagerService.getTabByContextIdAndType(contextId,areaType));
        }catch (Exception e) {
            e.printStackTrace();
            String exceptionMessage = "根据上下文ID和区域类型,按顺序获取当前区域的tab时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            logger.error(exceptionMessage);
            return BaseResult.fail(exceptionMessage);
        }
    }
    /**
     * åˆ›å»ºåŒºåŸŸæ•°æ®
     * @param plTabPage
     * @return ä¿å­˜ç»“æžœ
     */
    @PostMapping("/addTabData")
    public BaseResult addTabData(@RequestBody PLTabPage plTabPage){
        try {
            return uiManagerService.addTabData(plTabPage) ? BaseResult.success("创建成功!"):BaseResult.fail("创建失败!");
        } catch (Exception e) {
            e.printStackTrace();
            String exceptionMessage = "创建时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            logger.error(exceptionMessage);
            return BaseResult.fail(exceptionMessage);
        }
    }
    /**
     * ä¿®æ”¹åŒºåŸŸæ•°æ®
     * @param  plTabPage
     * @return ä¿®æ”¹ç»“æžœ
     */
    @PutMapping("/updateTabData")
    public BaseResult updateTabData(@RequestBody PLTabPage plTabPage){
        try {
            return uiManagerService.updateTabData(plTabPage) ? BaseResult.success("修改成功!"):BaseResult.fail("修改失败!");
        } catch (Exception e) {
            e.printStackTrace();
            String exceptionMessage = "修改时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            logger.error(exceptionMessage);
            return BaseResult.fail(exceptionMessage);
        }
    }
    /**
     * UI解析类正则检查
     * @param extAttr
     * @return
     */
    @GetMapping("/checkTabPageExtAttrIsOk")
    public BaseResult checkTabPageExtAttrIsOk(String extAttr){
        try {
            return uiManagerService.checkTabPageExtAttrIsOk(extAttr);
        }catch (Exception e) {
            e.printStackTrace();
            String exceptionMessage = "UI解析类正则检查时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            logger.error(exceptionMessage);
            return BaseResult.fail(exceptionMessage);
        }
    }
    /**
     * åˆ é™¤æ•°æ®
     * @param oids
     * @return
     */
    @DeleteMapping("/deleteTabData")
    public BaseResult deleteTabData(String[] oids){
        try {
            return uiManagerService.deleteTabData(oids) ? BaseResult.success("删除成功!"):BaseResult.fail("删除失败!");
        } catch (PLException e) {
            e.printStackTrace();
            String exceptionMessage = "删除时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
            logger.error(exceptionMessage);
            return BaseResult.fail(exceptionMessage);
        }
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java
@@ -386,7 +386,6 @@
     * @return
     */
    @PostMapping("/impData")
    @VciUnCheckRight
    public BaseResult impData(MultipartFile file){try {
        return btmService.impData(file);
    }catch (Throwable e) {
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/UIManagerServiceI.java
@@ -1,13 +1,20 @@
package com.vci.web.service;
import com.vci.corba.common.PLException;
import com.vci.corba.portal.data.PLPageDefination;
import com.vci.corba.portal.data.PLTabPage;
import com.vci.corba.portal.data.PLUILayout;
import com.vci.model.PLDefination;
import com.vci.pagemodel.PLDefinationVO;
import com.vci.pagemodel.PLUILayoutCloneVO;
import com.vci.starter.web.pagemodel.BaseQueryObject;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.pagemodel.DataGrid;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/**
 * @author ludc
@@ -43,20 +50,93 @@
     * æ ¹æ®ä¸»é”®å’Œä¸šåŠ¡ç±»åž‹oid删除ui上下文数据
     * @return
     */
    boolean delUIContextData(String[] oids) throws PLException;
    boolean delUIContextData(String[] oids,String plRelatedType) throws PLException;
    /**
     * å…‹éš†ui上下文
     * @param pluiLayoutCloneVO
     * @return
     */
    boolean cloneUiContextData(PLUILayoutCloneVO pluiLayoutCloneVO) throws PLException;
    boolean cloneUIContextData(PLUILayoutCloneVO pluiLayoutCloneVO) throws PLException;
    /**
     * å¯¼å‡ºui上下文(勾选的要导出的控制区的数据)
     * oids
     * @return
     */
    void expUiContextData(String[] oids, HttpServletResponse response) throws PLException, IOException;
    void expUIContextData(String[] oids, HttpServletResponse response) throws PLException, IOException;
    /**
     * å¯¼å…¥UI上下文
     * @param file
     * @return
     */
    BaseResult impUIContextData(MultipartFile file);
    //区域相关查询、添加、删除、修改等接口
    /**
     * æ ¹æ®ä¸Šä¸‹æ–‡ID和区域类型,按顺序获取当前区域的tab页
     */
    List<PLTabPage> getTabByContextIdAndType(String contextId, int areaType) throws PLException;
    /**
     * æ·»åŠ åŒºåŸŸæ•°æ®
     * @param plTabPage
     * @return
     */
    boolean addTabData(PLTabPage plTabPage) throws PLException;
    /**
     * ä¿®æ”¹åŒºåŸŸæ•°æ®
     * @param plTabPage
     * @return
     */
    boolean updateTabData(PLTabPage plTabPage) throws PLException;
    /**
     * åˆ é™¤åŒºåŸŸæ•°æ®
     * @param oids
     * @return
     */
    boolean deleteTabData(String[] oids) throws PLException;
    /**
     * æ£€æŸ¥æ‰©å±•属性数据格式是否合规,并给出提示
     * @param extAttr
     * @return
     */
    BaseResult checkTabPageExtAttrIsOk(String extAttr);
    //页面设计相关接口
    /**
     * æŸ¥è¯¢é¡µé¢è®¾è®¡å®šä¹‰
     * @param plPageContextOId
     * @return
     */
    List<PLPageDefination> getPLPageDefinations(String plPageContextOId);
    /**
     * æ·»åŠ é¡µé¢å®šä¹‰
     * @param pd
     * @return
     */
    boolean addPageDefination(PLDefinationVO pd) throws Throwable;
    /**
     * ä¿®æ”¹é¡µé¢å®šä¹‰
     * @param pd
     * @return
     */
    boolean updatePageDefination(PLDefinationVO pd) throws Throwable;
    /**
     * åˆ é™¤é¡µé¢å®šä¹‰
     * @param oids
     * @return
     */
    boolean delPageDefination(String[] oids) throws PLException;
    //配置按钮相关接口
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIManagerServiceImpl.java
@@ -1,14 +1,17 @@
package com.vci.web.service.impl;
import com.sun.jnlp.ApiDialog;
import com.vci.client.mw.ClientContextVariable;
import com.vci.common.qt.object.QTConstants;
import com.vci.common.utility.ObjectUtility;
import com.vci.corba.common.PLException;
import com.vci.corba.portal.PortalService;
import com.vci.corba.portal.data.*;
import com.vci.model.PLDefination;
import com.vci.pagemodel.PLDefinationVO;
import com.vci.pagemodel.PLUILayoutCloneVO;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.BaseQueryObject;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.pagemodel.DataGrid;
import com.vci.starter.web.pagemodel.SessionInfo;
import com.vci.starter.web.util.VciBaseUtil;
@@ -17,17 +20,21 @@
import com.vci.web.util.Func;
import com.vci.web.util.PlatformClientUtil;
import com.vci.web.util.UITools;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.swing.*;
import javax.swing.text.JTextComponent;
import java.io.IOException;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
 * UI定义服务界面相关接口
@@ -42,6 +49,7 @@
     */
    @Resource
    private PlatformClientUtil platformClientUtil;
    /**
     * æ—¥å¿—
     */
@@ -100,7 +108,6 @@
        try {
            //ui上下文对象校验
            canContinue(pluiLayout);
            String code = pluiLayout.plCode;
            String name = pluiLayout.plName;
            boolean isExist = nameOrCodeIsExist(pluiLayout, false);
@@ -181,9 +188,9 @@
     * @return
     */
    @Override
    public boolean delUIContextData(String[] oids) throws PLException {
    public boolean delUIContextData(String[] oids,String plRelatedType) throws PLException {
        VciBaseUtil.alertNotNull(oids,"待删除的对象列表");
        //删除方法中有关联数据删除的操作逻辑
        //删除方法中有关联数据删除的操作逻辑,但是这个方法存在问题就是删除的数据并没有将缓存的东西清理干净
        return platformClientUtil.getUIService().deletePLUILayoutByOidsForCascade(oids);
    }
@@ -193,7 +200,7 @@
     * @return
     */
    @Override
    public boolean cloneUiContextData(PLUILayoutCloneVO pluiLayoutCloneVO) throws PLException {
    public boolean cloneUIContextData(PLUILayoutCloneVO pluiLayoutCloneVO) throws PLException {
        VciBaseUtil.alertNotNull(
            pluiLayoutCloneVO,"克隆参数对象",
            pluiLayoutCloneVO.getSourcePLUILayout(),"克隆的源对象信息",
@@ -202,8 +209,9 @@
        );
        PLUILayout pluiLayout = new PLUILayout();
        PLUILayout sourcePLUILayout = pluiLayoutCloneVO.getSourcePLUILayout();
        pluiLayout.plRelatedType = pluiLayoutCloneVO.getCloneTargetName();
        //如果选择克隆目标,则克隆到选择的类型下,如果没有选择克隆目标,则克隆到当前类型下
        if(Func.isBlank(pluiLayoutCloneVO.getCloneTargetOid())){
        if(Func.isBlank(pluiLayoutCloneVO.getCloneTargetName())){
            pluiLayout.plRelatedType = sourcePLUILayout.plRelatedType;
        }
        //克隆的名称和ui上下文编号查重
@@ -223,6 +231,9 @@
        this.checkCodeName(pluiLayout);
        //1、先保存ui上下文
        boolean res = platformClientUtil.getUIService().savePLUILayout(pluiLayout);
        if(!res){
            return res;
        }
        //2、再考虑子节点的克隆
        PLTabPage[] pages = platformClientUtil.getUIService().getPLTabPagesByPageDefinationOId(sourcePLUILayout.plOId); //控制区节点及其子节点的克隆
        if(pages == null){
@@ -241,9 +252,477 @@
        }
    }
    /**
     * å¯¼å‡ºui上下文(勾选的要导出的控制区的数据)
     * oids
     * @return
     */
    @Override
    public void expUiContextData(String[] oids, HttpServletResponse response) throws PLException, IOException {
    public void expUIContextData(String[] oids, HttpServletResponse response) throws PLException, IOException {
    }
    /**
     * å¯¼å…¥UI上下文
     * @param file
     * @return
     */
    @Override
    public BaseResult impUIContextData(MultipartFile file) {
        return null;
    }
    /**
     * æ ¹æ®ä¸Šä¸‹æ–‡ID和区域类型,按顺序获取当前区域的tab页
     */
    @Override
    public List<PLTabPage> getTabByContextIdAndType(String contextId, int areaType) throws PLException {
        VciBaseUtil.alertNotNull(contextId,"上下文主键",areaType,"区域类型");
        PLTabPage[] plTabPages = platformClientUtil.getUIService().getTabPagesByContextIdAndType(contextId, (short) areaType);
        return Arrays.asList(plTabPages);
    }
    /**
     * æ·»åŠ åŒºåŸŸæ•°æ®
     * @param plTabPage
     * @return
     */
    @Override
    public boolean addTabData(PLTabPage plTabPage) throws PLException {
        VciBaseUtil.alertNotNull(plTabPage,"添加区域数据");
        SessionInfo sessionInfo = WebThreadLocalUtil.getCurrentUserSessionInfoInThread();
        plTabPage.plCreateUser = sessionInfo.getUserId();
        plTabPage.plModifyUser = sessionInfo.getUserId();
        plTabPage.plOId = ObjectUtility.getNewObjectID36();
        //新增和修改前检查,出错直接抛出异常
        checkEdit(plTabPage);
        return platformClientUtil.getUIService().savePLTabPage(plTabPage);
    }
    /**
     * ä¿®æ”¹åŒºåŸŸæ•°æ®
     * @param plTabPage
     * @return
     */
    @Override
    public boolean updateTabData(PLTabPage plTabPage) throws PLException {
        VciBaseUtil.alertNotNull(plTabPage,"添加区域数据");
        SessionInfo sessionInfo = WebThreadLocalUtil.getCurrentUserSessionInfoInThread();
        plTabPage.plModifyUser = sessionInfo.getUserId();
        //新增和修改前检查,出错直接抛出异常
        checkEdit(plTabPage);
        return platformClientUtil.getUIService().updatePLTabPage(plTabPage);
    }
    /**
     * åˆ é™¤åŒºåŸŸæ•°æ®
     * @param oids
     * @return
     */
    @Override
    public boolean deleteTabData(String[] oids) throws PLException {
        VciBaseUtil.alertNotNull(oids,"待删除的主键列表");
        return platformClientUtil.getUIService().deletePLTabPageByOidsForCascade(oids);
    }
    /**
     * æ‰©å±•属性合规检测
     * @param extAttr
     * @return
     */
    public BaseResult checkTabPageExtAttrIsOk(String extAttr){
        // æ•°æ®æ ¼å¼ï¼šext1:xx;ext2;ext3:xx;ext4:xxx;extn:xxx;
        boolean res = checkExtValIsOk(extAttr);
        return res ? BaseResult.success(true,"扩展属性数据格式正确!"):BaseResult.fail("扩展属性数据格式不正确!!");
    }
    /**
     * æŸ¥è¯¢é¡µé¢è®¾è®¡å®šä¹‰
     * @param plPageContextOId
     * @return
     */
    @Override
    public List<PLPageDefination> getPLPageDefinations(String plPageContextOId) {
        return null;
    }
    /**
     * æ·»åŠ é¡µé¢å®šä¹‰
     * @param pdVO
     * @return
     */
    @Override
    public boolean addPageDefination(PLDefinationVO pdVO) throws Throwable {
        VciBaseUtil.alertNotNull(pdVO,"页面定义对象",pdVO.getSeq(),"编号",pdVO.getName(),"名称");
        PLDefination d = new PLDefination();
        PLPageDefination pd = new PLPageDefination();
        pd.plTabPageOId = pdVO.getTabPageOId();
        pd.plOId = ObjectUtility.getNewObjectID36();
        //不能为空属性检查
        if(!this.baseInfoIsOk(pd,false)){
            return false;
        }
        pd.name = pdVO.getName().trim();
        pd.seq = Short.valueOf(pdVO.getSeq().trim());
        pd.desc = pdVO.getDescription();
        pd.plType = Short.parseShort(pdVO.getTemplateType());
        d.setName(pdVO.getName().trim());
        d.setUiParser(pdVO.getUiParser().trim());
        d.setExtAttr(pdVO.getExtAttr().trim());
        d.setTemplateType(pdVO.getTemplateType());
        //名称和编号查重
        newPLDefinationIsOk(pdVO, false);
        // æ£€æŸ¥å„个类型下的数据是否输入或有效,一共6种类型按类型检验
        short plType = pd.plType;
        switch (plType){
            //Table(表格)
            case 1:
            //From(表单)
            case 4:
                TableComptCheckInput tci = new TableComptCheckInput(
                    pdVO.getSearchTarger()
                    ,pdVO.getBtmType()
                    ,pdVO.getLinkType()
                    ,pdVO.getTemplateId()
                    ,pdVO.getQueryTemplateName()
                );
                if(!tci.checkInputIsOk()){
                    return false;
                }
                d = tci.getNewPLDefination(d);
                break;
            //Custom(自定义模板)
            case 2:
                //只检查控制路径不能为空,有问题会直接报错
                CustomComptCheckInput ccci = new CustomComptCheckInput(pdVO.getControlPath());
                if(!ccci.checkInputIsOk()){
                    return false;
                }
                d = ccci.getNewPLDefination(d);
                break;
            //TreeTable(树表)
            case 3:
                TreeTableComptCheckInput ttcci = new TreeTableComptCheckInput(
                    pdVO.getSearchTarger()
                    ,pdVO.getBtmType()
                    ,pdVO.getLinkType()
                    ,pdVO.getTemplateId()
                    ,pdVO.getQueryTemplateName()
                    ,pdVO.getExpandCols()
                    ,pdVO.getExpandMode()
                );
                if(!ttcci.checkInputIsOk()){
                return false;
            }
                d = ttcci.getNewPLDefination(d);
                break;
            //Tree(树)
            case 5:
                TreeComptCheckInput tcci = new TreeComptCheckInput(
                    pdVO.getBtmType(),
                    pdVO.getLinkType(),
                    pdVO.getQueryTemplateName(),
                    pdVO.getShowExpressionRoot(),
                    pdVO.getShowExpression(),
                    pdVO.getRefTreeSet(),
                    pdVO.getSeparator(),
                    pdVO.getExpandMode()
                );
                if(!tcci.checkInputIsOk()){
                    return false;
                }
                d = tcci.getNewPLDefination(d);
                break;
            //UILayout(UI定义)
            case 6:
                UILayoutComptCheckInput ulci = new UILayoutComptCheckInput(
                    pdVO.getSearchTarger(),
                    pdVO.getBtmType(),
                    pdVO.getUiLayout(),
                    pdVO.getQueryTemplateName(),
                    pdVO.getQryType()
                );
                if(!ulci.checkInputIsOk()){
                    return false;
                }
                d = ulci.getNewPLDefination(d);
                break;
        }
        d = setEventDataToPLDefination(d,pdVO);
        //转xml赋值到plDefination中
        pd.plDefination = UITools.getPLDefinationText(d);
        //执行保存
        return platformClientUtil.getUIService().savePLPageDefination(pd);
    }
    /**
     * ä¿®æ”¹é¡µé¢å®šä¹‰
     * @param pdVO
     * @return
     */
    @Override
    public boolean updatePageDefination(PLDefinationVO pdVO) throws Throwable {
        /*PLPageDefination pd = getPageDefination();
        PLDefination d = UITools.getPLDefination(pd.plDefination);
        //不能为空属性检查
        if(!this.baseInfoIsOk(pd,true)){
            return false;
        }
        setUIValueToObject(pd, d);
        this.newPLDefinationIsOk(pdVO, true);
        // æ£€æŸ¥å„个组件内部的数据是否有效
        int plType = pdVO.getType();
        switch (plType){
            //Table(表格)
            case 1:
                //From(表单)
            case 4:
                TableComptCheckInput tci = new TableComptCheckInput(
                        pdVO.getSearchTarger()
                        ,pdVO.getBtmType()
                        ,pdVO.getLinkType()
                        ,pdVO.getTemplateId()
                        ,pdVO.getQueryTemplateName()
                );
                if(!tci.checkInputIsOk()){
                    return false;
                }
                d = tci.getNewPLDefination(d);
                break;
            //Custom(自定义模板)
            case 2:
                //只检查控制路径不能为空,有问题会直接报错
                CustomComptCheckInput ccci = new CustomComptCheckInput(pdVO.getControlPath());
                if(!ccci.checkInputIsOk()){
                    return false;
                }
                d = ccci.getNewPLDefination(d);
                break;
            //TreeTable(树表)
            case 3:
                TreeTableComptCheckInput ttcci = new TreeTableComptCheckInput(
                        pdVO.getSearchTarger()
                        ,pdVO.getBtmType()
                        ,pdVO.getLinkType()
                        ,pdVO.getTemplateId()
                        ,pdVO.getQueryTemplateName()
                        ,pdVO.getExpandCols()
                        ,pdVO.getExpandMode()
                );
                if(!ttcci.checkInputIsOk()){
                    return false;
                }
                d = ttcci.getNewPLDefination(d);
                break;
            //Tree(树)
            case 5:
                TreeComptCheckInput tcci = new TreeComptCheckInput(
                        pdVO.getBtmType(),
                        pdVO.getLinkType(),
                        pdVO.getQueryTemplateName(),
                        pdVO.getShowExpressionRoot(),
                        pdVO.getShowExpression(),
                        pdVO.getRefTreeSet(),
                        pdVO.getSeparator(),
                        pdVO.getExpandMode()
                );
                if(!tcci.checkInputIsOk()){
                    return false;
                }
                d = tcci.getNewPLDefination(d);
                break;
            //UILayout(UI定义)
            case 6:
                UILayoutComptCheckInput ulci = new UILayoutComptCheckInput(
                        pdVO.getSearchTarger(),
                        pdVO.getBtmType(),
                        pdVO.getUiLayout(),
                        pdVO.getQueryTemplateName(),
                        pdVO.getQryType()
                );
                if(!ulci.checkInputIsOk()){
                    return false;
                }
                d = ulci.getNewPLDefination(d);
                break;
        }
        d = comptPanel.getNewPLDefination(d);
        d = setEventDataToPLDefination(d,pdVO);
        pd.plDefination = UITools.getPLDefinationText(d);*/
        boolean res = true;//platformClientUtil.getUIService().updatePLPageDefination(pd);
        return res;
    }
    /**
     * å¤„理配置的event事件
     * @param d
     * @param pdVO
     * @return
     */
    private PLDefination setEventDataToPLDefination(PLDefination d,PLDefinationVO pdVO){
        Map<String, String> eventMap = pdVO.getEventMap();
        if(Func.isNotEmpty(eventMap)){
            String eventKey = eventMap.keySet().stream().collect(Collectors.joining(","));
            d.setEventKey(eventKey);
            String eventValue = eventMap.values().stream().collect(Collectors.joining(","));
            d.setEventValue(eventValue);
        }else{
            d.setEventKey("");
            d.setEventValue("");
        }
        return d;
    }
    private boolean baseInfoIsOk(PLPageDefination pd, boolean isEdit) throws PLException{
        boolean res = false;
        if(!checkRequiredIsOk("名称", pd.name)){
            return false;
        }
        //short类型的就不用检查了
        /*else if(!checkRequiredIsOk("编号", pd.seq)){
            return false;
        }*/
        res = true;
        return res;
    }
    private boolean checkRequiredIsOk(String tip, String txt) throws PLException {
        boolean res = false;
        if(Func.isBlank(txt)){
            throw new PLException("500", new String[]{tip + " ä¸èƒ½ä¸ºç©ºï¼"});
        } else {
            res = true;
        }
        return res;
    }
    /**
     * åˆ é™¤é¡µé¢å®šä¹‰
     * @param oids
     * @return
     */
    @Override
    public boolean delPageDefination(String[] oids) throws PLException {
        VciBaseUtil.alertNotNull(oids,"删除的页面定义主键");
        boolean res = platformClientUtil.getUIService().deletePLUILayoutByOidsForCascade(oids);
        return res;
    }
    /**
     * é¡µé¢å®šä¹‰åç§°å’Œç¼–号查重
     * @param pd
     * @param isEdit
     * @throws PLException
     */
    private void newPLDefinationIsOk(PLDefinationVO pd, boolean isEdit) throws PLException{
        boolean res = false;
        boolean nameExist = false;
        boolean seqExist = false;
        PLPageDefination[] pds = platformClientUtil.getUIService().getPLPageDefinationsByPageContextOId(pd.getTabPageOId());
        for (PLPageDefination pdGet : pds) {
            if(!isEdit){
                if(pd.getName().equals(pdGet.name)){
                    nameExist = true;
                } else if(Short.parseShort(pd.getSeq()) == pdGet.seq){
                    seqExist = true;
                }
            } else {
                if(!pd.getId().equals(pdGet.plOId)){
                    if(pd.getName().equals(pdGet.name)){
                        nameExist = true;
                    } else if(Short.parseShort(pd.getSeq()) == pdGet.seq){
                        seqExist = true;
                    }
                }
            }
            if(nameExist || seqExist){
                break;
            }
        }
        if(nameExist){
            throw new VciBaseException("名称已经存在!");
        }
        if(seqExist){
            throw new VciBaseException("编号已经存在!");
        }
    }
    /**
     * ç»™åŒºåŸŸä¸­æ·»åŠ æ•°æ®å‰æ ¡éªŒ
     * @param plTabPage
     * @return
     */
    private void checkEdit(PLTabPage plTabPage) throws PLException {
        /*if(plTabPage.plSeq >= 0){
            throw new VciBaseException("序号不能为空!");
        }else if(!isNumber(plseq.getText().trim())){
            throw new VciBaseException("序号只能是数字,请重新填写!");
        }*/
        if(!checkTabPageUIParserIsOk(plTabPage)){
            throw new VciBaseException("UI解析类格式不正确,请重新填写!");
        }
        //独立出来单独做一个接口让前端进行调用
        /*else if(!checkTabPageExtAttrIsOk(plTabPage)){
            //给出提示,对于mpm配置可以允许其保存,具体解析mpm自己控制 by liucq
            int confirm = VCIOptionPane.showConfirmDialog(PLTApplication.frame, "扩展属性数据格式不正确\n是否继续保存?", "系统提示", JOptionPane.YES_NO_OPTION);
        }*/
        PLTabPage[] tps = platformClientUtil.getUIService().getTabPagesByContextIdAndType(plTabPage.plContextOId, plTabPage.plAreaType);
        for (PLTabPage tp : tps) {
            if(tp.plSeq == plTabPage.plSeq && !tp.plOId.equals(plTabPage.plOId)){
                throw new VciBaseException("序号重复!");
            }
            if(tp.plName.equalsIgnoreCase(plTabPage.plName) && !tp.plOId.equals(plTabPage.plOId)){
                throw new VciBaseException("名称重复!");
            }
            if(tp.plCode.equalsIgnoreCase(plTabPage.plCode) && !tp.plOId.equals(plTabPage.plOId)){
                throw new VciBaseException("页面编码重复!");
            }
        }
    }
    /**
     * æ£€æŸ¥UI解析类是否合规
     * @param tabPage
     * @return
     */
    private boolean checkTabPageUIParserIsOk(PLTabPage tabPage){
        // æ•°æ®æ ¼å¼ï¼š java_cs:xxx;java_bs:xxx;net_cs:xxx;net_bs:xxx;mobile_cs:xx;mobile_bs:xxx;
        String uiParser = tabPage.plUIParser;
        return checkExtValIsOk(uiParser);
    }
    /**
     * UI解析类正则检查
     * @param value
     * @return
     */
    private boolean checkExtValIsOk(String value){
        boolean res = true;
        if(value == null || "".equals(value)){
            return res;
        }
        Pattern ptn = Pattern.compile("([\\w\\.\\_\\-\\+]+:[\\w\\.\\_\\-\\+]+(;)?)+");
        res = ptn.matcher(value).matches();
        return res;
    }
    /**
@@ -344,7 +823,7 @@
        //查询同一业务类型下的ui上下文,然后查重
        PLUILayout[] plpagelayoutdefinations = platformClientUtil.getUIService().getPLUILayoutsByRelatedType(pluiLayout.plRelatedType);
        int length = plpagelayoutdefinations.length;
        for (int i =0;i<length;i++){
        for (int i =0; i<length; i++){
            String code = plpagelayoutdefinations[i].plCode;
            String name = plpagelayoutdefinations[i].plName;
            String ids = plpagelayoutdefinations[i].plOId;
@@ -355,9 +834,8 @@
                        break;
                    }
                }
            }
            else {
                if (code.equalsIgnoreCase(code) || name.equals(name)){
            }else {
                if (code.equalsIgnoreCase(pluiLayout.plCode) || name.equals(pluiLayout.plName)){
                    res = true;
                    break;
                }
@@ -366,4 +844,679 @@
        return res;
    }
    //基础公共检查接口
    private abstract class BaseComptInter {
        /**
         * å…¬å…±æ ¡éªŒæ–¹æ³•
         * @return
         * @throws PLException
         */
        public abstract boolean checkInputIsOk() throws PLException;
        /**
         * æ ¹æ®ç±»åž‹ä¸åŒè®¾ç½®ä¸åŒçš„属性
         * @param d
         * @return
         */
        public abstract PLDefination getNewPLDefination(PLDefination d);
        /**
         * éžç©ºæ£€æŸ¥
         * @param tip
         * @param txt
         * @return
         */
        protected boolean checkRequiredIsOk(String tip, String txt){
            boolean res = false;
            if(Func.isBlank(txt)){
                throw new VciBaseException(tip + " ä¸èƒ½ä¸ºç©ºï¼");
            } else {
                res = true;
            }
            return res;
        }
        /**
         * æ£€æŸ¥BtmType输入是否有效
         * @param tipName æç¤ºçš„信息
         * @param btmName ä¸šåŠ¡ç±»åž‹å
         * @return
         */
        protected boolean checkBtmTypeTxtIsOk(String tipName, String btmName) throws PLException {
            boolean res = false;
            if(tipName == null) return true;
            if(btmName == null) return true;
            if(!checkRequiredIsOk(tipName, btmName)){
                res = false;
            } else if(!checkBtmNameIsExist(tipName, btmName)){
                res = false;
            } else {
                res = true;
            }
            return res;
        }
        /**
         * æ£€æŸ¥ä¸šåŠ¡ç±»åž‹æ˜¯å¦å­˜åœ¨
         * @param tip
         * @param btmName
         * @return
         */
        protected boolean checkBtmNameIsExist(String tip, String btmName) throws PLException {
            boolean res = false;
            String sql = "select count(1) count_ from plbtmtype bt where bt.name='" + btmName.trim() + "'";
            res = checkCountNotEqualZero(sql);
            if(!res){
                throw new PLException("500",
                        new String[]{String.format("%s %s æ— æ•ˆï¼", tip, btmName)});
            } else {
                res = true;
            }
            return res;
        }
        /**
         * æ‰§è¡Œsql,检查是否有返回值
         * @param sql
         * @return
         */
        protected boolean checkCountNotEqualZero(String sql){
            boolean res = false;
            try{
                String[][] kvss = platformClientUtil.getQueryService().queryBySqlWithoutKey(sql);
                res = Integer.valueOf(kvss[0][0]) > 0;
            }catch(Exception ex){
                ex.printStackTrace();
            }
            return res;
        }
        /**
         * æ£€æŸ¥è¡¨å•输入是否有效
         * @param tip
         * @param txtVIName
         * @param btmLinkType
         * @return
         */
        protected boolean checkPortalVITxtIsOk(String tip, String txtVIName, String btmLinkType) throws PLException {
            boolean res = false;
            if(tip == null) return true;
            if(txtVIName == null) return true;
            if(!checkRequiredIsOk(tip, txtVIName)){
                res = false;
            } else if(!checkPortalVIIsExist(tip, txtVIName, btmLinkType)){
                res = false;
            } else {
                res = true;
            }
            return res;
        }
        /**
         * æ£€æŸ¥æ¨¡æ¿
         * @param tip
         * @param txtVIName
         * @param btmLinkType
         * @return
         */
        protected boolean checkPortalVIIsExist(String tip, String txtVIName, String btmLinkType) throws PLException {
            boolean res = false;
            String sql = "select count(1) count_ from plportalvi vi " +
                    "where vi.typename='" + btmLinkType.trim() + "' " +
                    "and vi.viname='" + txtVIName.trim() + "'";
            res = checkCountNotEqualZero(sql);
            if(!res){
                throw new PLException("500",
                        new String[]{String.format("%s %s æ— æ•ˆï¼", tip, txtVIName)});
            } else {
                res = true;
            }
            return res;
        }
        /**
         * æ£€æŸ¥æŸ¥è¯¢æ¨¡æ¿è¾“入是否有效
         * @param tip è¾“入框的名称,用来提示
         * @param txtQTName æŸ¥è¯¢æ¨¡æ¿
         * @param btmLinkType
         * @return
         */
        protected boolean checkQTNameTxtIsOk(String tip, String txtQTName, String btmLinkType) throws PLException {
            boolean res = false;
            if(tip == null) return true;
            if(txtQTName == null) return true;
            if(!checkRequiredIsOk(tip, txtQTName)){
                res = false;
            } else if(Func.isBlank(txtQTName) && !checkQTIsExist(tip, txtQTName, btmLinkType)){
                res = false;
            } else {
                res = true;
            }
            return res;
        }
        /**
         * æ£€æŸ¥è¡¨å•输入是否有效
         * @param tip
         * @param uiName
         * @param btmLinkType
         * @return
         */
        protected boolean checkUILayoutTxtIsOk(String tip, String uiName, String btmLinkType) throws PLException {
            boolean res = false;
            if(tip == null) return true;
            if(uiName == null) return true;
            if(!checkRequiredIsOk(tip, uiName)){
                res = false;
            } else if(!checkUILayoutIsExist(tip, uiName, btmLinkType)){
                res = false;
            } else {
                res = true;
            }
            return res;
        }
        private boolean checkUILayoutIsExist(String tip, String uiName, String txtType) throws PLException {
            boolean res = false;
            String sql = "select count(1) count_ from PLUILAYOUT ui " +
                    "where ui.PLRELATEDTYPE='" + txtType.trim() + "' " +
                    "and ui.plcode='" + uiName.trim() + "'";
            res = checkCountNotEqualZero(sql);
            if(!res){
                throw new PLException("500",
                        new String[]{String.format("%s %s æ— æ•ˆï¼", tip, uiName)});
            } else {
                res = true;
            }
            return res;
        }
        /**
         * æ£€æŸ¥å½“前输入的查询模板是否存在
         * @param tip
         * @param txtQTName
         * @param txtType
         * @return
         */
        protected boolean checkQTIsExist(String tip, String txtQTName, String txtType) throws PLException {
            boolean res = false;
            String sql = "select count(1) count_ from PL_QTEMPLATE qt " +
                    "where qt.btmname ='" + txtType.trim() + "' " +
                    "and qt.qtname='" + txtQTName.trim() + "'";
            if(!res){
                throw new PLException("500",
                        new String[]{String.format("%s %s æ— æ•ˆï¼", tip, txtQTName)});
            } else {
                res = true;
            }
            return res;
        }
        /**
         * æ£€æŸ¥LinkType输入是否有效
         * @param tip
         * @param linkTypeName
         * @return
         */
        protected boolean checkLinkTypeTxtIsOk(String tip, String linkTypeName) throws PLException {
            boolean res = false;
            if(tip == null) return true;
            if(linkTypeName == null) return true;
            if(!checkRequiredIsOk(tip, linkTypeName)){
                res = false;
            } else if(!checkLinkTypeIsExist(tip, linkTypeName)){
                res = false;
            } else {
                res = true;
            }
            return res;
        }
        private boolean checkLinkTypeIsExist(String tip, String linkTypeName) throws PLException {
            boolean res = false;
            String sql = "select count(1) count_ from pllinktype lt " +
                    "where lt.name ='" + linkTypeName.trim() + "'";
            res = checkCountNotEqualZero(sql);
            if(!res){
                throw new PLException("500",
                       new String[]{String.format("%s %s æ— æ•ˆï¼", tip, linkTypeName)});
            } else {
                res = true;
            }
            return res;
        }
    }
    //模板类型为Custom类型时校验输入
    @AllArgsConstructor
    @NoArgsConstructor
    private class CustomComptCheckInput extends BaseComptInter{
        /**
         * æŽ§åˆ¶è·¯å¾„
         */
        private String ctrlPath;
        @Override
        public boolean checkInputIsOk() throws PLException {
            boolean res = true;
            if(!checkRequiredIsOk(this.ctrlPath)){
                res = false;
            }
            return res;
        }
        /**
         * æŽ§åˆ¶è·¯å¾„必输检查
         * @param ctrlPath
         * @return
         */
        protected boolean checkRequiredIsOk(String ctrlPath) throws PLException {
            boolean res = false;
            String text = ctrlPath.trim();
            if(Func.isBlank(text)){
                throw new PLException("500", new String[]{"控制路径不能为空!"});
            } else {
                res = true;
            }
            return res;
        }
        @Override
        public PLDefination getNewPLDefination(PLDefination d) {
            if(d == null){
                d = new PLDefination();
            }
            d.setControlPath(ctrlPath);
            return d;
        }
    }
    @AllArgsConstructor
    @NoArgsConstructor
    private class TableComptCheckInput extends BaseComptInter{
        /**
         * æœç´¢ç±»åž‹ï¼šæœ¬å¯¹è±¡å±žæ€§ï¼š1,关联对象属性:2
         */
        private String searchTarger;
        /**
         * ä¸šåŠ¡ç±»åž‹
         */
        private String btmType;
        /**
         * é“¾æŽ¥ç±»åž‹
         */
        private String linkType;
        /**
         * é€‰æ‹©æ¨¡æ¿
         */
        private String txtVIName;
        /**
         * æŸ¥è¯¢æ¨¡æ¿
         */
        private String txtQTName;
        @Override
        public boolean checkInputIsOk() throws PLException {
            boolean res = false;
            if(searchTarger.equals("1")){
                res = checkBtmTypeInputIsOk(btmType,txtVIName,txtQTName);
            } else if(searchTarger.equals("2")){
                res = checkLinkTypeInputIsOk(txtVIName,txtQTName,btmType);
            }
            return res;
        }
        @Override
        public PLDefination getNewPLDefination(PLDefination d) {
            if(d == null){
                d = new PLDefination();
            }
            if("1".equals(searchTarger)){
                d.setSearchTarger("1");
                d.setShowType(btmType.trim());
                d.setTemplateId(txtVIName);
                d.setQueryTemplateName(txtQTName);
            } else if("2".equals(searchTarger)){
                d.setSearchTarger("2");
                d.setShowType(btmType);
                d.setLinkType(linkType);
                d.setTemplateId(txtVIName);
                d.setQueryTemplateName(txtQTName);
            }
            return d;
        }
        /**
         * æ£€æŸ¥ä¸šåŠ¡ç±»åž‹æ˜¯å¦è¾“å…¥ï¼Œæ˜¯å¦å­˜åœ¨
         * @param txtVIName
         * @param btmType
         * @param txtQTName
         * @return
         */
        private boolean checkBtmTypeInputIsOk(String btmType,String txtVIName/*选择模板*/,String txtQTName/*查询模板*/) throws PLException {
            boolean res = false;
            if(!super.checkBtmTypeTxtIsOk("业务类型", btmType)){
                res = false;
            } else if(!super.checkPortalVITxtIsOk("选择模板", txtVIName, btmType)){
                res = false;
            } else if(!super.checkQTNameTxtIsOk("查询模板", txtQTName, btmType)){
                res = false;
            } else {
                res = true;
            }
            return res;
        }
        /**
         * æ£€æŸ¥é“¾æŽ¥ç±»åž‹æ˜¯å¦è¾“入,是否存在
         * @param txtVIName
         * @param txtQTName
         * @param btmType
         * @return
         */
        private boolean checkLinkTypeInputIsOk(String txtVIName/*选择的模板*/,String txtQTName/*查询模板*/,String btmType) throws PLException {
            boolean res = false;
            if(!(this.checkBtmTypeTxtIsOk("目标对象", linkType))){
                res = false;
            } else if(!(this.checkPortalVITxtIsOk("选择模板", txtVIName, linkType))){
                res = false;
            } else if(!(this.checkQTNameTxtIsOk("查询模板", txtQTName, linkType))){
                res = false;
            } else {
                res = true;
            }
            return res;
        }
    }
    @AllArgsConstructor
    @NoArgsConstructor
    private class TreeTableComptCheckInput extends BaseComptInter{
        /**
         * æœç´¢ç±»åž‹ï¼šæœ¬å¯¹è±¡å±žæ€§ï¼š1,关联对象属性:2
         */
        private String searchTarger;
        /**
         * ä¸šåŠ¡ç±»åž‹
         */
        private String btmType;
        /**
         * é“¾æŽ¥ç±»åž‹
         */
        private String linkType;
        /**
         * é€‰æ‹©æ¨¡æ¿
         */
        private String txtVIName;
        /**
         * æŸ¥è¯¢æ¨¡æ¿
         */
        private String txtQTName;
        /**
         * æ ‘形结构展开列
         */
        private String expandCols;
        /**
         * å±•开形式:逐级展开 1,全部展开 0
         */
        private String expandMode;
        @Override
        public boolean checkInputIsOk() throws PLException {
            boolean res = false;
            if(searchTarger.equals("1")){
                res = this.checkBtmTypeInputIsOk();
            } else if(searchTarger.equals("2")){
                res = checkLinkTypeInputIsOk();
            }
            return res;
        }
        @Override
        public PLDefination getNewPLDefination(PLDefination d) {
            if(d == null){
                d = new PLDefination();
            }
            //属性赋值重叠,所以这儿改变了逻辑
            d.setSearchTarger(searchTarger);
            d.setShowType(btmType);
            d.setTemplateId(txtVIName);
            d.setQueryTemplateName(txtQTName);
            d.setExpandCols(expandCols);
            d.setExpandMode(expandMode);
            if("2".equals(searchTarger)){
                d.setLinkType(linkType);
            }
            return d;
        }
        private boolean checkBtmTypeInputIsOk() throws PLException {
            boolean res = false;
            if(!(super.checkBtmTypeTxtIsOk("顶级节点显示类型", btmType))){
                res = false;
            } else if(!(super.checkPortalVITxtIsOk("选择模板", txtVIName, btmType))){
                res = false;
            } else if(!(super.checkQTNameTxtIsOk("查询模板", txtQTName , btmType))){
                res = false;
            } else {
                res = true;
            }
            return res;
        }
        private boolean checkLinkTypeInputIsOk() throws PLException {
            boolean res = false;
            if(!(super.checkBtmTypeTxtIsOk("顶级节点显示类型", linkType))){
                res = false;
            } else if(!(super.checkPortalVITxtIsOk("选择模板", txtVIName, linkType))){
                res = false;
            } else if(!(super.checkQTNameTxtIsOk("查询模板", txtQTName, linkType))){
                res = false;
            } else {
                res = true;
            }
            return res;
        }
    }
    @AllArgsConstructor
    @NoArgsConstructor
    private class TreeComptCheckInput extends BaseComptInter{
        /**
         * ä¸šåŠ¡ç±»åž‹
         */
        private String btmType;
        /**
         * é“¾æŽ¥ç±»åž‹
         */
        private String linkType;
        /**
         * æŸ¥è¯¢æ¨¡æ¿
         */
        private String queryTemplateName;
        /**
         * æ ¹èŠ‚ç‚¹æ˜¾ç¤ºè¡¨è¾¾å¼
         */
        private String showExpressionRoot;
        /**
         * æ ‘节点显示表达式
         */
        private String showExpression;
        /**
         * å‚照树设置
         */
        private String refTreeSet;
        /**
         * åˆ†éš”符
         */
        private String splitChar;
        /**
         * å±•开方式:逐级展开 1,全部展开 0
         */
        private String expandMode;
        @Override
        public boolean checkInputIsOk() throws PLException {
            return checkBtmTypeInputIsOk();
        }
        @Override
        public PLDefination getNewPLDefination(PLDefination d) {
            if(d == null){
                d = new PLDefination();
            }
            d.setShowType(btmType);
            d.setLinkType(linkType);
            d.setTemplateId(queryTemplateName);
            d.setRootContent(showExpressionRoot.trim());
            d.setShowAbs(showExpression.trim());
            d.setShowLinkAbs(refTreeSet.trim());
            d.setSeparator(splitChar.trim());
            d.setExpandMode(expandMode);
            return d;
        }
        private boolean checkBtmTypeInputIsOk() throws PLException {
            boolean res = false;
            if(!(super.checkBtmTypeTxtIsOk("业务类型", btmType))){
                res = false;
                return res;
            }
            // é“¾æŽ¥ç±»åž‹ä¸ä¸ºç©ºæ—¶ï¼Œéœ€è¦åŒæ—¶æ£€æŸ¥é“¾æŽ¥ç±»åž‹åŠé“¾æŽ¥ç±»åž‹ä¸‹çš„æŸ¥è¯¢æ¨¡æ¿æ˜¯å¦æœ‰æ•ˆ
            if(Func.isBlank(linkType)){
                if(!(super.checkLinkTypeTxtIsOk("链接类型", linkType))){
                    res = false;
                    return res;
                } else if(!(super.checkQTNameTxtIsOk("查询模板", queryTemplateName, linkType))){
                    res = false;
                    return res;
                }
            } else {
                // é“¾æŽ¥ç±»åž‹ä¸ºç©ºæ—¶ï¼Œåªéœ€è¦æ£€æŸ¥ä¸šåŠ¡ç±»åž‹ä¸‹çš„æŸ¥è¯¢æ¨¡æ¿æ˜¯å¦æœ‰æ•ˆ
                if(!(super.checkQTNameTxtIsOk("查询模板", queryTemplateName, btmType))){
                    res = false;
                    return res;
                }
            }
            if(!super.checkRequiredIsOk("根节点显示表达式", showExpressionRoot)){
                res = false;
            }
            else if(!super.checkRequiredIsOk("树节点显示表达式", showExpression)){
                res = false;
            }
            else if(!super.checkRequiredIsOk("参照树设置", refTreeSet)){
                res = false;
            }
            else {
                res = true;
            }
            return res;
        }
    }
    @AllArgsConstructor
    @NoArgsConstructor
    private class UILayoutComptCheckInput extends BaseComptInter{
        /**
         * æœç´¢ç±»åž‹ï¼šæœ¬å¯¹è±¡å±žæ€§ï¼š1,关联对象属性:2
         * æŸ¥è¯¢ç±»åž‹ä¹Ÿæ˜¯èµ‹å€¼åˆ°è¿™ä¸ªå±žæ€§ä¸Šï¼š ä¸šåŠ¡ç±»åž‹ï¼š1,链接类型:2
         */
        private String searchTarger;
        /**
         * å¯¹è±¡ç±»åž‹
         */
        private String uiBtmType;
        /**
         * UI定义
         */
        private String uiLayout;
        /**
         * æŸ¥è¯¢æ¨¡æ¿
         */
        private String queryTemplateName;
        /**
         * æŸ¥è¯¢å¯¹è±¡ç±»åž‹
         */
        private String qryType;
        @Override
        public boolean checkInputIsOk() throws PLException{
            return checkUILayoutInputIsOk();
        }
        @Override
        public PLDefination getNewPLDefination(PLDefination d) {
            if (d == null) {
                d = new PLDefination();
            }
            d.setSearchTarger(searchTarger);
            d.setSubUiObjType(uiBtmType.trim());
            d.setSubUILayout(uiLayout.trim());
            if (searchTarger.equals("1")) {
                d.setShowType(qryType.trim());
            } else {
                d.setLinkType(qryType.trim());
            }
            d.setQueryTemplateName(queryTemplateName.trim());
            return d;
        }
        private boolean checkUILayoutInputIsOk() throws PLException {
            boolean res = false;
            if (!(super.checkBtmTypeTxtIsOk("对象类型", uiBtmType))) {
                res = false;
            } else if (!(super.checkUILayoutTxtIsOk("UI定义", uiLayout, uiBtmType))) {
                res = false;
            } else if (!(super.checkQTNameTxtIsOk("查询模板", queryTemplateName, qryType))) {
                res = false;
            } else {
                res = true;
            }
            return res;
        }
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/UITools.java
@@ -4,6 +4,8 @@
import java.util.Iterator;
import java.util.List;
import com.vci.corba.portal.data.PLPageDefination;
import com.vci.model.PLDefination;
import com.vci.model.PRMDO;
import com.vci.model.PRMItemDO;
import org.apache.commons.lang3.StringUtils;
@@ -437,238 +439,238 @@
            throw e;
        }
    }
//    /**
//     * å°†ä»Žæ•°æ®åº“中读取的xml文本转化成对应的PLDefination对象
//     * @param text
//     * @return
//     * @throws Throwable
//     */
//    public static PLDefination getPLDefination(String text) throws Throwable{
//        try{
//            Document document = null;
//            document = DocumentHelper.parseText(text);
//            if(document == null){
//                return null;
//            }
//            PLDefination obj = new PLDefination();
//            Element root = document.getRootElement();
//            if(root != null){
//                String elementText = root.elementText(PLDefinationConstants.TYPE);
//                if(elementText == null || elementText.equals("")){
//                    elementText = "0";
//                }
//                obj.setType(Integer.parseInt(elementText));
//
//                elementText = root.elementText(PLDefinationConstants.SHOWABS);
//                obj.setShowAbs(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.SEPARATOR);
//                obj.setSeparator(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.SHOWLINKABS);
//                obj.setShowLinkAbs(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.SEARCHTARGET);
//                obj.setSearchTarger(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.TEMPLATETYPE);
//                obj.setTemplateType(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.SHOWTYPE);
//                obj.setShowType(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.TEMPLATEID);
//                obj.setTemplateId(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.ORIENTATION);
//                obj.setOrientation(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.VALIDITY);
//                obj.setValidity(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.ORDERFIELD);
//                obj.setOrderField(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.ORDERMODE);
//                obj.setOrderMode(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.RETURNROWS);
//                obj.setReturnRows(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.CONTROLPATH);
//                obj.setControlPath(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.EXPANDMODE);
//                obj.setExpandMode(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.LINKTYPE);
//                obj.setLinkType(elementText == null ? "" : elementText);
//
//
//                elementText = root.elementText(PLDefinationConstants.ISSHOWIMAGE);
//                obj.setIsShowImage(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.EXPANDCOLS);
//                obj.setExpandCols(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.SHOWCONTENT);
//                obj.setShowContent(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.SHOWCONTENTTYPE);
//                obj.setShowContentType(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.SHOWCONTENTRELATION);
//                obj.setShowContentRelation(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.SHOWCONTENTTABLE);
//                obj.setShowContentTable(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.NAVIGATORTYPE);
//                obj.setNavigatorType(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.EVENTKEY);
//                obj.setEventKey(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.EVENTVALUE);
//                obj.setEventValue(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.ROOTCONTENT);
//                obj.setRootContent(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.UIPARSER);
//                obj.setUiParser(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.EXTATTR);
//                obj.setExtAttr(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.QUERYTEMPLATENAME);
//                obj.setQueryTemplateName(elementText == null ? "" : elementText);
//
//                elementText = root.elementText(PLDefinationConstants.SUBUILAYOUT);
//                obj.setSubUILayout(elementText == null ? "" : elementText);
//            }
//            return obj;
//        }catch(Throwable e){
//            e.printStackTrace();
//            throw e;
//        }
//    }
//
//    /**
//     * å°†PLDefination对象转化成xml文本
//     * @param obj
//     * @return
//     * @throws Throwable
//     */
//    public static String getPLDefinationText(PLDefination obj) throws Throwable{
//        try{
//            if(obj == null){
//                return "";
//            }
//
//            Document doc = DocumentHelper.createDocument();
//            Element rootNode = doc.addElement(PLDefinationConstants.PLDEFINATION);
//
//            Element node = rootNode.addElement(PLDefinationConstants.TYPE);
//            node.setText(String.valueOf(obj.getType()));
//
//            node = rootNode.addElement(PLDefinationConstants.SHOWABS);
//            node.setText(obj.getShowAbs());
//
//            node = rootNode.addElement(PLDefinationConstants.SEPARATOR);
//            node.setText(obj.getSeparator());
//
//            node = rootNode.addElement(PLDefinationConstants.SHOWLINKABS);
//            node.setText(obj.getShowLinkAbs());
//
//            node = rootNode.addElement(PLDefinationConstants.SEARCHTARGET);
//            node.setText(obj.getSearchTarger());
//
//            node = rootNode.addElement(PLDefinationConstants.TEMPLATETYPE);
//            node.setText(obj.getTemplateType());
//
//            node = rootNode.addElement(PLDefinationConstants.SHOWTYPE);
//            node.setText(obj.getShowType());
//
//            node = rootNode.addElement(PLDefinationConstants.TEMPLATEID);
//            node.setText(obj.getTemplateId());
//
//            node = rootNode.addElement(PLDefinationConstants.ORIENTATION);
//            node.setText(obj.getOrientation());
//
//            node = rootNode.addElement(PLDefinationConstants.VALIDITY);
//            node.setText(obj.getValidity());
//
//            node = rootNode.addElement(PLDefinationConstants.ORDERFIELD);
//            node.setText(obj.getOrderField());
//
//            node = rootNode.addElement(PLDefinationConstants.ORDERMODE);
//            node.setText(obj.getOrderMode());
//
//            node = rootNode.addElement(PLDefinationConstants.RETURNROWS);
//            node.setText(obj.getReturnRows());
//
//            node = rootNode.addElement(PLDefinationConstants.CONTROLPATH);
//            node.setText(obj.getControlPath());
//
//            node = rootNode.addElement(PLDefinationConstants.EXPANDMODE);
//            node.setText(obj.getExpandMode());
//
//            node = rootNode.addElement(PLDefinationConstants.LINKTYPE);
//            node.setText(obj.getLinkType());
//
//            node = rootNode.addElement(PLDefinationConstants.ISSHOWIMAGE);
//            node.setText(obj.getIsShowImage());
//
//            node = rootNode.addElement(PLDefinationConstants.EXPANDCOLS);
//            node.setText(obj.getExpandCols());
//
//            node = rootNode.addElement(PLDefinationConstants.SHOWCONTENT);
//            node.setText(obj.getShowContent());
//
//            node = rootNode.addElement(PLDefinationConstants.SHOWCONTENTTYPE);
//            node.setText(obj.getShowContentType());
//
//            node = rootNode.addElement(PLDefinationConstants.SHOWCONTENTRELATION);
//            node.setText(obj.getShowContentRelation());
//
//            node = rootNode.addElement(PLDefinationConstants.SHOWCONTENTTABLE);
//            node.setText(obj.getShowContentTable());
//
//            node = rootNode.addElement(PLDefinationConstants.NAVIGATORTYPE);
//            node.setText(obj.getNavigatorType());
//
//            node = rootNode.addElement(PLDefinationConstants.EVENTKEY);
//            node.setText(obj.getEventKey());
//
//            node = rootNode.addElement(PLDefinationConstants.EVENTVALUE);
//            node.setText(obj.getEventValue());
//
//            node = rootNode.addElement(PLDefinationConstants.ROOTCONTENT);
//            node.setText(obj.getRootContent());
//
//            node = rootNode.addElement(PLDefinationConstants.UIPARSER);
//            node.setText(obj.getUiParser());
//
//            node = rootNode.addElement(PLDefinationConstants.EXTATTR);
//            node.setText(obj.getExtAttr());
//
//            node = rootNode.addElement(PLDefinationConstants.QUERYTEMPLATENAME);
//            node.setText(obj.getQueryTemplateName());
//
//            node = rootNode.addElement(PLDefinationConstants.SUBUIOBJTYPE);
//            node.setText(obj.getSubUiObjType());
//
//            node = rootNode.addElement(PLDefinationConstants.SUBUILAYOUT);
//            node.setText(obj.getSubUILayout());
//
//            return doc.asXML();
//        }catch(Throwable e){
//            throw e;
//        }
//
//    }
    /**
     * å°†PLDefination对象转化成xml文本
     * @param obj
     * @return
     * @throws Throwable
     */
    public static String getPLDefinationText(PLDefination obj) throws Throwable{
        try{
            if(obj == null){
                return "";
            }
            Document doc = DocumentHelper.createDocument();
            Element rootNode = doc.addElement(PLDefinationConstants.PLDEFINATION);
            Element node = rootNode.addElement(PLDefinationConstants.TYPE);
            node.setText(String.valueOf(obj.getType()));
            node = rootNode.addElement(PLDefinationConstants.SHOWABS);
            node.setText(obj.getShowAbs());
            node = rootNode.addElement(PLDefinationConstants.SEPARATOR);
            node.setText(obj.getSeparator());
            node = rootNode.addElement(PLDefinationConstants.SHOWLINKABS);
            node.setText(obj.getShowLinkAbs());
            node = rootNode.addElement(PLDefinationConstants.SEARCHTARGET);
            node.setText(obj.getSearchTarger());
            node = rootNode.addElement(PLDefinationConstants.TEMPLATETYPE);
            node.setText(obj.getTemplateType());
            node = rootNode.addElement(PLDefinationConstants.SHOWTYPE);
            node.setText(obj.getShowType());
            node = rootNode.addElement(PLDefinationConstants.TEMPLATEID);
            node.setText(obj.getTemplateId());
            node = rootNode.addElement(PLDefinationConstants.ORIENTATION);
            node.setText(obj.getOrientation());
            node = rootNode.addElement(PLDefinationConstants.VALIDITY);
            node.setText(obj.getValidity());
            node = rootNode.addElement(PLDefinationConstants.ORDERFIELD);
            node.setText(obj.getOrderField());
            node = rootNode.addElement(PLDefinationConstants.ORDERMODE);
            node.setText(obj.getOrderMode());
            node = rootNode.addElement(PLDefinationConstants.RETURNROWS);
            node.setText(obj.getReturnRows());
            node = rootNode.addElement(PLDefinationConstants.CONTROLPATH);
            node.setText(obj.getControlPath());
            node = rootNode.addElement(PLDefinationConstants.EXPANDMODE);
            node.setText(obj.getExpandMode());
            node = rootNode.addElement(PLDefinationConstants.LINKTYPE);
            node.setText(obj.getLinkType());
            node = rootNode.addElement(PLDefinationConstants.ISSHOWIMAGE);
            node.setText(obj.getIsShowImage());
            node = rootNode.addElement(PLDefinationConstants.EXPANDCOLS);
            node.setText(obj.getExpandCols());
            node = rootNode.addElement(PLDefinationConstants.SHOWCONTENT);
            node.setText(obj.getShowContent());
            node = rootNode.addElement(PLDefinationConstants.SHOWCONTENTTYPE);
            node.setText(obj.getShowContentType());
            node = rootNode.addElement(PLDefinationConstants.SHOWCONTENTRELATION);
            node.setText(obj.getShowContentRelation());
            node = rootNode.addElement(PLDefinationConstants.SHOWCONTENTTABLE);
            node.setText(obj.getShowContentTable());
            node = rootNode.addElement(PLDefinationConstants.NAVIGATORTYPE);
            node.setText(obj.getNavigatorType());
            node = rootNode.addElement(PLDefinationConstants.EVENTKEY);
            node.setText(obj.getEventKey());
            node = rootNode.addElement(PLDefinationConstants.EVENTVALUE);
            node.setText(obj.getEventValue());
            node = rootNode.addElement(PLDefinationConstants.ROOTCONTENT);
            node.setText(obj.getRootContent());
            node = rootNode.addElement(PLDefinationConstants.UIPARSER);
            node.setText(obj.getUiParser());
            node = rootNode.addElement(PLDefinationConstants.EXTATTR);
            node.setText(obj.getExtAttr());
            node = rootNode.addElement(PLDefinationConstants.QUERYTEMPLATENAME);
            node.setText(obj.getQueryTemplateName());
            node = rootNode.addElement(PLDefinationConstants.SUBUIOBJTYPE);
            node.setText(obj.getSubUiObjType());
            node = rootNode.addElement(PLDefinationConstants.SUBUILAYOUT);
            node.setText(obj.getSubUILayout());
            return doc.asXML();
        }catch(Throwable e){
            throw e;
        }
    }
    /**
     * å°†ä»Žæ•°æ®åº“中读取的xml文本转化成对应的PLDefination对象
     * @param text
     * @return
     * @throws Throwable
     */
    public static PLDefination getPLDefination(String text) throws Throwable{
        try{
            Document document = null;
            document = DocumentHelper.parseText(text);
            if(document == null){
                return null;
            }
            PLDefination obj = new PLDefination();
            Element root = document.getRootElement();
            if(root != null){
                String elementText = root.elementText(PLDefinationConstants.TYPE);
                if(elementText == null || elementText.equals("")){
                    elementText = "0";
                }
                obj.setType(Integer.parseInt(elementText));
                elementText = root.elementText(PLDefinationConstants.SHOWABS);
                obj.setShowAbs(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.SEPARATOR);
                obj.setSeparator(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.SHOWLINKABS);
                obj.setShowLinkAbs(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.SEARCHTARGET);
                obj.setSearchTarger(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.TEMPLATETYPE);
                obj.setTemplateType(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.SHOWTYPE);
                obj.setShowType(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.TEMPLATEID);
                obj.setTemplateId(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.ORIENTATION);
                obj.setOrientation(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.VALIDITY);
                obj.setValidity(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.ORDERFIELD);
                obj.setOrderField(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.ORDERMODE);
                obj.setOrderMode(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.RETURNROWS);
                obj.setReturnRows(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.CONTROLPATH);
                obj.setControlPath(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.EXPANDMODE);
                obj.setExpandMode(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.LINKTYPE);
                obj.setLinkType(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.ISSHOWIMAGE);
                obj.setIsShowImage(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.EXPANDCOLS);
                obj.setExpandCols(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.SHOWCONTENT);
                obj.setShowContent(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.SHOWCONTENTTYPE);
                obj.setShowContentType(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.SHOWCONTENTRELATION);
                obj.setShowContentRelation(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.SHOWCONTENTTABLE);
                obj.setShowContentTable(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.NAVIGATORTYPE);
                obj.setNavigatorType(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.EVENTKEY);
                obj.setEventKey(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.EVENTVALUE);
                obj.setEventValue(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.ROOTCONTENT);
                obj.setRootContent(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.UIPARSER);
                obj.setUiParser(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.EXTATTR);
                obj.setExtAttr(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.QUERYTEMPLATENAME);
                obj.setQueryTemplateName(elementText == null ? "" : elementText);
                elementText = root.elementText(PLDefinationConstants.SUBUILAYOUT);
                obj.setSubUILayout(elementText == null ? "" : elementText);
            }
            return obj;
        }catch(Throwable e){
            e.printStackTrace();
            throw e;
        }
    }
    
    /**
     * å°†ARRAY转化成LIST