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
bb7934ec
Commit
bb7934ec
authored
Aug 28, 2025
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
190a9f00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
37 deletions
+27
-37
ComprehensiveStatisticalAnalysisServiceImpl.java
...ice/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
+27
-37
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 @
bb7934ec
...
@@ -1186,8 +1186,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -1186,8 +1186,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
JSONArray
rightGroup
=
filterParams
.
getJSONArray
(
"group2"
);
JSONArray
rightGroup
=
filterParams
.
getJSONArray
(
"group2"
);
Boolean
isOrGroup
=
or
.
equals
(
filterParams
.
getString
(
"groupAndOr"
))
?
Boolean
.
TRUE
:
Boolean
.
FALSE
;
Boolean
isOrGroup
=
or
.
equals
(
filterParams
.
getString
(
"groupAndOr"
))
?
Boolean
.
TRUE
:
Boolean
.
FALSE
;
handleAdvancedFilter
(
boolMust
,
leftGroup
,
rightGroup
,
isOrGroup
,
StatisticalAnalysisEnum
.
equip
.
getCode
());
handleAdvancedFilter
(
boolMust
,
leftGroup
,
rightGroup
,
isOrGroup
,
StatisticalAnalysisEnum
.
equip
.
getCode
());
equListCodes
.
add
(
"
8000
"
);
equListCodes
.
add
(
"
all
"
);
equCategoryCodes
.
add
(
"
2300
"
);
equCategoryCodes
.
add
(
"
all
"
);
}
}
filterParams
.
put
(
"equList"
,
String
.
join
(
","
,
equListCodes
));
filterParams
.
put
(
"equList"
,
String
.
join
(
","
,
equListCodes
));
filterParams
.
put
(
"equCategory"
,
String
.
join
(
","
,
equCategoryCodes
));
filterParams
.
put
(
"equCategory"
,
String
.
join
(
","
,
equCategoryCodes
));
...
@@ -3246,9 +3246,12 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -3246,9 +3246,12 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
// 一级统计
// 一级统计
if
(!
is2LeveFlag
)
{
if
(!
is2LeveFlag
)
{
companyBoolMust
(
boolMust
,
"company"
);
BoolQueryBuilder
countBoolMust
=
QueryBuilderUtils
.
copyBoolQuery
(
boolMust
);
Map
<
String
,
Object
>
dats
=
getTotalAggMapsByUnitType
(
request
,
builder
,
boolMust
,
tabTotalMap
,
StatisticalAnalysisEnum
.
person
);
companyBoolMust
(
countBoolMust
,
"company"
);
result
=
getUseAndProductAndFillingStatistics
(
dats
);
long
total
=
this
.
queryDpStatisticsTotalByIndex
(
countBoolMust
,
StatisticalAnalysisEnum
.
person
.
getKey
());
// 汇总总数
tabTotalMap
.
put
(
StatisticalAnalysisEnum
.
person
.
getCode
(),
total
);
result
=
getUseAndProductAndFillingStatistics
(
boolMust
,
StatisticalAnalysisEnum
.
person
.
getKey
());
}
else
if
(!
is3LeveFlag
)
{
}
else
if
(!
is3LeveFlag
)
{
if
(
unitCategory
.
equals
(
UnitCategoryEnum
.
use
.
getCode
()))
{
if
(
unitCategory
.
equals
(
UnitCategoryEnum
.
use
.
getCode
()))
{
companyBoolMust
(
boolMust
,
UnitCategoryEnum
.
use
.
getCode
());
companyBoolMust
(
boolMust
,
UnitCategoryEnum
.
use
.
getCode
());
...
@@ -3405,16 +3408,12 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -3405,16 +3408,12 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
.
orElse
(
false
);
.
orElse
(
false
);
// 一级统计
// 一级统计
if
(!
is2LeveFlag
)
{
if
(!
is2LeveFlag
)
{
// 计算总数
BoolQueryBuilder
countBoolMust
=
QueryBuilderUtils
.
copyBoolQuery
(
boolMust
);
boolMust
.
should
(
QueryBuilders
.
matchQuery
(
"unitType"
,
UnitTypeEnum
.
sydw
.
getName
()))
companyBoolMust
(
countBoolMust
,
"company"
);
.
should
(
QueryBuilders
.
matchQuery
(
"unitType"
,
UnitTypeEnum
.
grzt
.
getName
()))
long
total
=
this
.
queryDpStatisticsTotalByIndex
(
countBoolMust
,
StatisticalAnalysisEnum
.
company
.
getKey
());
.
should
(
QueryBuilders
.
matchQuery
(
"unitType"
,
UnitTypeEnum
.
zzdw
.
getName
()))
// 汇总总数
.
should
(
QueryBuilders
.
matchQuery
(
"unitType"
,
UnitTypeEnum
.
sjdw
.
getName
()))
tabTotalMap
.
put
(
StatisticalAnalysisEnum
.
company
.
getCode
(),
total
);
.
should
(
QueryBuilders
.
matchQuery
(
"unitType"
,
UnitTypeEnum
.
azgzwxdw
.
getName
()))
return
Collections
.
singletonList
(
getUseAndProductAndFillingStatistics
(
boolMust
,
StatisticalAnalysisEnum
.
company
.
getKey
()));
.
should
(
QueryBuilders
.
matchQuery
(
"unitType"
,
UnitTypeEnum
.
czdw
.
getName
()))
.
minimumShouldMatch
(
1
);
Map
<
String
,
Object
>
datas
=
getTotalAggMapsByUnitType
(
request
,
builder
,
boolMust
,
tabTotalMap
,
StatisticalAnalysisEnum
.
company
);
return
Collections
.
singletonList
(
getUseAndProductAndFillingStatistics
(
datas
));
}
else
if
(!
is3LeveFlag
)
{
}
else
if
(!
is3LeveFlag
)
{
Long
companyCount
=
getStatisticCount
(
boolMust
,
StatisticalAnalysisEnum
.
company
.
getKey
());
Long
companyCount
=
getStatisticCount
(
boolMust
,
StatisticalAnalysisEnum
.
company
.
getKey
());
JSONObject
industrySupervisor
=
this
.
getItemGroupStatisticsByItemName
(
boolMust
,
JSONObject
industrySupervisor
=
this
.
getItemGroupStatisticsByItemName
(
boolMust
,
...
@@ -3540,29 +3539,20 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -3540,29 +3539,20 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
return
Collections
.
singletonList
(
result
);
return
Collections
.
singletonList
(
result
);
}
}
private
Map
<
String
,
Object
>
getUseAndProductAndFillingStatistics
(
Map
<
String
,
Object
>
datas
)
{
private
Map
<
String
,
Object
>
getUseAndProductAndFillingStatistics
(
BoolQueryBuilder
boolMust
,
String
index
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Long
filling
=
0L
;
BoolQueryBuilder
useBoolMust
=
QueryBuilderUtils
.
copyBoolQuery
(
boolMust
);
Long
use
=
0L
;
companyBoolMust
(
useBoolMust
,
UnitCategoryEnum
.
use
.
getCode
());
Long
produce
=
0L
;
BoolQueryBuilder
produceBoolMust
=
QueryBuilderUtils
.
copyBoolQuery
(
boolMust
);
for
(
String
key
:
datas
.
keySet
())
{
companyBoolMust
(
produceBoolMust
,
UnitCategoryEnum
.
produce
.
getCode
());
if
(
key
.
equals
(
"sydw"
))
{
BoolQueryBuilder
fillingBoolMust
=
QueryBuilderUtils
.
copyBoolQuery
(
boolMust
);
use
+=
Long
.
valueOf
(
datas
.
get
(
"sydw"
).
toString
());
companyBoolMust
(
fillingBoolMust
,
UnitCategoryEnum
.
filling
.
getCode
());
}
else
if
(
key
.
equals
(
"grzt"
))
{
Long
useCount
=
getStatisticCount
(
useBoolMust
,
index
);
use
+=
Long
.
valueOf
(
datas
.
get
(
"grzt"
).
toString
());
Long
produceCount
=
getStatisticCount
(
produceBoolMust
,
index
);
}
else
if
(
key
.
equals
(
"sjdw"
))
{
Long
fillingCount
=
getStatisticCount
(
fillingBoolMust
,
index
);
produce
+=
Long
.
valueOf
(
datas
.
get
(
"sjdw"
).
toString
());
result
.
put
(
"use"
,
useCount
);
}
else
if
(
key
.
equals
(
"zzdw"
))
{
result
.
put
(
"produce"
,
produceCount
);
produce
+=
Long
.
valueOf
(
datas
.
get
(
"zzdw"
).
toString
());
result
.
put
(
"filling"
,
fillingCount
);
}
else
if
(
key
.
equals
(
"azgzwxdw"
))
{
produce
+=
Long
.
valueOf
(
datas
.
get
(
"azgzwxdw"
).
toString
());
}
else
if
(
key
.
equals
(
"czdw"
))
{
filling
=
Long
.
valueOf
(
datas
.
get
(
"czdw"
).
toString
());
}
}
result
.
put
(
"use"
,
use
);
result
.
put
(
"produce"
,
produce
);
result
.
put
(
"filling"
,
filling
);
return
result
;
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