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
9111e398
Commit
9111e398
authored
Jul 25, 2024
by
麻笑宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大屏调整提交
parent
a366f743
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
340 additions
and
138 deletions
+340
-138
DPFilterParamDto.java
...oin/amos/boot/module/common/api/dto/DPFilterParamDto.java
+4
-0
UnitTypeEnum.java
...ejoin/amos/boot/module/common/api/enums/UnitTypeEnum.java
+49
-0
UserPostEnum.java
...ejoin/amos/boot/module/common/api/enums/UserPostEnum.java
+56
-0
ZLStatisticsMapper.java
...boot/module/statistics/api/mapper/ZLStatisticsMapper.java
+2
-0
ZLStatisticsMapper.xml
...tics-api/src/main/resources/mapper/ZLStatisticsMapper.xml
+19
-2
ZLDPStatisticsController.java
...le/statistcs/biz/controller/ZLDPStatisticsController.java
+7
-0
ZLDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/ZLDPStatisticsServiceImpl.java
+203
-136
No files found.
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/DPFilterParamDto.java
View file @
9111e398
...
...
@@ -36,4 +36,8 @@ public class DPFilterParamDto {
* month , year
*/
private
String
searchType
;
/**
* 1生产单位 2使用单位 3充装单位 4检验检测机构
*/
private
String
companyType
;
}
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/enums/UnitTypeEnum.java
0 → 100644
View file @
9111e398
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
enums
;
import
lombok.Getter
;
import
java.util.ArrayList
;
import
java.util.EnumSet
;
import
java.util.HashMap
;
import
java.util.List
;
@Getter
public
enum
UnitTypeEnum
{
//type 1生产单位 2使用单位 3充装单位 4检验检测机构
//制造单位
ZZDW
(
"制造单位"
,
"1236"
,
"1"
),
//设计单位
SJDW
(
"设计单位"
,
"1235"
,
"1"
),
//安改维单位
AGWDW
(
"安装改造维修单位"
,
"1234"
,
"1"
),
//使用单位
SYDW
(
"使用单位"
,
"1232"
,
"2"
),
//充装单位
CZDW
(
"充装单位"
,
"1231"
,
"3"
),
//检验检测机构
JYJCJG
(
"检验检测机构"
,
"1233"
,
"4"
),
;
String
name
;
String
code
;
String
type
;
private
UnitTypeEnum
(
String
name
,
String
code
,
String
type
)
{
this
.
name
=
name
;
this
.
code
=
code
;
this
.
type
=
type
;
}
public
static
List
<
String
>
getNameListByType
(
String
type
)
{
List
<
String
>
list
=
new
ArrayList
<>();
for
(
UnitTypeEnum
testEnum
:
EnumSet
.
allOf
(
UnitTypeEnum
.
class
))
{
if
(
testEnum
.
getType
().
equals
(
type
))
{
list
.
add
(
testEnum
.
getName
());
}
}
return
list
;
}
}
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/enums/UserPostEnum.java
0 → 100644
View file @
9111e398
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
enums
;
import
lombok.Getter
;
import
java.util.*
;
@Getter
public
enum
UserPostEnum
{
//type 1生产单位 2使用单位 3充装单位 4检验检测机构
//主要负责人
ZYFZR
(
"主要负责人"
,
"6548"
,
"1,2,3"
),
//质量安全总监
ZLAQZJ
(
"质量安全总监"
,
"6550"
,
"1"
),
//质量安全员
ZLAQY
(
"质量安全员"
,
"6551"
,
"1"
),
//作业人员
ZYRY
(
"作业人员"
,
"6552"
,
"1,2,3,4"
),
//检验人员
ZJRY
(
"检验人员"
,
"66151"
,
"1,4"
),
//检测人员
JCRY
(
"检测人员"
,
"66152"
,
"1,4"
),
//安全总监
AQZJ
(
"安全总监"
,
"6547"
,
"2,3"
),
//安全员
AQY
(
"安全员"
,
"6549"
,
"2,3"
),
//质量保证体系人员(非字典表字段,后期修改code)
ZLBZTXRY
(
"质量保证体系人员"
,
"nullnull"
,
"1,3,4"
),
;
String
name
;
String
code
;
String
type
;
private
UserPostEnum
(
String
name
,
String
code
,
String
type
)
{
this
.
name
=
name
;
this
.
code
=
code
;
this
.
type
=
type
;
}
public
static
List
<
Map
<
String
,
String
>>
getEnumListByType
(
String
type
)
{
List
<
Map
<
String
,
String
>>
list
=
new
ArrayList
<>();
for
(
UserPostEnum
testEnum
:
EnumSet
.
allOf
(
UserPostEnum
.
class
))
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
if
(
testEnum
.
getType
().
contains
(
type
))
{
map
.
put
(
"name"
,
testEnum
.
getName
());
map
.
put
(
"code"
,
testEnum
.
getCode
());
list
.
add
(
map
);
}
}
return
list
;
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/mapper/ZLStatisticsMapper.java
View file @
9111e398
...
...
@@ -26,4 +26,6 @@ public interface ZLStatisticsMapper {
List
<
Map
<
String
,
Object
>>
supervisorCount
(
@Param
(
"screenDto"
)
DPFilterParamDto
screenDto
);
String
getOrgCodeByCompanyCode
(
@Param
(
"cityCode"
)
String
cityCode
);
List
<
Map
<
String
,
String
>>
userCountNew
(
@Param
(
"screenDto"
)
DPFilterParamDto
screenDto
,
@Param
(
"unitTypeList"
)
List
<
String
>
unitTypeList
);
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/resources/mapper/ZLStatisticsMapper.xml
View file @
9111e398
...
...
@@ -11,7 +11,7 @@
WHERE company_code = #{screenDto.cityCode}
) AS subquery
JOIN tz_base_enterprise_info bi ON bi.supervise_org_code LIKE CONCAT(subquery.org_code, '%')
where
bi.equip_category is not null and bi.equip_category != '[]' and bi.unit_type is not null;
where
bi.unit_type is not null
</select>
<select
id=
"testOrg"
resultType=
"java.util.Map"
>
SELECT COUNT(1),
...
...
@@ -35,7 +35,7 @@
INNER JOIN tzs_user_info tui ON bi.use_unit_code = tui.unit_code
WHERE
tui.post LIKE concat ( '%', '6552', '%' )
AND bi.unit_type IS NOT NULL
;
AND bi.unit_type IS NOT NULL
</select>
<select
id=
"supervisorCount"
resultType=
"java.util.Map"
>
SELECT
...
...
@@ -52,6 +52,23 @@
<select
id=
"getOrgCodeByCompanyCode"
resultType=
"java.lang.String"
>
select org_code from privilege_company where company_code = #{cityCode} limit 1
</select>
<select
id=
"userCountNew"
resultType=
"java.util.Map"
>
SELECT
tui.post
FROM
( SELECT org_code FROM privilege_company WHERE company_code = #{screenDto.cityCode} ) AS subquery
INNER JOIN tz_base_enterprise_info bi ON bi.supervise_org_code LIKE CONCAT ( subquery.org_code, '%' )
INNER JOIN tzs_user_info tui ON bi.use_unit_code = tui.unit_code
WHERE
bi.unit_type IS NOT NULL
AND tui.post IS NOT NULL
<if
test=
"unitTypeList != null and unitTypeList.size() > 0"
>
AND
<foreach
collection=
"unitTypeList"
item=
"unitType"
open=
"("
separator=
"OR"
close=
")"
>
bi.unit_type LIKE concat ( '%', #{unitType}, '%' )
</foreach>
</if>
</select>
</mapper>
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/ZLDPStatisticsController.java
View file @
9111e398
...
...
@@ -57,6 +57,13 @@ public class ZLDPStatisticsController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/userCountNew"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏-总览-左屏-人员统计新"
,
notes
=
"大屏-总览-左屏-人员统计"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
userCountNew
(
@RequestBody
DPFilterParamDto
screenDto
)
{
return
ResponseHelper
.
buildResponse
(
statisticsService
.
userCountNew
(
screenDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/supervisorCount"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏-总览-左屏-行业主管部门统计"
,
notes
=
"大屏-总览-左屏-行业主管部门统计"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
supervisorCount
(
@RequestBody
DPFilterParamDto
screenDto
)
{
...
...
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/ZLDPStatisticsServiceImpl.java
View file @
9111e398
...
...
@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONArray;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto
;
import
com.yeejoin.amos.boot.module.common.api.enums.UnitTypeEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.UserPostEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.mapper.ZLStatisticsMapper
;
import
org.apache.lucene.queryparser.classic.QueryParser
;
import
org.elasticsearch.action.search.SearchRequest
;
...
...
@@ -17,6 +19,7 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
...
...
@@ -40,21 +43,33 @@ public class ZLDPStatisticsServiceImpl {
public
List
<
Map
<
String
,
Object
>>
companyInfo
(
DPFilterParamDto
screenDto
)
{
List
<
Map
<
String
,
Object
>>
list
=
screenMapper
.
getCompanyInfo
(
screenDto
);
List
<
Map
<
String
,
Object
>>
returnList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
list
=
screenMapper
.
getCompanyInfo
(
screenDto
);
List
<
Map
<
String
,
Object
>>
returnList
=
new
ArrayList
<>();
//数据处理后Map,key为企业类型+设备,value为计数
Map
<
String
,
Integer
>
dataMap
=
new
HashMap
<>();
for
(
Map
<
String
,
Object
>
map
:
list
)
{
JSONArray
equipCategoryArray
=
(
JSONArray
)
JSONArray
.
parse
((
String
)
map
.
get
(
"equipCategory"
));
String
[]
UnitTypeArray
=
((
String
)
map
.
get
(
"unitType"
)).
split
(
"#"
);
for
(
int
i
=
0
;
i
<
UnitTypeArray
.
length
;
i
++)
{
String
unitTypeName
=
UnitTypeArray
[
i
];
for
(
int
j
=
0
;
j
<
equipCategoryArray
.
size
();
j
++)
{
if
(
dataMap
.
containsKey
(
unitTypeName
+
equipCategoryArray
.
get
(
j
)))
{
dataMap
.
put
(
unitTypeName
+
equipCategoryArray
.
get
(
j
),
dataMap
.
get
(
unitTypeName
+
equipCategoryArray
.
get
(
j
))
+
1
);
for
(
Map
<
String
,
Object
>
map
:
list
){
if
(
null
==
map
.
get
(
"equipCategory"
)
||
CollectionUtils
.
isEmpty
((
JSONArray
)
JSONArray
.
parse
((
String
)
map
.
get
(
"equipCategory"
)))){
String
[]
UnitTypeArray
=
((
String
)
map
.
get
(
"unitType"
)).
split
(
"#"
);
for
(
int
i
=
0
;
i
<
UnitTypeArray
.
length
;
i
++)
{
String
unitTypeName
=
UnitTypeArray
[
i
];
if
(
dataMap
.
containsKey
(
unitTypeName
+
"null"
))
{
dataMap
.
put
(
unitTypeName
+
"null"
,
dataMap
.
get
(
unitTypeName
+
"null"
)
+
1
);
}
else
{
dataMap
.
put
(
unitTypeName
+
equipCategoryArray
.
get
(
j
),
1
);
dataMap
.
put
(
unitTypeName
+
"null"
,
1
);
}
}
}
else
{
JSONArray
equipCategoryArray
=
(
JSONArray
)
JSONArray
.
parse
((
String
)
map
.
get
(
"equipCategory"
));
String
[]
UnitTypeArray
=
((
String
)
map
.
get
(
"unitType"
)).
split
(
"#"
);
for
(
int
i
=
0
;
i
<
UnitTypeArray
.
length
;
i
++)
{
String
unitTypeName
=
UnitTypeArray
[
i
];
for
(
int
j
=
0
;
j
<
equipCategoryArray
.
size
();
j
++)
{
if
(
dataMap
.
containsKey
(
unitTypeName
+
equipCategoryArray
.
get
(
j
)))
{
dataMap
.
put
(
unitTypeName
+
equipCategoryArray
.
get
(
j
),
dataMap
.
get
(
unitTypeName
+
equipCategoryArray
.
get
(
j
))
+
1
);
}
else
{
dataMap
.
put
(
unitTypeName
+
equipCategoryArray
.
get
(
j
),
1
);
}
}
}
}
...
...
@@ -71,190 +86,219 @@ public class ZLDPStatisticsServiceImpl {
*/
//充装Map
Map
<
String
,
Object
>
chongzhuangMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
chongzhuangCompanyList
=
new
ArrayList
<>();
chongzhuangMap
.
put
(
"key"
,
"chongzhuangCompany"
);
chongzhuangMap
.
put
(
"value"
,
"充装单位"
);
Map
<
String
,
Object
>
chongzhuangMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
chongzhuangCompanyList
=
new
ArrayList
<>();
chongzhuangMap
.
put
(
"key"
,
"chongzhuangCompany"
);
chongzhuangMap
.
put
(
"value"
,
"充装单位"
);
//充装压力容器
Map
<
String
,
Object
>
chongzhuangyalirongqiMap
=
new
HashMap
<>();
chongzhuangyalirongqiMap
.
put
(
"key"
,
"key04"
);
chongzhuangyalirongqiMap
.
put
(
"name"
,
"气瓶"
);
chongzhuangyalirongqiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"充装单位2000"
,
0
));
Map
<
String
,
Object
>
chongzhuangyalirongqiMap
=
new
HashMap
<>();
chongzhuangyalirongqiMap
.
put
(
"key"
,
"key04"
);
chongzhuangyalirongqiMap
.
put
(
"name"
,
"气瓶"
);
chongzhuangyalirongqiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"充装单位2000"
,
0
));
chongzhuangCompanyList
.
add
(
chongzhuangyalirongqiMap
);
chongzhuangMap
.
put
(
"data"
,
chongzhuangCompanyList
);
chongzhuangMap
.
put
(
"data"
,
chongzhuangCompanyList
);
//无设备类型
Map
<
String
,
Object
>
chongzhuangNullMap
=
new
HashMap
<>();
chongzhuangNullMap
.
put
(
"key"
,
"key09"
);
chongzhuangNullMap
.
put
(
"name"
,
"无设备类型"
);
chongzhuangNullMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"充装单位null"
,
0
));
chongzhuangCompanyList
.
add
(
chongzhuangNullMap
);
chongzhuangMap
.
put
(
"data"
,
chongzhuangCompanyList
);
//安改维Map
Map
<
String
,
Object
>
angaiweiMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
angaiweiCompanyList
=
new
ArrayList
<>();
angaiweiMap
.
put
(
"key"
,
"angaiweiCompany"
);
angaiweiMap
.
put
(
"value"
,
"安改维单位"
);
Map
<
String
,
Object
>
angaiweiMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
angaiweiCompanyList
=
new
ArrayList
<>();
angaiweiMap
.
put
(
"key"
,
"angaiweiCompany"
);
angaiweiMap
.
put
(
"value"
,
"安改维单位"
);
//安改维电梯
Map
<
String
,
Object
>
angaiweidiantiMap
=
new
HashMap
<>();
angaiweidiantiMap
.
put
(
"key"
,
"key01"
);
angaiweidiantiMap
.
put
(
"name"
,
"电梯"
);
angaiweidiantiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"安装改造维修单位3000"
,
0
));
Map
<
String
,
Object
>
angaiweidiantiMap
=
new
HashMap
<>();
angaiweidiantiMap
.
put
(
"key"
,
"key01"
);
angaiweidiantiMap
.
put
(
"name"
,
"电梯"
);
angaiweidiantiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"安装改造维修单位3000"
,
0
));
angaiweiCompanyList
.
add
(
angaiweidiantiMap
);
//安改维锅炉
Map
<
String
,
Object
>
angaiweiguoluMap
=
new
HashMap
<>();
angaiweiguoluMap
.
put
(
"key"
,
"key02"
);
angaiweiguoluMap
.
put
(
"name"
,
"锅炉"
);
angaiweiguoluMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"安装改造维修单位1000"
,
0
));
Map
<
String
,
Object
>
angaiweiguoluMap
=
new
HashMap
<>();
angaiweiguoluMap
.
put
(
"key"
,
"key02"
);
angaiweiguoluMap
.
put
(
"name"
,
"锅炉"
);
angaiweiguoluMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"安装改造维修单位1000"
,
0
));
angaiweiCompanyList
.
add
(
angaiweiguoluMap
);
//安改维场内机动车
Map
<
String
,
Object
>
angaiweijidongcheMap
=
new
HashMap
<>();
angaiweijidongcheMap
.
put
(
"key"
,
"key03"
);
angaiweijidongcheMap
.
put
(
"name"
,
"场内机动车"
);
angaiweijidongcheMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"安装改造维修单位5000"
,
0
));
Map
<
String
,
Object
>
angaiweijidongcheMap
=
new
HashMap
<>();
angaiweijidongcheMap
.
put
(
"key"
,
"key03"
);
angaiweijidongcheMap
.
put
(
"name"
,
"场内机动车"
);
angaiweijidongcheMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"安装改造维修单位5000"
,
0
));
angaiweiCompanyList
.
add
(
angaiweijidongcheMap
);
//安改维压力管道
Map
<
String
,
Object
>
angaiweiyaliguandaoMap
=
new
HashMap
<>();
angaiweiyaliguandaoMap
.
put
(
"key"
,
"key05"
);
angaiweiyaliguandaoMap
.
put
(
"name"
,
"压力管道"
);
angaiweiyaliguandaoMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"安装改造维修单位9000"
,
0
));
Map
<
String
,
Object
>
angaiweiyaliguandaoMap
=
new
HashMap
<>();
angaiweiyaliguandaoMap
.
put
(
"key"
,
"key05"
);
angaiweiyaliguandaoMap
.
put
(
"name"
,
"压力管道"
);
angaiweiyaliguandaoMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"安装改造维修单位9000"
,
0
));
angaiweiCompanyList
.
add
(
angaiweiyaliguandaoMap
);
//安改维起重机械
Map
<
String
,
Object
>
angaiweiqizhongjixieMap
=
new
HashMap
<>();
angaiweiqizhongjixieMap
.
put
(
"key"
,
"key06"
);
angaiweiqizhongjixieMap
.
put
(
"name"
,
"起重机械"
);
angaiweiqizhongjixieMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"安装改造维修单位4000"
,
0
));
Map
<
String
,
Object
>
angaiweiqizhongjixieMap
=
new
HashMap
<>();
angaiweiqizhongjixieMap
.
put
(
"key"
,
"key06"
);
angaiweiqizhongjixieMap
.
put
(
"name"
,
"起重机械"
);
angaiweiqizhongjixieMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"安装改造维修单位4000"
,
0
));
angaiweiCompanyList
.
add
(
angaiweiqizhongjixieMap
);
//安改维游乐设施
Map
<
String
,
Object
>
angaiweiyoulesheshiMap
=
new
HashMap
<>();
angaiweiyoulesheshiMap
.
put
(
"key"
,
"key07"
);
angaiweiyoulesheshiMap
.
put
(
"name"
,
"大型游乐设施"
);
angaiweiyoulesheshiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"安装改造维修单位6000"
,
0
));
Map
<
String
,
Object
>
angaiweiyoulesheshiMap
=
new
HashMap
<>();
angaiweiyoulesheshiMap
.
put
(
"key"
,
"key07"
);
angaiweiyoulesheshiMap
.
put
(
"name"
,
"大型游乐设施"
);
angaiweiyoulesheshiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"安装改造维修单位6000"
,
0
));
angaiweiCompanyList
.
add
(
angaiweiyoulesheshiMap
);
//安改维客运索道
Map
<
String
,
Object
>
angaiweikeyunsuodaoMap
=
new
HashMap
<>();
angaiweikeyunsuodaoMap
.
put
(
"key"
,
"key08"
);
angaiweikeyunsuodaoMap
.
put
(
"name"
,
"客运索道"
);
angaiweikeyunsuodaoMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"安装改造维修单位9000"
,
0
));
Map
<
String
,
Object
>
angaiweikeyunsuodaoMap
=
new
HashMap
<>();
angaiweikeyunsuodaoMap
.
put
(
"key"
,
"key08"
);
angaiweikeyunsuodaoMap
.
put
(
"name"
,
"客运索道"
);
angaiweikeyunsuodaoMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"安装改造维修单位9000"
,
0
));
angaiweiCompanyList
.
add
(
angaiweikeyunsuodaoMap
);
angaiweiMap
.
put
(
"data"
,
angaiweiCompanyList
);
angaiweiMap
.
put
(
"data"
,
angaiweiCompanyList
);
//无设备类型
Map
<
String
,
Object
>
angaiweiNullMap
=
new
HashMap
<>();
angaiweiNullMap
.
put
(
"key"
,
"key09"
);
angaiweiNullMap
.
put
(
"name"
,
"无设备类型"
);
angaiweiNullMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"安装改造维修单位null"
,
0
));
angaiweiCompanyList
.
add
(
angaiweiNullMap
);
angaiweiMap
.
put
(
"data"
,
angaiweiCompanyList
);
//设计Map
Map
<
String
,
Object
>
shejiMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
shejiCompanyList
=
new
ArrayList
<>();
shejiMap
.
put
(
"key"
,
"shejiCompany"
);
shejiMap
.
put
(
"value"
,
"设计单位"
);
Map
<
String
,
Object
>
shejiMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
shejiCompanyList
=
new
ArrayList
<>();
shejiMap
.
put
(
"key"
,
"shejiCompany"
);
shejiMap
.
put
(
"value"
,
"设计单位"
);
//设计压力容器
Map
<
String
,
Object
>
shejiyalirongqiMap
=
new
HashMap
<>();
shejiyalirongqiMap
.
put
(
"key"
,
"key04"
);
shejiyalirongqiMap
.
put
(
"name"
,
"压力容器"
);
shejiyalirongqiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"设计单位2000"
,
0
));
Map
<
String
,
Object
>
shejiyalirongqiMap
=
new
HashMap
<>();
shejiyalirongqiMap
.
put
(
"key"
,
"key04"
);
shejiyalirongqiMap
.
put
(
"name"
,
"压力容器"
);
shejiyalirongqiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"设计单位2000"
,
0
));
shejiCompanyList
.
add
(
shejiyalirongqiMap
);
//设计压力管道
Map
<
String
,
Object
>
shejiyaliguandaoMap
=
new
HashMap
<>();
shejiyaliguandaoMap
.
put
(
"key"
,
"key05"
);
shejiyaliguandaoMap
.
put
(
"name"
,
"压力管道"
);
shejiyaliguandaoMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"设计单位8000"
,
0
));
Map
<
String
,
Object
>
shejiyaliguandaoMap
=
new
HashMap
<>();
shejiyaliguandaoMap
.
put
(
"key"
,
"key05"
);
shejiyaliguandaoMap
.
put
(
"name"
,
"压力管道"
);
shejiyaliguandaoMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"设计单位8000"
,
0
));
shejiCompanyList
.
add
(
shejiyaliguandaoMap
);
shejiMap
.
put
(
"data"
,
shejiCompanyList
);
shejiMap
.
put
(
"data"
,
shejiCompanyList
);
//制造Map
Map
<
String
,
Object
>
zhizaoMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
zhizaoCompanyList
=
new
ArrayList
<>();
zhizaoMap
.
put
(
"key"
,
"zhizaoCompany"
);
zhizaoMap
.
put
(
"value"
,
"制造单位"
);
Map
<
String
,
Object
>
zhizaoMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
zhizaoCompanyList
=
new
ArrayList
<>();
zhizaoMap
.
put
(
"key"
,
"zhizaoCompany"
);
zhizaoMap
.
put
(
"value"
,
"制造单位"
);
//制造电梯
Map
<
String
,
Object
>
zhizaodiantiMap
=
new
HashMap
<>();
zhizaodiantiMap
.
put
(
"key"
,
"key01"
);
zhizaodiantiMap
.
put
(
"name"
,
"电梯"
);
zhizaodiantiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"制造单位3000"
,
0
));
Map
<
String
,
Object
>
zhizaodiantiMap
=
new
HashMap
<>();
zhizaodiantiMap
.
put
(
"key"
,
"key01"
);
zhizaodiantiMap
.
put
(
"name"
,
"电梯"
);
zhizaodiantiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"制造单位3000"
,
0
));
zhizaoCompanyList
.
add
(
zhizaodiantiMap
);
//制造锅炉
Map
<
String
,
Object
>
zhizaoguoluMap
=
new
HashMap
<>();
zhizaoguoluMap
.
put
(
"key"
,
"key02"
);
zhizaoguoluMap
.
put
(
"name"
,
"锅炉"
);
zhizaoguoluMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"制造单位1000"
,
0
));
Map
<
String
,
Object
>
zhizaoguoluMap
=
new
HashMap
<>();
zhizaoguoluMap
.
put
(
"key"
,
"key02"
);
zhizaoguoluMap
.
put
(
"name"
,
"锅炉"
);
zhizaoguoluMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"制造单位1000"
,
0
));
zhizaoCompanyList
.
add
(
zhizaoguoluMap
);
//制造锅炉
Map
<
String
,
Object
>
zhizaojidongcheMap
=
new
HashMap
<>();
zhizaojidongcheMap
.
put
(
"key"
,
"key03"
);
zhizaojidongcheMap
.
put
(
"name"
,
"场内机动车"
);
zhizaojidongcheMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"制造单位5000"
,
0
));
Map
<
String
,
Object
>
zhizaojidongcheMap
=
new
HashMap
<>();
zhizaojidongcheMap
.
put
(
"key"
,
"key03"
);
zhizaojidongcheMap
.
put
(
"name"
,
"场内机动车"
);
zhizaojidongcheMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"制造单位5000"
,
0
));
zhizaoCompanyList
.
add
(
zhizaojidongcheMap
);
//制造压力容器
Map
<
String
,
Object
>
zhizaoyalirongqiMap
=
new
HashMap
<>();
zhizaoyalirongqiMap
.
put
(
"key"
,
"key04"
);
zhizaoyalirongqiMap
.
put
(
"name"
,
"压力容器"
);
zhizaoyalirongqiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"制造单位2000"
,
0
));
Map
<
String
,
Object
>
zhizaoyalirongqiMap
=
new
HashMap
<>();
zhizaoyalirongqiMap
.
put
(
"key"
,
"key04"
);
zhizaoyalirongqiMap
.
put
(
"name"
,
"压力容器"
);
zhizaoyalirongqiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"制造单位2000"
,
0
));
zhizaoCompanyList
.
add
(
zhizaoyalirongqiMap
);
//制造起重机械
Map
<
String
,
Object
>
zhizaoqizhongjixieMap
=
new
HashMap
<>();
zhizaoqizhongjixieMap
.
put
(
"key"
,
"key06"
);
zhizaoqizhongjixieMap
.
put
(
"name"
,
"起重机械"
);
zhizaoqizhongjixieMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"制造单位4000"
,
0
));
Map
<
String
,
Object
>
zhizaoqizhongjixieMap
=
new
HashMap
<>();
zhizaoqizhongjixieMap
.
put
(
"key"
,
"key06"
);
zhizaoqizhongjixieMap
.
put
(
"name"
,
"起重机械"
);
zhizaoqizhongjixieMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"制造单位4000"
,
0
));
zhizaoCompanyList
.
add
(
zhizaoqizhongjixieMap
);
//制造游乐设施
Map
<
String
,
Object
>
zhizaoyoulesheshiMap
=
new
HashMap
<>();
zhizaoyoulesheshiMap
.
put
(
"key"
,
"key07"
);
zhizaoyoulesheshiMap
.
put
(
"name"
,
"大型游乐设施"
);
zhizaoyoulesheshiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"制造单位6000"
,
0
));
Map
<
String
,
Object
>
zhizaoyoulesheshiMap
=
new
HashMap
<>();
zhizaoyoulesheshiMap
.
put
(
"key"
,
"key07"
);
zhizaoyoulesheshiMap
.
put
(
"name"
,
"大型游乐设施"
);
zhizaoyoulesheshiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"制造单位6000"
,
0
));
zhizaoCompanyList
.
add
(
zhizaoyoulesheshiMap
);
//制造客运索道
Map
<
String
,
Object
>
zhizaokeyunsuodaoMap
=
new
HashMap
<>();
zhizaokeyunsuodaoMap
.
put
(
"key"
,
"key08"
);
zhizaokeyunsuodaoMap
.
put
(
"name"
,
"客运索道"
);
zhizaokeyunsuodaoMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"制造单位9000"
,
0
));
Map
<
String
,
Object
>
zhizaokeyunsuodaoMap
=
new
HashMap
<>();
zhizaokeyunsuodaoMap
.
put
(
"key"
,
"key08"
);
zhizaokeyunsuodaoMap
.
put
(
"name"
,
"客运索道"
);
zhizaokeyunsuodaoMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"制造单位9000"
,
0
));
zhizaoCompanyList
.
add
(
zhizaokeyunsuodaoMap
);
zhizaoMap
.
put
(
"data"
,
zhizaoCompanyList
);
zhizaoMap
.
put
(
"data"
,
zhizaoCompanyList
);
//无设备类型
Map
<
String
,
Object
>
zhizaoNullMap
=
new
HashMap
<>();
zhizaoNullMap
.
put
(
"key"
,
"key09"
);
zhizaoNullMap
.
put
(
"name"
,
"无设备类型"
);
zhizaoNullMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"制造单位null"
,
0
));
zhizaoCompanyList
.
add
(
zhizaoNullMap
);
zhizaoMap
.
put
(
"data"
,
zhizaoCompanyList
);
//使用Map
Map
<
String
,
Object
>
shiyongMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
shiyongCompanyList
=
new
ArrayList
<>();
shiyongMap
.
put
(
"key"
,
"shiyongCompany"
);
shiyongMap
.
put
(
"value"
,
"使用单位"
);
Map
<
String
,
Object
>
shiyongMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
shiyongCompanyList
=
new
ArrayList
<>();
shiyongMap
.
put
(
"key"
,
"shiyongCompany"
);
shiyongMap
.
put
(
"value"
,
"使用单位"
);
//使用电梯
Map
<
String
,
Object
>
shiyongdiantiMap
=
new
HashMap
<>();
shiyongdiantiMap
.
put
(
"key"
,
"key01"
);
shiyongdiantiMap
.
put
(
"name"
,
"电梯"
);
shiyongdiantiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"使用单位3000"
,
0
));
Map
<
String
,
Object
>
shiyongdiantiMap
=
new
HashMap
<>();
shiyongdiantiMap
.
put
(
"key"
,
"key01"
);
shiyongdiantiMap
.
put
(
"name"
,
"电梯"
);
shiyongdiantiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"使用单位3000"
,
0
));
shiyongCompanyList
.
add
(
shiyongdiantiMap
);
//使用锅炉
Map
<
String
,
Object
>
shiyongguoluMap
=
new
HashMap
<>();
shiyongguoluMap
.
put
(
"key"
,
"key02"
);
shiyongguoluMap
.
put
(
"name"
,
"锅炉"
);
shiyongguoluMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"使用单位1000"
,
0
));
Map
<
String
,
Object
>
shiyongguoluMap
=
new
HashMap
<>();
shiyongguoluMap
.
put
(
"key"
,
"key02"
);
shiyongguoluMap
.
put
(
"name"
,
"锅炉"
);
shiyongguoluMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"使用单位1000"
,
0
));
shiyongCompanyList
.
add
(
shiyongguoluMap
);
//使用锅炉
Map
<
String
,
Object
>
shiyongjidongcheMap
=
new
HashMap
<>();
shiyongjidongcheMap
.
put
(
"key"
,
"key03"
);
shiyongjidongcheMap
.
put
(
"name"
,
"场内机动车"
);
shiyongjidongcheMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"使用单位5000"
,
0
));
Map
<
String
,
Object
>
shiyongjidongcheMap
=
new
HashMap
<>();
shiyongjidongcheMap
.
put
(
"key"
,
"key03"
);
shiyongjidongcheMap
.
put
(
"name"
,
"场内机动车"
);
shiyongjidongcheMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"使用单位5000"
,
0
));
shiyongCompanyList
.
add
(
shiyongjidongcheMap
);
//使用压力容器
Map
<
String
,
Object
>
shiyongyalirongqiMap
=
new
HashMap
<>();
shiyongyalirongqiMap
.
put
(
"key"
,
"key04"
);
shiyongyalirongqiMap
.
put
(
"name"
,
"压力容器"
);
shiyongyalirongqiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"使用单位2000"
,
0
));
Map
<
String
,
Object
>
shiyongyalirongqiMap
=
new
HashMap
<>();
shiyongyalirongqiMap
.
put
(
"key"
,
"key04"
);
shiyongyalirongqiMap
.
put
(
"name"
,
"压力容器"
);
shiyongyalirongqiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"使用单位2000"
,
0
));
shiyongCompanyList
.
add
(
shiyongyalirongqiMap
);
//使用压力管道
Map
<
String
,
Object
>
shiyongyaliguandaoMap
=
new
HashMap
<>();
shiyongyaliguandaoMap
.
put
(
"key"
,
"key05"
);
shiyongyaliguandaoMap
.
put
(
"name"
,
"压力管道"
);
shiyongyaliguandaoMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"使用单位9000"
,
0
));
Map
<
String
,
Object
>
shiyongyaliguandaoMap
=
new
HashMap
<>();
shiyongyaliguandaoMap
.
put
(
"key"
,
"key05"
);
shiyongyaliguandaoMap
.
put
(
"name"
,
"压力管道"
);
shiyongyaliguandaoMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"使用单位9000"
,
0
));
shiyongCompanyList
.
add
(
shiyongyaliguandaoMap
);
//使用起重机械
Map
<
String
,
Object
>
shiyongqizhongjixieMap
=
new
HashMap
<>();
shiyongqizhongjixieMap
.
put
(
"key"
,
"key06"
);
shiyongqizhongjixieMap
.
put
(
"name"
,
"起重机械"
);
shiyongqizhongjixieMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"使用单位4000"
,
0
));
Map
<
String
,
Object
>
shiyongqizhongjixieMap
=
new
HashMap
<>();
shiyongqizhongjixieMap
.
put
(
"key"
,
"key06"
);
shiyongqizhongjixieMap
.
put
(
"name"
,
"起重机械"
);
shiyongqizhongjixieMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"使用单位4000"
,
0
));
shiyongCompanyList
.
add
(
shiyongqizhongjixieMap
);
//使用游乐设施
Map
<
String
,
Object
>
shiyongyoulesheshiMap
=
new
HashMap
<>();
shiyongyoulesheshiMap
.
put
(
"key"
,
"key07"
);
shiyongyoulesheshiMap
.
put
(
"name"
,
"大型游乐设施"
);
shiyongyoulesheshiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"使用单位6000"
,
0
));
Map
<
String
,
Object
>
shiyongyoulesheshiMap
=
new
HashMap
<>();
shiyongyoulesheshiMap
.
put
(
"key"
,
"key07"
);
shiyongyoulesheshiMap
.
put
(
"name"
,
"大型游乐设施"
);
shiyongyoulesheshiMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"使用单位6000"
,
0
));
shiyongCompanyList
.
add
(
shiyongyoulesheshiMap
);
//使用客运索道
Map
<
String
,
Object
>
shiyongkeyunsuodaoMap
=
new
HashMap
<>();
shiyongkeyunsuodaoMap
.
put
(
"key"
,
"key08"
);
shiyongkeyunsuodaoMap
.
put
(
"name"
,
"客运索道"
);
shiyongkeyunsuodaoMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"使用单位9000"
,
0
));
Map
<
String
,
Object
>
shiyongkeyunsuodaoMap
=
new
HashMap
<>();
shiyongkeyunsuodaoMap
.
put
(
"key"
,
"key08"
);
shiyongkeyunsuodaoMap
.
put
(
"name"
,
"客运索道"
);
shiyongkeyunsuodaoMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"使用单位9000"
,
0
));
shiyongCompanyList
.
add
(
shiyongkeyunsuodaoMap
);
shiyongMap
.
put
(
"data"
,
shiyongCompanyList
);
shiyongMap
.
put
(
"data"
,
shiyongCompanyList
);
//无设备类型
Map
<
String
,
Object
>
shiyongNullMap
=
new
HashMap
<>();
shiyongNullMap
.
put
(
"key"
,
"key09"
);
shiyongNullMap
.
put
(
"name"
,
"无设备类型"
);
shiyongNullMap
.
put
(
"value"
,
dataMap
.
getOrDefault
(
"使用单位null"
,
0
));
shiyongCompanyList
.
add
(
shiyongNullMap
);
shiyongMap
.
put
(
"data"
,
shiyongCompanyList
);
returnList
.
add
(
zhizaoMap
);
returnList
.
add
(
angaiweiMap
);
...
...
@@ -450,4 +494,27 @@ public class ZLDPStatisticsServiceImpl {
}
return
orgCode
;
}
public
Map
<
String
,
Object
>
userCountNew
(
DPFilterParamDto
screenDto
)
{
List
<
String
>
unitTypeList
=
UnitTypeEnum
.
getNameListByType
(
screenDto
.
getCompanyType
());
List
<
Map
<
String
,
String
>>
userListMap
=
UserPostEnum
.
getEnumListByType
(
screenDto
.
getCompanyType
());
List
<
Map
<
String
,
String
>>
list
=
screenMapper
.
userCountNew
(
screenDto
,
unitTypeList
);
Map
<
String
,
Integer
>
dataMap
=
new
HashMap
<>();
for
(
Map
<
String
,
String
>
map
:
list
)
{
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
map
.
get
(
"post"
));
for
(
int
j
=
0
;
j
<
jsonArray
.
size
();
j
++){
dataMap
.
put
(
jsonArray
.
getString
(
j
),
dataMap
.
getOrDefault
(
jsonArray
.
getString
(
j
),
1
)
+
1
);
}
}
Map
<
String
,
Object
>
returnMap
=
new
HashMap
<>();
List
<
Object
>
xdata
=
new
ArrayList
<>();
List
<
Object
>
ydata
=
new
ArrayList
<>();
for
(
Map
<
String
,
String
>
map
:
userListMap
)
{
xdata
.
add
(
map
.
get
(
"name"
));
ydata
.
add
(
dataMap
.
getOrDefault
(
map
.
get
(
"code"
),
0
));
}
returnMap
.
put
(
"xdata"
,
xdata
);
returnMap
.
put
(
"ydata"
,
ydata
);
return
returnMap
;
}
}
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