Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tagManager
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanmw
tagManager
Commits
b21d0483
Commit
b21d0483
authored
Jan 10, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改获取个人标签树接口
parent
1bc70a96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
TagService.java
...ain/java/com/keymobile/tagmanager/service/TagService.java
+14
-12
No files found.
src/main/java/com/keymobile/tagmanager/service/TagService.java
View file @
b21d0483
...
@@ -404,19 +404,20 @@ public class TagService {
...
@@ -404,19 +404,20 @@ public class TagService {
//拼接查找个人标签条件
//拼接查找个人标签条件
private
Query
createNewPersonalTagQuery
(
String
userId
,
List
<
String
>
orgIds
,
private
Query
createNewPersonalTagQuery
(
String
userId
,
List
<
String
>
orgIds
,
List
<
String
>
companyOrgIdList
)
{
List
<
String
>
companyOrgIdList
)
{
Criteria
criteria
=
new
Criteria
();
Criteria
criteria
=
Criteria
.
where
(
"tagType"
).
is
(
"1"
);
//获取自定义标签
Criteria
criteriaOr
=
new
Criteria
();
for
(
String
companyOrgId
:
companyOrgIdList
)
{
for
(
String
companyOrgId
:
companyOrgIdList
)
{
Criteria
criteriaDim
=
Criteria
.
where
(
"proDept"
).
is
(
companyOrgId
)
Criteria
criteriaDim
=
Criteria
.
where
(
"proDept"
).
is
(
companyOrgId
)
.
and
(
"dimensionType"
).
is
(
Constants
.
TAG_DIMENSION_TRUE
);
//标签是维度管理员机构的
.
and
(
"dimensionType"
).
is
(
Constants
.
TAG_DIMENSION_TRUE
);
//标签是维度管理员机构的
Criteria
criteriaShare
=
Criteria
.
where
(
"proDept"
).
is
(
companyOrgId
)
Criteria
criteriaShare
=
Criteria
.
where
(
"proDept"
).
is
(
companyOrgId
)
.
and
(
"isOpen"
).
is
(
Constants
.
TAG_OPEN_STATUS
);
//公司机构id是companyId和是共享状态的
.
and
(
"isOpen"
).
is
(
Constants
.
TAG_OPEN_STATUS
);
//公司机构id是companyId和是共享状态的
criteria
.
orOperator
(
criteriaDim
,
criteriaShare
);
criteria
Or
.
orOperator
(
criteriaDim
,
criteriaShare
);
}
}
for
(
String
orgId
:
orgIds
)
{
for
(
String
orgId
:
orgIds
)
{
Criteria
criteriaUser
=
Criteria
.
where
(
"dept"
).
is
(
orgId
).
and
(
"tagUser"
).
is
(
userId
);
Criteria
criteriaUser
=
Criteria
.
where
(
"dept"
).
is
(
orgId
).
and
(
"tagUser"
).
is
(
userId
);
criteria
.
orOperator
(
criteriaUser
);
criteria
Or
.
orOperator
(
criteriaUser
);
}
}
criteria
.
and
(
"tagType"
).
is
(
"1"
);
//获取自定义标签
criteria
.
and
Operator
(
criteriaOr
);
return
Query
.
query
(
criteria
)
return
Query
.
query
(
criteria
)
.
with
(
Sort
.
by
(
getDefaultTagOrders
()));
.
with
(
Sort
.
by
(
getDefaultTagOrders
()));
}
}
...
@@ -489,24 +490,25 @@ public class TagService {
...
@@ -489,24 +490,25 @@ public class TagService {
//拼接个人标签查询条件
//拼接个人标签查询条件
private
Criteria
createPersonalTagCriteria
(
String
userName
,
List
<
String
>
orgIds
,
private
Criteria
createPersonalTagCriteria
(
String
userName
,
List
<
String
>
orgIds
,
List
<
String
>
companyOrgIdList
,
String
path
)
throws
TagNotExistException
{
List
<
String
>
companyOrgIdList
,
String
path
)
throws
TagNotExistException
{
Criteria
criteria
=
Criteria
.
where
(
"tagType"
).
is
(
Constants
.
TAG_PERSONAL_TYPE
);
Criteria
criteriaOr
=
new
Criteria
();
Criteria
criteriaOr
=
new
Criteria
();
for
(
String
orgId
:
orgIds
)
{
for
(
String
orgId
:
orgIds
)
{
Criteria
criteria
=
Criteria
.
where
(
"tagType"
).
is
(
Constants
.
TAG_PERSONAL_TYPE
)
Criteria
criteriaUser
=
Criteria
.
where
(
"dept"
).
is
(
orgId
).
and
(
"tagUser"
).
is
(
userName
);
.
and
(
"dept"
).
is
(
orgId
).
and
(
"tagUser"
).
is
(
userName
);
if
(
StringUtils
.
isNotBlank
(
path
))
{
if
(
StringUtils
.
isNotBlank
(
path
))
{
criteria
.
and
(
"path"
).
regex
(
"^"
+
path
);
criteria
User
.
and
(
"path"
).
regex
(
"^"
+
path
);
}
}
criteriaOr
.
orOperator
(
criteria
);
criteriaOr
.
orOperator
(
criteria
User
);
}
}
for
(
String
companyOrgId
:
companyOrgIdList
)
{
for
(
String
companyOrgId
:
companyOrgIdList
)
{
Criteria
criteria
=
Criteria
.
where
(
"proDept"
).
is
(
companyOrgId
)
Criteria
criteria
User
=
Criteria
.
where
(
"proDept"
).
is
(
companyOrgId
)
.
and
(
"isOpen"
).
is
(
Constants
.
TAG_OPEN_STATUS
);
.
and
(
"isOpen"
).
is
(
Constants
.
TAG_OPEN_STATUS
);
if
(
StringUtils
.
isNotBlank
(
path
))
{
if
(
StringUtils
.
isNotBlank
(
path
))
{
criteria
.
and
(
"path"
).
regex
(
"^"
+
path
);
criteria
User
.
and
(
"path"
).
regex
(
"^"
+
path
);
}
}
criteriaOr
.
orOperator
(
criteria
);
criteriaOr
.
orOperator
(
criteria
User
);
}
}
return
criteriaOr
;
criteria
.
andOperator
(
criteriaOr
);
return
criteria
;
}
}
//拼接查询当前系统标签子标签条件
//拼接查询当前系统标签子标签条件
private
List
<
Tag
>
getSystemSubTag
(
Tag
parentTag
)
{
private
List
<
Tag
>
getSystemSubTag
(
Tag
parentTag
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment