From aa3b56b8ab335277351f503b8d38e1a0a5fe7477 Mon Sep 17 00:00:00 2001 From: yuxc <653031404@qq.com> Date: 星期四, 14 九月 2023 18:28:51 +0800 Subject: [PATCH] 1、处理层级码段生成问题。 --- Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml index 4d6f43b..40dfb07 100644 --- a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml +++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml @@ -177,8 +177,14 @@ </select> <select id="selectAllLevelParentByOid" resultType="java.util.HashMap"> - select oid, - level from pl_code_classify start with oid= #{oid} connect by prior PARENTCODECLASSIFYOID = oid + select b.oid as oid,level from + pl_code_classify b + join (select oid + from pl_code_classify + start with oid = #{oid} + connect by oid = prior PARENTCODECLASSIFYOID) a on b.oid = a.OID + start with b.PARENTCODECLASSIFYOID is null + connect by prior b.oid = b.PARENTCODECLASSIFYOID </select> <select id="getIdPathToNamePathByParentId" resultMap="plCodeClassifyResultMap"> -- Gitblit v1.9.3