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
f6a535a4
Commit
f6a535a4
authored
Jul 17, 2025
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 更新统计分析中的过滤条件和单位转换逻辑
parent
f30ed85c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
ComprehensiveStatisticalAnalysisServiceImpl.java
...ice/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
+7
-5
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 @
f6a535a4
...
...
@@ -2789,6 +2789,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
BoolQueryBuilder
equipBoolMust
=
QueryBuilders
.
boolQuery
();
handleOrgCode
(
equipBoolMust
,
orgCode
);
equipBoolMust
.
mustNot
(
QueryBuilders
.
termsQuery
(
"STATUS"
,
Arrays
.
asList
(
"草稿"
,
"已拒领"
,
"待认领"
)));
equipBoolMust
.
mustNot
(
QueryBuilders
.
termQuery
(
"EQU_CATEGORY_CODE"
,
"2300"
));
equipBoolMust
.
mustNot
(
QueryBuilders
.
termQuery
(
"EQU_LIST_CODE"
,
"8000"
));
BoolQueryBuilder
companyBoolMust
=
QueryBuilders
.
boolQuery
();
companyBoolMust
.
must
(
QueryBuilders
.
prefixQuery
(
"superviseOrgCode.keyword"
,
orgCode
));
BoolQueryBuilder
personBoolMust
=
QueryBuilders
.
boolQuery
();
...
...
@@ -3031,6 +3033,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
if
(
groupField
.
equals
(
"EQU_LIST_CODE"
))
{
gasBoolQueryBuilder
=
QueryBuilderUtils
.
copyBoolQuery
(
boolMust
);
}
boolMust
.
mustNot
(
QueryBuilders
.
matchQuery
(
"EQU_CATEGORY_CODE"
,
"2300"
));
getStatisticCountByGroup
(
request
,
builder
,
boolMust
,
groupField
,
staticCountByGroup
,
"noGas"
);
AtomicReference
<
Long
>
otherCount
=
new
AtomicReference
<>(
0L
);
...
...
@@ -3066,7 +3069,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
map
.
put
(
"img"
,
dpEquipPhotoPrefix
+
code
+
dpEquipPhotoSuffix
);
Integer
count
=
tzsCustomFilterMapper
.
selectEquipmentCategoryCountByParentId
(
categoryMap
.
get
(
"key"
).
toString
());
map
.
put
(
"noChild"
,
0
==
count
?
Boolean
.
TRUE
:
Boolean
.
FALSE
);
map
.
put
(
"measurementUnit"
,
code
.
startsWith
(
"8"
)
?
"千米
"
:
"台套"
);
map
.
put
(
"measurementUnit"
,
equipCode
!=
null
&&
equipCode
.
startsWith
(
"8"
)
?
"千米"
:
equipCode
!=
null
&&
equipCode
.
startsWith
(
"2"
)
?
"个
"
:
"台套"
);
map
.
put
(
"noBottom"
,
code
.
startsWith
(
"8"
)
?
Boolean
.
TRUE
:
Boolean
.
FALSE
);
// 统计该分类下的数据完整性的分组数量 DATA_QUALITY_SCORE
BoolQueryBuilder
scoreQuery
=
QueryBuilderUtils
.
copyBoolQuery
(
boolMust
);
...
...
@@ -3108,8 +3111,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
map
.
put
(
"img"
,
dpEquipPhotoPrefix
+
code
+
dpEquipPhotoSuffix
);
Integer
count
=
tzsCustomFilterMapper
.
selectEquipmentCategoryCountByParentId
(
gas
.
get
(
"key"
).
toString
());
map
.
put
(
"noChild"
,
0
==
count
?
Boolean
.
TRUE
:
Boolean
.
FALSE
);
map
.
put
(
"measurementUnit"
,
"
台套
"
);
map
.
put
(
"noBottom"
,
Boolean
.
TRU
E
);
map
.
put
(
"measurementUnit"
,
"
个
"
);
map
.
put
(
"noBottom"
,
Boolean
.
FALS
E
);
// 统计该分类下的数据完整性的分组数量 DATA_QUALITY_SCORE
BoolQueryBuilder
scoreQuery
=
QueryBuilderUtils
.
copyBoolQuery
(
boolMust
);
scoreQuery
.
must
(
QueryBuilders
.
termQuery
(
fieldKey
,
code
));
...
...
@@ -3124,7 +3127,6 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
getStatisticCountByDate
(
StatisticalAnalysisEnum
.
equip
.
getKey
(),
"NEXT_INSPECT_DATE"
,
nextInspectQuery
,
nextInspectCountByGroup
);
map
.
put
(
"NEXT_INSPECT_DATE"
,
nextInspectCountByGroup
);
dataMapList
.
add
(
map
);
boolMust
.
mustNot
(
QueryBuilders
.
matchQuery
(
"EQU_CATEGORY_CODE"
,
"2300"
));
}
BigDecimal
otherPipeLength
=
new
BigDecimal
(
0
);
...
...
@@ -3217,7 +3219,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
map
.
put
(
"noChild"
,
Boolean
.
TRUE
);
map
.
put
(
"value"
,
isOther
?
otherPipeLength
:
otherCount
);
map
.
put
(
"img"
,
dpEquipPhotoPrefix
+
type
+
dpEquipPhotoSuffix
);
map
.
put
(
"measurementUnit"
,
equipCode
!=
null
&&
equipCode
.
startsWith
(
"8"
)
?
"千米"
:
"台套"
);
map
.
put
(
"measurementUnit"
,
equipCode
!=
null
&&
equipCode
.
startsWith
(
"8"
)
?
"千米"
:
equipCode
!=
null
&&
equipCode
.
startsWith
(
"2"
)
?
"个"
:
"台套"
);
map
.
put
(
"noBottom"
,
equipCode
!=
null
&&
equipCode
.
startsWith
(
"8"
)
?
Boolean
.
TRUE
:
Boolean
.
FALSE
);
Map
<
String
,
Long
>
scoreCount
=
new
HashMap
<>();
scoreCount
.
put
(
"1"
,
oneCount
);
...
...
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