| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 使用主键获取编码规则的内容 |
| | | * |
| | | * @param oid 主键 |
| | | * @return 规则的显示对象 |
| | | */ |
| | | @Override |
| | | public CodeRuleVO getObjectHasSecByOid(String oid) { |
| | | CodeRule ruleDO = selectByOid(oid); |
| | | return codeRuleDO2VO(ruleDO, true); |
| | | } |
| | | |
| | | /** |
| | | * 数据对象转换为显示对象 |
| | | * |
| | | * @param codeRuleDO 规则的数据对象 |
| | | * @param hasSec 是否查询码段 |
| | | * @return 显示对象 |
| | | * @throws VciBaseException 拷贝属性出错的时候会抛出异常 |
| | | */ |
| | | public CodeRuleVO codeRuleDO2VO(CodeRule codeRuleDO, boolean hasSec) throws VciBaseException { |
| | | CodeRuleVO vo = new CodeRuleVO(); |
| | | if (codeRuleDO != null) { |
| | | BeanUtilForVCI.copyPropertiesIgnoreCase(codeRuleDO, vo); |
| | | //如果有lcstatus的类的话 |
| | | vo.setLcStatusText(CodeRuleLC.getTextByValue(vo.getLcStatus())); |
| | | if (hasSec) { |
| | | //查询码段 |
| | | vo.setSecVOList(codeBasicSecService.listCodeBasicSecByRuleOid(vo.getOid())); |
| | | } |
| | | } |
| | | return vo; |
| | | } |
| | | |
| | | } |