Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c678d93e
authored
Oct 31, 2023
by
huangjinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:组织结构过滤查询
1 parent
a569e4f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/DispatchServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/DispatchServiceImpl.java
View file @
c678d93
...
...
@@ -518,13 +518,11 @@ public class DispatchServiceImpl implements DispatchService {
if
(
ListUtils
.
isNotEmpty
(
reqDTO
.
getGroupCategory
()))
{
Subquery
<
OrderInfoEntity
>
skillGroupCategorySubquery
=
criteriaQuery
.
subquery
(
OrderInfoEntity
.
class
);
Root
<
SkillInfoEntity
>
skillInfoRoot
=
skillGroupCategorySubquery
.
from
(
SkillInfo
Entity
.
class
);
Root
<
OrgGroupEntity
>
orgGroupEntityRoot
=
skillGroupCategorySubquery
.
from
(
OrgGroup
Entity
.
class
);
skillGroupCategorySubquery
.
select
(
root
)
// 注意这里的 select 使用主查询的 root
.
where
(
criteriaBuilder
.
equal
(
skillInfoRoot
.
get
(
"brand"
),
root
.
get
(
"brand"
)),
criteriaBuilder
.
equal
(
skillInfoRoot
.
get
(
"type"
),
root
.
get
(
"type"
)),
criteriaBuilder
.
equal
(
skillInfoRoot
.
get
(
"skill"
),
root
.
get
(
"skill"
)),
skillInfoRoot
.
get
(
"groupCategory"
).
in
(
reqDTO
.
getGroupCategory
())
criteriaBuilder
.
equal
(
orgGroupEntityRoot
.
get
(
"groupId"
),
root
.
get
(
"orgGroupId"
)),
orgGroupEntityRoot
.
get
(
"category"
).
in
(
reqDTO
.
getGroupCategory
())
);
predicates
.
add
(
criteriaBuilder
.
exists
(
skillGroupCategorySubquery
));
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment