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
664b47df
Commit
664b47df
authored
Jun 09, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交报表相关bug
parent
fb648675
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
FilePatrolReportServiceImpl.java
...equipmanage/service/impl/FilePatrolReportServiceImpl.java
+15
-6
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FilePatrolReportServiceImpl.java
View file @
664b47df
...
...
@@ -42,6 +42,7 @@ import java.time.LocalDateTime;
import
java.time.format.DateTimeFormatter
;
import
java.util.List
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Slf4j
@Service
...
...
@@ -126,7 +127,7 @@ public class FilePatrolReportServiceImpl implements IFirePatrolReportService {
complete_task_percent
=
0.0
;
log
.
error
(
"-----------------------------当天巡检计划总数是 0,请检查同步服务!-----------------------------"
);
}
else
{
complete_task_percent
=
(
complete_task_count
/
task_count
)*
100
;
complete_task_percent
=
(
Double
.
valueOf
(
complete_task_count
)
/
Double
.
valueOf
(
task_count
))
*
100
;
}
// 任务完成率
map
.
put
(
"complete_task_percent"
,
nf
.
format
(
complete_task_percent
)+
"%"
);
...
...
@@ -160,7 +161,7 @@ public class FilePatrolReportServiceImpl implements IFirePatrolReportService {
certified_percent
=
0.0
;
log
.
error
(
"-----------------------------人员总数是 0,请检查同步服务!-----------------------------"
);
}
else
{
certified_percent
=
(
certified_person_count
/
person_count
)*
100
;
certified_percent
=
(
Double
.
valueOf
(
certified_person_count
)
/
Double
.
valueOf
(
person_count
))
*
100
;
}
// 持证率
map
.
put
(
"certified_percent"
,
nf
.
format
(
certified_percent
)+
"%"
);
...
...
@@ -202,13 +203,13 @@ public class FilePatrolReportServiceImpl implements IFirePatrolReportService {
}
// 发现问题总数
int
problem_count
=
((
BigDecimal
)
report
.
get
(
"problem_count"
)).
intValue
();
map
.
put
(
"problem_count"
,
problem_count
);
//
map.put("problem_count", problem_count);
// 修复问题总数
int
fixed_problem_count
=
((
BigDecimal
)
report
.
get
(
"fixed_problem_count"
)).
intValue
();
map
.
put
(
"fixed_problem_count"
,
fixed_problem_count
);
//
map.put("fixed_problem_count", fixed_problem_count);
// 未修复问题总数
int
unfixed_problem_count
=
problem_count
-
fixed_problem_count
;
map
.
put
(
"unfixed_problem_count"
,
unfixed_problem_count
);
//
int unfixed_problem_count = problem_count-fixed_problem_count;
//
map.put("unfixed_problem_count", unfixed_problem_count);
// 巡查点位数
int
checked_point_count
=
((
BigDecimal
)
report
.
get
(
"checked_point_count"
)).
intValue
();
map
.
put
(
"checked_point_count"
,
checked_point_count
);
...
...
@@ -232,6 +233,14 @@ public class FilePatrolReportServiceImpl implements IFirePatrolReportService {
List
<
Map
<
String
,
Object
>>
defect_list
=
analysisReportLogMapper
.
getDefect
(
analysisReportLog
);
// 缺陷总数
map
.
put
(
"defect_count"
,
defect_list
.
size
());
// 解决问题数量问题,相关需求链接http://36.46.149.14:5080/zentao/task-view-7059.html
map
.
put
(
"problem_count"
,
defect_list
.
size
());
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
if
(
0
<
defect_list
.
size
())
{
list
=
defect_list
.
stream
().
filter
(
x
->
"治理完毕"
.
equals
(
String
.
valueOf
(
x
.
get
(
"danger_state"
)))).
collect
(
Collectors
.
toList
());
}
map
.
put
(
"fixed_problem_count"
,
list
.
size
());
map
.
put
(
"unfixed_problem_count"
,
defect_list
.
size
()
-
list
.
size
());
defect_list
.
forEach
(
i
->{
i
.
put
(
"defect_location"
,
i
.
get
(
"danger_position"
));
i
.
put
(
"defect_description"
,
i
.
get
(
"problem_description"
));
...
...
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