1、删除查询方案删除的参数修改。
2、查询模板的列表添加了字段的相关属性新增。
已修改6个文件
已添加2个文件
715 ■■■■■ 文件已修改
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/AttributeDefDTO.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/QTDDTO.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/MenuVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/ISmFunctionQueryService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmFunctionQueryServicePlatformImpl.java 334 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsQueryTemplateController.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsQuereyTemplateServiceI.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsQueryTemplateImpl.java 232 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/AttributeDefDTO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,39 @@
package com.vci.dto;
import com.vci.corba.omd.atm.AttributeDef;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
 * å±žæ€§ä¼ è¾“对象
 * @author yuxc
 * @date 2024/09/02 10:15
 */
@Data
public class AttributeDefDTO implements java.io.Serializable {
    /**
     * ç¦æ­¢ä¿®æ”¹è¿™ä¸ªå€¼
     */
    private static final long serialVersionUID = 2492852474710986720L;
    public String oid;
    public String name;
    public String label;
    public String vtDataType;
    public String defValue;
    public String ts;
    public String creator;
    public long createTime;
    public String modifier;
    public long modifyTime;
    public String description;
    public String rage;
    public String other;
    /**
     * å±‚æ•°
     */
    public int layersNum;
    public List<AttributeDefDTO> attrs = new ArrayList<>();
}
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/QTDDTO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,46 @@
package com.vci.dto;
import com.vci.corba.omd.atm.AttributeDef;
import lombok.Data;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * æŸ¥è¯¢æ¨¡æ¿ä¼ è¾“对象
 * @author weidy
 * @date 2019/10/14 17:50
 */
