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
8566b8a5
Commit
8566b8a5
authored
Aug 06, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.应急故障原因卡片没数据
parent
b5414efe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
18 deletions
+23
-18
YJDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/YJDPStatisticsServiceImpl.java
+23
-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 @
8566b8a5
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -83,6 +84,14 @@ public class YJDPStatisticsServiceImpl {
private
DataDictionaryServiceImpl
dataDictionaryService
;
private
static
final
Map
<
String
,
String
>
BLL_LX_LEGEND
=
new
LinkedHashMap
<>();
static
{
BLL_LX_LEGEND
.
put
(
"trapped"
,
"困人"
);
BLL_LX_LEGEND
.
put
(
"complaint"
,
"投诉"
);
BLL_LX_LEGEND
.
put
(
"fault"
,
"故障"
);
}
/**
* 电梯设备品种
*/
...
...
@@ -106,11 +115,9 @@ public class YJDPStatisticsServiceImpl {
String
endDate
=
DateUtil
.
getNow
(
DateUtil
.
Y_M_D
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
dpFilterParamDto
);
JSONObject
jsonObject
=
new
JSONObject
();
List
<
String
>
everyDay
=
this
.
getEveryDay
(
beginDate
,
endDate
);
JSONObject
jsonObject
=
this
.
buildLegendData
(
null
,
"trapped"
,
"困人"
);
this
.
buildLegendData
(
jsonObject
,
"complaint"
,
"投诉"
);
this
.
buildLegendData
(
jsonObject
,
"fault"
,
"故障"
);
this
.
buildLegendData
(
jsonObject
);
List
<
String
>
xdata
=
new
ArrayList
<>();
List
<
Object
>
trapped
=
new
ArrayList
<>();
List
<
Object
>
complaint
=
new
ArrayList
<>();
...
...
@@ -133,7 +140,6 @@ public class YJDPStatisticsServiceImpl {
complaint
.
add
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
"投诉咨询"
))
?
Integer
.
parseInt
(
map
.
get
(
"投诉咨询"
).
toString
())
:
0
);
fault
.
add
(!
ValidationUtil
.
isEmpty
(
map
.
get
(
"故障维修"
))
?
Integer
.
parseInt
(
map
.
get
(
"故障维修"
).
toString
())
:
0
);
});
jsonObject
.
put
(
"xdata"
,
xdata
);
jsonObject
.
put
(
"trapped"
,
trapped
);
jsonObject
.
put
(
"complaint"
,
complaint
);
...
...
@@ -383,19 +389,6 @@ public class YJDPStatisticsServiceImpl {
return
dateList
;
}
private
JSONObject
buildLegendData
(
JSONObject
jsonObject
,
String
dataKey
,
String
value
)
{
if
(
ValidationUtil
.
isEmpty
(
jsonObject
))
{
jsonObject
=
new
JSONObject
();
}
JSONObject
legendData
=
jsonObject
.
getJSONObject
(
"legendData"
);
if
(
ValidationUtil
.
isEmpty
(
legendData
))
{
legendData
=
new
JSONObject
();
jsonObject
.
put
(
"legendData"
,
legendData
);
}
legendData
.
put
(
dataKey
,
value
);
return
jsonObject
;
}
public
List
<
Map
<
String
,
Object
>>
getCenterMapCountDataForOverview
(
DPFilterParamDto
dpFilterParamDto
)
{
return
stCommonService
.
setRegionIfRootParent
(
dpFilterParamDto
).
stream
().
map
(
r
->
{
DPFilterParamDto
filterParamDto
=
new
DPFilterParamDto
();
...
...
@@ -412,6 +405,18 @@ public class YJDPStatisticsServiceImpl {
}).
collect
(
Collectors
.
toList
());
}
private
void
buildLegendData
(
JSONObject
jsonObject
)
{
JSONArray
jsonArray
=
new
JSONArray
();
BLL_LX_LEGEND
.
forEach
((
k
,
v
)
->
{
JSONObject
item
=
new
JSONObject
();
item
.
put
(
"dataKey"
,
k
);
item
.
put
(
"value"
,
v
);
jsonArray
.
add
(
item
);
});
jsonObject
.
put
(
"legendData"
,
jsonArray
);
}
private
Map
<
String
,
Object
>
getCenterMapOverviewData
(
String
orgCode
,
DPFilterParamDto
filterParamDto
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
// 统计完成的事件包括困人、故障、投诉咨询
...
...
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