From c2c0c9370a72d253c624ff11d630d27c9cd0040d Mon Sep 17 00:00:00 2001 From: ludc Date: 星期一, 09 十月 2023 15:34:25 +0800 Subject: [PATCH] 主数据排序改为按id排序 --- Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 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 69dba1b..876b2c9 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"> @@ -265,7 +271,7 @@ </select> <select id="selectCodeClassifyDOByTree" resultMap="plCodeClassifyResultMap"> - select codeclassify0.OWNER as owner, + select codeclassify0.OWNER as owner, codeclassify0.BTMTYPEID as btmtypeid, codeclassify0.CREATOR as creator, codeclassify0.CREATETIME as createtime, @@ -306,7 +312,7 @@ <if test="tenantId != null and tenantId != ''"> and codeclassify0.tenant_id = #{tenantId} </if> - order by lastmodifytime desc + order by id asc </select> <select id="selectClassifyByKeyAndReseRel" resultMap="plCodeClassifyResultMap"> @@ -510,4 +516,11 @@ </foreach> ;END; </update> + + <select id="selectAllParents" resultMap="plCodeClassifyResultMap"> + select * from PL_CODE_CLASSIFY p + start with p.OID =#{oid} + connect by p.oid = prior p.PARENTCODECLASSIFYOID + </select> + </mapper> -- Gitblit v1.9.3