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
fe02ac2d
authored
2024-07-16 14:48:59 +0800
by
冯轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
MOD:log
1 parent
15c08f70
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
src/apps/doc/views.py
src/apps/doc/views.py
View file @
fe02ac2
...
...
@@ -1903,12 +1903,13 @@ class InvoiceExcelView(GenericView):
def
post
(
self
,
request
,
args
):
application_ids
=
args
.
get
(
'application_ids'
)
application_entity
=
args
.
get
(
'application_entity'
)
self
.
running_log
.
info
(
'[InvoiceExcelView] [user_role={0}] '
.
format
(
'111222333'
))
# 角色权限不符,返回异常
token
=
request
.
META
.
get
(
"HTTP_AUTHORIZATION"
)
user_role
=
rh
.
get_token
(
token
[
-
11
:])
self
.
running_log
.
info
(
'[InvoiceExcelView] [user_role={0}] '
.
format
(
user_role
))
if
user_role
is
None
or
user_role
==
'-1'
or
(
user_role
==
'1'
and
application_entity
==
'HIL'
)
or
(
user_role
==
'2'
and
application_entity
==
'AFC'
):
if
user_role
is
None
or
user_role
==
'-1'
or
(
user_role
==
'1'
and
application_entity
==
'2'
)
or
(
user_role
==
'2'
and
application_entity
==
'1'
):
self
.
running_log
.
info
(
'[InvoiceExcelView no permission] [user_role={0}] [application_entity={1}]'
.
format
(
user_role
,
application_entity
))
raise
NoPermissionException
(
'no permission'
)
url
=
'http://127.0.0.1:8088/napi/invoice/downloadExcelOri'
...
...
@@ -1947,12 +1948,14 @@ class InvoiceQueryInfoView(GenericView):
def
post
(
self
,
request
,
args
):
application_ids
=
args
.
get
(
'application_ids'
)
application_entity
=
args
.
get
(
'application_entity'
)
self
.
running_log
.
info
(
'[InvoiceExcelView] [user_role={0}] '
.
format
(
'111222333'
))
# 角色权限不符,返回异常
token
=
request
.
META
.
get
(
"HTTP_AUTHORIZATION"
)
user_role
=
rh
.
get_token
(
token
[
-
11
:])
self
.
running_log
.
info
(
'[InvoiceQueryInfoView] [user_role={0}] '
.
format
(
user_role
))
if
user_role
is
None
or
user_role
==
'-1'
or
(
user_role
==
'1'
and
application_entity
==
'HIL'
)
or
(
user_role
==
'2'
and
application_entity
==
'AFC'
):
if
user_role
is
None
or
user_role
==
'-1'
or
(
user_role
==
'1'
and
application_entity
==
'2'
)
or
(
user_role
==
'2'
and
application_entity
==
'1'
):
self
.
running_log
.
info
(
'[InvoiceExcelView no permission] [user_role={0}] [application_entity={1}]'
.
format
(
user_role
,
application_entity
))
raise
NoPermissionException
(
'no permission'
)
url
=
'http://127.0.0.1:8088/napi/invoice/queryInfoOri'
...
...
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