Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
inspect_report
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
zhengjinlei
inspect_report
Commits
f356c3df
Commit
f356c3df
authored
Jun 09, 2020
by
zhengjinlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重新计算得分
parent
9c114833
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
report_utils.py
src/inspect_report/utils/report_utils.py
+6
-4
No files found.
src/inspect_report/utils/report_utils.py
View file @
f356c3df
...
...
@@ -164,9 +164,9 @@ def single_score_stat(t, create_date, stat_count=0):
seat
[
'total_session'
]
+=
1
seat
[
'validate_session'
]
+=
1
if
check
[
'violationRuleCount'
]
>
0
else
0
seat
[
'validate_num'
]
+=
len
(
score_item
)
seat
[
'score'
]
=
round
((
seat
[
'score'
]
+
score
)
/
2
,
2
)
seat
[
'service_score'
]
=
round
((
seat
[
'service_score'
]
+
service_score
)
/
2
,
2
)
seat
[
'business_score'
]
=
round
((
seat
[
'business_score'
]
+
business_score
)
/
2
,
2
)
seat
[
'score'
]
+=
score
seat
[
'service_score'
]
+=
service_score
seat
[
'business_score'
]
+=
business_score
else
:
seat_dict
[
check
[
'agentName'
]]
=
{
'create_date'
:
create_date
,
'agentName'
:
check
[
'agentName'
],
'taskId'
:
check
[
'taskId'
],
...
...
@@ -177,7 +177,9 @@ def single_score_stat(t, create_date, stat_count=0):
seat_dict
[
check
[
'agentName'
]][
'validate_session'
]
=
1
if
check
[
'violationRuleCount'
]
>
0
else
0
seat_dict
[
check
[
'agentName'
]][
'validate_num'
]
=
len
(
score_item
)
for
k
,
v
in
seat_dict
.
items
():
seat_obj
=
{
'agentName'
:
k
}
seat_obj
=
{
'agentName'
:
k
,
'score'
:
round
(
v
.
pop
(
'score'
)
/
v
[
'total_session'
],
2
),
'business_score'
:
round
(
v
.
pop
(
'business_score'
)
/
v
[
'total_session'
],
2
),
'service_score'
:
round
(
v
.
pop
(
'service_score'
)
/
v
[
'total_session'
],
2
)}
seat_obj
.
update
(
v
)
seat_list
.
append
(
ScoreStat
(
**
seat_obj
))
ScoreStat
.
objects
.
bulk_create
(
seat_list
)
...
...
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