Merge branch 'feature/pres-3034' into 'feature/uat-tmp'
de-mortgage 接口更新 See merge request !2
Showing
2 changed files
with
15 additions
and
1 deletions
... | @@ -4,4 +4,5 @@ from pos import views | ... | @@ -4,4 +4,5 @@ from pos import views |
4 | urlpatterns = [ | 4 | urlpatterns = [ |
5 | path(r'nsc/invoice', views.NSCInvoiceView.as_view()), | 5 | path(r'nsc/invoice', views.NSCInvoiceView.as_view()), |
6 | path(r'de-mortgage', views.DeMortgageView.as_view()), | 6 | path(r'de-mortgage', views.DeMortgageView.as_view()), |
7 | path(r'de-mortgage1', views.DeMortgageView1.as_view()), | ||
7 | ] | 8 | ] | ... | ... |
... | @@ -62,7 +62,7 @@ de_mortgage_args = { | ... | @@ -62,7 +62,7 @@ de_mortgage_args = { |
62 | 'customerName': fields.Str(required=True, validate=validate.Length(max=64)), | 62 | 'customerName': fields.Str(required=True, validate=validate.Length(max=64)), |
63 | 'applicationName': fields.Str(required=True, validate=validate.Length(max=64)), | 63 | 'applicationName': fields.Str(required=True, validate=validate.Length(max=64)), |
64 | 'deMortgageDate': fields.Date(required=True), | 64 | 'deMortgageDate': fields.Date(required=True), |
65 | 'files': fields.Nested(file_param, required=True), | 65 | 'files': fields.List(fields.Nested(file_param)) |
66 | } | 66 | } |
67 | 67 | ||
68 | 68 | ||
... | @@ -121,3 +121,16 @@ class DeMortgageView(GenericView): | ... | @@ -121,3 +121,16 @@ class DeMortgageView(GenericView): |
121 | } | 121 | } |
122 | return response.ok(data=result) | 122 | return response.ok(data=result) |
123 | 123 | ||
124 | |||
125 | class DeMortgageView1(GenericView): | ||
126 | permission_classes = [IsAuthenticated] | ||
127 | authentication_classes = [OAuth2AuthenticationWithUser] | ||
128 | |||
129 | @use_args(de_mortgage_args, location='data') | ||
130 | def post(self, request, args): # interface_report mpos to ocr | ||
131 | files = args.get('files', []) | ||
132 | customer_name = args.get('customerName', '') | ||
133 | application_name = args.get('applicationName', '') | ||
134 | de_mortgage_date = args.get('deMortgageDate') | ||
135 | |||
136 | return response.ok(data=args) | ... | ... |
-
Please register or sign in to post a comment