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
564346f6
authored
2023-01-12 17:57:20 +0800
by
王聪
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'feature/fsm-full' into 'feature/uat-tmp'
增加 fsm流程记录 See merge request !12
2 parents
d9b45158
ac855afd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
src/apps/doc/models.py
src/apps/doc/views.py
src/apps/doc/models.py
View file @
564346f
...
...
@@ -1075,3 +1075,15 @@ class NscInvoice(models.Model):
situ_db_label
=
'hil'
class
CmsStatusInfo
(
models
.
Model
):
id
=
models
.
AutoField
(
primary_key
=
True
,
verbose_name
=
"id"
)
# 主键
application_id
=
models
.
CharField
(
max_length
=
64
,
verbose_name
=
"订单id"
)
# 索引
business_type
=
models
.
CharField
(
max_length
=
64
,
verbose_name
=
"业务类型"
)
is_fsm
=
models
.
models
.
SmallIntegerField
(
null
=
False
,
default
=
0
,
verbose_name
=
"是否fsm流程 1:是"
)
update_time
=
models
.
DateTimeField
(
verbose_name
=
'更新时间'
)
create_time
=
models
.
DateTimeField
(
verbose_name
=
'创建时间'
)
class
Meta
:
managed
=
False
db_table
=
'cms_status_info'
situ_db_label
=
'hil'
\ No newline at end of file
...
...
src/apps/doc/views.py
View file @
564346f
...
...
@@ -51,7 +51,8 @@ from .models import (
HILOCRResult
,
HILSEOCRResult
,
AFCOCRResult
,
AFCSEOCRResult
AFCSEOCRResult
,
CmsStatusInfo
)
from
.named_enum
import
ErrorType
,
AutoResult
,
WholeResult
,
RPAResult
,
SystemName
,
RequestTeam
from
.mixins
import
DocHandler
,
MPOSHandler
,
PreSEHandler
...
...
@@ -1408,9 +1409,19 @@ class SECMSView(GenericView):
fsm_contract
=
cms_info
.
get
(
'FSMContract'
,
False
)
fsm_best_price
=
cms_info
.
get
(
'FSMBestPrice'
,
False
)
if
fsm_contract
:
# 记录fsm 流程的cms 提交
cms_status_info
=
CmsStatusInfo
.
objects
.
filter
(
application_id
=
application_id
)
.
first
()
if
cms_status_info
:
cms_status_info
.
is_fsm
=
1
cms_status_info
.
save
()
else
:
cms_status_info
=
CmsStatusInfo
()
cms_status_info
.
application_id
=
application_id
cms_status_info
.
business_type
=
business_type
cms_status_info
.
is_fsm
=
1
cms_status_info
.
save
()
fsm_compare
.
apply_async
((
application_id
,
business_type
,
None
,
None
,
False
,
True
),
queue
=
'queue_compare'
)
else
:
# 触发比对
compare
.
apply_async
((
application_id
,
business_type
,
None
,
None
,
False
,
True
),
...
...
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