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
4b03e7bc
Commit
4b03e7bc
authored
Aug 25, 2025
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: 调整中屏查询
parent
9c62d23e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
14 deletions
+35
-14
DPMapStatisticsItemEnum.java
...mos/boot/module/jg/api/enums/DPMapStatisticsItemEnum.java
+3
-1
ComprehensiveStatisticalAnalysisServiceImpl.java
...ice/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
+0
-0
JGDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/JGDPStatisticsServiceImpl.java
+32
-13
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/DPMapStatisticsItemEnum.java
View file @
4b03e7bc
...
@@ -31,11 +31,13 @@ public enum DPMapStatisticsItemEnum {
...
@@ -31,11 +31,13 @@ public enum DPMapStatisticsItemEnum {
MANUFACTURING_UNITS
(
"制造单位 (家)"
,
"manufacturingUnits"
,
""
),
MANUFACTURING_UNITS
(
"制造单位 (家)"
,
"manufacturingUnits"
,
""
),
CONSTRUCTION_UNITS
(
"安改维单位 (家)"
,
"constructionUnits"
,
""
),
CONSTRUCTION_UNITS
(
"安改维单位 (家)"
,
"constructionUnits"
,
""
),
COMPANY_TOTAL
(
"企业总量 (家)"
,
"companyTotal"
,
""
),
COMPANY_TOTAL
(
"企业总量 (家)"
,
"companyTotal"
,
""
),
INSPECTION_AGENCY_COUNT
(
"检验检测机构总数 (家)"
,
"inspectionAgencyCount"
,
""
),
USERS_UNITS
(
"使用单位 (家)"
,
"usersUnits"
,
""
),
USERS_UNITS
(
"使用单位 (家)"
,
"usersUnits"
,
""
),
PERMIT_UNITS
(
"许可单位 (家)"
,
"permitUnits"
,
""
),
PERMIT_UNITS
(
"许可单位 (家)"
,
"permitUnits"
,
""
),
GAS_UNITS
(
"充装单位 (家)"
,
"gasUnits"
,
""
),
GAS_UNITS
(
"充装单位 (家)"
,
"gasUnits"
,
""
),
DESIGN_UNITS
(
"设计单位 (家)"
,
"designUnits"
,
""
),
DESIGN_UNITS
(
"设计单位 (家)"
,
"designUnits"
,
""
),
PERSON_TOTAL
(
"人员总数 (人)"
,
"personTotal"
,
""
),
PERSON_TOTAL
(
"企业人员总数 (人)"
,
"personTotal"
,
""
),
INSPECTION_PERSON_TOTAL
(
"检验检测人员总数 (人)"
,
"jyjcryzl"
,
""
),
OPERATORS
(
"作业人员 (人)"
,
"operators"
,
""
),
OPERATORS
(
"作业人员 (人)"
,
"operators"
,
""
),
DEVICE_COUNT
(
"已纳管设备数"
,
"deviceCount"
,
""
),
DEVICE_COUNT
(
"已纳管设备数"
,
"deviceCount"
,
""
),
PERSON_ISSUES_COUNT
(
"个人问题数"
,
"个人"
,
""
),
PERSON_ISSUES_COUNT
(
"个人问题数"
,
"个人"
,
""
),
...
...
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 @
4b03e7bc
This diff is collapsed.
Click to expand it.
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 @
4b03e7bc
...
@@ -458,13 +458,21 @@ public class JGDPStatisticsServiceImpl {
...
@@ -458,13 +458,21 @@ public class JGDPStatisticsServiceImpl {
private
void
staticsCenterMapCountDataForPerson
(
Map
<
String
,
Object
>
result
,
DPFilterParamDto
dpFilterParamDto
,
String
orgCode
)
{
private
void
staticsCenterMapCountDataForPerson
(
Map
<
String
,
Object
>
result
,
DPFilterParamDto
dpFilterParamDto
,
String
orgCode
)
{
if
(
orgCode
==
null
)
{
if
(
orgCode
==
null
)
{
result
.
put
(
DPMapStatisticsItemEnum
.
OPERATORS
.
getCode
(),
0
);
result
.
put
(
DPMapStatisticsItemEnum
.
INSPECTION_PERSON_TOTAL
.
getCode
(),
0
);
result
.
put
(
DPMapStatisticsItemEnum
.
PERSON_TOTAL
.
getCode
(),
0
);
result
.
put
(
DPMapStatisticsItemEnum
.
PERSON_TOTAL
.
getCode
(),
0
);
return
;
return
;
}
}
Long
num
=
userInfoMapper
.
countUserByPostAndAreaCode
(
orgCode
,
"6552"
,
dpFilterParamDto
.
getCityCode
());
BoolQueryBuilder
companyBoolMust
=
QueryBuilders
.
boolQuery
();
result
.
put
(
DPMapStatisticsItemEnum
.
OPERATORS
.
getCode
(),
num
);
companyBoolMust
.
must
(
QueryBuilders
.
prefixQuery
(
"superviseOrgCode"
,
orgCode
));
staticsPersonCountByEs
(
orgCode
,
StatisticalAnalysisEnum
.
person
.
getKey
(),
result
);
statisticalAnalysisService
.
companyBoolMust
(
companyBoolMust
,
"company"
);
Long
companySum
=
statisticalAnalysisService
.
getStatisticCount
(
companyBoolMust
,
StatisticalAnalysisEnum
.
person
.
getKey
());
BoolQueryBuilder
inspectionBoolMust
=
QueryBuilders
.
boolQuery
();
inspectionBoolMust
.
must
(
QueryBuilders
.
prefixQuery
(
"superviseOrgCode"
,
orgCode
));
inspectionBoolMust
.
mustNot
(
QueryBuilders
.
wildcardQuery
(
"unitType.keyword"
,
"*检验检测机构*"
));
statisticalAnalysisService
.
companyBoolMust
(
inspectionBoolMust
,
"inspection"
);
Long
inspectionSum
=
statisticalAnalysisService
.
getStatisticCount
(
inspectionBoolMust
,
StatisticalAnalysisEnum
.
person
.
getKey
());
result
.
put
(
DPMapStatisticsItemEnum
.
PERSON_TOTAL
.
getCode
(),
companySum
);
result
.
put
(
DPMapStatisticsItemEnum
.
INSPECTION_PERSON_TOTAL
.
getCode
(),
inspectionSum
);
}
}
private
void
staticsPersonCountByEs
(
String
orgCode
,
String
key
,
Map
<
String
,
Object
>
result
)
{
private
void
staticsPersonCountByEs
(
String
orgCode
,
String
key
,
Map
<
String
,
Object
>
result
)
{
...
@@ -513,14 +521,25 @@ public class JGDPStatisticsServiceImpl {
...
@@ -513,14 +521,25 @@ public class JGDPStatisticsServiceImpl {
setDefaultCompanyCountData
(
result
);
setDefaultCompanyCountData
(
result
);
return
;
return
;
}
}
List
<
CountDto
>
countDtos
=
enterpriseInfoMapper
.
countByUnitTypeAndOrgCode
(
orgCode
,
cityCode
,
false
);
BoolQueryBuilder
companyBoolMust
=
QueryBuilders
.
boolQuery
();
// 企业根据类型统计
companyBoolMust
.
must
(
QueryBuilders
.
prefixQuery
(
"superviseOrgCode.keyword"
,
orgCode
));
staticsUnitTypeCountByEs
(
orgCode
,
StatisticalAnalysisEnum
.
company
.
getKey
(),
result
);
statisticalAnalysisService
.
companyBoolMust
(
companyBoolMust
,
"company"
);
result
.
put
(
DPMapStatisticsItemEnum
.
CONSTRUCTION_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_MAINTENANCE
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
Long
companySum
=
statisticalAnalysisService
.
getStatisticCount
(
companyBoolMust
,
StatisticalAnalysisEnum
.
company
.
getKey
());
result
.
put
(
DPMapStatisticsItemEnum
.
MANUFACTURING_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_MANUFACTURE
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
BoolQueryBuilder
inspectionBoolMust
=
QueryBuilders
.
boolQuery
();
result
.
put
(
DPMapStatisticsItemEnum
.
GAS_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_FILLING
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
inspectionBoolMust
.
must
(
QueryBuilders
.
prefixQuery
(
"superviseOrgCode.keyword"
,
orgCode
));
result
.
put
(
DPMapStatisticsItemEnum
.
DESIGN_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_DESIGN
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
inspectionBoolMust
.
mustNot
(
QueryBuilders
.
wildcardQuery
(
"unitType.keyword"
,
"*检验检测机构*"
));
statisticalAnalysisService
.
companyBoolMust
(
inspectionBoolMust
,
"inspection"
);
Long
inspectionSum
=
statisticalAnalysisService
.
getStatisticCount
(
inspectionBoolMust
,
StatisticalAnalysisEnum
.
company
.
getKey
());
result
.
put
(
DPMapStatisticsItemEnum
.
COMPANY_TOTAL
.
getCode
(),
companySum
);
result
.
put
(
DPMapStatisticsItemEnum
.
INSPECTION_AGENCY_COUNT
.
getCode
(),
inspectionSum
);
// List<CountDto> countDtos = enterpriseInfoMapper.countByUnitTypeAndOrgCode(orgCode, cityCode, false);
// // 企业根据类型统计
// staticsUnitTypeCountByEs(orgCode, StatisticalAnalysisEnum.company.getKey(), result);
// result.put(DPMapStatisticsItemEnum.CONSTRUCTION_UNITS.getCode(), countDtos.stream().filter(c -> c.getKeyStr().contains(COMPANY_TYPE_MAINTENANCE)).mapToInt(CountDto::getIntValue).sum());
// result.put(DPMapStatisticsItemEnum.MANUFACTURING_UNITS.getCode(), countDtos.stream().filter(c -> c.getKeyStr().contains(COMPANY_TYPE_MANUFACTURE)).mapToInt(CountDto::getIntValue).sum());
// result.put(DPMapStatisticsItemEnum.GAS_UNITS.getCode(), countDtos.stream().filter(c -> c.getKeyStr().contains(COMPANY_TYPE_FILLING)).mapToInt(CountDto::getIntValue).sum());
// result.put(DPMapStatisticsItemEnum.DESIGN_UNITS.getCode(), countDtos.stream().filter(c -> c.getKeyStr().contains(COMPANY_TYPE_DESIGN)).mapToInt(CountDto::getIntValue).sum());
}
}
private
void
staticsUnitTypeCountByEs
(
String
orgCode
,
String
index
,
Map
<
String
,
Object
>
result
)
{
private
void
staticsUnitTypeCountByEs
(
String
orgCode
,
String
index
,
Map
<
String
,
Object
>
result
)
{
...
@@ -651,7 +670,7 @@ public class JGDPStatisticsServiceImpl {
...
@@ -651,7 +670,7 @@ public class JGDPStatisticsServiceImpl {
String
orgCode
=
StCommonServiceImpl
.
getRegionCodeOrgCodeMap
().
get
(
cityCode
);
String
orgCode
=
StCommonServiceImpl
.
getRegionCodeOrgCodeMap
().
get
(
cityCode
);
if
(
StringUtils
.
isNotEmpty
(
orgCode
))
{
if
(
StringUtils
.
isNotEmpty
(
orgCode
))
{
// m.put(DPMapStatisticsItemEnum.USERS_UNITS.getCode(), countDtos.stream().filter(c -> c.getKeyStr().contains(COMPANY_TYPE_USE) && c.getLabel().contains(orgCode)).mapToInt(CountDto::getIntValue).sum());
// m.put(DPMapStatisticsItemEnum.USERS_UNITS.getCode(), countDtos.stream().filter(c -> c.getKeyStr().contains(COMPANY_TYPE_USE) && c.getLabel().contains(orgCode)).mapToInt(CountDto::getIntValue).sum());
statics
UnitTypeCountByEs
(
orgCode
,
StatisticalAnalysisEnum
.
company
.
getKey
(),
m
);
statics
CenterMapCountDataForCompany
(
m
,
orgCode
,
cityCode
);
m
.
put
(
DPMapStatisticsItemEnum
.
CONSTRUCTION_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_MAINTENANCE
)
&&
c
.
getLabel
().
contains
(
orgCode
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
m
.
put
(
DPMapStatisticsItemEnum
.
CONSTRUCTION_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_MAINTENANCE
)
&&
c
.
getLabel
().
contains
(
orgCode
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
m
.
put
(
DPMapStatisticsItemEnum
.
MANUFACTURING_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_MANUFACTURE
)
&&
c
.
getLabel
().
contains
(
orgCode
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
m
.
put
(
DPMapStatisticsItemEnum
.
MANUFACTURING_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_MANUFACTURE
)
&&
c
.
getLabel
().
contains
(
orgCode
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
m
.
put
(
DPMapStatisticsItemEnum
.
GAS_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_FILLING
)
&&
c
.
getLabel
().
contains
(
orgCode
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
m
.
put
(
DPMapStatisticsItemEnum
.
GAS_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_FILLING
)
&&
c
.
getLabel
().
contains
(
orgCode
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
...
@@ -665,7 +684,7 @@ public class JGDPStatisticsServiceImpl {
...
@@ -665,7 +684,7 @@ public class JGDPStatisticsServiceImpl {
private
void
setDefaultCompanyCountData
(
Map
<
String
,
Object
>
m
)
{
private
void
setDefaultCompanyCountData
(
Map
<
String
,
Object
>
m
)
{
m
.
put
(
DPMapStatisticsItemEnum
.
USERS_UNITS
.
getCode
(),
0
);
m
.
put
(
DPMapStatisticsItemEnum
.
USERS_UNITS
.
getCode
(),
0
);
m
.
put
(
DPMapStatisticsItemEnum
.
COMPANY_TOTAL
.
getCode
(),
0
);
m
.
put
(
DPMapStatisticsItemEnum
.
COMPANY_TOTAL
.
getCode
(),
0
);
m
.
put
(
DPMapStatisticsItemEnum
.
PERMIT_UNITS
.
getCode
(),
0
);
m
.
put
(
DPMapStatisticsItemEnum
.
INSPECTION_AGENCY_COUNT
.
getCode
(),
0
);
m
.
put
(
DPMapStatisticsItemEnum
.
CONSTRUCTION_UNITS
.
getCode
(),
0
);
m
.
put
(
DPMapStatisticsItemEnum
.
CONSTRUCTION_UNITS
.
getCode
(),
0
);
m
.
put
(
DPMapStatisticsItemEnum
.
MANUFACTURING_UNITS
.
getCode
(),
0
);
m
.
put
(
DPMapStatisticsItemEnum
.
MANUFACTURING_UNITS
.
getCode
(),
0
);
m
.
put
(
DPMapStatisticsItemEnum
.
GAS_UNITS
.
getCode
(),
0
);
m
.
put
(
DPMapStatisticsItemEnum
.
GAS_UNITS
.
getCode
(),
0
);
...
...
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