| | |
| | | vo.setDelimiter(btmItem.delimiter); |
| | | vo.setfName(btmItem.fName); |
| | | vo.setVersionRule(String.valueOf(btmItem.verRuleName)); |
| | | if (StringUtils.isNotBlank(vo.getRevisionRuleName()) || vo.isInputRevisionFlag()) { |
| | | if (StringUtils.isNotBlank(vo.getRevisionRuleId()) || vo.isInputRevisionFlag()) { |
| | | vo.setRevisionFlag(true); |
| | | } |
| | | vo.setLifeCycleIds(Arrays.stream(btmItem.lifeCycles).collect(Collectors.joining(","))); |
| | |
| | | } |
| | | return self.selectAllBtmMap().getOrDefault(id.toLowerCase(), null); |
| | | } |
| | | |
| | | /** |
| | | * 使用类型名获取业务类型,查不到直接报错 |
| | | * @param btmName 类型名 |
| | | * @return 业务类型 |
| | | * @throws |
| | | */ |
| | | @Override |
| | | public OsBtmTypeVO getBtmByName(String btmName) throws PLException{ |
| | | if(Func.isBlank(btmName)){ |
| | | throw new PLException("500",new String[]{"查询条件类型名不能为空!"}); |
| | | } |
| | | BizType bizType = platformClientUtil.getBtmService().getBizTypeByName(btmName); |
| | | if(Func.isEmpty(bizType) || Func.isBlank(bizType.oid)){ |
| | | throw new PLException("500",new String[]{"根据【"+btmName+"】未查询到对应业务类型!"}); |
| | | } |
| | | return btmDO2VO(bizType,null); |
| | | } |
| | | |
| | | /** |
| | | * 使用编号获取业务类型 |
| | | * |
| | |
| | | if (attrVOs == null) { |
| | | attrVOs = new ArrayList<>(); |
| | | } |
| | | if (!CollectionUtils.isEmpty(attributeService.getDefaultAttributeVOs())) { |
| | | List<OsAttributeVO> defaultAttributeVOs = attributeService.getDefaultAttributeVOs(); |
| | | if (!CollectionUtils.isEmpty(defaultAttributeVOs)) { |
| | | List<OsBtmTypeAttributeVO> finalAttrVOs = attrVOs; |
| | | attributeService.getDefaultAttributeVOs().stream().forEach(attr -> { |
| | | defaultAttributeVOs.stream().forEach(attr -> { |
| | | OsBtmTypeAttributeVO attributeVO = new OsBtmTypeAttributeVO(); |
| | | BeanUtil.convert(attr, attributeVO); |
| | | attributeVO.setAttributeDataType(attr.getAttributeDataType()); |