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
5f6296e8
Commit
5f6296e8
authored
Aug 05, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.左右屏中区域只统计到县区(例如横坐标为区域的柱状图),地图为县区时,柱状图只显示自身一个(不要显示到镇、街道),新增tgl接口调整
parent
b189f718
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
+17
-18
YJDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/YJDPStatisticsServiceImpl.java
+17
-18
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/YJDPStatisticsServiceImpl.java
View file @
5f6296e8
...
...
@@ -116,7 +116,7 @@ public class YJDPStatisticsServiceImpl {
List
<
Object
>
complaint
=
new
ArrayList
<>();
List
<
Object
>
fault
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
maps
=
new
ArrayList
<>();
if
(
orgCode
!=
null
)
{
if
(
orgCode
!=
null
)
{
maps
=
alertCalledMapper
.
queryNearlyList
(
beginDate
,
endDate
,
orgCode
);
}
List
<
Map
<
String
,
Object
>>
finalMaps
=
maps
;
...
...
@@ -148,9 +148,9 @@ public class YJDPStatisticsServiceImpl {
List
<
Long
>
ydata
=
new
ArrayList
<>();
regionList
.
forEach
(
x
->
{
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
x
.
getRegionCode
().
toString
());
if
(!
ValidationUtil
.
isEmpty
(
orgCode
))
{
if
(!
ValidationUtil
.
isEmpty
(
orgCode
))
{
ydata
.
add
(
elevatorCountByES
(
orgCode
));
}
else
{
}
else
{
ydata
.
add
(
0L
);
}
});
...
...
@@ -168,19 +168,19 @@ public class YJDPStatisticsServiceImpl {
List
<
Object
>
xdata
=
dataDictionaries
.
stream
().
map
(
DataDictionary:
:
getName
).
collect
(
Collectors
.
toList
());
List
<
Object
>
ydata
;
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
dpFilterParamDto
);
if
(
orgCode
==
null
)
{
ydata
=
dataDictionaries
.
stream
().
map
(
d
->
0L
).
collect
(
Collectors
.
toList
());
if
(
orgCode
==
null
)
{
ydata
=
dataDictionaries
.
stream
().
map
(
d
->
0L
).
collect
(
Collectors
.
toList
());
}
else
{
List
<
CountDto
>
maps
=
alertCalledMapper
.
queryListByLocation
(
orgCode
,
dpFilterParamDto
);
Map
<
String
,
Long
>
addressNumMap
=
maps
.
stream
().
collect
(
Collectors
.
toMap
(
CountDto:
:
getKeyStr
,
CountDto:
:
getLongValue
));
ydata
=
dataDictionaries
.
stream
().
map
(
d
->
{
Map
<
String
,
Long
>
addressNumMap
=
maps
.
stream
().
collect
(
Collectors
.
toMap
(
CountDto:
:
getKeyStr
,
CountDto:
:
getLongValue
));
ydata
=
dataDictionaries
.
stream
().
map
(
d
->
{
Long
num
=
0L
;
// 目前USE_PLACE字段存放字典的id
if
(
addressNumMap
.
get
(
d
.
getSequenceNbr
().
toString
())
!=
null
)
{
if
(
addressNumMap
.
get
(
d
.
getSequenceNbr
().
toString
())
!=
null
)
{
num
=
addressNumMap
.
get
(
d
.
getSequenceNbr
().
toString
());
}
// 数据库中老数据历史问题存放字典的name,兼容对老数据的统计
if
(
addressNumMap
.
get
(
d
.
getName
())
!=
null
)
{
if
(
addressNumMap
.
get
(
d
.
getName
())
!=
null
)
{
num
=
num
+
addressNumMap
.
get
(
d
.
getName
());
}
return
num
;
...
...
@@ -195,7 +195,7 @@ public class YJDPStatisticsServiceImpl {
public
JSONObject
faultCauseRatio
(
DPFilterParamDto
dpFilterParamDto
)
{
JSONObject
jsonObject
=
new
JSONObject
();
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
dpFilterParamDto
);
if
(
orgCode
==
null
)
{
if
(
orgCode
==
null
)
{
return
jsonObject
;
}
List
<
Map
<
String
,
Object
>>
maps
=
alertCalledMapper
.
faultCauseRatio
(
orgCode
);
...
...
@@ -309,7 +309,7 @@ public class YJDPStatisticsServiceImpl {
public
List
<
Map
<
String
,
Object
>>
rankUnitByRescueTime
(
DPFilterParamDto
dpFilterParamDto
)
{
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
dpFilterParamDto
);
if
(
orgCode
==
null
)
{
if
(
orgCode
==
null
)
{
return
new
ArrayList
<>();
}
List
<
Map
<
String
,
Object
>>
maps
=
dispatchTaskMapper
.
rankUnitByRescueTime
(
orgCode
);
...
...
@@ -337,9 +337,12 @@ public class YJDPStatisticsServiceImpl {
}
public
JSONObject
regionEventRank
(
DPFilterParamDto
dpFilterParamDto
)
{
List
<
RegionModel
>
childRegion
=
stCommonService
.
setRegionIfRootParent
(
dpFilterParamDto
);
JSONObject
jsonObject
=
new
JSONObject
();
String
orgCodeR
=
stCommonService
.
getAndSetOrgCode
(
dpFilterParamDto
.
getCityCode
());
if
(
orgCodeR
==
null
)
{
return
jsonObject
;
}
List
<
RegionModel
>
childRegion
=
stCommonService
.
setRegionIfRootParentAndNoAccessIf3Level
(
dpFilterParamDto
);
Map
<
String
,
Long
>
map
=
new
HashMap
<>();
childRegion
.
forEach
(
x
->
{
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
x
.
getRegionCode
().
toString
());
...
...
@@ -350,14 +353,10 @@ public class YJDPStatisticsServiceImpl {
map
.
put
(
x
.
getRegionName
(),
num
);
}
});
List
<
String
>
xdata
=
new
ArrayList
<>(
map
.
keySet
());
List
<
Long
>
ydata
=
new
ArrayList
<>();
xdata
.
sort
(
Comparator
.
comparingLong
(
map:
:
get
).
reversed
());
xdata
.
stream
().
forEach
(
x
->
{
ydata
.
add
(
map
.
get
(
x
));
});
xdata
.
forEach
(
x
->
ydata
.
add
(
map
.
get
(
x
)));
jsonObject
.
put
(
"xdata"
,
xdata
);
jsonObject
.
put
(
"ydata"
,
ydata
);
return
jsonObject
;
...
...
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