@Data
public class QTDDTO implements java.io.Serializable {
    /**
     * ç¦æ­¢ä¿®æ”¹è¿™ä¸ªå€¼
     */
    private static final long serialVersionUID = 2492852474710986720L;
    /**
     * æ¨¡æ¿åç§°
     */
    public String name;
    /**
     * åˆ›å»ºäºº
     */
    public String creator;
    /**
     * åˆ›å»ºæ—¶é—´
     */
    public long createTime;
    /**
     * ä¸šåŠ¡ç±»åž‹
     */
    public String btmName;
    /**
     * é“¾æŽ¥ç±»åž‹
     */
    public String linkTypeName;
    /**
     * æ‰€é€‰æ‹©æŸ¥è¯¢çš„字段对象
     */
    public List<AttributeDefDTO> attrs = new ArrayList<>();
}
Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/pagemodel/MenuVO.java
@@ -143,6 +143,10 @@
     * æ¨¡å—下关联的操作类型id
     */
    private String operId;
    /**
     * æ˜¯å¦æœ‰æƒé™ï¼Œ0没有,1有
     */
    private Integer havePermission;
    /**
     * å‰ç«¯æ˜¯å¦éšè—
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/ISmFunctionQueryService.java
@@ -62,6 +62,15 @@
     * @throws VciBaseException
     */
    List<MenuVO> getSysModelTreeMenuByPID(String parentId,String modeType,boolean isAll) throws VciBaseException;
    /**
     * é€šè¿‡æ¨¡å—ID获取子级列表
     * @param parentId
     * @param modeType æ¨¡å—类型
     * @param isAll æ˜¯å¦åŒ…括无效的模块,true则包括
     * @return
     * @throws VciBaseException
     */
    List<MenuVO> getSysModelAuthTreeMenuByPID(String parentId,String modeType,boolean isAll) throws VciBaseException, PLException;
    int checkChildObject(String moduleId) throws VciException;
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmFunctionQueryServicePlatformImpl.java
@@ -4,13 +4,11 @@
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.JSONReader;
import com.vci.client.ClientSession;
import com.vci.client.common.objects.RoleObject;
import com.vci.common.exception.VciException;
import com.vci.common.locale.LocaleDisplay;
import com.vci.corba.common.PLException;
import com.vci.corba.framework.data.FuncOperationInfo;
import com.vci.corba.framework.data.FunctionInfo;
import com.vci.corba.framework.data.OperateInfo;
import com.vci.corba.framework.data.RoleRightInfo;
import com.vci.corba.framework.data.*;
import com.vci.corba.omd.data.BusinessObject;
import com.vci.corba.portal.data.PLUILayout;
import com.vci.frameworkcore.compatibility.ISmFunctionQueryService;
@@ -510,6 +508,80 @@
        return functionVOList.stream().sorted(Comparator.comparing(s -> s.getSort())).collect(Collectors.toList());
    }
    public List<MenuVO> findChildAuthFunctionVO(String parentId,MenuVO functionVO) throws PLException {
//        List<FunctionInfo> menus = map.get(parentOid);
        //0表示没有模块也没有操作,1表示有模块,2表示有操作
        long l = platformClientUtil.getFrameworkService().checkChildObject(parentId);
//        funcObj.setFuncType(funcType);
//
//        if(funcType == 1){
//            FunctionObject[] funcObjs = new FunctionClientDelegate().getModuleListByParentId(funcObj.getId(),false);
//            for(int i=0;i<funcObjs.length;i++){
//                VCIBaseTreeNode curNode  = new VCIBaseTreeNode(funcObjs[i].getName(), funcObjs[i]);
//                treeModel.insertNodeInto(curNode, node,node.getChildCount());
//                setChildNode(curNode,funcObjs[i]);
//            }
//        }else if(funcType == 2){
//            FuncOperationObject[] funcOperateObjs = new FuncOperationClientDelegate().getFuncOperationByModuleId(funcObj.getId(), "", true);
//            for (int j = 0; j < funcOperateObjs.length; j++) {
//                VCIBaseTreeNode childNode = new VCIBaseTreeNode(funcOperateObjs[j].getOperAlias(),funcOperateObjs[j]);
//                UserObject user = rightManagementClient.fetchUserInfoByName(PLTApplication.getUserEntityObject().getUserName());
////                    if(user.getUserType() == 0 || childNode.toString().equals("查看")){
////                        treeModel.insertNodeInto(childNode, node,node.getChildCount());
////                        childNode.setLeaf(true);
////                    }else{
////                        boolean res = initRoleRightByType(childNode);
////                        if(res){
//                treeModel.insertNodeInto(childNode, node,node.getChildCount());
//                childNode.setLeaf(true);
////                        }
////                    }
//            }
//        }else{
//            functionVO.setHasChildren(false);
//        }
//
//
//
//
//
//        int funcType = funcDel.checkChildObject(funcObj.getId());
//        funcObj.setFuncType(funcType);
//
//
        List<MenuVO> functionVOList = new ArrayList<>();
//        if(menus == null){
//            return functionVOList;
//        }
//        for (FunctionInfo menu : menus) {
//            if(!menu.isValid){
//                continue;
//            }
//            MenuVO functionVO = new MenuVO();
//            functionVO.setId(menu.id);
//            functionVO.setSource(menu.image);
////            if(StringUtils.isBlank(menu.resourceB) ){
////                continue;
////            }
//            functionVO.setPath(menu.resourceB);
//            functionVO.setCode(menu.aliasName);
//            functionVO.setAlias(menu.aliasName);
//            functionVO.setParentId(menu.parentId);
//            functionVO.setName(menu.name);
//            functionVO.getMeta().put("keepAlive",false);
//            functionVO.setSort((int) menu.seq);
//            functionVO.setChildren(findChildAuthFunctionVO(menu.id,functionVO));
//            if(functionVO.getChildren().size() > 0){
//                functionVO.setHasChildren(true);
//            }else {
//                functionVO.setHasChildren(false);
//            }
//            functionVOList.add(functionVO);
//        }
        return functionVOList.stream().sorted(Comparator.comparing(s -> s.getSort())).collect(Collectors.toList());
    }
    @Override
    public UIContentVO getUIContentByBtmTypeAndId(TreeQueryObject treeQueryObject, ResourceControlTypeEnum resourceControlTypeEnum) throws PLException {
        SessionInfo sessionInfo = WebUtil.getCurrentUserSessionInfoNotException();
@@ -858,4 +930,258 @@
    public void clearCache() {
    }
    /**
     * é€šè¿‡æ¨¡å—ID获取子级列表
     * @param parentId
     * @param modeType æ¨¡å—类型
     * @param isAll æ˜¯å¦åŒ…括无效的模块,true则包括
     * @return
     * @throws VciBaseException
     */
    @Override
    public List<MenuVO> getSysModelAuthTreeMenuByPID(String parentId,String modeType,boolean isAll) throws VciBaseException, PLException {
        List<MenuVO> menuVOList = new ArrayList<>();
        if(Func.isBlank(parentId)){
            return menuVOList;
        }
        SessionInfo sessionInfo = WebUtil.getCurrentUserSessionInfoNotException();
        boolean adminOrDeveloperOrRoot = rightControlUtil.isAdminOrDeveloperOrRoot(sessionInfo.getUserId());
        if (adminOrDeveloperOrRoot) {
            //系统菜单
            parentId = SYSTEMMANAGMENTNODE;
        } else if (rightControlUtil.isThreeAdminCurUser()) {
            //三员返回管理功能模块相关的菜单
            parentId = SYSTEMMANAGMENTNODE;
        } else {
            //普通用户只返回业务功能模块相关的菜单
            parentId = ROOT_MENU_ID;
        }
        List<MenuVO> functionVOList = new ArrayList<>();
        FunctionInfo[] moduleListByParentId = getModuleListByParentId(parentId, false);
        for (FunctionInfo menu : moduleListByParentId) {
            if(!menu.isValid){
                continue;
            }
            MenuVO functionVO = new MenuVO();
            functionVO.setId(menu.id);
            functionVO.setSource(menu.image);
            functionVO.setPath(menu.resourceB);
            functionVO.setParentId(menu.parentId);
            functionVO.setCode(menu.aliasName);
            functionVO.setAlias(menu.aliasName);
            functionVO.setName(menu.name);
            functionVO.getMeta().put("keepAlive",false);
            functionVO.setSort((int) menu.seq);
//            try {
//                functionVO.setChildren(findChildAuthFunctionVO(menu.id));
//            } catch (PLException e) {
//                e.printStackTrace();
//                String errorMsg = "菜单查询时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
//                logger.error(errorMsg);
//                throw new VciBaseException(errorMsg);
//            }
            if(functionVO.getChildren().size() > 0){
                functionVO.setHasChildren(true);
            }else {
                functionVO.setHasChildren(false);
            }
            functionVOList.add(functionVO);
        }
        RoleRightInfo[] userRoleRights = rightControlUtil.getRoleRightByUserName(sessionInfo.getUserId());
        Map<String, List<FunctionInfo>> map = rightControlUtil.getAllChildrenFunctionsByUserName(
                parentId, sessionInfo.getUserId(), userRoleRights);
        if(Func.isEmpty(map.get(parentId))) {
            return functionVOList;
        }
        for (FunctionInfo menu : map.get(parentId)) {
            if(!menu.isValid){
                continue;
            }
            MenuVO functionVO = new MenuVO();
            functionVO.setId(menu.id);
            functionVO.setSource(menu.image);
            //if(StringUtils.isBlank(menu.resourceB)){
            //    continue;
            //}
            functionVO.setPath(menu.resourceB);
            functionVO.setParentId(menu.parentId);
            functionVO.setCode(menu.aliasName);
            functionVO.setAlias(menu.aliasName);
            functionVO.setName(menu.name);
            functionVO.getMeta().put("keepAlive",false);
            functionVO.setSort((int) menu.seq);
//            try {
//                functionVO.setChildren(findChildAuthFunctionVO(menu.id, map));
//            } catch (PLException e) {
//                e.printStackTrace();
//                String errorMsg = "菜单查询时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e);
//                logger.error(errorMsg);
//                throw new VciBaseException(errorMsg);
//            }
            if(functionVO.getChildren().size() > 0){
                functionVO.setHasChildren(true);
            }else {
                functionVO.setHasChildren(false);
            }
            functionVOList.add(functionVO);
        }
        //如果是开发或者测试用户,需哟获取系统模块配置菜单
        if(adminOrDeveloperOrRoot){
            //获取首页系统模块配置菜单
            MenuVO menuVO = JsonConfigReader.getSysModuleConf().getSysModuleNode();
            if(Func.isNotEmpty(menuVO)){
                functionVOList.add(menuVO);
            }
        }
        return functionVOList.stream().sorted(Comparator.comparing(s -> s.getSort())).collect(Collectors.toList());
//
//
//
//
//        boolean isFunctionObject = Func.isNotBlank(modeType) && modeType.equalsIgnoreCase("FunctionObject");
//        if(parentId.equals("systemManagmentNode") || parentId.equals("modelManagmentNode") || isFunctionObject){
//            int childType = this.checkChildObject(parentId);
//            if(isFunctionObject){
//                try {
//                    /**判断该模块下子对象是模块还是操作,0表示无子节点,1表示是模块,2表示是操作**/
//                    if(childType == 2){
//                        try{
//                            FuncOperationInfo[] infos = platformClientUtil.getFrameworkService().getFuncOperationByModule(parentId, "", false);
//                            if(Func.isNotEmpty(infos.length)){
//                                childType = this.checkChildObject(infos[0].id); //都是同一层所以取第一个即可查询是什么类型
//                                for(int i = 0;i < infos.length ;i++){
//                                    FuncOperationInfo info = infos[i];
//                                    MenuVO menuVO = new MenuVO();
//                                    menuVO.setChildType(childType);
//                                    menuVO.setId(info.id);
//                                    menuVO.setFuncId(info.funcId);
//                                    menuVO.setCode(info.operIndentify);
//                                    menuVO.setOperId(info.operId);
//                                    menuVO.setName(info.operName);
//                                    menuVO.setAlias(info.operAlias);
//                                    menuVO.setRemark(info.operDesc);
//                                    menuVO.setSort((int) info.number);
//                                    menuVO.setModeType("FunctionObject");
//                                    menuVO.setIsValid(info.isValid);
//                                    menuVO.setHasChildren(false);
//                                    menuVOList.add(menuVO);
//                                }
//                            }
//                        }catch (PLException e) {
//                            e.printStackTrace();
//                            throw new VciBaseException(String.valueOf(e.code), e.messages);
//                        }
//                    }else if(childType == 1){
//                        try{
//                            FunctionInfo[] funcInfos = platformClientUtil.getFrameworkService().getModuleListByParentId(parentId, isAll);
//                            if(Func.isNotEmpty(funcInfos.length)){
//                                childType = this.checkChildObject(funcInfos[0].id); //都是同一层所以取第一个即可查询是什么类型
//                                for(int i = 0;i < funcInfos.length; i++){
//                                    FunctionInfo funcInfo = funcInfos[i];
//                                    MenuVO menuVO = this.functionInfoToMenuVO(funcInfo);
//                                    menuVO.setChildType(childType);
//                                    menuVO.setModeType("FunctionObject");
//                                    menuVOList.add(menuVO);
//                                }
//                            }
//                        }catch (PLException e) {
//                            e.printStackTrace();
//                            throw new VciBaseException(String.valueOf(e.code),e.messages);
//                        }
//                    }
//                } catch (Exception e) {
//                    e.printStackTrace();
//                    throw new VciBaseException("模块查询时出现错误,原因:"+VciBaseUtil.getExceptionMessage(e));
//                }
//            }else{
//                try{
//                    MenuVO parentNode = null;
//                    //将返回的节点外层套上当前父节点
//                    if("systemManagmentNode".equals(parentId)){
//                        parentNode = JsonConfigReader.getSysModuleConf().getSystemManagmentNode();
//                    }else if("modelManagmentNode".equals(parentId)){
//                        parentNode = JsonConfigReader.getSysModuleConf().getModelManagmentNode();
//                    }
//                    //如果查询的是第一层节点就需要直接返回systemManagmentNode或modelManagmentNode节点
//                    if(Func.isNotBlank(modeType) && modeType.equals("firstNode")){
//                        menuVOList.add(parentNode);
//                        return menuVOList;
//                    }
//                    //查询的三级节点
//                    FunctionInfo[] funcInfos = platformClientUtil.getFrameworkService().getModuleListByParentId(parentId, isAll);
//                    for(int i = 0;i < funcInfos.length; i++){
//                        FunctionInfo funcInfo = funcInfos[i];
//                        MenuVO menuVO = this.functionInfoToMenuVO(funcInfo);
//                        menuVO.setModeType("FunctionObject");
//                        menuVO.setChildType(childType);
//                        menuVOList.add(menuVO);
//                    }
//                    return menuVOList;
//                }catch (PLException e) {
//                    e.printStackTrace();
//                    throw new VciBaseException(String.valueOf(e.code),e.messages);
//                }
//            }
//        }
//        else if(parentId.equals("operateNode")){
//            //加载所有操作
//            try{
//                //将返回的节点外层套上当前父节点
//                MenuVO parentNode = JsonConfigReader.getSysModuleConf().getOperateNode();
//                //如果查询的是第一层节点就需要直接返回sysOptionNode节点
//                if(Func.isNotBlank(modeType) && modeType.equals("firstNode")){
//                    menuVOList.add(parentNode);
//                    return menuVOList;
//                }
//                OperateInfo[] operateInfos = platformClientUtil.getFrameworkService().getOperateTreeList(parentId);
//                for(int i = 0; i < operateInfos.length;i++ ){
//                    OperateInfo operateInfo = operateInfos[i];
//                    MenuVO menuVO = new MenuVO();
//                    menuVO.setId(operateInfo.id);
//                    menuVO.setName(operateInfo.name);
//                    menuVO.setCode(operateInfo.identify);
//                    menuVO.setAlias(operateInfo.alias);
//                    menuVO.setCategory(2);
//                    menuVO.setChildType(0);
//                    menuVO.setRemark(operateInfo.desc);
//                    menuVO.getMeta().put("keepAlive",false);
//                    menuVO.setSort((int) operateInfo.seq);
//                    menuVO.setModeType("operateObject");
//                    menuVO.setHasChildren(false);
//                    menuVOList.add(menuVO);
//                }
//            }catch (PLException e) {
//                e.printStackTrace();
//                throw new VciBaseException(String.valueOf(e.code),new String[]{VciBaseUtil.getExceptionMessage(e)});
//            }
//        }
//        return null;
//        return menuVOList.stream().sorted(Comparator.comparing(s -> s.getSort())).collect(Collectors.toList());
    }
    /**
     * é€šè¿‡æ¨¡å—ID获取子级列表
     * @param parentId
     * @param isAll æ˜¯å¦åŒ…括无效的模块,true则包括
     * @return
     * @throws VciException
     */
    public FunctionInfo[] getModuleListByParentId(String parentId,boolean isAll) throws PLException {
        FunctionInfo[] funcInfos = null;
        funcInfos = platformClientUtil.getFrameworkService().getModuleListByParentId(parentId, isAll);
        return funcInfos;
    }
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsQueryTemplateController.java
@@ -1,37 +1,23 @@
package com.vci.web.controller;
import com.vci.corba.common.PLException;
import com.vci.corba.omd.ltm.LinkType;
import com.vci.corba.omd.qtm.QTD;
import com.vci.dto.QTInfoDTO;
import com.vci.pagemodel.OsBtmTypeAttributeVO;
import com.vci.pagemodel.OsBtmTypeVO;
import com.vci.pagemodel.OsLinkTypeAttributeVO;
import com.vci.pagemodel.OsLinkTypeVO;
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.pagemodel.DataGrid;
import com.vci.starter.web.util.VciBaseUtil;
import com.vci.web.service.OsLinkTypeServiceI;
import com.vci.web.service.OsQuereyTemplateServiceI;
import org.apache.commons.lang3.StringUtils;
import org.dom4j.DocumentException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
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.HashMap;
import java.util.List;
import java.util.stream.Collectors;
/**
 * æŸ¥è¯¢æ¨¡æ¿çš„æŽ§åˆ¶å™¨
@@ -63,6 +49,25 @@
    public BaseResult queryTemplateList(String btmName,Boolean linkFlag){
        try {
            return quereyTemplateServiceI.queryTemplateList(btmName,linkFlag);
        } catch (PLException e) {
            BaseResult objectBaseResult = new BaseResult<>();
            objectBaseResult.setCode(Integer.parseInt(e.code));
            objectBaseResult.setMsg(Arrays.toString(e.messages));
            return objectBaseResult;
        }
    }
    /**
     * æŸ¥è¯¢æ¨¡æ¿çš„列表添加了字段的相关属性
     * @param btmName ç±»åž‹
     * @param linkFlag æ˜¯å¦é“¾æŽ¥ç±»åž‹ ï¼štrue é“¾æŽ¥ç±»åž‹ ï¼Œfalse ä¸šåŠ¡ç±»åž‹
     * @return æŸ¥è¯¢æ¨¡æ¿çš„列表
     */
    @GetMapping("/queryTemplateListByAttr")
    public BaseResult queryTemplateListByAttr(String btmName,Boolean linkFlag, String direction){
        try {
            return quereyTemplateServiceI.queryTemplateListByAttr(btmName,linkFlag,direction);
        } catch (PLException e) {
            BaseResult objectBaseResult = new BaseResult<>();
            objectBaseResult.setCode(Integer.parseInt(e.code));
@@ -277,13 +282,13 @@
    /**
     * æŸ¥è¯¢æ–¹æ¡ˆåˆ é™¤
     * @param templateNames æŸ¥è¯¢æ–¹æ¡ˆå
     * @param names æŸ¥è¯¢æ–¹æ¡ˆå
     * @return æ“ä½œç»“æžœ
     */
    @DeleteMapping("/deleteLinkTemplate")
    public BaseResult deleteLinkTemplate(@RequestBody List<String> templateNames){
    public BaseResult deleteLinkTemplate(String names){
        try {
            return quereyTemplateServiceI.deleteLinkTemplate(templateNames);
            return quereyTemplateServiceI.deleteLinkTemplate(names);
        } catch (PLException e) {
            BaseResult objectBaseResult = new BaseResult<>();
            objectBaseResult.setCode(Integer.parseInt(e.code));
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsQuereyTemplateServiceI.java
@@ -102,10 +102,10 @@
    BaseResult impLinkTemplate(MultipartFile file) throws IOException, ClassNotFoundException;
    /**
     * æŸ¥è¯¢æ–¹æ¡ˆåˆ é™¤
     * @param templateNames æŸ¥è¯¢æ–¹æ¡ˆå
     * @param names æŸ¥è¯¢æ–¹æ¡ˆå
     * @return æ“ä½œç»“æžœ
     */
    BaseResult deleteLinkTemplate(List<String> templateNames) throws PLException;
    BaseResult deleteLinkTemplate(String names) throws PLException;
    /**
     * æŸ¥è¯¢æ¡ä»¶ä¸‹çš„æŸ¥è¯¢æŒ‰é’®
@@ -153,5 +153,11 @@
     * @return å¯¼å…¥ç»“æžœ
     */
    BaseResult impBtmTemplate(MultipartFile file) throws IOException, ClassNotFoundException;
    /**
     * æŸ¥è¯¢æ¨¡æ¿çš„列表添加了字段的相关属性
     * @param btmName ç±»åž‹
     * @param linkFlag æ˜¯å¦é“¾æŽ¥ç±»åž‹ ï¼štrue é“¾æŽ¥ç±»åž‹ ï¼Œfalse ä¸šåŠ¡ç±»åž‹
     * @return æŸ¥è¯¢æ¨¡æ¿çš„列表
     */
    BaseResult queryTemplateListByAttr(String btmName, Boolean linkFlag, String direction) throws PLException;
}
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsQueryTemplateImpl.java
@@ -16,7 +16,10 @@
import com.vci.corba.omd.ltm.LinkType;
import com.vci.corba.omd.qtm.QTD;
import com.vci.corba.omd.qtm.QTInfo;
import com.vci.dto.AttributeDefDTO;
import com.vci.dto.QTDDTO;
import com.vci.dto.QTInfoDTO;
import com.vci.omd.constants.SystemAttribute;
import com.vci.omd.objects.OtherInfo;
import com.vci.po.OsLinkTypePO;
import com.vci.starter.poi.bo.ReadExcelOption;
@@ -1332,12 +1335,16 @@
    }
    /**
     * æŸ¥è¯¢æ–¹æ¡ˆåˆ é™¤
     * @param templateNames æŸ¥è¯¢æ–¹æ¡ˆå
     * @param names æŸ¥è¯¢æ–¹æ¡ˆå
     * @return æ“ä½œç»“æžœ
     */
    @Override
    public BaseResult deleteLinkTemplate(List<String> templateNames) throws PLException {
        boolean b = platformClientUtil.getQTDService().deleteQTs(templateNames.toArray(new String[0]));
    public BaseResult deleteLinkTemplate(String names) throws PLException {
        if(StringUtils.isBlank(names)){
            return BaseResult.fail("请选择查询方案!");
        }
        String[] nameSplit = names.split(",");
        boolean b = platformClientUtil.getQTDService().deleteQTs(nameSplit);
        if(!b){
            return BaseResult.fail("删除失败!!!");
        }
@@ -1565,6 +1572,225 @@
        return BaseResult.success(tree);
    }
    @Override
    public BaseResult queryTemplateListByAttr(String btmName, Boolean linkFlag, String direction) throws PLException {
        //返回的界面下拉框显示树
        List<QTDDTO> qtddtos = new ArrayList<>();
        Map<String, AttributeDef> allSysAttr = Arrays.stream(platformClientUtil.getBtmService().getSysAttributeDefs()).collect(Collectors.toMap(e -> e.name, e -> e));
//        if(linkFlag){
//            QTD[] qtdArray = platformClientUtil.getQTDService().getLinkTypeQTDs(btmName);
//            for (QTD qtd : qtdArray) {
//                QTDDTO qtddto = new QTDDTO();
//                qtddto.setName(qtd.name);
//                qtddto.setCreateTime(qtd.createTime);
//                qtddto.setLinkTypeName(qtd.linkTypeName);
//                qtddto.setBtmName(qtd.btmName);
//                qtddto.setCreator(qtd.creator);
//                for (String abName : qtd.abNames) {
//                    AttributeDef att = platformClientUtil.getAttributeService().getAttributeDefByName(abName);
//                    AttributeDefDTO attrDto = new AttributeDefDTO();
//                    attrDto.setDescription(att.description);
//                    attrDto.setLabel(att.label);
//                    attrDto.setOid(att.oid);
//                    attrDto.setCreator(att.creator);
//                    attrDto.setName(att.name);
//                    attrDto.setDefValue(att.defValue);
//                    attrDto.setRage(att.rage);
//                    attrDto.setVtDataType(att.vtDataType);
//                    attrDto.setOther(att.other);
//                    qtddto.getAttrs().add(attrDto);
//                }
//                qtddtos.add(qtddto);
//            }
//
//        }else {
//            Map<String, AttributeDef> lSysAttr = Arrays.stream(platformClientUtil.getLinkTypeService().getSysAttributeDefs()).collect(Collectors.toMap(e -> e.name, e -> e));
        allSysAttr.putAll(Arrays.stream(platformClientUtil.getLinkTypeService().getSysAttributeDefs()).collect(Collectors.toMap(e -> e.name, e -> e)));
        QTD[] qtdArray = null;
        if(linkFlag){
            qtdArray = platformClientUtil.getQTDService().getLinkTypeQTDs(btmName);
        }else {
            qtdArray = platformClientUtil.getQTDService().getBizTypeQTDs(btmName);
        }
//        QTD[]
        for (QTD qtd : qtdArray) {
            QTDDTO qtddto = new QTDDTO();
            qtddto.setName(qtd.name);
            qtddto.setCreateTime(qtd.createTime);
            qtddto.setLinkTypeName(qtd.linkTypeName);
            qtddto.setBtmName(qtd.btmName);
            qtddto.setCreator(qtd.creator);
            for (String abName : qtd.abNames) {
                AttributeDef att = platformClientUtil.getAttributeService().getAttributeDefByName(abName);
                if(att == null || "".equals(att.oid)){
                    att = allSysAttr.get(abName.toLowerCase());
                }
                if(direction != null) {
                    if (direction.equals(QTConstants.DIRECTION_POSITIVE)) {
                        att.name = "T_OID." + abName;
                    } else if (direction.equals(QTConstants.DIRECTION_OPPOSITE)) {
                        att.name = "F_OID." + abName;
                    }
                }else{
                    att.name = abName;
                }
                AttributeDefDTO attrDto = new AttributeDefDTO();
                attrDto.setDescription(att.description);
                attrDto.setLabel(att.label);
                attrDto.setOid(att.oid);
                attrDto.setCreator(att.creator);
                attrDto.setName(att.name);
                attrDto.setDefValue(att.defValue);
                attrDto.setLayersNum(1);
                attrDto.setRage(att.rage);
                attrDto.setVtDataType(att.vtDataType);
                attrDto.setOther(att.other);
                qtddto.getAttrs().add(attrDto);
                addNode(attrDto, allSysAttr);
            }
            qtddtos.add(qtddto);
        }
//        }
        return BaseResult.dataList(Arrays.asList(qtddtos));
    }
    private void addNode(AttributeDefDTO attributeDefByName, Map<String, AttributeDef> allSysAttr){
        if(attributeDefByName.getLayersNum() >= 3){
            return;
        }
        String abName = attributeDefByName.name;
        //取node上的最后一个属性名
        if(abName.contains(".")){
            abName = abName.substring(abName.lastIndexOf(".") + 1);
        }
//        qtddto.getAttrs().add(attributeDefByName);
        if(SystemAttribute.sysAttList().contains(abName.toUpperCase())){
            return;
        }
        AttributeDef abItem = null;
        try {
            abItem = platformClientUtil.getAttributeService().getAttributeDefByName(abName);
            String other = abItem.other;
//            String btmName = ApProvider.getInstance().getOtherValueByType(other, BTM);
            OtherInfo otherInfo = OtherInfo.getOtherInfoByText(other);
            int refFlag = otherInfo.getRefFlag();
            String refTypeName = otherInfo.getRefTypeName();
            if(refFlag != -1){
                //参照业务类型
                if(refFlag == 0){
                    //pName: ä¸ºå‚照属性名加上路径
                    String pName = attributeDefByName.name + ".";
                    String[] abNames = platformClientUtil.getBtmService().getAttributeNames(refTypeName);
                    for(int i = 0; i < abNames.length; i++){
                        String abName_ = abNames[i];
                        AttributeDef att = platformClientUtil.getAttributeService().getAttributeDefByName(abName_);
                        if(att == null || "".equals(att.oid)){
                            att = allSysAttr.get(abName_.toLowerCase());
                        }
                        att.name = pName + abName_ ;
                        AttributeDefDTO attrDto = new AttributeDefDTO();
                        attrDto.setDescription(att.description);
                        attrDto.setLabel(att.label);
                        attrDto.setOid(att.oid);
                        attrDto.setLayersNum(attributeDefByName.getLayersNum() + 1);
                        attrDto.setCreator(att.creator);
                        attrDto.setName(att.name);
                        attrDto.setDefValue(att.defValue);
                        attrDto.setRage(att.rage);
                        attrDto.setVtDataType(att.vtDataType);
                        attrDto.setOther(att.other);
                        attributeDefByName.getAttrs().add(attrDto);
                        addNode(attrDto, allSysAttr);
                    }
                    //系统属性ID,NAME,DESCRIPTION
//                    AttributeDef[] sysAttributeDefs = platformClientUtil.getBtmService().getSysAttributeDefs();
//                    for (int i = 0; i < sysAttributeDefs.length; i++) {
                    for (int i = 0; i < SystemAttribute.bosysAttList().size(); i++) {
//                        addNode(node,  new DefaultMutableTreeNode(pName + SystemAttribute.bosysAttList().get(i)));
                        AttributeDef attributeDef = allSysAttr.get(SystemAttribute.bosysAttList().get(i).toLowerCase());
                        AttributeDefDTO attrDto = new AttributeDefDTO();
                        attrDto.setDescription(attributeDef.description);
                        attrDto.setLabel(attributeDef.label);
                        attrDto.setOid(attributeDef.oid);
                        attrDto.setLayersNum(attributeDefByName.getLayersNum() + 1);
                        attrDto.setCreator(attributeDef.creator);
                        attrDto.setName(pName + SystemAttribute.bosysAttList().get(i));
                        attrDto.setDefValue(attributeDef.defValue);
                        attrDto.setRage(attributeDef.rage);
                        attrDto.setVtDataType(attributeDef.vtDataType);
                        attrDto.setOther(attributeDef.other);
                        attributeDefByName.getAttrs().add(attrDto);
                        addNode(attrDto, allSysAttr);
                    }
                    //参照链接类型
                }else if(refFlag == 1){
                    //pName: ä¸ºå‚照属性名加上路径
                    String pName = attributeDefByName.name + ".";
                    LinkType link = null;
                    try {
                        link = platformClientUtil.getLinkTypeService().getLinkType(refTypeName);
                    } catch (Exception e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    } catch (Throwable e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                    if(link != null){
                        String[] abNames = link.attributes;
                        for(int i = 0; i < abNames.length; i++){
                            String abName_ = abNames[i];
//                            DefaultMutableTreeNode node_ = new DefaultMutableTreeNode(pName + abName_);
                            AttributeDef att = platformClientUtil.getAttributeService().getAttributeDefByName(abName_);
                            if(att == null || att.oid.equals("")){
                                att = allSysAttr.get(abName_.toLowerCase());
                            }
                            AttributeDefDTO attrDto = new AttributeDefDTO();
                            attrDto.setDescription(att.description);
                            attrDto.setLabel(att.label);
                            attrDto.setOid(att.oid);
                            attrDto.setLayersNum(attributeDefByName.getLayersNum() + 1);
                            attrDto.setCreator(att.creator);
                            attrDto.setName(pName + abName_);
                            attrDto.setDefValue(att.defValue);
                            attrDto.setRage(att.rage);
                            attrDto.setVtDataType(att.vtDataType);
                            attrDto.setOther(att.other);
                            attributeDefByName.getAttrs().add(attrDto);
                            addNode(attrDto, allSysAttr);
                        }
                        //系统属性ID,NAME,DESCRIPTION
                        for (int i = 0; i < SystemAttribute.losysAttList().size(); i++) {
//                            addNode(node,  new DefaultMutableTreeNode(pName + SystemAttribute.losysAttList().get(i)));
//                        }
//                        AttributeDef[] sysAttributeDefs = platformClientUtil.getLinkTypeService().getSysAttributeDefs();
//                        for (int i = 0; i < sysAttributeDefs.length; i++) {
//                        addNode(node,  new DefaultMutableTreeNode(pName + SystemAttribute.bosysAttList().get(i)));
                            AttributeDef sysAttributeDefs = allSysAttr.get(SystemAttribute.losysAttList().get(i).toLowerCase());
                            AttributeDefDTO attrDto = new AttributeDefDTO();
                            attrDto.setDescription(sysAttributeDefs.description);
                            attrDto.setLabel(sysAttributeDefs.label);
                            attrDto.setOid(sysAttributeDefs.oid);
                            attrDto.setLayersNum(attributeDefByName.getLayersNum() + 1);
                            attrDto.setCreator(sysAttributeDefs.creator);
                            attrDto.setName(pName + SystemAttribute.losysAttList().get(i));
                            attrDto.setDefValue(sysAttributeDefs.defValue);
                            attrDto.setRage(sysAttributeDefs.rage);
                            attrDto.setVtDataType(sysAttributeDefs.vtDataType);
                            attrDto.setOther(sysAttributeDefs.other);
                            attributeDefByName.getAttrs().add(attrDto);
                            addNode(attrDto, allSysAttr);
                        }
                    }
                }
            }
        } catch (PLException e) {
            e.printStackTrace();
        }
    }
    // æ•°æ®è¿‡æ»¤
    private void addImportBtmData(BtmQTExportData qtExportData, List<BizType> ltsNew, List<QTInfo> qTWrapperNew,
                               Map<String/* ç±»åž‹åç§° */, QTD[]/* æŸ¥è¯¢æ¨¡æ¿å®šä¹‰ */> norepQTDs) {