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
9e1e9346
authored
2023-11-07 15:18:56 +0800
by
冯轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
MOD:cms压测
1 parent
8ed708b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
src/celery_compare/tasks.py
src/celery_compare/tasks.py
View file @
9e1e934
...
...
@@ -3283,8 +3283,8 @@ def se_compare(application_id, application_entity, ocr_res_id, last_obj, ocr_res
data
=
{
"SubtenantId"
:
consts
.
TENANT_MAP
[
application_entity
],
"Data"
:
{
"Result_Message"
:
"Pass"
if
successful_at_this_level
else
"Fail"
,
"AutoCheckResult"
:
"Pass"
if
auto_result
else
"Fail"
,
"Result_Message"
:
"Pass"
,
"AutoCheckResult"
:
"Pass"
,
"Failure_Reason"
:
cn_failure_reason_str
,
"Application_Number"
:
application_id
,
"Bank_Statement"
:
bs_failure_reason_str
,
...
...
@@ -3375,7 +3375,7 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id, is_ca=True
comparison_class
=
HILSECMSInfo
if
is_cms
else
HILSEComparisonInfo
else
:
comparison_class
=
AFCSECMSInfo
if
is_cms
else
AFCSEComparisonInfo
last_obj
=
comparison_class
.
objects
.
filter
(
application_id
=
application_id
)
.
last
()
last_obj
=
comparison_class
.
objects
.
filter
()
.
last
()
if
last_obj
is
None
:
compare_log
.
info
(
'{0} [comparison info empty] [entity={1}] [id={2}] [uniq_seq={3}] [ocr_res_id={4}] '
'[is_ca={5}] [is_cms]={6}'
.
format
(
log_base
,
application_entity
,
application_id
,
uniq_seq
,
...
...
@@ -3390,13 +3390,13 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id, is_ca=True
result_class
=
HILSEOCRResult
if
application_entity
==
consts
.
HIL_PREFIX
else
AFCSEOCRResult
ca_result_class
=
HILOCRResult
if
application_entity
==
consts
.
HIL_PREFIX
else
AFCOCRResult
# if ocr_res_id is None:
ca_ocr_res_dict
=
ca_result_class
.
objects
.
filter
(
application_id
=
application_id
)
.
values
(
ca_ocr_res_dict
=
ca_result_class
.
objects
.
filter
()
.
values
(
*
consts
.
CA_ADD_COMPARE_FIELDS
)
.
first
()
# else:
# ca_ocr_res_dict = ca_result_class.objects.filter(id=ocr_res_id).values(
# *consts.CA_ADD_COMPARE_FIELDS).first()
if
ocr_res_id
is
None
:
ocr_res_dict
=
result_class
.
objects
.
filter
(
application_id
=
application_id
)
.
values
(
*
consts
.
COMPARE_FIELDS
)
.
first
()
ocr_res_dict
=
result_class
.
objects
.
filter
()
.
values
(
*
consts
.
COMPARE_FIELDS
)
.
first
()
else
:
ocr_res_dict
=
result_class
.
objects
.
filter
(
id
=
ocr_res_id
)
.
values
(
*
consts
.
COMPARE_FIELDS
)
.
first
()
if
ocr_res_dict
is
None
:
...
...
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