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
20f285b0
authored
2022-01-24 18:25:41 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix auto
1 parent
244bd532
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
src/apps/doc/views.py
src/apps/doc/views.py
View file @
20f285b
...
...
@@ -748,17 +748,25 @@ class SECompareView(GenericView):
business_type
=
content
.
get
(
'applicationEntity'
)
application_id
=
content
.
get
(
'applicationId'
)
is_auto
=
content
.
get
(
'isAutoSettlement'
,
False
)
auto_class
=
HILAutoSettlement
if
business_type
in
consts
.
HIL_SET
else
AFCAutoSettlement
auto_obj
=
auto_class
.
objects
.
filter
(
application_id
=
application_id
)
.
first
()
if
is_auto
:
# 加入优先级队列
PriorityApplication
.
objects
.
update_or_create
(
application_id
=
application_id
,
defaults
=
{
'on_off'
:
True
})
# 加入auto表
auto_class
=
HILAutoSettlement
if
business_type
in
consts
.
HIL_SET
else
AFCAutoSettlement
is_auto_in_db
=
auto_class
.
objects
.
filter
(
application_id
=
application_id
,
on_off
=
True
)
.
exists
()
if
not
is_auto_in_db
:
if
auto_obj
is
None
:
auto_class
.
objects
.
create
(
application_id
=
application_id
,
)
elif
auto_obj
.
on_off
is
False
:
auto_obj
.
on_off
=
True
auto_obj
.
save
()
else
:
if
auto_obj
is
not
None
and
auto_obj
.
on_off
is
True
:
auto_obj
.
on_off
=
False
auto_obj
.
save
()
return
response
.
ok
()
# uniq_seq = content.get('uniqSeq')
...
...
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