From 778cde15e534dcb350f1354de6ebae88f279414e Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期五, 08 三月 2024 10:15:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml | 42 ++++++++++++++++++++++++++++--------------
1 files changed, 28 insertions(+), 14 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 044e2b9..3af89eb 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
@@ -108,7 +108,7 @@
<where>
1=1
<if test="oid != null and oid != ''">
- and codeclassify0.parentcodeclassifyoid = ${oid}
+ and codeclassify0.parentcodeclassifyoid = ${oid}
</if>
<if test="oid = null">
and codeclassify0.parentcodeclassifyoid is null
@@ -117,7 +117,7 @@
and codeclassify0.tenant_id = #{tenantId}
</if>
</where>
- order by lastmodifytime asc
+ order by id asc
</select>
<select id="selectAllLevelChildHasPath" resultMap="plCodeClassifyResultMap">
@@ -320,20 +320,13 @@
left join pl_code_resemblerule coderesembleruleoid
on codeclassify0.codeResembleRuleOid = coderesembleruleoid.oid
where codeclassify0.lcstatus = #{lcstatus}
- and codeclassify0.parentcodeclassifyoid = (
- SELECT
- OID
- FROM
- PL_CODE_CLASSIFY
- WHERE
- parentcodeclassifyoid IS NULL
- AND id = #{id}
- )
- or codeclassify0.parentcodeclassifyoid IS NULL
- and codeclassify0.id = #{id}
<if test="tenantId != null and tenantId != ''">
- and codeclassify0.tenant_id = #{tenantId}
+ AND codeclassify0.tenant_id = #{tenantId}
</if>
+ START WITH
+ codeclassify0.ID = #{id}
+ CONNECT BY
+ PRIOR codeclassify0.OID = codeclassify0.parentCodeClassifyOid
order by id asc
</select>
@@ -612,5 +605,26 @@
and oid != #{currentOid}
</select>
+ <!--鏍规嵁椤跺眰鑺傜偣oid鏌ヨ鎵�鏈夊彾瀛愯妭鐐瑰垎绫籵id-->
+ <select id="selectLeafByPid" resultType="com.vci.ubcs.code.entity.CodeClassify">
+ select *
+ from (
+ select
+ oid,
+ name,
+ id,
+ level lvl,
+ isparticipatecheck,
+ nvl((select 'N'
+ from PL_CODE_CLASSIFY pcc1
+ where pcc.oid = pcc1.PARENTCODECLASSIFYOID
+ and rownum < 2),'Y') is_leaf
+ from PL_CODE_CLASSIFY pcc
+ start with pcc.oid = #{pid}
+ connect by pcc.PARENTCODECLASSIFYOID = prior oid
+ ) plcls
+ where
+ is_leaf = 'Y'
+ </select>
</mapper>
--
Gitblit v1.9.3