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
7edab924
authored
2022-12-06 14:34:58 +0800
by
王聪
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update
1 parent
b0c9794f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
src/apps/doc/mixins.py
src/pos/views.py
src/apps/doc/mixins.py
View file @
7edab92
...
...
@@ -234,7 +234,7 @@ class PosHandler:
for
registration
in
registration_bar
:
if
registration
.
get
(
'register_type'
,
''
)
==
'抵押登记'
:
register_info
=
registration
.
get
(
'register_info'
,
{})
result_obj
[
'application'
]
=
register_info
.
get
(
'抵押权人姓名/名称'
,
''
)
result_obj
[
'application
Name
'
]
=
register_info
.
get
(
'抵押权人姓名/名称'
,
''
)
elif
registration
.
get
(
'register_type'
,
''
)
==
'解除抵押'
:
register_info
=
registration
.
get
(
'register_info'
,
{})
result_obj
[
'deMortgageDate'
]
=
register_info
.
get
(
'解除抵押日期'
,
''
)
...
...
@@ -250,7 +250,7 @@ class PosHandler:
def
de_mortgage_ocr_process1
(
file_obj
):
result_obj
=
{
'customerName'
:
''
,
'application'
:
''
,
'application
Name
'
:
''
,
'deMortgageDate'
:
''
}
...
...
src/pos/views.py
View file @
7edab92
...
...
@@ -60,7 +60,7 @@ file_param = {
de_mortgage_args
=
{
'customerName'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
64
)),
'application'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
64
)),
'application
Name
'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
64
)),
'deMortgageDate'
:
fields
.
Date
(
required
=
True
),
'files'
:
fields
.
Nested
(
file_param
,
required
=
True
),
}
...
...
@@ -68,7 +68,7 @@ de_mortgage_args = {
de_mortgage_comments
=
{
'customerName'
:
(
'机动车所有人识别不一致'
,
),
'application'
:
(
'抵押权人姓名/名称识别不一致'
,
),
'application
Name
'
:
(
'抵押权人姓名/名称识别不一致'
,
),
'deMortgageDate'
:
(
'解除抵押日期不一致'
,
)
}
...
...
@@ -82,12 +82,12 @@ class DeMortgageView(GenericView):
def
post
(
self
,
request
,
args
):
# interface_report mpos to ocr
files
=
args
.
get
(
'files'
,
[])
customer_name
=
args
.
get
(
'customerName'
,
''
)
application
=
args
.
get
(
'application
'
,
''
)
application
_name
=
args
.
get
(
'applicationName
'
,
''
)
de_mortgage_date
=
args
.
get
(
'deMortgageDate'
)
fields_input
=
{
'customerName'
:
customer_name
,
'application
'
:
application
,
'application
Name'
:
application_name
,
'deMortgageDate'
:
de_mortgage_date
}
de_mortgage_info
=
{}
...
...
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