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
76ac8734
authored
2023-01-07 17:54:49 +0800
by
王聪
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
FSM fix
1 parent
ba27a782
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
src/apps/doc/views.py
src/apps/doc/views.py
View file @
76ac873
...
...
@@ -579,20 +579,26 @@ class UploadDocView(GenericView, DocHandler):
# fsm激活状态, 更新ocr_result 表fsm状态
if
consts
.
FSM_ACTIVITED_STATUS
.
get
(
application_status
):
ocr_result_obj
=
None
result_class
=
None
if
business_type
==
consts
.
HIL_PREFIX
:
if
document_scheme
==
RequestTeam
.
ACCEPTANCE
[
1
]:
ocr_result_obj
=
HILOCRResult
.
objects
.
filter
(
application_id
=
application_id
)
.
first
()
result_class
=
HILOCRResult
elif
document_scheme
==
RequestTeam
.
SETTLEMENT
[
1
]:
ocr_result_obj
=
HILSEOCRResult
.
objects
.
filter
(
application_id
=
application_id
)
.
first
()
result_class
=
HILSEOCRResult
elif
business_type
==
consts
.
AFC_PREFIX
:
if
document_scheme
==
RequestTeam
.
ACCEPTANCE
[
1
]:
ocr_result_obj
=
AFCOCRResult
.
objects
.
filter
(
application_id
=
application_id
)
.
first
()
result_class
=
AFCOCRResult
elif
document_scheme
==
RequestTeam
.
SETTLEMENT
[
1
]:
ocr_result_obj
=
AFCSEOCRResult
.
objects
.
filter
(
application_id
=
application_id
)
.
first
()
result_class
=
AFCSEOCRResult
ocr_result_obj
=
result_class
.
objects
.
filter
(
application_id
=
application_id
)
.
first
()
if
ocr_result_obj
:
ocr_result_obj
.
fsmActivited
=
1
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
=
1
ocr_result_obj
.
save
()
if
data_source
==
consts
.
DATA_SOURCE_LIST
[
1
]:
...
...
@@ -1388,8 +1394,8 @@ class SECMSView(GenericView):
)
# 检查是否fsm流程(SE)
fsm_contract
=
cms_info
.
get
(
'
fsm
Contract'
,
False
)
fsm_best_price
=
cms_info
.
get
(
'
fsm
BestPrice'
,
False
)
fsm_contract
=
cms_info
.
get
(
'
FSM
Contract'
,
False
)
fsm_best_price
=
cms_info
.
get
(
'
FSM
BestPrice'
,
False
)
if
fsm_contract
:
fsm_compare
.
apply_async
((
application_id
,
business_type
,
None
,
None
,
False
,
True
),
queue
=
'queue_compare'
)
...
...
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