ludc
2024-11-15 600c2ebb55b18d687ff848cb6c9d9a61b8bfa307
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java
@@ -345,7 +345,7 @@
     * @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);
@@ -1594,7 +1594,12 @@
                        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{