Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
5ccd0fdd
Commit
5ccd0fdd
authored
Jul 09, 2025
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(core): 移除不必要的existsQuery调用
parent
de6b8ad1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
7 deletions
+0
-7
ComprehensiveStatisticalAnalysisServiceImpl.java
...ice/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
+0
-7
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
View file @
5ccd0fdd
...
...
@@ -261,15 +261,12 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
if
(!((
JSONArray
)
v
).
contains
(
"all"
)
&&
((
JSONArray
)
v
).
size
()
>
0
)
{
String
field
=
k
;
if
(
k
.
equals
(
"newPost"
)
||
k
.
equals
(
"subPost"
)
||
k
.
equals
(
"equipType"
))
{
boolMust
.
must
(
existsQuery
(
field
));
EnhancedDynamicQueryBuilder
enhancedDynamicQueryBuilder
=
new
EnhancedDynamicQueryBuilder
();
((
JSONArray
)
v
).
forEach
(
item
->
enhancedDynamicQueryBuilder
.
add
(
QueryBuilders
.
wildcardQuery
(
field
,
"*"
+
item
+
"*"
),
or
));
boolMust
.
should
(
enhancedDynamicQueryBuilder
.
build
()).
minimumShouldMatch
(
1
);
}
else
if
(
k
.
equals
(
"unitType"
))
{
boolMust
.
must
(
existsQuery
(
field
));
((
JSONArray
)
v
).
forEach
(
item
->
boolMust
.
should
(
QueryBuilders
.
wildcardQuery
(
field
+
".keyword"
,
"*"
+
(
item
.
equals
(
"企业"
)
?
"使用单位"
:
item
)
+
"*"
)).
minimumShouldMatch
(
1
));
}
else
if
(
k
.
equals
(
"education"
))
{
boolMust
.
must
(
existsQuery
(
field
));
TermsQueryBuilder
termsQuery
=
QueryBuilders
.
termsQuery
(
field
,
(
JSONArray
)
v
);
boolMust
.
must
(
termsQuery
);
}
else
if
(
k
.
equals
(
"certNo"
)
||
k
.
equals
(
"expiryDate"
)
||
k
.
equals
(
"permissionLevel"
)
||
k
.
equals
(
"certType"
)
||
k
.
equals
(
"jobItem"
)
||
k
.
equals
(
"permissionItem"
))
{
...
...
@@ -518,10 +515,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
if
(!((
JSONArray
)
v
).
contains
(
"all"
)
&&
((
JSONArray
)
v
).
size
()
>
0
)
{
String
field
=
k
;
if
(
k
.
equals
(
"regulatoryLabels"
)
||
k
.
equals
(
"equipCategory"
)
||
k
.
equals
(
"unitType"
))
{
boolMust
.
must
(
existsQuery
(
field
));
((
JSONArray
)
v
).
forEach
(
item
->
boolMust
.
should
(
QueryBuilders
.
wildcardQuery
(
field
+
".keyword"
,
"*"
+
(
item
.
equals
(
"企业"
)
?
"使用单位"
:
item
)
+
"*"
)).
minimumShouldMatch
(
1
));
}
else
if
(
k
.
equals
(
"industrySupervisor"
)
||
k
.
equals
(
"operatingStatus"
))
{
boolMust
.
must
(
existsQuery
(
field
));
TermsQueryBuilder
termsQuery
=
QueryBuilders
.
termsQuery
(
field
+
".keyword"
,
((
JSONArray
)
v
).
get
(
0
));
boolMust
.
must
(
termsQuery
);
}
else
if
(
k
.
equals
(
"itemCode"
)
||
k
.
equals
(
"subItemCode"
)
||
k
.
equals
(
"permitStatus"
))
{
...
...
@@ -711,7 +706,6 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
String
field
=
k
;
if
(
k
.
equals
(
"NEXT_INSPECT_DATE"
))
{
String
finalField
=
field
;
boolMust
.
must
(
existsQuery
(
finalField
));
EnhancedDynamicQueryBuilder
queryBuilder
=
new
EnhancedDynamicQueryBuilder
();
((
JSONArray
)
v
).
forEach
(
item
->
{
if
(
item
.
equals
(
"overdue"
))
{
...
...
@@ -762,7 +756,6 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
}
else
if
(
k
.
equals
(
"EQU_DEFINE"
))
{
field
=
"EQU_DEFINE_CODE"
;
}
boolMust
.
must
(
existsQuery
(
field
));
TermsQueryBuilder
termsQuery
=
QueryBuilders
.
termsQuery
(
field
,
(
JSONArray
)
v
);
boolMust
.
must
(
termsQuery
);
}
else
if
(
k
.
equals
(
"JDJY"
)
||
k
.
equals
(
"DQJY"
)
||
k
.
equals
(
"SCJY"
)
||
k
.
equals
(
"DTJY"
))
{
...
...
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