ludc
2023-09-26 1707976c2f30199565c2ddbea0e2c33edd4688a9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vci.ubcs.code.mapper.SystemClassifyRoleMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="plSystemClassifyRoleMap" type="com.vci.ubcs.code.entity.SystemClassifyRole">
        <result column="OID" property="oid"/>
        <result column="REVISIONOID" property="revisionOid"/>
        <result column="NAMEOID" property="nameOid"/>
        <result column="BTMNAME" property="btmname"/>
        <result column="LASTR" property="lastR"/>
        <result column="FIRSTR" property="firstR"/>
        <result column="LASTV" property="lastV"/>
        <result column="FIRSTV" property="firstV"/>
        <result column="CREATOR" property="creator"/>
        <result column="CREATETIME" property="createTime"/>
        <result column="LASTMODIFIER" property="lastModifier"/>
        <result column="LASTMODIFYTIME" property="lastModifyTime"/>
        <result column="REVISIONRULE" property="revisionRule"/>
        <result column="VERSIONRULE" property="versionRule"/>
        <result column="REVISIONSEQ" property="revisionSeq"/>
        <result column="REVISIONVALUE" property="revisionValue"/>
        <result column="VERSIONSEQ" property="versionSeq"/>
        <result column="VERSIONVALUE" property="versionValue"/>
        <result column="LCTID" property="lctid"/>
        <result column="LCSTATUS" property="lcStatus"/>
        <result column="TS" property="ts"/>
        <result column="ID" property="id"/>
        <result column="NAME" property="name"/>
        <result column="DESCRIPTION" property="description"/>
        <result column="OWNER" property="owner"/>
        <result column="COPYFROMVERSION" property="copyFromVersion"/>
        <result column="TENANT_ID" property="tenantId"/>
        <result column="SYSTEMOID" property="systemOid"/>
        <result column="SYSTEMID" property="systemId"/>
        <result column="CLASSIFYOID" property="classifyOid"/>
        <result column="CLASSIFYID" property="classifyId"/>
        <result column="SELECTED" property="selected"/>
        <result column="CLASSPARENTOID" property="classParentOid"/>
    </resultMap>
    <select id="getListSystemClassifyRole" resultType="com.vci.ubcs.code.entity.SystemClassifyRole">
        select pc.OID,
               pc.REVISIONOID,
               pc.NAMEOID,
               pc.BTMNAME,
               pc.LASTR,
               pc.FIRSTR,
               pc.LASTV,
               pc.FIRSTV,
               pc.CREATOR,
               pc.CREATETIME,
               pc.LASTMODIFIER,
               pc.LASTMODIFYTIME,
               pc.REVISIONRULE,
               pc.VERSIONRULE,
               pc.REVISIONSEQ,
               pc.REVISIONVALUE,
               pc.VERSIONSEQ,
               pc.VERSIONVALUE,
               pc.LCTID,
               pc.LCSTATUS,
               pc.TS,
               pc.ID,
               p.NAME,
               pc.DESCRIPTION,
               pc.OWNER,
               pc.COPYFROMVERSION,
               pc.GROUPCODE,
               pc.TENANT_ID,
               pc.SYSTEMOID,
               pc.SYSTEMID,
               p.oid CLASSIFYOID,
               p.id CLASSIFYID,
               case when pc.selected is null then false when pc.selected = 0 then false else  pc.SELECTED end SELECTED,
               p.PARENTCODECLASSIFYOID CLASSPARENTOID
        from PL_CODE_CLASSIFY p ,
             PL_CODE_SYSTEM_CLASSIFY_ROLE pc
        where p.oid = pc.CLASSIFYOID(+)
          and '${systemOid}' = pc.SYSTEMOID(+)
          and '${systemId}' = pc.SYSTEMID(+)
    </select>
 
    <select id="getListClassifyRole" resultType="com.vci.ubcs.code.entity.CodeClassify">
        select *
        from PL_CODE_CLASSIFY
        where oid in( select classifyoid
                      from PL_CODE_SYSTEM_CLASSIFY_ROLE
                               start with classifyid = #{library}
            and SYSTEMID=#{systemId}
            and SYSTEMOID = #{systemOid}
        connect by prior classifyoid = classparentoid)
    </select>
 
</mapper>