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
362f43f5
authored
2022-12-07 18:20:45 +0800
by
王聪
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'feature/pres-3034' into 'feature/uat-tmp'
de-mortgage 接口更新 See merge request !2
2 parents
d4126306
44bf59b0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletions
src/apps/doc/pos_urls.py
src/pos/views.py
src/apps/doc/pos_urls.py
View file @
362f43f
...
...
@@ -4,4 +4,5 @@ from pos import views
urlpatterns
=
[
path
(
r'nsc/invoice'
,
views
.
NSCInvoiceView
.
as_view
()),
path
(
r'de-mortgage'
,
views
.
DeMortgageView
.
as_view
()),
path
(
r'de-mortgage1'
,
views
.
DeMortgageView1
.
as_view
()),
]
...
...
src/pos/views.py
View file @
362f43f
...
...
@@ -62,7 +62,7 @@ de_mortgage_args = {
'customerName'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
64
)),
'applicationName'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
64
)),
'deMortgageDate'
:
fields
.
Date
(
required
=
True
),
'files'
:
fields
.
Nested
(
file_param
,
required
=
True
),
'files'
:
fields
.
List
(
fields
.
Nested
(
file_param
))
}
...
...
@@ -121,3 +121,16 @@ class DeMortgageView(GenericView):
}
return
response
.
ok
(
data
=
result
)
class
DeMortgageView1
(
GenericView
):
permission_classes
=
[
IsAuthenticated
]
authentication_classes
=
[
OAuth2AuthenticationWithUser
]
@use_args
(
de_mortgage_args
,
location
=
'data'
)
def
post
(
self
,
request
,
args
):
# interface_report mpos to ocr
files
=
args
.
get
(
'files'
,
[])
customer_name
=
args
.
get
(
'customerName'
,
''
)
application_name
=
args
.
get
(
'applicationName'
,
''
)
de_mortgage_date
=
args
.
get
(
'deMortgageDate'
)
return
response
.
ok
(
data
=
args
)
...
...
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