Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
LAE
Overview
Overview
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
文靖昊
LAE
Commits
529d7f1d
Commit
529d7f1d
authored
Nov 29, 2024
by
tinywell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化阅读处置率数据的返回说明
parent
f1fcb634
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
tool_warn.py
src/agent/tool_warn.py
+4
-2
No files found.
src/agent/tool_warn.py
View file @
529d7f1d
...
...
@@ -111,7 +111,7 @@ class WarningTool(BaseTool):
error_msg
=
f
"查询失败: {response.message},请检查是否有相关数据权限"
self
.
logger
.
warning
(
error_msg
)
return
{
'code'
:
400
,
'message'
:
error_msg
}
self
.
logger
.
info
(
f
"查询成功,返回 {len(response.resultdata)} 条数据"
)
data
=
{}
for
item
in
response
.
resultdata
:
month
=
{
...
...
@@ -121,11 +121,13 @@ class WarningTool(BaseTool):
"虚警率"
:
item
[
"falseper"
],
"虚警数量"
:
item
[
"falsenum"
],
}
data
[
item
[
"month"
]
]
=
month
data
[
f
"{item['month']}月"
]
=
month
data
=
sorted
(
data
.
items
(),
key
=
lambda
x
:
x
[
0
])
return
{
'code'
:
200
,
'summary'
:
f
"查询到{len(data)}个月份的预警统计信息,包括{','.join([item[0] for item in data])}"
,
'data'
:
data
}
except
Exception
as
e
:
...
...
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