xiejun
2023-06-15 694374bb1c6c08e3e79a65f575922e61c5c971fc
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeRuleServiceImpl.java
@@ -320,6 +320,21 @@
   }
   /**
    * 主键批量获取主数据编码规则
    *
    * @param oidCollections 主键集合,但是受性能影响,建议一次查询不超过10000个
    * @param hasSec         是否包含码段
    * @return 主数据编码规则显示对象
    * @throws VciBaseException 查询出现异常时会抛出
    */
   @Override
   public Collection<CodeRuleVO> listCodeRuleByIds(Collection<String> oidCollections, boolean hasSec) throws VciBaseException {
      VciBaseUtil.alertNotNull(oidCollections, "数据对象主键集合");
      List<CodeRule> codeRuleDOList = listCodeRuleDOByOidCollections(oidCollections);
      return codeRuleDO2VOs(codeRuleDOList, true);
   }
   /**
    * 使用主键集合查询数据对象
    *
    * @param oidCollections 主键的集合
@@ -438,6 +453,27 @@
   }
   /**
    * 批量数据对象转换为显示对象
    *
    * @param codeRules 数据对象列表
    * @param hasSec      是否包含码段
    * @return 显示对象
    * @throws VciBaseException 参数为空或者不存在的时候会抛出异常
    */
   public List<CodeRuleVO> codeRuleDO2VOs(Collection<CodeRule> codeRules, boolean hasSec) throws VciBaseException {
      List<CodeRuleVO> voList = new ArrayList<CodeRuleVO>();
      if (!CollectionUtils.isEmpty(codeRules)) {
         for (CodeRule s : codeRules) {
            CodeRuleVO vo = codeRuleDO2VO(s,true);
            if (vo != null) {
               voList.add(vo);
            }
         }
      }
      return voList;
   }
   /**
    * 数据对象转换为显示对象
    *
    * @param codeRuleDO 规则的数据对象