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
34e57655
Commit
34e57655
authored
Aug 19, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.总数修改,不包括压力容器、气瓶
parent
a5f03c19
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
24 deletions
+9
-24
JGDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/JGDPStatisticsServiceImpl.java
+5
-22
StCommonServiceImpl.java
...odule/statistcs/biz/service/impl/StCommonServiceImpl.java
+4
-2
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/JGDPStatisticsServiceImpl.java
View file @
34e57655
...
@@ -1417,7 +1417,7 @@ public class JGDPStatisticsServiceImpl {
...
@@ -1417,7 +1417,7 @@ public class JGDPStatisticsServiceImpl {
// 2.压力管道长度统计
// 2.压力管道长度统计
stCommonService
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
);
stCommonService
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
);
// 3.已纳管设备总数
// 3.已纳管设备总数
this
.
staticsCenterMapCountDataForEquipIsManage
(
result
,
orgCode
);
this
.
staticsCenterMapCountDataForEquipIsManage
(
result
);
// 4.登记证总数
// 4.登记证总数
this
.
staticsCenterMapCountCertificate
(
result
,
orgCode
);
this
.
staticsCenterMapCountCertificate
(
result
,
orgCode
);
// 5.超过15年电梯数量
// 5.超过15年电梯数量
...
@@ -1459,30 +1459,14 @@ public class JGDPStatisticsServiceImpl {
...
@@ -1459,30 +1459,14 @@ public class JGDPStatisticsServiceImpl {
result
.
put
(
DPMapStatisticsItemEnum
.
CERTIFICATE_COUNT
.
getCode
(),
num
);
result
.
put
(
DPMapStatisticsItemEnum
.
CERTIFICATE_COUNT
.
getCode
(),
num
);
}
}
private
void
staticsCenterMapCountDataForEquipIsManage
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
private
void
staticsCenterMapCountDataForEquipIsManage
(
Map
<
String
,
Object
>
result
)
{
long
num
=
0
;
result
.
put
(
DPMapStatisticsItemEnum
.
DEVICE_COUNT
.
getCode
(),
result
.
get
(
DPMapStatisticsItemEnum
.
TOTAL
.
getCode
()));
CountRequest
request
=
new
CountRequest
();
result
.
remove
(
DPMapStatisticsItemEnum
.
TOTAL
.
getCode
());
request
.
indices
(
"idx_biz_view_jg_all"
);
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
// 按照管辖机构区域信息模糊查询
boolMust
.
must
(
QueryBuilders
.
wildcardQuery
(
"ORG_BRANCH_CODE.keyword"
,
QueryParser
.
escape
(
orgCode
)
+
"*"
));
// 只统计已纳管设备
boolMust
.
must
(
QueryBuilders
.
termQuery
(
"IS_INTO_MANAGEMENT"
,
true
));
// 且8大类,目的去掉脏数据
boolMust
.
must
(
QueryBuilders
.
termsQuery
(
"EQU_LIST_CODE"
,
StCommonServiceImpl
.
getEquipmentCategory
().
stream
().
map
(
EquipmentCategoryDto:
:
getCode
).
collect
(
Collectors
.
toList
())));
request
.
query
(
boolMust
);
try
{
CountResponse
response
=
restHighLevelClient
.
count
(
request
,
RequestOptions
.
DEFAULT
);
num
=
response
.
getCount
();
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
result
.
put
(
DPMapStatisticsItemEnum
.
DEVICE_COUNT
.
getCode
(),
num
);
}
}
public
List
<
Map
<
String
,
Object
>>
JGCenterMapCountForOverview
(
DPFilterParamDto
dpFilterParamDto
)
{
public
List
<
Map
<
String
,
Object
>>
JGCenterMapCountForOverview
(
DPFilterParamDto
dpFilterParamDto
)
{
List
<
RegionModel
>
regionModels
=
stCommonService
.
setRegionIfRootParent
(
dpFilterParamDto
);
List
<
RegionModel
>
regionModels
=
stCommonService
.
setRegionIfRootParent
(
dpFilterParamDto
);
List
<
Map
<
String
,
Object
>>
result
=
regionModels
.
parallelStream
().
map
(
r
->
{
return
regionModels
.
parallelStream
().
map
(
r
->
{
DPFilterParamDto
filterParamDto
=
new
DPFilterParamDto
();
DPFilterParamDto
filterParamDto
=
new
DPFilterParamDto
();
filterParamDto
.
setCityCode
(
r
.
getRegionCode
().
toString
());
filterParamDto
.
setCityCode
(
r
.
getRegionCode
().
toString
());
Map
<
String
,
Object
>
itemResult
=
JGCenterMapCountForGlobal
(
filterParamDto
);
Map
<
String
,
Object
>
itemResult
=
JGCenterMapCountForGlobal
(
filterParamDto
);
...
@@ -1490,7 +1474,6 @@ public class JGDPStatisticsServiceImpl {
...
@@ -1490,7 +1474,6 @@ public class JGDPStatisticsServiceImpl {
itemResult
.
put
(
"regionName"
,
r
.
getRegionName
());
itemResult
.
put
(
"regionName"
,
r
.
getRegionName
());
return
itemResult
;
return
itemResult
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
return
result
;
}
}
public
List
<
Map
<
String
,
Object
>>
noticeList
(
DPFilterParamDto
dpFilterParamDto
)
{
public
List
<
Map
<
String
,
Object
>>
noticeList
(
DPFilterParamDto
dpFilterParamDto
)
{
...
...
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/StCommonServiceImpl.java
View file @
34e57655
...
@@ -245,7 +245,8 @@ public class StCommonServiceImpl {
...
@@ -245,7 +245,8 @@ public class StCommonServiceImpl {
// 压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
// 压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
if
(
bucket
.
getKeyAsString
().
equals
(
EquipmentClassifityEnum
.
YLRQ
.
getCode
())){
if
(
bucket
.
getKeyAsString
().
equals
(
EquipmentClassifityEnum
.
YLRQ
.
getCode
())){
countMap
.
put
(
bucket
.
getKeyAsString
(),
bucket
.
getDocCount
()
-
cylinderNum
);
countMap
.
put
(
bucket
.
getKeyAsString
(),
bucket
.
getDocCount
()
-
cylinderNum
);
}
else
{
}
else
if
(!
bucket
.
getKeyAsString
().
equals
(
EquipmentClassifityEnum
.
YLGD
.
getCode
()))
{
// 压力管道单独统计,求总数时,不包括压力管道
countMap
.
put
(
bucket
.
getKeyAsString
(),
bucket
.
getDocCount
());
countMap
.
put
(
bucket
.
getKeyAsString
(),
bucket
.
getDocCount
());
}
}
}
}
...
@@ -254,7 +255,8 @@ public class StCommonServiceImpl {
...
@@ -254,7 +255,8 @@ public class StCommonServiceImpl {
equipmentCategoryDtos
.
forEach
(
c
->
{
equipmentCategoryDtos
.
forEach
(
c
->
{
result
.
put
(
this
.
castCategoryCode2WebCode
(
c
.
getCode
()),
countMap
.
getOrDefault
(
c
.
getCode
(),
0L
));
result
.
put
(
this
.
castCategoryCode2WebCode
(
c
.
getCode
()),
countMap
.
getOrDefault
(
c
.
getCode
(),
0L
));
});
});
result
.
put
(
DPMapStatisticsItemEnum
.
TOTAL
.
getCode
(),
countMap
.
values
().
stream
().
mapToLong
(
e
->
e
).
sum
()
+
cylinderNum
);
// 注意,求总数时:countMap不包括气瓶数量、压力管道数量(20240819修改)
result
.
put
(
DPMapStatisticsItemEnum
.
TOTAL
.
getCode
(),
countMap
.
values
().
stream
().
mapToLong
(
e
->
e
).
sum
());
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
...
...
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