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
3782d297
Commit
3782d297
authored
Jul 25, 2024
by
王果
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…
Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents
1d3bef08
20786824
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
616 additions
and
295 deletions
+616
-295
IAlertStatisticsService.java
.../module/elevator/api/service/IAlertStatisticsService.java
+0
-2
StatisticsController.java
.../module/elevator/biz/controller/StatisticsController.java
+0
-10
TzsAuthController.java
...oot/module/elevator/biz/controller/TzsAuthController.java
+0
-1
AlertStatisticsServiceImpl.java
...elevator/biz/service/impl/AlertStatisticsServiceImpl.java
+0
-97
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
JgReformNoticeController.java
...ot/module/jg/biz/controller/JgReformNoticeController.java
+3
-1
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+62
-18
AlertStatisticsMapper.java
...t/module/statistics/api/mapper/AlertStatisticsMapper.java
+2
-0
ZLStatisticsMapper.java
...boot/module/statistics/api/mapper/ZLStatisticsMapper.java
+2
-0
ZLStatisticsMapper.xml
...tics-api/src/main/resources/mapper/ZLStatisticsMapper.xml
+19
-2
AQZSDPStatisticsController.java
.../statistcs/biz/controller/AQZSDPStatisticsController.java
+14
-14
JGDPStatisticsController.java
...le/statistcs/biz/controller/JGDPStatisticsController.java
+2
-2
StCommonController.java
...t/module/statistcs/biz/controller/StCommonController.java
+33
-0
ZLDPStatisticsController.java
...le/statistcs/biz/controller/ZLDPStatisticsController.java
+28
-5
StCommonServiceImpl.java
...odule/statistcs/biz/service/impl/StCommonServiceImpl.java
+33
-0
ZLDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/ZLDPStatisticsServiceImpl.java
+309
-143
No files found.
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-api/src/main/java/com/yeejoin/amos/boot/module/elevator/api/service/IAlertStatisticsService.java
View file @
3782d297
...
...
@@ -13,6 +13,4 @@ public interface IAlertStatisticsService {
void
statisticalGeneration
(
String
type
);
List
<
AlertStatistics
>
getList
(
String
date
)
throws
ParseException
;
JSONArray
statisticInfoByRegionAndDate
(
DPFilterParamDto
queryParams
);
}
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/controller/StatisticsController.java
View file @
3782d297
...
...
@@ -350,14 +350,4 @@ public class StatisticsController extends BaseController {
ExcelUtil
.
createTemplate
(
response
,
"困人救援超时情况统计"
,
"困人救援超时情况统计"
,
exportVos
,
AlertDispatchStatisticsExportVo
.
class
,
null
,
false
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/region/info"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询区域统计信息"
,
notes
=
"查询区域统计信息"
)
public
ResponseModel
<
JSONArray
>
statisticsRegionInfo
(
@Validated
@RequestBody
DPFilterParamDto
dpFilterParamDto
,
BindingResult
result
)
{
List
<
FieldError
>
fieldErrors
=
result
.
getFieldErrors
();
if
(!
fieldErrors
.
isEmpty
())
{
throw
new
BadRequest
(
fieldErrors
.
get
(
0
).
getDefaultMessage
());
}
return
ResponseHelper
.
buildResponse
(
alertStatisticsService
.
statisticInfoByRegionAndDate
(
dpFilterParamDto
));
}
}
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/controller/TzsAuthController.java
View file @
3782d297
...
...
@@ -73,7 +73,6 @@ public class TzsAuthController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取用户regionCode"
,
notes
=
"获取用户regionCode"
)
public
ResponseModel
<
List
<
String
>>
getUserRegincode
()
{
List
<
String
>
regionList
=
tzsAuthService
.
getUserRegionCode
();
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
return
ResponseHelper
.
buildResponse
(
regionList
);
}
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/service/impl/AlertStatisticsServiceImpl.java
View file @
3782d297
...
...
@@ -168,100 +168,4 @@ public class AlertStatisticsServiceImpl extends BaseService<AlertStatisticsDto,
return
alertStatistics
;
}
@Override
public
JSONArray
statisticInfoByRegionAndDate
(
DPFilterParamDto
params
)
{
LocalDate
today
=
LocalDate
.
now
();
LocalDate
startDate
;
LocalDate
endDate
;
String
regionCode
=
params
.
getCityCode
();
if
(
ObjectUtils
.
isEmpty
(
params
.
getBeginDate
())
||
ObjectUtils
.
isEmpty
(
params
.
getBeginDate
()))
{
startDate
=
today
.
minusDays
(
6
);
endDate
=
today
;
}
else
{
startDate
=
LocalDate
.
parse
(
params
.
getBeginDate
());
endDate
=
LocalDate
.
parse
(
params
.
getEndDate
());
}
params
.
setBeginDate
(
startDate
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
)));
params
.
setEndDate
(
endDate
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
)));
AlertStatistics
statistics
=
this
.
baseMapper
.
statisticsInfoByRegionAndDate
(
regionCode
,
startDate
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
)),
endDate
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
)));
JSONArray
jsonArray
=
new
JSONArray
();
if
(!
ObjectUtils
.
isEmpty
(
statistics
))
{
JSONObject
jsonObject0
=
new
JSONObject
();
jsonObject0
.
put
(
"key"
,
"dtkr"
);
jsonObject0
.
put
(
"value"
,
ValidationUtil
.
isEmpty
(
statistics
.
getTrappedPeople
())
?
0
:
statistics
.
getTrappedPeople
());
jsonObject0
.
put
(
"name"
,
"电梯困人"
);
JSONObject
jsonObject1
=
new
JSONObject
();
jsonObject1
.
put
(
"key"
,
"slts"
);
jsonObject1
.
put
(
"value"
,
ValidationUtil
.
isEmpty
(
statistics
.
getComplaint
())
?
0
:
statistics
.
getComplaint
());
jsonObject1
.
put
(
"name"
,
"受理投诉"
);
JSONObject
jsonObject2
=
new
JSONObject
();
jsonObject2
.
put
(
"key"
,
"gzbx"
);
jsonObject2
.
put
(
"value"
,
ValidationUtil
.
isEmpty
(
statistics
.
getBreakdownRescue
())
?
0
:
statistics
.
getBreakdownRescue
());
jsonObject2
.
put
(
"name"
,
"故障维修"
);
JSONObject
jsonObject3
=
new
JSONObject
();
jsonObject3
.
put
(
"key"
,
"jjbkck"
);
jsonObject3
.
put
(
"value"
,
ValidationUtil
.
isEmpty
(
statistics
.
getRescuePersonnel
())
?
0
:
statistics
.
getRescuePersonnel
());
jsonObject3
.
put
(
"name"
,
"解救被困乘客"
);
JSONObject
jsonObject4
=
new
JSONObject
();
jsonObject4
.
put
(
"key"
,
"30fzdd"
);
jsonObject4
.
put
(
"value"
,
ValidationUtil
.
isEmpty
(
statistics
.
getWithinThirtyRescue
())
?
0
:
statistics
.
getWithinThirtyRescue
());
jsonObject4
.
put
(
"name"
,
"30分钟内到达"
);
JSONObject
jsonObject5
=
new
JSONObject
();
jsonObject5
.
put
(
"key"
,
"pjjysj"
);
jsonObject5
.
put
(
"value"
,
ValidationUtil
.
isEmpty
(
statistics
.
getAvgTime
())
?
0
:
statistics
.
getAvgTime
());
jsonObject5
.
put
(
"name"
,
"平均救援时间"
);
String
orgCode
=
this
.
getAndSetOrgCode
(
regionCode
);
JSONObject
jsonObject6
=
new
JSONObject
();
jsonObject6
.
put
(
"key"
,
"jycq"
);
jsonObject6
.
put
(
"value"
,
this
.
getQuestionNumber
(
"检验超期"
,
params
,
orgCode
));
jsonObject6
.
put
(
"name"
,
"检验超期"
);
JSONObject
jsonObject7
=
new
JSONObject
();
jsonObject7
.
put
(
"key"
,
"jybhg"
);
jsonObject7
.
put
(
"value"
,
this
.
getQuestionNumber
(
"检验不合格"
,
params
,
orgCode
));
jsonObject7
.
put
(
"name"
,
"检验不合格"
);
JSONObject
jsonObject8
=
new
JSONObject
();
jsonObject8
.
put
(
"key"
,
"wbcq"
);
jsonObject8
.
put
(
"value"
,
this
.
getQuestionNumber
(
"维保超期"
,
params
,
orgCode
));
jsonObject8
.
put
(
"name"
,
"维保超期"
);
JSONObject
jsonObject9
=
new
JSONObject
();
jsonObject9
.
put
(
"key"
,
"csjsynx"
);
jsonObject9
.
put
(
"value"
,
this
.
getQuestionNumber
(
"超设计使用年限"
,
params
,
orgCode
));
jsonObject9
.
put
(
"name"
,
"超设计使用年限"
);
jsonArray
.
add
(
jsonObject0
);
jsonArray
.
add
(
jsonObject1
);
jsonArray
.
add
(
jsonObject2
);
jsonArray
.
add
(
jsonObject3
);
jsonArray
.
add
(
jsonObject4
);
jsonArray
.
add
(
jsonObject5
);
jsonArray
.
add
(
jsonObject6
);
jsonArray
.
add
(
jsonObject7
);
jsonArray
.
add
(
jsonObject8
);
jsonArray
.
add
(
jsonObject9
);
}
return
jsonArray
;
}
private
Long
getQuestionNumber
(
String
problemType
,
DPFilterParamDto
params
,
String
orgCode
)
{
return
this
.
getBaseMapper
().
countProblemByTypeDateAndOrgCode
(
problemType
,
params
,
orgCode
);
}
private
String
getAndSetOrgCode
(
String
region
)
{
String
orgCode
=
regionCodeOrgCodeMap
.
get
(
region
);
if
(
orgCode
==
null
)
{
orgCode
=
this
.
getBaseMapper
().
getOrgCodeByCompanyCode
(
region
);
if
(
orgCode
!=
null
)
{
regionCodeOrgCodeMap
.
put
(
region
,
orgCode
);
}
}
return
orgCode
;
}
}
\ No newline at end of file
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 @
3782d297
...
...
@@ -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 @
3782d297
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 @
3782d297
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-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgReformNoticeController.java
View file @
3782d297
...
...
@@ -64,7 +64,9 @@ public class JgReformNoticeController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/update"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新改造告知"
,
notes
=
"根据sequenceNbr更新改造告知"
)
public
ResponseModel
<
JgReformNoticeDto
>
updateBySequenceNbrJgReformNotice
(
@RequestParam
String
submitType
,
@RequestBody
JgReformNoticeDto
installationInfo
,
@RequestParam
(
value
=
"op"
,
required
=
false
)
String
op
)
{
public
ResponseModel
<
JgReformNoticeDto
>
updateBySequenceNbrJgReformNotice
(
@RequestParam
String
submitType
,
@RequestBody
JgReformNoticeDto
installationInfo
,
@RequestParam
(
value
=
"op"
,
required
=
false
)
String
op
)
{
if
(
Objects
.
isNull
(
installationInfo
))
{
throw
new
IllegalArgumentException
(
"参数installationInfo不能为空"
);
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
View file @
3782d297
...
...
@@ -5,6 +5,7 @@ import cn.hutool.core.map.MapBuilder;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.util.StringUtil
;
...
...
@@ -77,7 +78,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"renovationNoticeNew"
;
private
static
final
String
TABLE_PAGE_ID
=
"reformNoticeAdd"
;
private
final
List
<
String
>
NOT_FLOWING_STATE
=
Arrays
.
asList
(
"6610"
,
"6614"
,
"6615"
,
"6617"
,
"6616"
);
// 西安行政区划code
private
static
final
String
XIAN
=
"610100"
;
...
...
@@ -199,7 +200,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
// 字段转换
this
.
convertField
(
noticeDto
);
JgReformNotice
notice
=
this
.
getById
(
noticeDto
.
getSequenceNbr
());
this
.
checkRepeatUsed
(
submitType
,
notice
);
List
<
Map
<
String
,
Object
>>
deviceList
=
noticeDto
.
getDeviceList
();
List
<
String
>
records
=
deviceList
.
stream
().
map
(
equ
->
String
.
valueOf
(
equ
.
get
(
"SEQUENCE_NBR"
))).
collect
(
Collectors
.
toList
());
this
.
checkRepeatUsed
(
submitType
,
records
,
notice
);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
// 发起流程
if
(!
StringUtils
.
hasText
(
noticeDto
.
getInstanceId
()))
{
...
...
@@ -245,7 +248,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
}
dto
.
setNextExecuteUserCompanyCode
(
notice
.
getReceiveCompanyCode
());
dto
.
setVariable
(
commMap
);
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
completeOrReject
(
notice
.
getNextTaskId
(),
dto
,
op
);
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
completeOrReject
(
notice
.
getNextTaskId
(),
dto
,
"2"
);
// 提取节点等信息
WorkflowResultDto
workflowResultDto
=
commonService
.
buildWorkFlowInfo
(
Collections
.
singletonList
(
processTaskDTO
)).
get
(
0
);
BeanUtils
.
copyProperties
(
noticeDto
,
notice
);
...
...
@@ -273,6 +276,19 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
jgReformNoticeMapper
.
updateById
(
bean
);
}
jgReformNoticeEqMapper
.
delete
(
new
QueryWrapper
<
JgReformNoticeEq
>()
.
eq
(
"equip_transfer_id"
,
notice
.
getSequenceNbr
()));
// eq关系表
List
<
JgReformNoticeEq
>
noticeEqs
=
new
ArrayList
<>();
// 更新设备关系表
deviceList
.
forEach
(
obj
->
{
JgReformNoticeEq
jgRelationEquip
=
new
JgReformNoticeEq
();
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquipTransferId
(
String
.
valueOf
(
notice
.
getSequenceNbr
()));
noticeEqs
.
add
(
jgRelationEquip
);
});
jgReformNoticeEqMapper
.
insertBatchSomeColumn
(
noticeEqs
);
return
noticeDto
;
}
catch
(
BadRequest
|
LocalBadRequest
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
...
...
@@ -498,15 +514,13 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
equipList
.
forEach
(
equipMap
->
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
PROCESS_DEFINITION_KEY
).
equipRepeatUsedCheck
(
String
.
valueOf
(
equipMap
.
get
(
"SEQUENCE_NBR"
)),
companyCode
));
}
private
void
checkRepeatUsed
(
String
submitType
,
JgReformNotice
jgReformNotice
)
{
private
void
checkRepeatUsed
(
String
submitType
,
List
<
String
>
records
,
JgReformNotice
jgReformNotice
)
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
// 流程中校验
LambdaQueryWrapper
<
JgReformNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgReformNoticeEq:
:
getEquipTransferId
,
jgReformNotice
.
getSequenceNbr
());
List
<
JgReformNoticeEq
>
noticeEqs
=
jgReformNoticeEqMapper
.
selectList
(
queryWrapper
);
for
(
JgReformNoticeEq
noticeEq
:
noticeEqs
)
{
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
PROCESS_DEFINITION_KEY
).
equipRepeatUsedCheck
(
noticeEq
.
getEquId
(),
jgReformNotice
.
getInstallUnitCreditCode
());
}
records
.
forEach
(
record
->
{
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
PROCESS_DEFINITION_KEY
)
.
equipRepeatUsedCheck
(
record
,
jgReformNotice
.
getInstallUnitCreditCode
());
});
}
}
...
...
@@ -514,10 +528,13 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
* 删除 redis校验重复引用设备的数据
*/
private
void
delRepeatUseEquipData
(
JgReformNotice
notice
)
{
LambdaQueryWrapper
<
JgReformNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgReformNoticeEq:
:
getEquipTransferId
,
notice
.
getSequenceNbr
());
JgReformNoticeEq
jgRelationEquip
=
jgReformNoticeEqMapper
.
selectOne
(
queryWrapper
);
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
PROCESS_DEFINITION_KEY
).
delDataForCheckEquipRepeatUsed
(
Collections
.
singletonList
(
jgRelationEquip
.
getEquId
()),
notice
.
getInstallUnitCreditCode
());
if
(
NOT_FLOWING_STATE
.
contains
(
notice
.
getNoticeStatus
()))
{
LambdaQueryWrapper
<
JgReformNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgReformNoticeEq:
:
getEquipTransferId
,
notice
.
getSequenceNbr
());
List
<
JgReformNoticeEq
>
noticeEqs
=
jgReformNoticeEqMapper
.
selectList
(
queryWrapper
);
List
<
String
>
ids
=
noticeEqs
.
stream
().
map
(
JgReformNoticeEq:
:
getEquId
).
collect
(
Collectors
.
toList
());
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
PROCESS_DEFINITION_KEY
).
delDataForCheckEquipRepeatUsed
(
ids
,
notice
.
getInstallUnitCreditCode
());
}
}
private
void
rollBackForDelRedisData
()
{
...
...
@@ -546,7 +563,11 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
}
private
TaskModelDto
buildTempTaskModelDto
(
JgReformNotice
item
)
{
return
TaskModelDto
.
builder
().
model
(
item
).
taskContent
(
String
.
format
(
"来自%s的业务办理,【申请单号:%s】"
,
item
.
getEquListName
(),
item
.
getApplyNo
())).
taskCode
(
item
.
getApplyNo
()).
taskType
(
BusinessTypeEnum
.
JG_MODIFICATION_NOTIFICATION
.
getCode
()).
relationId
(
item
.
getSequenceNbr
()
+
""
).
build
();
return
TaskModelDto
.
builder
().
model
(
item
)
.
taskContent
(
String
.
format
(
"来自%s的业务办理,【申请单号:%s】"
,
item
.
getEquListName
(),
item
.
getApplyNo
()))
.
taskCode
(
item
.
getApplyNo
())
.
taskType
(
BusinessTypeEnum
.
JG_MODIFICATION_NOTIFICATION
.
getCode
())
.
relationId
(
item
.
getSequenceNbr
()
+
""
).
build
();
}
/**
...
...
@@ -570,7 +591,29 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
private
TaskModelDto
buildTaskModelDto
(
JgReformNotice
item
,
WorkflowResultDto
workflowResultDto
)
{
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
BeanUtil
.
copyProperties
(
item
,
taskMessageDto
);
return
TaskModelDto
.
builder
().
flowCreateDate
(
item
.
getCreateDate
()).
taskName
(
workflowResultDto
.
getNextTaskName
()).
taskCode
(
item
.
getApplyNo
()).
relationId
(
workflowResultDto
.
getInstanceId
()).
taskType
(
BusinessTypeEnum
.
JG_MODIFICATION_NOTIFICATION
.
getCode
()).
taskTypeLabel
(
BusinessTypeEnum
.
JG_MODIFICATION_NOTIFICATION
.
getName
()).
relationId
(
item
.
getInstanceId
()).
executeUserIds
(
workflowResultDto
.
getNextExecutorUserIds
()).
taskStatus
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()).
taskStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
()).
flowStatus
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()).
flowCode
(
workflowResultDto
.
getNextTaskId
()).
flowStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
()).
taskContent
(
String
.
format
(
"来自%s的业务办理,【申请单号:%s】"
,
item
.
getEquList
(),
item
.
getApplyNo
())).
taskDesc
(
String
.
format
(
"来自%s的业务办理,【申请单号:%s】"
,
item
.
getEquList
(),
item
.
getApplyNo
())).
startUserId
(
item
.
getCreateUserId
()).
startUser
(
item
.
getCreateUserName
()).
startUserCompanyName
(
item
.
getCreateUserCompanyName
()).
startDate
(
item
.
getCreateDate
()).
model
(
taskMessageDto
).
nextExecuteUser
(
item
.
getNextExecuteIds
()).
build
();
return
TaskModelDto
.
builder
()
.
flowCreateDate
(
item
.
getCreateDate
())
.
taskName
(
workflowResultDto
.
getNextTaskName
())
.
taskCode
(
item
.
getApplyNo
())
.
relationId
(
workflowResultDto
.
getInstanceId
())
.
taskType
(
BusinessTypeEnum
.
JG_MODIFICATION_NOTIFICATION
.
getCode
())
.
taskTypeLabel
(
BusinessTypeEnum
.
JG_MODIFICATION_NOTIFICATION
.
getName
())
.
relationId
(
item
.
getInstanceId
())
.
executeUserIds
(
workflowResultDto
.
getNextExecutorUserIds
())
.
taskStatus
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
())
.
taskStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
())
.
flowStatus
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
())
.
flowCode
(
workflowResultDto
.
getNextTaskId
())
.
flowStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
())
.
taskContent
(
String
.
format
(
"来自%s的业务办理,【申请单号:%s】"
,
item
.
getEquListName
(),
item
.
getApplyNo
()))
.
taskDesc
(
String
.
format
(
"来自%s的业务办理,【申请单号:%s】"
,
item
.
getEquListName
(),
item
.
getApplyNo
()))
.
startUserId
(
item
.
getCreateUserId
()).
startUser
(
item
.
getCreateUserName
())
.
startUserCompanyName
(
item
.
getCreateUserCompanyName
())
.
startDate
(
item
.
getCreateDate
())
.
model
(
taskMessageDto
)
.
nextExecuteUser
(
item
.
getNextExecuteIds
())
.
startDate
(
new
Date
())
.
build
();
}
/**
...
...
@@ -841,9 +884,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
taskV2Model
=
this
.
updateLastTodo
(
jgReformNotice
,
FlowStatusEnum
.
REJECTED
);
this
.
createNewTodo
(
jgReformNotice
,
workflowResultDto
,
taskV2Model
,
FlowStatusEnum
.
REJECTED
);
jgReformNoticeMapper
.
updateById
(
jgReformNotice
);
this
.
delRepeatUseEquipData
(
jgReformNotice
);
}
commonService
.
saveExecuteFlowData2Redis
(
instanceId
,
this
.
buildInstanceRuntimeData
(
jgReformNotice
));
this
.
delRepeatUseEquipData
(
jgReformNotice
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
finally
{
...
...
@@ -882,7 +925,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
private
void
createNewTodo
(
JgReformNotice
transfer
,
WorkflowResultDto
workflowResultDto
,
TaskV2Model
taskV2Model
,
FlowStatusEnum
statusEnum
)
{
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
BeanUtil
.
copyProperties
(
transfer
,
taskMessageDto
);
TaskModelDto
taskModelDto
=
TaskModelDto
.
builder
().
flowCreateDate
(
taskV2Model
.
getFlowCreateDate
()).
taskName
(
workflowResultDto
.
getNextTaskName
()).
taskCode
(
taskV2Model
.
getTaskCode
()).
taskType
(
taskV2Model
.
getTaskType
()).
taskTypeLabel
(
taskV2Model
.
getTaskTypeLabel
()).
relationId
(
taskV2Model
.
getRelationId
()).
executeUserIds
(
workflowResultDto
.
getNextExecutorUserIds
()).
taskStatusLabel
(
statusEnum
.
getName
()).
flowStatus
(
statusEnum
.
getCode
()).
flowCode
(
workflowResultDto
.
getNextTaskId
()).
flowStatusLabel
(
statusEnum
.
getName
()).
taskContent
(
String
.
format
(
"来自%s的业务办理,【申请单号:%s】"
,
transfer
.
getEquList
(),
transfer
.
getApplyNo
())).
taskDesc
(
String
.
format
(
"来自%s的业务办理,【申请单号:%s】"
,
transfer
.
getEquList
(),
transfer
.
getApplyNo
())).
startUserCompanyName
(
transfer
.
getCreateUserCompanyName
()).
startUserId
(
taskV2Model
.
getStartUserId
()).
startUser
(
taskV2Model
.
getStartUser
()).
startDate
(
taskV2Model
.
getStartDate
()).
model
(
taskMessageDto
).
pageType
(
statusEnum
.
getCode
()
==
6614
?
"edit"
:
"look"
).
nextExecuteUser
(
workflowResultDto
.
getNextExecutorRoleIds
()).
build
();
TaskModelDto
taskModelDto
=
TaskModelDto
.
builder
().
flowCreateDate
(
taskV2Model
.
getFlowCreateDate
()).
taskName
(
workflowResultDto
.
getNextTaskName
()).
taskCode
(
taskV2Model
.
getTaskCode
()).
taskType
(
taskV2Model
.
getTaskType
()).
taskTypeLabel
(
taskV2Model
.
getTaskTypeLabel
()).
relationId
(
taskV2Model
.
getRelationId
()).
executeUserIds
(
workflowResultDto
.
getNextExecutorUserIds
()).
taskStatusLabel
(
statusEnum
.
getName
()).
flowStatus
(
statusEnum
.
getCode
()).
flowCode
(
workflowResultDto
.
getNextTaskId
()).
flowStatusLabel
(
statusEnum
.
getName
()).
taskContent
(
String
.
format
(
"来自%s的业务办理,【申请单号:%s】"
,
transfer
.
getEquList
Name
(),
transfer
.
getApplyNo
())).
taskDesc
(
String
.
format
(
"来自%s的业务办理,【申请单号:%s】"
,
transfer
.
getEquList
(),
transfer
.
getApplyNo
())).
startUserCompanyName
(
transfer
.
getCreateUserCompanyName
()).
startUserId
(
taskV2Model
.
getStartUserId
()).
startUser
(
taskV2Model
.
getStartUser
()).
startDate
(
taskV2Model
.
getStartDate
()).
model
(
taskMessageDto
).
pageType
(
statusEnum
.
getCode
()
==
6614
?
"edit"
:
"look"
).
nextExecuteUser
(
workflowResultDto
.
getNextExecutorRoleIds
()).
build
();
commonService
.
buildTaskModel
(
Collections
.
singletonList
(
taskModelDto
));
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/mapper/AlertStatisticsMapper.java
View file @
3782d297
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.statistics.api.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.AlertStatistics
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
...
...
@@ -11,6 +12,7 @@ import org.apache.ibatis.annotations.Param;
* @author system_generator
* @date 2023-11-02
*/
@Mapper
public
interface
AlertStatisticsMapper
extends
BaseMapper
<
AlertStatistics
>
{
AlertStatistics
getStatisticsMessage
(
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
...
...
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 @
3782d297
...
...
@@ -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 @
3782d297
...
...
@@ -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/AQZSDPStatisticsController.java
View file @
3782d297
...
...
@@ -63,7 +63,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"问题类型主体统计"
)
@ApiOperation
(
value
=
"
大屏-安全追溯-左屏-
问题类型主体统计"
)
@PostMapping
(
value
=
"/mainBodyCount"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
mainBodyCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
...
...
@@ -76,7 +76,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"设备问题近30天统计"
)
@ApiOperation
(
value
=
"
大屏-安全追溯-左屏-
设备问题近30天统计"
)
@PostMapping
(
value
=
"/equipmentCount"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
equipmentCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
...
...
@@ -89,7 +89,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"企业问题近30天统计"
)
@ApiOperation
(
value
=
"
大屏-安全追溯-左屏-
企业问题近30天统计"
)
@PostMapping
(
value
=
"/companyCount"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
companyCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
...
...
@@ -102,7 +102,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"人员问题近30天统计"
)
@ApiOperation
(
value
=
"
大屏-安全追溯-左屏-
人员问题近30天统计"
)
@PostMapping
(
value
=
"/personCount"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
personCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
...
...
@@ -116,7 +116,7 @@ public class AQZSDPStatisticsController {
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"气瓶问题近30天统计"
)
@ApiOperation
(
value
=
"
大屏-安全追溯-左屏-
气瓶问题近30天统计"
)
@PostMapping
(
value
=
"/cylinderCount"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
cylinderCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
...
...
@@ -129,7 +129,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"按月统计近12个月的问题数量趋势"
)
@ApiOperation
(
value
=
"
大屏-安全追溯-右屏-
按月统计近12个月的问题数量趋势"
)
@PostMapping
(
value
=
"/issueCountByMonth"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
issueCountByMonth
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
...
...
@@ -142,7 +142,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"按月统计近30天的问题数量趋势"
)
@ApiOperation
(
value
=
"
大屏-安全追溯-右屏-
按月统计近30天的问题数量趋势"
)
@PostMapping
(
value
=
"/issueCountByDay"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
issueCountByDay
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
...
...
@@ -154,7 +154,7 @@ public class AQZSDPStatisticsController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"当前区域数据统计"
)
@ApiOperation
(
value
=
"
大屏-安全追溯-中屏-
当前区域数据统计"
)
@PostMapping
(
value
=
"/issueCountByCityCode"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
issueCountByCityCode
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
...
...
@@ -167,7 +167,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"当前区域子区域数据统计"
)
@ApiOperation
(
value
=
"
大屏-安全追溯-中屏-
当前区域子区域数据统计"
)
@PostMapping
(
value
=
"/issueChildrenCityCount"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
issueChildrenCityCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
...
...
@@ -180,7 +180,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"当月问题列表(主体类型、问题类型、问题时间、操作)"
)
@ApiOperation
(
value
=
"
大屏-安全追溯-左屏-
当月问题列表(主体类型、问题类型、问题时间、操作)"
)
@PostMapping
(
value
=
"/issueMonthList"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
issueMonthList
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
...
...
@@ -192,7 +192,7 @@ public class AQZSDPStatisticsController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"当年问题等级分类统计"
)
@ApiOperation
(
value
=
"
大屏-安全追溯-右屏-
当年问题等级分类统计"
)
@PostMapping
(
value
=
"/issueProblemLevelCount"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
issueProblemLevelCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
...
...
@@ -204,7 +204,7 @@ public class AQZSDPStatisticsController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"按问题类型排名top 10"
)
@ApiOperation
(
value
=
"
大屏-安全追溯-右屏-
按问题类型排名top 10"
)
@PostMapping
(
value
=
"/issueCompanyTop"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
issueCompanyTop
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
...
...
@@ -227,7 +227,7 @@ public class AQZSDPStatisticsController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"当年下级区域问题闭环率排名"
)
@ApiOperation
(
value
=
"
大屏-安全追溯-右屏-
当年下级区域问题闭环率排名"
)
@PostMapping
(
value
=
"/issueChildrenCityCountTop"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
issueChildrenCityCountTop
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
...
...
@@ -239,7 +239,7 @@ public class AQZSDPStatisticsController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"按问题类型排名top 10"
)
@ApiOperation
(
value
=
"
大屏-安全追溯-右屏-
按问题类型排名top 10"
)
@PostMapping
(
value
=
"/issueCountTopByProblemType"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
issueCountTopByProblemType
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/JGDPStatisticsController.java
View file @
3782d297
...
...
@@ -228,7 +228,7 @@ public class JGDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏监管-中屏-各地市数据统计"
,
notes
=
"大屏监管-中屏-各地市数据统计"
)
@PostMapping
(
value
=
"/
jg/
centre/dataStatistic"
)
@PostMapping
(
value
=
"/centre/dataStatistic"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
dataStatisticByReginCode
(
@Validated
@RequestBody
DPFilterParamDto
dpFilterParamDto
,
BindingResult
result
)
{
List
<
FieldError
>
fieldErrors
=
result
.
getFieldErrors
();
if
(!
fieldErrors
.
isEmpty
())
{
...
...
@@ -239,7 +239,7 @@ public class JGDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏监管-中屏-当前区域数据统计"
,
notes
=
"大屏监管-中屏-当前区域数据统计"
)
@PostMapping
(
value
=
"/
jg/
centre/dataStatisticCount"
)
@PostMapping
(
value
=
"/centre/dataStatisticCount"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
dataStatisticCountByReginCode
(
@Validated
@RequestBody
DPFilterParamDto
dpFilterParamDto
,
BindingResult
result
)
{
List
<
FieldError
>
fieldErrors
=
result
.
getFieldErrors
();
if
(!
fieldErrors
.
isEmpty
())
{
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/StCommonController.java
0 → 100644
View file @
3782d297
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
controller
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.StCommonServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
@RestController
@Api
(
tags
=
"统计公共API"
)
@RequestMapping
(
value
=
"/st-common"
)
public
class
StCommonController
{
StCommonServiceImpl
commonService
;
/**
* 获取用户regionCode
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUserRegincode"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取用户regionCode"
,
notes
=
"获取用户regionCode"
)
public
ResponseModel
<
List
<
String
>>
getUserRegincode
()
{
List
<
String
>
regionList
=
commonService
.
getUserRegionCode
();
return
ResponseHelper
.
buildResponse
(
regionList
);
}
}
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 @
3782d297
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONArray
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.ZLDPStatisticsServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.FieldError
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -37,36 +42,54 @@ public class ZLDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/companyInfo"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏
企业统计"
,
notes
=
"大屏
企业统计"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏
-总览-左屏-企业统计"
,
notes
=
"大屏-总览-左屏-
企业统计"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
companyInfo
(
@RequestBody
DPFilterParamDto
screenDto
)
{
return
ResponseHelper
.
buildResponse
(
statisticsService
.
companyInfo
(
screenDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/testOrg"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏
检测机构统计"
,
notes
=
"大屏
检测机构统计"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏
-总览-左屏-检测机构统计"
,
notes
=
"大屏-总览-左屏-
检测机构统计"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
testOrg
(
@RequestBody
DPFilterParamDto
screenDto
)
{
return
ResponseHelper
.
buildResponse
(
statisticsService
.
testOrg
(
screenDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/userCount"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏
人员统计"
,
notes
=
"大屏
人员统计"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏
-总览-左屏-人员统计"
,
notes
=
"大屏-总览-左屏-
人员统计"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
userCount
(
@RequestBody
DPFilterParamDto
screenDto
)
{
return
ResponseHelper
.
buildResponse
(
statisticsService
.
userCount
(
screenDto
));
}
@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
=
"大屏
行业主管部门统计"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏
-总览-左屏-行业主管部门统计"
,
notes
=
"大屏-总览-左屏-
行业主管部门统计"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
supervisorCount
(
@RequestBody
DPFilterParamDto
screenDto
)
{
return
ResponseHelper
.
buildResponse
(
statisticsService
.
supervisorCount
(
screenDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/equipmentInformCount"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏
设备使用场所统计"
,
notes
=
"大屏
设备使用场所统计"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏
-总览-左屏-设备使用场所统计"
,
notes
=
"大屏-总览-左屏-
设备使用场所统计"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
equipmentInformCount
(
@RequestBody
DPFilterParamDto
screenDto
)
{
return
ResponseHelper
.
buildResponse
(
statisticsService
.
equipmentInformCount
(
screenDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/region/info"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询区域统计信息"
,
notes
=
"查询区域统计信息"
)
public
ResponseModel
<
JSONArray
>
statisticsRegionInfo
(
@Validated
@RequestBody
DPFilterParamDto
dpFilterParamDto
,
BindingResult
result
)
{
List
<
FieldError
>
fieldErrors
=
result
.
getFieldErrors
();
if
(!
fieldErrors
.
isEmpty
())
{
throw
new
BadRequest
(
fieldErrors
.
get
(
0
).
getDefaultMessage
());
}
return
ResponseHelper
.
buildResponse
(
statisticsService
.
statisticInfoByRegionAndDate
(
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
0 → 100644
View file @
3782d297
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author Administrator
*/
@Service
public
class
StCommonServiceImpl
{
public
List
<
String
>
getUserRegionCode
()
{
List
<
String
>
regionList
=
new
ArrayList
<>();
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
CompanyModel
userCompany
=
me
.
getCompanys
().
get
(
0
);
String
regions
=
userCompany
.
getRegionSeq
();
if
(
regions
!=
null
)
{
String
[]
regionsId
=
regions
.
split
(
","
);
for
(
String
regionId:
regionsId
)
{
RegionModel
region
=
Systemctl
.
regionClient
.
getRegion
(
Long
.
valueOf
(
regionId
)).
getResult
();
regionList
.
add
(
region
.
getRegionCode
()
+
""
);
}
}
return
regionList
;
}
}
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 @
3782d297
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
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.entity.AlertStatistics
;
import
com.yeejoin.amos.boot.module.statistics.api.mapper.AlertStatisticsMapper
;
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
;
...
...
@@ -15,11 +20,14 @@ import org.elasticsearch.search.aggregations.AggregationBuilders;
import
org.elasticsearch.search.aggregations.Aggregations
;
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
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.stream.Collectors
;
...
...
@@ -27,34 +35,55 @@ import java.util.stream.Collectors;
@Service
public
class
ZLDPStatisticsServiceImpl
{
@Resource
private
ZLStatisticsMapper
screenMapper
;
@Autowired
DataDictionaryServiceImpl
iDataDictionaryService
;
@Autowired
RestHighLevelClient
restHighLevelClient
;
private
DataDictionaryServiceImpl
iDataDictionaryService
;
private
AlertStatisticsMapper
alertStatisticsMapper
;
private
RestHighLevelClient
restHighLevelClient
;
private
static
Map
<
String
,
String
>
regionCodeOrgCodeMap
=
new
ConcurrentHashMap
<>();
public
ZLDPStatisticsServiceImpl
(
ZLStatisticsMapper
screenMapper
,
DataDictionaryServiceImpl
iDataDictionaryService
,
AlertStatisticsMapper
alertStatisticsMapper
,
RestHighLevelClient
restHighLevelClient
)
{
this
.
screenMapper
=
screenMapper
;
this
.
iDataDictionaryService
=
iDataDictionaryService
;
this
.
alertStatisticsMapper
=
alertStatisticsMapper
;
this
.
restHighLevelClient
=
restHighLevelClient
;
}
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 +100,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 +508,112 @@ 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
;
}
public
JSONArray
statisticInfoByRegionAndDate
(
DPFilterParamDto
params
)
{
LocalDate
today
=
LocalDate
.
now
();
LocalDate
startDate
;
LocalDate
endDate
;
String
regionCode
=
params
.
getCityCode
();
if
(
ObjectUtils
.
isEmpty
(
params
.
getBeginDate
())
||
ObjectUtils
.
isEmpty
(
params
.
getBeginDate
()))
{
startDate
=
today
.
minusDays
(
6
);
endDate
=
today
;
}
else
{
startDate
=
LocalDate
.
parse
(
params
.
getBeginDate
());
endDate
=
LocalDate
.
parse
(
params
.
getEndDate
());
}
params
.
setBeginDate
(
startDate
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
)));
params
.
setEndDate
(
endDate
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
)));
AlertStatistics
statistics
=
alertStatisticsMapper
.
statisticsInfoByRegionAndDate
(
regionCode
,
startDate
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
)),
endDate
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
)));
JSONArray
jsonArray
=
new
JSONArray
();
if
(!
ObjectUtils
.
isEmpty
(
statistics
))
{
JSONObject
jsonObject0
=
new
JSONObject
();
jsonObject0
.
put
(
"key"
,
"dtkr"
);
jsonObject0
.
put
(
"value"
,
ValidationUtil
.
isEmpty
(
statistics
.
getTrappedPeople
())
?
0
:
statistics
.
getTrappedPeople
());
jsonObject0
.
put
(
"name"
,
"电梯困人"
);
JSONObject
jsonObject1
=
new
JSONObject
();
jsonObject1
.
put
(
"key"
,
"slts"
);
jsonObject1
.
put
(
"value"
,
ValidationUtil
.
isEmpty
(
statistics
.
getComplaint
())
?
0
:
statistics
.
getComplaint
());
jsonObject1
.
put
(
"name"
,
"受理投诉"
);
JSONObject
jsonObject2
=
new
JSONObject
();
jsonObject2
.
put
(
"key"
,
"gzbx"
);
jsonObject2
.
put
(
"value"
,
ValidationUtil
.
isEmpty
(
statistics
.
getBreakdownRescue
())
?
0
:
statistics
.
getBreakdownRescue
());
jsonObject2
.
put
(
"name"
,
"故障维修"
);
JSONObject
jsonObject3
=
new
JSONObject
();
jsonObject3
.
put
(
"key"
,
"jjbkck"
);
jsonObject3
.
put
(
"value"
,
ValidationUtil
.
isEmpty
(
statistics
.
getRescuePersonnel
())
?
0
:
statistics
.
getRescuePersonnel
());
jsonObject3
.
put
(
"name"
,
"解救被困乘客"
);
JSONObject
jsonObject4
=
new
JSONObject
();
jsonObject4
.
put
(
"key"
,
"30fzdd"
);
jsonObject4
.
put
(
"value"
,
ValidationUtil
.
isEmpty
(
statistics
.
getWithinThirtyRescue
())
?
0
:
statistics
.
getWithinThirtyRescue
());
jsonObject4
.
put
(
"name"
,
"30分钟内到达"
);
JSONObject
jsonObject5
=
new
JSONObject
();
jsonObject5
.
put
(
"key"
,
"pjjysj"
);
jsonObject5
.
put
(
"value"
,
ValidationUtil
.
isEmpty
(
statistics
.
getAvgTime
())
?
0
:
statistics
.
getAvgTime
());
jsonObject5
.
put
(
"name"
,
"平均救援时间"
);
String
orgCode
=
this
.
getAndSetOrgCode
(
regionCode
);
JSONObject
jsonObject6
=
new
JSONObject
();
jsonObject6
.
put
(
"key"
,
"jycq"
);
jsonObject6
.
put
(
"value"
,
this
.
getQuestionNumber
(
"检验超期"
,
params
,
orgCode
));
jsonObject6
.
put
(
"name"
,
"检验超期"
);
JSONObject
jsonObject7
=
new
JSONObject
();
jsonObject7
.
put
(
"key"
,
"jybhg"
);
jsonObject7
.
put
(
"value"
,
this
.
getQuestionNumber
(
"检验不合格"
,
params
,
orgCode
));
jsonObject7
.
put
(
"name"
,
"检验不合格"
);
JSONObject
jsonObject8
=
new
JSONObject
();
jsonObject8
.
put
(
"key"
,
"wbcq"
);
jsonObject8
.
put
(
"value"
,
this
.
getQuestionNumber
(
"维保超期"
,
params
,
orgCode
));
jsonObject8
.
put
(
"name"
,
"维保超期"
);
JSONObject
jsonObject9
=
new
JSONObject
();
jsonObject9
.
put
(
"key"
,
"csjsynx"
);
jsonObject9
.
put
(
"value"
,
this
.
getQuestionNumber
(
"超设计使用年限"
,
params
,
orgCode
));
jsonObject9
.
put
(
"name"
,
"超设计使用年限"
);
jsonArray
.
add
(
jsonObject0
);
jsonArray
.
add
(
jsonObject1
);
jsonArray
.
add
(
jsonObject2
);
jsonArray
.
add
(
jsonObject3
);
jsonArray
.
add
(
jsonObject4
);
jsonArray
.
add
(
jsonObject5
);
jsonArray
.
add
(
jsonObject6
);
jsonArray
.
add
(
jsonObject7
);
jsonArray
.
add
(
jsonObject8
);
jsonArray
.
add
(
jsonObject9
);
}
return
jsonArray
;
}
private
Long
getQuestionNumber
(
String
problemType
,
DPFilterParamDto
params
,
String
orgCode
)
{
return
alertStatisticsMapper
.
countProblemByTypeDateAndOrgCode
(
problemType
,
params
,
orgCode
);
}
}
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