yuxc
2023-08-01 edb1fca3ed219065caaaa79f4964d4d81402148d
1、修改参照配置为false调用出错问题。
已修改1个文件
41 ■■■■■ 文件已修改
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -3672,6 +3672,47 @@
        } else {
            if (StringUtils.isNotBlank(referConfigVO.getParentFieldName()) && StringUtils.isNotBlank(queryObject.getParentOid())) {
                queryObject.getConditionMap().put(referConfigVO.getParentFieldName(), queryObject.getParentOid());
                //查询全部的信息
                String parentOidSql = "";
                if (StringUtils.isNotBlank(referConfigVO.getParentValue())) {
                    String temp = referConfigVO.getParentValue();
                    if (temp.startsWith(QueryOptionConstant.IN)) {
                        temp = temp.substring((QueryOptionConstant.IN).length()).trim();
                        parentOidSql = " in " + "('" + queryObject.getParentOid() + "')";
                    } else if (temp.startsWith(QueryOptionConstant.NOTIN)) {
                        parentOidSql = " not in " + "('" + queryObject.getParentOid() + "')";
                    } else if (temp.startsWith(QueryOptionConstant.NOTEQUAL)) {
                        temp = temp.substring((QueryOptionConstant.NOTEQUAL).length()).trim();
                        parentOidSql = QueryOptionConstant.NOTEQUAL + " " + ((temp.startsWith("'") && temp.endsWith("'")) ? temp : "'" + temp + "'");
                    } else if (temp.startsWith(QueryOptionConstant.MORETHAN)) {
                        temp = temp.substring((QueryOptionConstant.MORETHAN).length()).trim();
                        parentOidSql = QueryOptionConstant.MORETHAN + " " + ((temp.startsWith("'") && temp.endsWith("'")) ? temp : "'" + temp + "'");
                    } else if (temp.startsWith(QueryOptionConstant.MORE)) {
                        temp = temp.substring((QueryOptionConstant.MORE).length()).trim();
                        parentOidSql = QueryOptionConstant.MORE + " " + ((temp.startsWith("'") && temp.endsWith("'")) ? temp : "'" + temp + "'");
                    } else if (temp.startsWith(QueryOptionConstant.LESSTHAN)) {
                        temp = temp.substring((QueryOptionConstant.LESSTHAN).length()).trim();
                        parentOidSql = QueryOptionConstant.LESSTHAN + " " + ((temp.startsWith("'") && temp.endsWith("'")) ? temp : "'" + temp + "'");
                    } else if (temp.startsWith(QueryOptionConstant.LESS)) {
                        temp = temp.substring((QueryOptionConstant.LESS).length()).trim();
                        parentOidSql = QueryOptionConstant.LESS + " " + ((temp.startsWith("'") && temp.endsWith("'")) ? temp : "'" + temp + "'");
                    } else if (temp.startsWith(QueryOptionConstant.ISNOTNULL)) {
                        parentOidSql = " is not null";
                    } else if (temp.startsWith(QueryOptionConstant.ISNULL)) {
                        parentOidSql = " is  null";
                    } else if (temp.contains("*")) {
                        parentOidSql = " like " + ((temp.startsWith("'") && temp.endsWith("'")) ? temp : "'" + temp + "'").replace("*", "%");
                    } else {
                        parentOidSql = " = " + ((temp.startsWith("'") && temp.endsWith("'")) ? temp : "'" + temp + "'");
                    }
                }
                //查询全部的信息
                queryObject.getConditionMap().put("oid", QueryOptionConstant.IN + "(select oid from " +
                    getTableName(referConfigVO.getReferType()) +
                    " START WITH " + referConfigVO.getParentFieldName() + " " +
                    parentOidSql +
                    " CONNECT BY PRIOR " + oidFieldName + " = " + referConfigVO.getParentFieldName() + ")");
            }
        }
        LambdaQueryWrapper<CodeClassify> lqw = new LambdaQueryWrapper<>();