Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
98fb6f96
authored
2024-06-07 17:41:37 +0800
by
冯轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
ADD:log
1 parent
b0ca4ade
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
src/apps/doc/views.py
src/apps/doc/views.py
View file @
98fb6f9
...
...
@@ -91,7 +91,7 @@ def load_data(request, schema):
return
request
.
data
employee_args
=
{
'application
I
d'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
64
)),
'application
_i
d'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
64
)),
'business_type'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
64
)),
}
...
...
@@ -1862,12 +1862,16 @@ class EmployeeView(GenericView):
ocr_result_class
=
HILOCRResult
if
business_type
in
consts
.
HIL_SET
else
AFCOCRResult
ocr_result_info
=
ocr_result_class
.
objects
.
filter
(
application_id
=
application_id
)
.
first
()
self
.
running_log
.
info
(
'[query Employee] [application_id={0}] [business_type={1}] [ocr_result_info exist={2}]'
.
format
(
application_id
,
business_type
,
ocr_result_info
is
not
None
))
if
not
ocr_result_info
:
self
.
running_log
.
info
(
'[query Employee] [application_id={0}] ocr_result none'
.
format
(
application_id
))
return
response
.
ok
(
data
=
False
)
bss_ocr_str
=
ocr_result_info
.
bss_ocr
bss_ocr
=
json
.
loads
(
bss_ocr_str
)
self
.
running_log
.
info
(
'[query Employee] [application_id={0}] [bss_ocr={1}]'
.
format
(
application_id
,
bss_ocr
))
for
one_bss
in
bss_ocr
:
income_keywords
=
one_bss
[
'income_keywords'
]
self
.
running_log
.
info
(
'[query Employee] [application_id={0}] [income_keywords={1}]'
.
format
(
application_id
,
income_keywords
))
if
income_keywords
is
not
None
and
len
(
income_keywords
)
>
0
:
return
response
.
ok
(
data
=
True
)
return
response
.
ok
(
data
=
False
)
\ No newline at end of file
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment