| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.awt.event.ItemEvent; |
| | | import java.io.File; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | import static com.vci.ubcs.code.constant.FrameWorkDefaultValueConstant.*; |
| | | |
| | |
| | | attributeVO.setAttributeLength(attr.getAttributeLength()); |
| | | attributeVO.setBtmTypeId(btmTypeDetail.getData().getId()); |
| | | attributeVO.setBtmname(btmTypeDetail.getData().getName()); |
| | | attributeVO.setAttrDataTypeText(EnumCache.getValue(EnumEnum.VCO_FIELD_TYPE,attr.getAttrDataType())); |
| | | attributeVO.setAttrDataTypeText(EnumCache.getValue(EnumEnum.VCI_FIELD_TYPE,attr.getAttrDataType())); |
| | | boolean add = true; |
| | | if(StringUtils.isNotBlank(id) && !attributeVO.getId().contains(id.replace("*",""))){ |
| | | add = false; |
| | | } |
| | | if(StringUtils.isNotBlank(name) && !attributeVO.getId().contains(name.replace("*",""))){ |
| | | if(StringUtils.isNotBlank(name) && !attributeVO.getName().contains(name.replace("*",""))){ |
| | | add = false; |
| | | } |
| | | if(add){ |
| | |
| | | throw new ServiceException("业务类型feign接口调用出错"); |
| | | } |
| | | List<BtmTypeAttributeVO> defaultAttrVOS = btmTypeVOR.getData().getAttributes(); |
| | | if(!CollectionUtils.isEmpty(defaultAttrVOS)){ |
| | | defaultAttrVOS.stream().forEach(attr->{ |
| | | |
| | | // 取两个集合差集 |
| | | List<String> ids = unDefaultAttributes.stream().map(BtmTypeAttributeVO::getId).collect(Collectors.toList()); |
| | | defaultAttrVOS.forEach(item->{ |
| | | if(!ids.contains(item.getId())){ |
| | | BtmTypeAttributeVO attributeVO = new BtmTypeAttributeVO(); |
| | | BeanUtils.copyProperties(item,attributeVO); |
| | | attributeVO.setAttrDataType(item.getAttrDataType()); |
| | | attributeVO.setAttributeLength(item.getAttributeLength()); |
| | | attributeVO.setBtmTypeId(btmTypeDetail.getData().getId()); |
| | | attributeVO.setBtmname(btmTypeDetail.getData().getName()); |
| | | attributeVO.setAttrDataTypeText(EnumCache.getValue(EnumEnum.VCI_FIELD_TYPE,item.getAttrDataType())); |
| | | boolean add = true; |
| | | if(StringUtils.isNotBlank(id) && !attr.getId().contains(id.replace("*",""))){ |
| | | if(StringUtils.isNotBlank(id) && !item.getId().contains(id.replace("*",""))){ |
| | | add = false; |
| | | } |
| | | if(StringUtils.isNotBlank(name) && !attr.getId().contains(name.replace("*",""))){ |
| | | if(StringUtils.isNotBlank(name) && !item.getName().contains(name.replace("*",""))){ |
| | | add = false; |
| | | } |
| | | if(add){ |
| | | attributeVOS.add(attr); |
| | | attributeVOS.add(attributeVO); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | DataGrid<BtmTypeAttributeVO> dataGrid = new DataGrid<>(); |
| | | dataGrid.setData(attributeVOS); |
| | | dataGrid.setTotal(attributeVOS.size()); |
| | |
| | | } |
| | | |
| | | /** |
| | | <<<<<<< Updated upstream |
| | | <<<<<<< Updated upstream |
| | | <<<<<<< Updated upstream |
| | | * 主题库的树,已联调业务类型查询feign |
| | | ======= |
| | | * 主题库的树,已经联调业务类型查询 |
| | | >>>>>>> Stashed changes |
| | | ======= |
| | | * 主题库的树,已经联调业务类型查询 |
| | | >>>>>>> Stashed changes |
| | | ======= |
| | | * 主题库的树,已经联调业务类型查询 |
| | | >>>>>>> Stashed changes |
| | | * |
| | | * @param treeQueryObject 树形查询对象 |
| | | * @return 主题库显示树 |
| | | */ |