ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?xml version="1.0" encoding="UTF-8"?>
<Data>
    <QueryTemplate id="queryLink" type="link">
    <!-- id: 查询模板的唯一标识; type: 查询模板的类型, 类型分为link和btm-->
        <clauseList>*</clauseList>
        <!-- clauseList: 查询列, *代表所有列 -->
        <linkType>DocumentRelation</linkType>
        <!-- linkType: 查询的链接类型, 只在查询模板的类型为link时需要设置 -->
        <btmType>Document</btmType>
        <!-- btmType: 查询的业务类型, 查询模板的类型为link时: btmType可设置为*用来查询link关联的所有业务类型,
                        也可以不设置只查询link类型; 查询模板的类型为btm时: 必须设置业务类型-->
        <version>2</version>
        <!-- version: 查询对象的版本版次条件限制, 查询模板的类型为link时:
             正向查询: 1: 当前版本当前版次; 2: 当前版本最新版次; 3: 最新版本最新版次;
             反向查询: 4: 当前版次; 5: 当前版本; 6: 当前命名对象;
             查询模板的类型为btm时: 3: 最新版本最新版次;-->
        <levelRec>10</levelRec>
        <!-- levelRec: 递归查询的层数, 只在查询模板的类型为link时需要设置 -->
        <direction>positive</direction>
        <!-- direction: link查询的方向, positive: 正向查询; opposite: 反向查询 -->
        <pageInfo>
        <!-- pageInfo: 分页设置 -->
            <pageNO>1</pageNO>
            <!-- pageNO: 查询的页码 -->
            <rowCount>100</rowCount>
            <!-- rowCount: 分页的大小 -->
        </pageInfo>
        <orderInfos>
        <!-- orderInfos: 排序设置 -->
            <orderInfo>
            <!-- orderInfo: 一个属性的排序设置 -->
                <orderField>linkAttr1</orderField>
                <!-- orderField: 排序属性 , 查询模板的类型为link, 且设置了btmType时,
                             可以用btmType的属性排序, 正向查询加前缀'T_OID.',反向查询加前缀'F_OID.',
                            如:T_OID.btmAttr1-->
                <orderMode>DESC</orderMode>
                <!-- orderMode: 排序方式, DESC: 降序; ASC: 升序 -->
                <level>2</level>
                <!-- level: 排序优先级, 数值越大优先级越高 -->
            </orderInfo>
            <orderInfo>
                <orderField>T_OID.btmAttr1</orderField>
                <orderMode>ASC</orderMode>
                <level>5</level>
            </orderInfo>
        </orderInfos>
        <condition rootCIName="ci3">
        <!-- condition: 查询条件; rootCIName: 查询条件根节点的id -->
            <conditionItem id="ci1">
            <!-- conditionItem: 一个查询条件节点; id: 查询条件节点的id -->
                <leafFlag>true</leafFlag>
                <!-- leafFlag: 是否是叶子节点 -->
                <leafInfo>
                <!-- leafInfo: 叶子节点信息 -->
                    <clause>linkAttr2</clause>
                    <!-- clause: 作为查询条件的属性 , 查询模板的类型为link, 且设置了btmType时,
                             可以用btmType的属性作为查询条件, 正向查询加前缀'T_OID.',反向查询加前缀'F_OID.',
                            如:T_OID.btmAttr2-->
                    <operator>=</operator>
                    <!-- operator: 查询条件的操作符 -->
                    <Value>
                    <!-- Value: 查询条件的值 -->
                        <ordinaryValue>abc</ordinaryValue>
                        <!-- ordinaryValue: 查询条件的普通值 -->
                        <refQT />
                    </Value>
                </leafInfo>
            </conditionItem>
            <conditionItem id="ci2">
                <leafFlag>true</leafFlag>
                <leafInfo>
                    <clause>T_OID.btmAttr2</clause>
                    <operator>in</operator>
                    <Value>
                        <ordinaryValue />
                        <refQT>queryBtm</refQT>
                        <!-- refQT: 查询条件的值为另一个查询模板的查询结果(嵌套查询) -->
                    </Value>
                </leafInfo>
            </conditionItem>
            <conditionItem id="ci3">
                <leafFlag>false</leafFlag>
                <childrenInfo>
                <!-- childrenInfo: 查询节点的子节点信息 -->
                    <left>ci1</left>
                    <!-- left: 查询节点的左子节点id-->
                    <right>ci2</right>
                    <!-- right: 查询节点的右子节点id-->
                    <connector>and</connector>
                    <!-- connector: 查询节点的子节点的逻辑连接符 -->
                </childrenInfo>
            </conditionItem>
        </condition>
    </QueryTemplate>
    <QueryTemplate id="queryBtm" type="btm">
        <clauseList>btmAttr2</clauseList>
        <btmType>Document</btmType>
        <queryChildrenFlag>false</queryChildrenFlag>
        <version>3</version>
        <levelRec>1</levelRec>
        <condition rootCIName="ci1_">
            <conditionItem id="ci1_">
                <leafFlag>true</leafFlag>
                <leafInfo>
                    <clause>btmAttr3</clause>
                    <operator>like</operator>
                    <Value>
                        <ordinaryValue>abc</ordinaryValue>
                        <refQT />
                    </Value>
                </leafInfo>
            </conditionItem>
        </condition>
    </QueryTemplate>
</Data>