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
36957ed5
Commit
36957ed5
authored
Jul 25, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.统计服务合并api整理
parent
010add58
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
190 additions
and
119 deletions
+190
-119
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
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
+16
-0
StCommonServiceImpl.java
...odule/statistcs/biz/service/impl/StCommonServiceImpl.java
+33
-0
ZLDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/ZLDPStatisticsServiceImpl.java
+106
-7
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 @
36957ed5
...
...
@@ -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 @
36957ed5
...
...
@@ -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 @
36957ed5
...
...
@@ -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 @
36957ed5
...
...
@@ -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-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/JGDPStatisticsController.java
View file @
36957ed5
...
...
@@ -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 @
36957ed5
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 @
36957ed5
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
;
...
...
@@ -69,4 +74,15 @@ public class ZLDPStatisticsController {
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 @
36957ed5
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 @
36957ed5
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.statistics.api.mapper.ZLStatisticsMapper
;
import
org.apache.lucene.queryparser.classic.QueryParser
;
import
org.elasticsearch.action.search.SearchRequest
;
...
...
@@ -15,11 +18,13 @@ 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.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,16 +32,25 @@ 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
)
{
...
...
@@ -450,4 +464,89 @@ public class ZLDPStatisticsServiceImpl {
}
return
orgCode
;
}
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