| | |
| | | } |
| | | |
| | | /** |
| | | * 主键批量获取主数据编码规则 |
| | | * |
| | | * @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 主键的集合 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 批量数据对象转换为显示对象 |
| | | * |
| | | * @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 规则的数据对象 |