版本规则增加查看应用范围,以及元数据查看应用范围的接口修正
| | |
| | | revisionRuleService.batchDelete(revisionRuleVOList); |
| | | return R.status(true); |
| | | } |
| | | |
| | | /** |
| | | * 查看使用范围 |
| | | * @param id 版本规则id |
| | | * @return 执行结果 |
| | | */ |
| | | @GetMapping("/get-apply-range") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "版本规则id",notes = "传入id") |
| | | public R getApplyRange(String id){ |
| | | return R.data(revisionRuleService.getApplyRange(id)); |
| | | } |
| | | } |
| | |
| | | */ |
| | | IPage<RevisionRuleVO> pageQueryVO(BaseQueryObject baseQueryObject) throws VciBaseException; |
| | | |
| | | /** |
| | | * 查看应用范围 |
| | | * @param id id |
| | | * @return 执行结果 |
| | | */ |
| | | List<BtmTypeVO> getApplyRange(String id); |
| | | } |
| | |
| | | @Override |
| | | public List<BtmTypeVO> applyRange(String oid) { |
| | | List<BtmType> btmTypes = baseMapper.selectApplyRange(oid); |
| | | if (!CollectionUtils.isEmpty(btmTypes)){ |
| | | return btmTypes.stream().map(btm -> { |
| | | BtmTypeVO vo = new BtmTypeVO(); |
| | | vo.setId(btm.getId()); |
| | | vo.setName(btm.getName()); |
| | | return vo; |
| | | }).collect(Collectors.toList()); |
| | | if (CollectionUtils.isEmpty(btmTypes)){ |
| | | return null; |
| | | } |
| | | return null; |
| | | return BtmTypeWrapper.build().listEntityVO(btmTypes); |
| | | } |
| | | |
| | | /** |
| | |
| | | }else { |
| | | throw new VciBaseException("领域名称不符合规则"); |
| | | } |
| | | return PL + StringPool.UNDERSCORE + domain + StringPool.UNDERSCORE + id; |
| | | return PL + StringPool.UNDERSCORE + domain.toUpperCase(Locale.ROOT) + StringPool.UNDERSCORE + id.toUpperCase(Locale.ROOT); |
| | | } |
| | | |
| | | /** |
| | |
| | | beanMap.putAll(conditionMap); |
| | | return RevisionRuleWrapper.build().pageVO(baseMapper.selectPage(Condition.getPage(query),Condition.getQueryWrapper(queryConditionObj).lambda().orderByAsc(RevisionRule::getId))); |
| | | } |
| | | |
| | | /** |
| | | * 查看应用范围 |
| | | * |
| | | * @param id id |
| | | * @return 执行结果 |
| | | */ |
| | | @Override |
| | | public List<BtmTypeVO> getApplyRange(String id) { |
| | | VciBaseUtil.alertNotNull(id,"版本规则英文名称"); |
| | | return BtmTypeWrapper.build().listEntityVO(btmTypeMapper.selectList(Wrappers.<BtmType>query().lambda().eq(BtmType::getRevisionRuleId,id))); |
| | | } |
| | | } |
| | |
| | | }); |
| | | vo.setFromBtmTypes(fromBtm); |
| | | vo.setToBtmTypes(toBtm); |
| | | vo.setTableName(vo.getTableName().toUpperCase(Locale.ROOT)); |
| | | // 枚举处理 |
| | | vo.setDomainText(NewAppConstantEnum.getTextByName(vo.getDomain())); |
| | | return vo; |
| | |
| | | </select> |
| | | <select id="selectApplyRange" resultType="com.vci.ubcs.omd.entity.BtmType"> |
| | | select |
| | | btm.name, |
| | | btm.ID |
| | | btm.* |
| | | from pl_omd_btm_type btm |
| | | join pl_omd_btm_type_attribute btmAttr on btmAttr.pk_btm_type = btm.oid |
| | | join <include refid="tableName"/> attr on attr.id = btmAttr.id |