| | |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.model.OsAttributeDO; |
| | | import com.vci.web.enumpck.ItemTypeEnum; |
| | | import com.vci.web.enumpck.PortalVITypeFlag; |
| | | import com.vci.web.properties.UsedNames; |
| | | import com.vci.web.service.OsAttributeServiceI; |
| | |
| | | attributeVO.setDescription(attribItem.description); |
| | | attributeVO.setAttributeDataType(attribItem.vtDataType); |
| | | attributeVO.setAttributeDataTypeText(VciFieldTypeEnum.getTextByValue(attribItem.vtDataType)); |
| | | //获取UI属性类型 |
| | | attributeVO.setAttributeUIType(ItemTypeEnum.convertAttributeTypeTOUITypeTextByValue(attribItem.vtDataType,false)); |
| | | //获取UI属性类型文本 |
| | | attributeVO.setAttributeUITypeText(ItemTypeEnum.convertAttributeTypeTOUITypeTextByValue(attribItem.vtDataType,true)); |
| | | attributeVO.setDefaultValue(attribItem.defValue); |
| | | if(Func.isNotBlank(attribItem.rage)){ |
| | | attributeVO.setRange(attribItem.rage.replace("<","<")); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 使用属性编号获取对象--批量 |
| | | * |
| | | * @param attrCodes 属性的英文名称 |
| | | * @param attributeVOMap 属性对象 |
| | | * @return 属性的显示对象 |
| | | */ |
| | | @Override |
| | | public List<OsAttributeVO> listAttrByIds(Collection<String> attrCodes,Map<String, OsAttributeVO> attributeVOMap) { |
| | | if(CollectionUtils.isEmpty(attrCodes)){ |
| | | return null; |
| | | } |
| | | if(attributeVOMap == null){ |
| | | attributeVOMap = self.selectAllAttributeMap(); |
| | | } |
| | | List<OsAttributeVO> attributeVOS = new ArrayList<>(); |
| | | Map<String, OsAttributeVO> finalAttributeVOMap = attributeVOMap; |
| | | attrCodes.stream().forEach(attrCode->{ |
| | | OsAttributeVO attributeVO = finalAttributeVOMap.getOrDefault(attrCode.toLowerCase(),null); |
| | | if(attributeVO!=null){ |
| | | attributeVOS.add(attributeVO); |
| | | } |
| | | }); |
| | | return attributeVOS; |
| | | } |
| | | |
| | | /** |
| | | * 批量添加属性 |
| | | * |
| | | * @param attribItemList 属性的列表 |