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
b859310a
authored
2024-08-08 14:06:26 +0800
by
chenyao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
将整个list进行json序列化
1 parent
3335a5d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
src/apps/doc/management/commands/ocr_process.py
src/apps/doc/management/commands/ocr_process.py
View file @
b859310
...
...
@@ -2451,7 +2451,7 @@ def atomicSaveDBAFC(self,result_class,doc,license_summary,ic_merge,rp_merge,task
res_obj
=
result_class
()
res_obj
.
application_id
=
doc
.
application_id
self
.
online_log
.
info
(
'{0} [res_obj is None application_id={1} doc_id={2}]'
.
format
(
self
.
log_base
,
doc
.
application_id
,
doc
.
id
))
res_obj
.
fs_ocr
=
[
json
.
dumps
(
financial_statement_dict
)]
res_obj
.
fs_ocr
=
json
.
dumps
([
financial_statement_dict
])
for
classify
,
field
in
consts
.
RESULT_MAPPING
.
items
():
if
not
hasattr
(
res_obj
,
field
):
continue
...
...
@@ -2485,7 +2485,7 @@ def atomicSaveDBHIL(self,result_class,doc,license_summary,ic_merge,rp_merge, tas
res_obj
=
result_class
()
res_obj
.
application_id
=
doc
.
application_id
self
.
online_log
.
info
(
'{0} [res_obj is None application_id={1} doc_id={2}]'
.
format
(
self
.
log_base
,
doc
.
application_id
,
doc
.
id
))
res_obj
.
fs_ocr
=
[
json
.
dumps
(
financial_statement_dict
)]
res_obj
.
fs_ocr
=
json
.
dumps
([
financial_statement_dict
])
for
classify
,
field
in
consts
.
RESULT_MAPPING
.
items
():
if
not
hasattr
(
res_obj
,
field
):
continue
...
...
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