| | |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | if(!CollectionUtils.isEmpty(oids)){ |
| | | this.removeBatchByIds(oids); |
| | | } |
| | | |
| | | String tenantId = AuthUtil.getTenantId().toString(); |
| | | codeClassifyTemplateAttrDOInsert.parallelStream().forEach(item->{ |
| | | item.setTenantId(tenantId); |
| | | }); |
| | | //再新增 |
| | | if(!CollectionUtils.isEmpty(codeClassifyTemplateAttrDOInsert)){ |
| | | this.saveBatch(codeClassifyTemplateAttrDOInsert); |
| | |
| | | // queryWrapper.addQueryMap("CLASSIFYTEMPLATEOID",templateAttrOid); |
| | | Map<String,Object> condition = new HashMap<>(1); |
| | | condition.put("CLASSIFYTEMPLATEOID",templateAttrOid); |
| | | |
| | | List<CodeClassifyTemplateAttr> codeClassifyTemplateAttrDOList = baseMapper.selectByMap(condition); |
| | | |
| | | List<String> btmIds = new ArrayList<String>(); |
| | |
| | | |
| | | //过滤掉已经存在的属性 |
| | | List<BtmTypeAttributeVO> boAttrss = new ArrayList<BtmTypeAttributeVO>(); |
| | | |
| | | for (BtmTypeAttributeVO osBtmTypeAttributeVO:btmTypeVOR.getData().getAttributes()){ |
| | | if(!btmIds.contains(osBtmTypeAttributeVO.getId())){ |
| | | //看看是不是有模糊查询 |
| | |
| | | } |
| | | } |
| | | } |
| | | // 按照id升序排序 |
| | | boAttrss = boAttrss.stream().sorted(Comparator.comparing(BtmTypeAttributeVO::getId)).collect(Collectors.toList()); |
| | | dataGrid.setData(boAttrss); |
| | | dataGrid.setTotal(boAttrss.size()); |
| | | return dataGrid; |