362f43f5 by 王聪

Merge branch 'feature/pres-3034' into 'feature/uat-tmp'

de-mortgage 接口更新

See merge request !2
2 parents d4126306 44bf59b0
......@@ -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()),
]
......
......@@ -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)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!