| | |
| | | OsBtmTypeAttributeVO idAttrVO = new OsBtmTypeAttributeVO(); |
| | | idAttrVO.setId("id"); |
| | | idAttrVO.setName("编号"); |
| | | idAttrVO.setAttrDataType(VciFieldTypeEnum.VTString.name()); |
| | | idAttrVO.setAttributeDataType(VciFieldTypeEnum.VTString.name()); |
| | | idAttrVO.setAttributeLength(50); |
| | | idAttrVO.setNullableFlag(true); |
| | | attributes.add(idAttrVO); |
| | |
| | | OsBtmTypeAttributeVO nameAttrVO = new OsBtmTypeAttributeVO(); |
| | | nameAttrVO.setId("name"); |
| | | nameAttrVO.setName("名称"); |
| | | nameAttrVO.setAttrDataType(VciFieldTypeEnum.VTString.name()); |
| | | nameAttrVO.setAttributeDataType(VciFieldTypeEnum.VTString.name()); |
| | | nameAttrVO.setAttributeLength(50); |
| | | nameAttrVO.setNullableFlag(true); |
| | | attributes.add(nameAttrVO); |
| | |
| | | OsBtmTypeAttributeVO descAttrVO = new OsBtmTypeAttributeVO(); |
| | | descAttrVO.setId("description"); |
| | | descAttrVO.setName("描述"); |
| | | descAttrVO.setAttrDataType(VciFieldTypeEnum.VTString.name()); |
| | | descAttrVO.setAttributeDataType(VciFieldTypeEnum.VTString.name()); |
| | | descAttrVO.setAttributeLength(150); |
| | | descAttrVO.setNullableFlag(true); |
| | | attributes.add(descAttrVO); |
| | |
| | | //然后属性的中文名称 |
| | | rowDataList.add(new WriteExcelData(rowIndex, 3, attributeVO.getName())); |
| | | //属性的类型 |
| | | rowDataList.add(new WriteExcelData(rowIndex, 4, VciFieldTypeEnum.getTextByValue(attributeVO.getAttrDataType()))); |
| | | rowDataList.add(new WriteExcelData(rowIndex, 4, VciFieldTypeEnum.getTextByValue(attributeVO.getAttributeDataType()))); |
| | | //是否可以为空 |
| | | rowDataList.add(new WriteExcelData(rowIndex, 5, attributeVO.isNullableFlag() ? "是" : "否")); |
| | | //属性长度 |
| | |
| | | } |
| | | columnData.put(wordFieldProperties.getColumnId(),btmTypeAttributeVO.getId().toLowerCase()); |
| | | columnData.put(wordFieldProperties.getColumnName(),btmTypeAttributeVO.getName()); |
| | | String attrDataType = btmTypeAttributeVO.getAttrDataType(); |
| | | String attrDataType = btmTypeAttributeVO.getAttributeDataType(); |
| | | String columnType = VciFieldTypeEnum.getTextByValue(attrDataType); |
| | | if(StringUtils.isBlank(columnType)){ |
| | | columnType = "字符串"; |
| | |
| | | } else { |
| | | btmItem.verRuleName = 0; |
| | | } |
| | | //包含的属性的数组 |
| | | List<OsBtmTypeLinkAttributesDTO> attributesDTOList = btmTypeDTO.getAttributesDTOList(); |
| | | List<String> attrIdList = new ArrayList<String>(); |
| | | if (!CollectionUtils.isEmpty(attributesDTOList)) { |
| | | for (OsBtmTypeLinkAttributesDTO attr : attributesDTOList) { |
| | | attrIdList.add(attr.getId().toLowerCase()); |
| | | } |
| | | } |
| | | btmItem.apNameArray = attrIdList.toArray(new String[0]); |
| | | //包含的属性名称 |
| | | btmItem.apNameArray = btmTypeDTO.getApNameArray().split(","); |
| | | } |
| | | |
| | | /** |