lihang
2023-06-02 59d3dce7cf32975e59935920968b2266af3c60a6
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java
@@ -19,6 +19,7 @@
import com.vci.ubcs.code.po.CodeClassifyPO;
import com.vci.ubcs.code.service.ICodeClassifyService;
import com.vci.ubcs.code.service.ICodeKeyAttrRepeatService;
import com.vci.ubcs.code.service.ICodeOsattributeService;
import com.vci.ubcs.code.service.ICodeRuleService;
import com.vci.ubcs.code.vo.CodeOsattributeVO;
import com.vci.ubcs.code.vo.CodeOsbtmtypeVO;
@@ -55,6 +56,7 @@
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@@ -86,7 +88,11 @@
   @Resource
   private IBtmTypeClient btmTypeClient;
   /**
    * 属性服务
    */
// @Autowired
// private OsAttributeServiceI attributeService;
   /**
    * 日志
@@ -267,7 +273,6 @@
      return codeClassifyMapper.checkHasChild(oid.trim());
   }
   /**
    * 删除主题库分类
    * @param codeClassify 主题库分类数据传输对象,oid和ts需要传输
@@ -372,7 +377,6 @@
      return codeClassifyDO2VOs(codeClassifyDOList);
   }
   /**
    * 使用主键集合查询数据对象
    * @param oidCollections 主键的集合
@@ -392,7 +396,6 @@
      return  codeClassifyList;
   }
   /**
    * 批量数据对象转换为显示对象
    * @param codeClassifys 数据对象列表
@@ -677,6 +680,7 @@
      return excelName;
   }
   /**
    * 导入分类
    *
@@ -906,7 +910,7 @@
      condition.put("pkbtmtype",topClassifyVO.getBtmtypeid());
      List<CodeOsbtmtypeattributeEntity> unDefaultAttributes = codeOsbtmtypeattributeMapper.selectByMap(condition);
//    List<OsBtmTypeAttributeVO> unDefaultAttributes = btmService. (topClassifyVO.getBtmtypeid());
      // List<OsBtmTypeAttributeVO> unDefaultAttributes = btmService. (topClassifyVO.getBtmtypeid());
      List<CodeOsattributeVO> attributeVOS = new ArrayList<>();
      if(!CollectionUtils.isEmpty(unDefaultAttributes)){
         unDefaultAttributes.stream().forEach(attr->{
@@ -916,6 +920,7 @@
            attributeVO.setAttrlength(Short.valueOf(attr.getAttributelength()));
            attributeVO.setBtmtypeid(attr.getReferbtmtypeid());
            attributeVO.setBtmtypename(attr.getReferbtmtypename());
            attributeVO.setAttributedatatypetext(attr.getReferbtmtypename());
            boolean add = true;
            if(StringUtils.isNotBlank(id) && !attributeVO.getId().contains(id.replace("*",""))){
               add = false;
@@ -928,8 +933,8 @@
            }
         });
      }
//    if(!CollectionUtils.isEmpty(attributeService.getDefaultAttributeVOs())){
//       attributeService.getDefaultAttributeVOs().stream().forEach(attr->{
//    if(!CollectionUtils.isEmpty(codeOsattributeService.getDefaultAttributeVOs())){
//       codeOsattributeService.getDefaultAttributeVOs().stream().forEach(attr->{
//          boolean add = true;
//          if(StringUtils.isNotBlank(id) && !attr.getId().contains(id.replace("*",""))){
//             add = false;