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
62e0a02b
authored
2023-01-15 14:56:28 +0800
by
冯轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
MOD:取消区分fsm_activited激活前后的值
1 parent
9be82ba6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
src/apps/doc/views.py
src/apps/doc/views.py
View file @
62e0a02
...
...
@@ -580,12 +580,9 @@ class UploadDocView(GenericView, DocHandler):
document_scheme
=
self
.
fix_scheme
(
document_scheme
)
# fsm激活状态, 更新ocr_result 表fsm状态
is_fsm
=
consts
.
FSM_ACTIVITED_STATUS
.
get
(
application_status
)
or
consts
.
FSM_BEFORE_ACTIVITED_STATUS
.
get
(
application_status
)
self
.
running_log
.
info
(
'[doc upload applicationId-{0}] [applicationStatus-{1}, activated-{2}]'
.
format
(
application_id
,
application_status
,
is_fsm
))
if
is_fsm
:
# fsm激活状态 0(默认):非sfm;1:激活前;2:激活后
fsm_activited
=
2
if
consts
.
FSM_ACTIVITED_STATUS
.
get
(
application_status
)
else
1
.
format
(
application_id
,
application_status
,
True
if
consts
.
FSM_ACTIVITED_STATUS
.
get
(
application_status
)
else
False
))
if
consts
.
FSM_ACTIVITED_STATUS
.
get
(
application_status
):
result_class
=
None
if
business_type
==
consts
.
HIL_PREFIX
:
if
document_scheme
==
RequestTeam
.
ACCEPTANCE
.
name
:
...
...
@@ -600,12 +597,12 @@ class UploadDocView(GenericView, DocHandler):
ocr_result_obj
=
result_class
.
objects
.
filter
(
application_id
=
application_id
)
.
first
()
if
ocr_result_obj
:
ocr_result_obj
.
fsm_activited
=
fsm_activited
ocr_result_obj
.
fsm_activited
=
1
ocr_result_obj
.
save
()
else
:
ocr_result_obj
=
result_class
()
ocr_result_obj
.
application_id
=
application_id
ocr_result_obj
.
fsm_activited
=
fsm_activited
ocr_result_obj
.
fsm_activited
=
1
ocr_result_obj
.
save
()
if
data_source
==
consts
.
DATA_SOURCE_LIST
[
1
]:
...
...
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