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
0729a724
Commit
0729a724
authored
Aug 22, 2025
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大屏综合统计-人员调整
parent
8c1b259e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
ComprehensiveStatisticalAnalysisServiceImpl.java
...ice/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
+8
-6
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 @
0729a724
...
@@ -3116,7 +3116,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -3116,7 +3116,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
.
should
(
QueryBuilders
.
matchQuery
(
"unitType"
,
UnitTypeEnum
.
azgzwxdw
.
getName
()))
.
should
(
QueryBuilders
.
matchQuery
(
"unitType"
,
UnitTypeEnum
.
azgzwxdw
.
getName
()))
.
should
(
QueryBuilders
.
matchQuery
(
"unitType"
,
UnitTypeEnum
.
czdw
.
getName
()))
.
should
(
QueryBuilders
.
matchQuery
(
"unitType"
,
UnitTypeEnum
.
czdw
.
getName
()))
.
minimumShouldMatch
(
1
);
.
minimumShouldMatch
(
1
);
result
=
getTotalAggMapsByUnitType
(
request
,
builder
,
boolMust
,
tabTotalMap
,
StatisticalAnalysisEnum
.
person
);
Map
<
String
,
Object
>
dats
=
getTotalAggMapsByUnitType
(
request
,
builder
,
boolMust
,
tabTotalMap
,
StatisticalAnalysisEnum
.
person
);
result
=
getUseAndProductAndFillingStatistics
(
dats
);
}
else
if
(!
is3LeveFlag
)
{
}
else
if
(!
is3LeveFlag
)
{
if
(
unitCategory
.
equals
(
UnitCategoryEnum
.
use
.
getCode
()))
{
if
(
unitCategory
.
equals
(
UnitCategoryEnum
.
use
.
getCode
()))
{
boolMust
.
should
(
QueryBuilders
.
matchQuery
(
"unitType"
,
UnitTypeEnum
.
sydw
.
getName
()))
boolMust
.
should
(
QueryBuilders
.
matchQuery
(
"unitType"
,
UnitTypeEnum
.
sydw
.
getName
()))
...
@@ -3155,6 +3156,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -3155,6 +3156,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
unitType
=
UnitTypeEnum
.
azgzwxdw
.
getName
();
unitType
=
UnitTypeEnum
.
azgzwxdw
.
getName
();
}
}
boolMust
.
must
(
QueryBuilders
.
wildcardQuery
(
"unitType.keyword"
,
"*"
+
unitType
+
"*"
));
boolMust
.
must
(
QueryBuilders
.
wildcardQuery
(
"unitType.keyword"
,
"*"
+
unitType
+
"*"
));
tabTotalMap
.
put
(
StatisticalAnalysisEnum
.
person
.
getCode
(),
this
.
queryDpStatisticsTotalByIndex
(
boolMust
,
StatisticalAnalysisEnum
.
person
.
getKey
()));
JSONObject
expiryDateStatus
=
this
.
getExpiryDateStatusGroupStatistics
(
boolMust
);
JSONObject
expiryDateStatus
=
this
.
getExpiryDateStatusGroupStatistics
(
boolMust
);
JSONObject
personType
=
this
.
getPersonTypeGroupStatistics
(
boolMust
);
JSONObject
personType
=
this
.
getPersonTypeGroupStatistics
(
boolMust
);
result
.
put
(
"tabTotalMap"
,
new
JSONObject
()
result
.
put
(
"tabTotalMap"
,
new
JSONObject
()
...
@@ -3169,6 +3171,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -3169,6 +3171,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
private
Map
<
String
,
Object
>
getTotalAggMapsByUnitType
(
SearchRequest
request
,
SearchSourceBuilder
builder
,
BoolQueryBuilder
boolMust
,
Map
<
String
,
Object
>
tabTotalMap
,
StatisticalAnalysisEnum
statisticalAnalysisEnum
)
{
private
Map
<
String
,
Object
>
getTotalAggMapsByUnitType
(
SearchRequest
request
,
SearchSourceBuilder
builder
,
BoolQueryBuilder
boolMust
,
Map
<
String
,
Object
>
tabTotalMap
,
StatisticalAnalysisEnum
statisticalAnalysisEnum
)
{
long
total
=
this
.
queryDpStatisticsTotalByIndex
(
boolMust
,
statisticalAnalysisEnum
.
getKey
());
long
total
=
this
.
queryDpStatisticsTotalByIndex
(
boolMust
,
statisticalAnalysisEnum
.
getKey
());
// 汇总总数
tabTotalMap
.
put
(
statisticalAnalysisEnum
.
getCode
(),
total
);
// 聚合查询
// 聚合查询
builder
.
size
(
0
);
// 不返回任何文档,只返回聚合结果
builder
.
size
(
0
);
// 不返回任何文档,只返回聚合结果
String
aggName
=
"unit_types_split"
;
String
aggName
=
"unit_types_split"
;
...
@@ -3185,8 +3189,6 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -3185,8 +3189,6 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
// 汇总总数
tabTotalMap
.
put
(
statisticalAnalysisEnum
.
getCode
(),
total
);
return
result
;
return
result
;
}
}
...
@@ -3269,7 +3271,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -3269,7 +3271,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
.
should
(
QueryBuilders
.
matchQuery
(
"unitType"
,
UnitTypeEnum
.
czdw
.
getName
()))
.
should
(
QueryBuilders
.
matchQuery
(
"unitType"
,
UnitTypeEnum
.
czdw
.
getName
()))
.
minimumShouldMatch
(
1
);
.
minimumShouldMatch
(
1
);
Map
<
String
,
Object
>
datas
=
getTotalAggMapsByUnitType
(
request
,
builder
,
boolMust
,
tabTotalMap
,
StatisticalAnalysisEnum
.
company
);
Map
<
String
,
Object
>
datas
=
getTotalAggMapsByUnitType
(
request
,
builder
,
boolMust
,
tabTotalMap
,
StatisticalAnalysisEnum
.
company
);
return
getUseAndProductAndFillingStatistics
(
datas
);
return
Collections
.
singletonList
(
getUseAndProductAndFillingStatistics
(
datas
)
);
}
else
if
(
is2LeveFlag
&&
!
is3LeveFlag
)
{
}
else
if
(
is2LeveFlag
&&
!
is3LeveFlag
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Long
companyCount
=
getStatisticCount
(
boolMust
,
StatisticalAnalysisEnum
.
company
.
getKey
());
Long
companyCount
=
getStatisticCount
(
boolMust
,
StatisticalAnalysisEnum
.
company
.
getKey
());
...
@@ -3387,7 +3389,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -3387,7 +3389,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
return
null
;
return
null
;
}
}
private
List
<
Map
<
String
,
Object
>
>
getUseAndProductAndFillingStatistics
(
Map
<
String
,
Object
>
datas
)
{
private
Map
<
String
,
Object
>
getUseAndProductAndFillingStatistics
(
Map
<
String
,
Object
>
datas
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Long
filling
=
0L
;
Long
filling
=
0L
;
Long
use
=
0L
;
Long
use
=
0L
;
...
@@ -3410,7 +3412,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -3410,7 +3412,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
result
.
put
(
"use"
,
use
);
result
.
put
(
"use"
,
use
);
result
.
put
(
"produce"
,
produce
);
result
.
put
(
"produce"
,
produce
);
result
.
put
(
"filling"
,
filling
);
result
.
put
(
"filling"
,
filling
);
return
Collections
.
singletonList
(
result
)
;
return
result
;
}
}
private
List
<
Map
<
String
,
Object
>>
queryDpEquipStatistics
(
JSONObject
filter
,
SearchRequest
request
,
SearchSourceBuilder
builder
,
BoolQueryBuilder
boolMust
,
Map
<
String
,
Object
>
tabTotalMap
)
{
private
List
<
Map
<
String
,
Object
>>
queryDpEquipStatistics
(
JSONObject
filter
,
SearchRequest
request
,
SearchSourceBuilder
builder
,
BoolQueryBuilder
boolMust
,
Map
<
String
,
Object
>
tabTotalMap
)
{
...
...
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