| | |
| | | * @throws VciBaseException 查询出错的时候会抛出异常 |
| | | */ |
| | | @Override |
| | | public List<Tree> getDataForTree(UITreeQuery treeQuery) throws VciBaseException { |
| | | public List<Tree> getDataForTree(UITreeQuery treeQuery) throws VciBaseException, PLException { |
| | | VciBaseUtil.alertNotNull(treeQuery,"表单的查询对象",treeQuery.getBtmname(),"业务类型的信息",treeQuery.getComponentOid(),"树所在的组件的主键"); |
| | | Map<String, OsAttributeVO> attributeVOMap = attrService.selectAllAttributeMap(); |
| | | UIComponentVO componentVO = uiEngineService.getComponentByOid(treeQuery.getComponentOid(),attributeVOMap); |
| | |
| | | conditionMap.put(usedAttributeVO.getId(),QueryOptionConstant.IN + "(" + VciBaseUtil.toInSql(oids.toArray(new String[0])) + ")"); |
| | | if(StringUtils.isNotBlank(usedAttributeVO.getPkBtmType())) { |
| | | if (boService.queryCount(usedAttributeVO.getPkBtmType(), conditionMap) > 0) { |
| | | OsBtmTypeVO btmTypeVO = btmService.getBtmById(usedAttributeVO.getPkBtmType()); |
| | | OsBtmTypeVO btmTypeVO = null; |
| | | try { |
| | | btmTypeVO = btmService.getBtmById(usedAttributeVO.getPkBtmType()); |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | throw new VciBaseException("数据在【" + btmTypeVO.getName() + "】中的字段[" + usedAttributeVO.getName() + "]里被引用.不能删除"); |
| | | } |
| | | }else{ |