Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java
@@ -611,7 +611,7 @@
                return BaseResult.fail(FrameWorkLangCodeConstant.IMPORT_FAIL, new String[]{"没有导入的属性文件。导入终止!"});
            }
        }
        BaseResult baseResult = attributeService.importAttributes(attrExcel);
        BaseResult baseResult = attributeService.importAttributes(attrExcel,true);
        if(!baseResult.isSuccess()){
            //删除上传的文件夹
            FileUtil.del(defaultTempFolder + File.separator);
@@ -648,7 +648,7 @@
                }else if(!osLinkTypePO.getName().matches("^[A-Za-z]+$")){
                    throw new VciBaseException("第【"+osLinkTypePO.getRowIndex()+"】行,链接类型名称只能为英文字母");
                }else if(excelReapeat.containsKey(osLinkTypePO.getName())){//属性名表格中判重
                    throw new VciBaseException("第【"+excelReapeat.get(osLinkTypePO.getName())+"】行和第【"+osLinkTypePO.getRowIndex()+"】行数据,属性名重复");
                    throw new VciBaseException("第【"+excelReapeat.get(osLinkTypePO.getName())+"】行和第【"+osLinkTypePO.getRowIndex()+"】行数据,链接类型名重复");
                }
                try {
                    LinkType historyLink = platformClientUtil.getLinkTypeService().getLinkType(osLinkTypePO.getName());
@@ -687,7 +687,7 @@
            });
        }catch (Exception e){
            if(logger.isErrorEnabled()){
                logger.error("读取excel内容时或保存用户信息时出现了错误,具体原因:",VciBaseUtil.getExceptionMessage(e));
                logger.error("读取excel内容时或保存链接类型信息时出现了错误,具体原因:",VciBaseUtil.getExceptionMessage(e));
            }
            e.printStackTrace();
            return BaseResult.fail(VciBaseUtil.getExceptionMessage(e),new String[]{},e);
@@ -988,4 +988,49 @@
        return null;
    }
    /**
     * 获取使用该业务类型的链接类型名
     * @param btmName 业务类型名称
     * @return
     */
    @Override
    public List<String> getUsedBtmLinkList(String btmName) {
        try {
            List<String> list = new ArrayList<String>();
            LinkType[] linkTypes = platformClientUtil.getLinkTypeService().getLinkTypes();
            for(int i = 0; i < linkTypes.length; i++){
                LinkType linkType = linkTypes[i];
                if(this.containsBtm(linkType, btmName)){
                    list.add(linkType.name);
                }
            }
            return list;
        } catch (PLException e) {
            e.printStackTrace();
        }
        return null;
    }
    /**
     * 指定的链接类型是否使用了指定的业务类型
     * @param link
     * @param btmName
     * @return
     */
    private boolean containsBtm(LinkType link, String btmName){
        String[] btms = link.btmItemsFrom;
        for(int i = 0; i < btms.length; i++){
            if(btmName.equalsIgnoreCase(btms[i])){
                return true;
            }
        }
        btms = link.btmItemsTo;
        for(int i = 0; i < btms.length; i++){
            if(btmName.equalsIgnoreCase(btms[i])){
                return true;
            }
        }
        return false;
    }
}