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
a5491e49
Commit
a5491e49
authored
Jul 16, 2025
by
hcing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:统计服务,大屏综合统计查询接口
parent
7c5e2b8a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
1 deletion
+30
-1
ComprehensiveStatisticalAnalysisServiceImpl.java
...ice/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
+30
-1
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 @
a5491e49
...
...
@@ -2962,6 +2962,16 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
String
path
=
"licenses"
;
String
nestedField
=
path
+
".expiryDate"
;
// 不需要资质的人员查询构造条件
BoolQueryBuilder
notNeedLicensesQueryBuilder
=
QueryBuilders
.
boolQuery
()
.
mustNot
(
QueryBuilders
.
wildcardQuery
(
"newPost"
,
"*66151*"
))
.
mustNot
(
QueryBuilders
.
wildcardQuery
(
"newPost"
,
"*66152*"
))
.
mustNot
(
QueryBuilders
.
wildcardQuery
(
"newPost"
,
"*6552*"
))
.
mustNot
(
QueryBuilders
.
wildcardQuery
(
"newPost"
,
"*6763*"
))
.
mustNot
(
QueryBuilders
.
wildcardQuery
(
"subPost"
,
"*6713*"
))
.
mustNot
(
QueryBuilders
.
wildcardQuery
(
"subPost"
,
"*6764*"
))
.
mustNot
(
QueryBuilders
.
wildcardQuery
(
"subPost"
,
"*6765*"
));
// 资质正常
BoolQueryBuilder
normalBoolQuery
=
QueryBuilderUtils
.
copyBoolQuery
(
boolQuery
);
NestedQueryBuilder
normalNestedQuery
=
QueryBuilders
.
nestedQuery
(
...
...
@@ -2970,6 +2980,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
ScoreMode
.
None
);
normalBoolQuery
.
must
(
normalNestedQuery
);
normalBoolQuery
.
must
(
notNeedLicensesQueryBuilder
);
Long
normalCount
=
getStatisticCount
(
normalBoolQuery
,
StatisticalAnalysisEnum
.
person
.
getKey
());
result
.
put
(
"zzzc"
,
normalCount
);
...
...
@@ -2981,6 +2992,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
ScoreMode
.
None
);
nearBoolQuery
.
must
(
nearNestedQuery
);
nearBoolQuery
.
must
(
notNeedLicensesQueryBuilder
);
Long
nearCount
=
getStatisticCount
(
nearBoolQuery
,
StatisticalAnalysisEnum
.
person
.
getKey
());
result
.
put
(
"zzlq"
,
nearCount
);
...
...
@@ -2992,6 +3004,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
ScoreMode
.
None
);
overBoolQuery
.
must
(
overNestedQuery
);
overBoolQuery
.
must
(
notNeedLicensesQueryBuilder
);
Long
overCount
=
getStatisticCount
(
overBoolQuery
,
StatisticalAnalysisEnum
.
person
.
getKey
());
result
.
put
(
"zzcq"
,
overCount
);
...
...
@@ -3003,10 +3016,11 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
ScoreMode
.
None
);
nothingBoolQuery
.
must
(
nothingNestedQuery
);
nothingBoolQuery
.
must
(
notNeedLicensesQueryBuilder
);
Long
nothingCount
=
getStatisticCount
(
nothingBoolQuery
,
StatisticalAnalysisEnum
.
person
.
getKey
());
result
.
put
(
"wyxq"
,
nothingCount
);
// 无资质
// 无资质
: 需要资质的人员没有资质的情况
BoolQueryBuilder
notLicensesBoolQuery
=
QueryBuilderUtils
.
copyBoolQuery
(
boolQuery
);
DynamicQueryBuilder
mainBuilder
=
new
DynamicQueryBuilder
();
...
...
@@ -3035,6 +3049,21 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
notLicensesBoolQuery
.
must
(
mainBuilder
.
build
());
Long
otLicensesCount
=
getStatisticCount
(
notLicensesBoolQuery
,
StatisticalAnalysisEnum
.
person
.
getKey
());
result
.
put
(
"wzz"
,
otLicensesCount
);
// 无资质要求查询
BoolQueryBuilder
notNeedLicensesBoolQuery
=
QueryBuilderUtils
.
copyBoolQuery
(
boolQuery
);
DynamicQueryBuilder
mainBuilderNotNeed
=
new
DynamicQueryBuilder
();
EnhancedDynamicQueryBuilder
dynamicQueryBuilder
=
new
EnhancedDynamicQueryBuilder
();
EnhancedDynamicQueryBuilder
notNeedLicensesQuery
=
new
EnhancedDynamicQueryBuilder
();
notNeedLicensesQuery
.
add
(
notNeedLicensesQueryBuilder
,
and
);
dynamicQueryBuilder
.
add
(
notNeedLicensesQuery
.
build
(),
"AND"
);
mainBuilderNotNeed
.
and
(
dynamicQueryBuilder
.
build
());
notNeedLicensesBoolQuery
.
must
(
mainBuilderNotNeed
.
build
());
Long
notNeedLicensesCount
=
getStatisticCount
(
notNeedLicensesBoolQuery
,
StatisticalAnalysisEnum
.
person
.
getKey
());
result
.
put
(
"wzzyq"
,
notNeedLicensesCount
);
return
result
;
}
...
...
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