| | |
| | | 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.QTInfoDTO; |
| | | import com.vci.dto.*; |
| | | import com.vci.omd.constants.SystemAttribute; |
| | | import com.vci.omd.objects.OtherInfo; |
| | | import com.vci.po.OsLinkTypePO; |
| | | import com.vci.starter.poi.bo.ReadExcelOption; |
| | |
| | | VciBaseUtil.alertNotNull(btName,"类型名"); |
| | | QTInfo[] objTypeQTs = platformClientUtil.getQTDService().getObjTypeQTs(btName); |
| | | List<QTInfoDTO> dtos = new ArrayList<>(); |
| | | Map<String, AttributeDef> allSysAttr = Arrays.stream(platformClientUtil.getBtmService().getSysAttributeDefs()).collect(Collectors.toMap(e -> e.name, e -> e)); |
| | | allSysAttr.putAll(Arrays.stream(platformClientUtil.getLinkTypeService().getSysAttributeDefs()).collect(Collectors.toMap(e -> e.name, e -> e))); |
| | | |
| | | for (QTInfo obj : objTypeQTs) { |
| | | QTInfoDTO qtInfoDTO = new QTInfoDTO(); |
| | | qtInfoDTO.setCreator(obj.creator); |
| | |
| | | qtInfoDTO.setQtUIText(obj.qtUIText); |
| | | if(StringUtils.isNotBlank(obj.qtUIText)){ |
| | | //将给定的String文本解析为XML文档并返回新创建的document |
| | | qtInfoDTO.setTree(analysisXml(obj)); |
| | | qtInfoDTO.setTree(analysisXml(obj, allSysAttr)); |
| | | } |
| | | qtInfoDTO.setQueryTemplate(OQTool.getQTByDoc(DocumentHelper.parseText(obj.qtText), obj.qtName)); |
| | | QueryTemplate qtByDoc = OQTool.getQTByDoc(DocumentHelper.parseText(obj.qtText), obj.qtName); |
| | | qtInfoDTO.setQueryTemplate(queryTemplateToDto(qtByDoc, allSysAttr)); |
| | | qtInfoDTO.setCreateTimeText(DateFormatUtils.format(new Date(obj.createTime), DateUtil.PATTERN_DATETIME)); |
| | | dtos.add(qtInfoDTO); |
| | | } |
| | | return BaseResult.dataList(dtos); |
| | | } |
| | | |
| | | /** |
| | | * 对象转换 |
| | | * @param qtByDoc 模板对象 |
| | | * @param allSysAttr 所有系统属性 |
| | | * @return 模板传输对象 |
| | | * @throws PLException |
| | | */ |
| | | private QueryTemplateDTO queryTemplateToDto(QueryTemplate qtByDoc, Map<String, AttributeDef> allSysAttr) throws PLException { |
| | | QueryTemplateDTO dto = new QueryTemplateDTO(); |
| | | dto.setId(qtByDoc.getId()); |
| | | dto.setBtmType(qtByDoc.getBtmType()); |
| | | dto.setDirection(qtByDoc.getDirection()); |
| | | dto.setLevel(qtByDoc.getLevel()); |
| | | dto.setQueryChildrenFlag(qtByDoc.isQueryChildren()); |
| | | dto.setQueryISLeaf(qtByDoc.isQueryISLeaf()); |
| | | dto.setClauseList(qtByDoc.getClauseList()); |
| | | dto.setPageInfo(qtByDoc.getPageInfo()); |
| | | dto.setLinkType(qtByDoc.getLinkType()); |
| | | dto.setVersion(qtByDoc.getVersion()); |
| | | dto.setType(qtByDoc.getType()); |
| | | dto.setSecretFlag(qtByDoc.isSecretFlag()); |
| | | dto.setRightFlag(qtByDoc.isRightFlag()); |
| | | dto.setOrderInfoList(qtByDoc.getOrderInfoList()); |
| | | dto.setRecReturnMode(qtByDoc.getRecReturnMode()); |
| | | Condition con = qtByDoc.getCondition(); |
| | | if(con != null){ |
| | | ConditionDTO conDto = new ConditionDTO(); |
| | | conDto.setRootCIName(con.getRootCIName()); |
| | | Map<String, ConditionItem> ciMap = con.getCIMap(); |
| | | Map<String, ConditionItemDTO> ciMapDto = new HashMap<>(); |
| | | for (String key : ciMap.keySet()) { |
| | | ConditionItem item = ciMap.get(key); |
| | | LeafInfo leafInfo = item.getLeafInfo(); |
| | | ConditionItemDTO itemDTO = new ConditionItemDTO(); |
| | | itemDTO.setChildrenInfo(item.getChildrenInfo()); |
| | | itemDTO.setId(item.getId()); |
| | | itemDTO.setLeafFlag(item.isLeaf()); |
| | | ciMapDto.put(key, itemDTO); |
| | | if(leafInfo == null){ |
| | | continue; |
| | | } |
| | | LeafInfoDTO leafInfoDTO = new LeafInfoDTO(); |
| | | itemDTO.setLeafInfo(leafInfoDTO); |
| | | //处理查询字段类型 |
| | | String column = leafInfo.getClause(); |
| | | if(column.contains(".")){ |
| | | column = StringUtils.substringAfterLast(column, "."); |
| | | } |
| | | if(column.contains(" ")){ |
| | | column = StringUtils.substringBefore(column, " "); |
| | | } |
| | | AttributeDef att = platformClientUtil.getAttributeService().getAttributeDefByName(column); |
| | | if(att == null || "".equals(att.oid)){ |
| | | att = allSysAttr.get(column.toLowerCase()); |
| | | } |
| | | if(att == null){ |
| | | throw new PLException("500", new String[]{"属性字段:" + column + "在属性池中未查询到,请确认!!"}); |
| | | } |
| | | leafInfoDTO.setClause(leafInfo.getClause()); |
| | | |
| | | leafInfoDTO.setOperator(leafInfo.getOperator()); |
| | | leafInfoDTO.setType(att.vtDataType); |
| | | if(leafInfo.getValue() != null ){ |
| | | LeafValueDto valueDto = new LeafValueDto(); |
| | | valueDto.setOrdinaryValue(leafInfo.getValue().getOrdinaryValue()); |
| | | valueDto.setQueryTemplate(leafInfo.getValue().getQueryTemplate() != null ? queryTemplateToDto(leafInfo.getValue().getQueryTemplate(),allSysAttr) : null); |
| | | leafInfoDTO.setValue(valueDto); |
| | | } |
| | | |
| | | } |
| | | conDto.setCIMap(ciMapDto); |
| | | dto.setCondition(conDto); |
| | | } |
| | | return dto; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | * @throws DocumentException |
| | | */ |
| | | private HashMap<String,Object> analysisXml(QTInfo obj) throws DocumentException { |
| | | private HashMap<String,Object> analysisXml(QTInfo obj, Map<String, AttributeDef> allSysAttr) throws DocumentException, PLException { |
| | | org.dom4j.Document document = DocumentHelper.parseText(obj.qtUIText); |
| | | if(document == null){ |
| | | return null; |
| | | } |
| | | //获取根节点,在例子中就是responsedata节点 |
| | | Element root = document.getRootElement(); |
| | | List<HashMap<String,Object>> treeList = new ArrayList<>(); |
| | | HashMap<String,Object> treeMap = new HashMap<>(); |
| | | treeMap.put("connector",root.getText()); |
| | | List<Element> children = root.elements(); |
| | |
| | | for(Iterator<Element> i = children.iterator(); i.hasNext();){ |
| | | Element child = i.next(); |
| | | if(AND.equals(child.getText()) || OR.equals(child.getText())){ |
| | | childList.add(addDefaultMutableTree(child)); |
| | | childList.add(addDefaultMutableTree(child, allSysAttr)); |
| | | }else { |
| | | childList.add(child.getText().trim()); |
| | | String column = StringUtils.substringBefore(child.getText().trim(), " "); |
| | | |
| | | if(column.contains(".")){ |
| | | column = StringUtils.substringAfterLast(column, "."); |
| | | } |
| | | AttributeDef att = platformClientUtil.getAttributeService().getAttributeDefByName(column); |
| | | if(att == null || "".equals(att.oid)){ |
| | | att = allSysAttr.get(column.toLowerCase()); |
| | | } |
| | | HashMap<String, String> data = new HashMap<>(); |
| | | data.put("column",child.getText().trim()); |
| | | data.put("type",att.vtDataType); |
| | | childList.add(data); |
| | | } |
| | | } |
| | | treeMap.put("child",childList); |
| | |
| | | * 将子节点转为map结构 |
| | | * @param element |
| | | */ |
| | | public Map<String, Object> addDefaultMutableTree(Element element){ |
| | | public Map<String, Object> addDefaultMutableTree(Element element, Map<String, AttributeDef> allSysAttr) throws PLException { |
| | | List<Object> childList = new ArrayList<>(); |
| | | List<Element> children = element.elements(); |
| | | HashMap<String,Object> treeMap = new HashMap<>(); |
| | |
| | | for(Iterator<Element> i = children.iterator(); i.hasNext();){ |
| | | Element child = i.next(); |
| | | if(AND.equals(child.getText()) || OR.equals(child.getText())){ |
| | | childList.add(addDefaultMutableTree(child)); |
| | | childList.add(addDefaultMutableTree(child, allSysAttr)); |
| | | }else { |
| | | childList.add(child.getText().trim()); |
| | | String column = StringUtils.substringBefore(child.getText().trim(), " "); |
| | | |
| | | if(column.contains(".")){ |
| | | column = StringUtils.substringAfterLast(column, "."); |
| | | } |
| | | AttributeDef att = platformClientUtil.getAttributeService().getAttributeDefByName(column); |
| | | if(att == null || "".equals(att.oid)){ |
| | | att = allSysAttr.get(column.toLowerCase()); |
| | | } |
| | | HashMap<String, String> data = new HashMap<>(); |
| | | data.put("column",child.getText().trim()); |
| | | data.put("type",att.vtDataType); |
| | | childList.add(data); |
| | | } |
| | | } |
| | | treeMap.put("child",childList); |
| | |
| | | return qt; |
| | | } |
| | | |
| | | // /** |
| | | // * 组装查询模板 |
| | | // * @return |
| | | // */ |
| | | // public QueryTemplate getQT(HashMap<String,Object> dataMap){ |
| | | // QueryTemplate qt = new QueryTemplate(); |
| | | // qt.setType(QTConstants.TYPE_LINK); |
| | | // //TODO String qtId = |
| | | // qt.setLinkType((String) dataMap.get("linkTypeName")); |
| | | // qt.setDirection( (Boolean)dataMap.get("rdPositive") ? QTConstants.DIRECTION_POSITIVE : QTConstants.DIRECTION_OPPOSITE); |
| | | // qt.setBtmType((String) dataMap.get("btmName")); |
| | | // if("所有类型".equals(dataMap.get("combRelaType"))){ |
| | | // qt.setBtmType("*"); |
| | | // } |
| | | // qt.setVersion(getVersion((String) dataMap.get("versionValue"))); |
| | | // qt.setQueryISLeaf((Boolean) dataMap.get("isQueryIsLeaf")); |
| | | // qt.setLevel(StringUtils.isBlank((CharSequence) dataMap.get("level")) ? 1 : Integer.valueOf(String.valueOf(dataMap.get("level")))); |
| | | // List<String> clauseList = new ArrayList<String>(); |
| | | // //TODO 查询列 显示列 |
| | | // clauseList.add("*"); |
| | | // qt.setClauseList(clauseList); |
| | | // Condition con = new Condition(); |
| | | // qt.setCondition(con); |
| | | // HashMap<String, ConditionItem> ciMap = getCIMap(); |
| | | // con.setCIMap(ciMap); |
| | | // con.setRootCIName(con.getRootCINameByCIMap(ciMap)); |
| | | // return qt; |
| | | // } |
| | | |
| | | /** |
| | | * 返回查询的版本 |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public void expLinkTemplate(List<String> names, HttpServletResponse response) throws PLException, IOException { |
| | | public void expLinkTemplate(String names, HttpServletResponse response) throws PLException, IOException { |
| | | String defaultTempFolder = LocalFileUtil.getDefaultTempFolder(); |
| | | String vciqtmfFileName = defaultTempFolder + File.separator + "LinkTemplateExp" + new Date().getTime() + ".vciqtf"; |
| | | LinkQTExportData exportData = new LinkQTExportData(); |
| | | for (String name : names) { |
| | | String[] splits = names.split(","); |
| | | for (String name : splits) { |
| | | QTInfo qt = platformClientUtil.getQTDService().getQT(name); |
| | | exportData.getAllQTs().put(qt.qtName,qt); |
| | | LinkType linkType = platformClientUtil.getLinkTypeService().getLinkType(qt.btmName); |
| | |
| | | } |
| | | /** |
| | | * 查询方案删除 |
| | | * @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("删除失败!!!"); |
| | | } |
| | |
| | | throw new PLException("500", new String[]{checkInfo}); |
| | | } |
| | | qt.setId("qt1"); |
| | | BusinessObject[] result = platformClientUtil.getQueryService().findBTMObjects(qt.getId(), OQTool.qtTOXMl(qt).asXML()); |
| | | return BaseResult.dataList(Arrays.asList(result)); |
| | | try { |
| | | BusinessObject[] result = platformClientUtil.getQueryService().findBTMObjects(qt.getId(), OQTool.qtTOXMl(qt).asXML()); |
| | | return BaseResult.dataList(Arrays.asList(result)); |
| | | }catch (Exception e){ |
| | | String errorLog = "查询时出现问题,请检查配置的条件是否存在问题,具体原因:"+VciBaseUtil.getExceptionMessage(e); |
| | | throw new VciBaseException(errorLog); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | if(!checkInfo.equals("OK")){ |
| | | throw new PLException("500", new String[]{checkInfo}); |
| | | } |
| | | qt.setId(qtInfoDTO.getQtName()); |
| | | //设置排序信息 |
| | | qt.setOrderInfoList(qtInfoDTO.getQueryTemplate().getOrderInfoList()); |
| | | QTInfo qtWrapper = new QTInfo(); |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public void expBtmQTTemplate(List<String> names, HttpServletResponse response) throws PLException, IOException { |
| | | public String expBtmQTTemplate(String qtNames) throws PLException, IOException { |
| | | String defaultTempFolder = LocalFileUtil.getDefaultTempFolder(); |
| | | String vciqtmfFileName = defaultTempFolder + File.separator + "BtmTemplateExp" + new Date().getTime() + ".vciqtf"; |
| | | String[] names = qtNames.split(","); |
| | | BtmQTExportData exportData = new BtmQTExportData(); |
| | | for (String name : names) { |
| | | QTInfo qt = platformClientUtil.getQTDService().getQT(name); |
| | |
| | | throw new PLException("500",new String[]{"导出流关闭异常!"}); |
| | | } |
| | | } |
| | | ControllerUtil.writeFileToResponse(response,vciqtmfFileName); |
| | | FileUtil.del(defaultTempFolder + File.separator); |
| | | //ControllerUtil.writeFileToResponse(response,vciqtmfFileName); |
| | | //FileUtil.del(defaultTempFolder + File.separator); |
| | | return vciqtmfFileName; |
| | | } |
| | | |
| | | /** |
| | |
| | | tree.put("children", childList); |
| | | return BaseResult.success(tree); |
| | | } |
| | | /** |
| | | * 查询模板的列表添加了字段的相关属性 |
| | | * @param btmName 类型 |
| | | * @param linkFlag 是否链接类型 :true 链接类型 ,false 业务类型 |
| | | * @param direction 正反方向 |
| | | * @return 查询模板的列表 |
| | | */ |
| | | @Override |
| | | public BaseResult queryTemplateListByAttr(String btmName, Boolean linkFlag, String direction) throws PLException { |
| | | //返回的界面下拉框显示树 |
| | | List<QTDDTO> qtddtos = new ArrayList<>(); |
| | | //将链接类型与业务类型的所有默认字段查询出来放到map里面方便后续调用 |
| | | Map<String, AttributeDef> allSysAttr = Arrays.stream(platformClientUtil.getBtmService().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); |
| | | } |
| | | 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)) { |
| | | if(att == null ){ |
| | | continue; |
| | | // throw new PLException("500",new String[]{"属性字段:"+ abName +"未查询到,请确认!"}); |
| | | } |
| | | att.name = "T_OID." + abName; |
| | | } else if (direction.equals(QTConstants.DIRECTION_OPPOSITE)) { |
| | | if(att == null ){ |
| | | continue; |
| | | // throw new PLException("500",new String[]{"属性字段:"+ abName +"未查询到,请确认!"}); |
| | | } |
| | | 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(qtddtos); |
| | | } |
| | | |
| | | /** |
| | | * 子节点处理 |
| | | * @param attributeDefByName 父节点的属性信息 |
| | | * @param allSysAttr 所有默认字段 |
| | | */ |
| | | 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); |
| | | } |
| | | 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 |
| | | for (int i = 0; i < SystemAttribute.bosysAttList().size(); 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]; |
| | | 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++) { |
| | | 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) { |