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
d364e1e6
authored
2023-01-15 14:05:00 +0800
by
王聪
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
cms_status_info update
1 parent
31329bdf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
src/apps/doc/models.py
src/apps/doc/views.py
src/apps/doc/models.py
View file @
d364e1e
...
...
@@ -1075,7 +1075,7 @@ class NscInvoice(models.Model):
situ_db_label
=
'hil'
class
CmsStatusInfo
(
models
.
Model
):
class
AFC
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
=
"业务类型"
)
...
...
@@ -1085,5 +1085,19 @@ class CmsStatusInfo(models.Model):
class
Meta
:
managed
=
False
db_table
=
'cms_status_info'
db_table
=
'afc_cms_status_info'
situ_db_label
=
'afc'
class
HILCmsStatusInfo
(
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
.
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
=
'hil_cms_status_info'
situ_db_label
=
'hil'
\ No newline at end of file
...
...
src/apps/doc/views.py
View file @
d364e1e
...
...
@@ -52,7 +52,8 @@ from .models import (
HILSEOCRResult
,
AFCOCRResult
,
AFCSEOCRResult
,
CmsStatusInfo
HILCmsStatusInfo
,
AFCCmsStatusInfo
)
from
.named_enum
import
ErrorType
,
AutoResult
,
WholeResult
,
RPAResult
,
SystemName
,
RequestTeam
from
.mixins
import
DocHandler
,
MPOSHandler
,
PreSEHandler
...
...
@@ -1402,12 +1403,13 @@ class SECMSView(GenericView):
if
fsm_contract
:
# 记录fsm 流程的cms 提交
try
:
cms_status_info
=
CmsStatusInfo
.
objects
.
filter
(
application_id
=
application_id
)
.
first
()
cms_status_class
=
HILCmsStatusInfo
if
business_type
in
consts
.
HIL_SET
else
AFCCmsStatusInfo
cms_status_info
=
cms_status_class
.
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
=
cms_status_class
()
cms_status_info
.
application_id
=
application_id
cms_status_info
.
business_type
=
business_type
cms_status_info
.
is_fsm
=
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