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
a7a8687b
authored
2022-01-07 17:34:38 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fxi auto
1 parent
fdc07b8c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
2 deletions
src/apps/doc/compare_urls.py
src/apps/doc/consts.py
src/apps/doc/models.py
src/apps/doc/views.py
src/apps/doc/compare_urls.py
View file @
a7a8687
...
...
@@ -5,6 +5,7 @@ from . import views
urlpatterns
=
[
path
(
r'v1'
,
views
.
CompareView
.
as_view
()),
path
(
r'settlement/v1'
,
views
.
SECompareView
.
as_view
()),
path
(
r'settlement/auto/v1'
,
views
.
AutoSettlementView
.
as_view
()),
path
(
r'settlement/cms/v1'
,
views
.
SECMSView
.
as_view
()),
path
(
r'offline/v1'
,
views
.
CompareOfflineView
.
as_view
()),
path
(
r'result'
,
views
.
CompareResultView
.
as_view
()),
...
...
src/apps/doc/consts.py
View file @
a7a8687
...
...
@@ -2206,6 +2206,8 @@ RESULT_MAP = {
2
:
False
}
RE_RESULT_MAP
=
{
v
:
k
for
k
,
v
in
RESULT_MAP
.
items
()}
RPA_RESULT_MAP
=
{
0
:
None
,
1
:
1
,
...
...
@@ -2213,3 +2215,5 @@ RPA_RESULT_MAP = {
3
:
3
,
}
RE_RPA_RESULT_MAP
=
{
v
:
k
for
k
,
v
in
RPA_RESULT_MAP
.
items
()}
...
...
src/apps/doc/models.py
View file @
a7a8687
...
...
@@ -835,7 +835,7 @@ class HILAutoSettlement(models.Model):
ocr_auto_result
=
models
.
TextField
(
null
=
True
,
verbose_name
=
"auto比对结果"
)
ocr_latest_comparison_time
=
models
.
DateTimeField
(
auto_now
=
True
,
null
=
True
,
verbose_name
=
'最新比对时间'
)
# 索引
update_time
=
models
.
DateTimeField
(
auto_now
=
Fals
e
,
verbose_name
=
'修改时间'
)
update_time
=
models
.
DateTimeField
(
auto_now
=
Tru
e
,
verbose_name
=
'修改时间'
)
create_time
=
models
.
DateTimeField
(
auto_now_add
=
True
,
verbose_name
=
'创建时间'
)
class
Meta
:
...
...
@@ -860,7 +860,8 @@ class AFCAutoSettlement(models.Model):
rpa_second_eye_time
=
models
.
DateTimeField
(
null
=
True
,
verbose_name
=
'rpa_second_eye_time'
)
on_off
=
models
.
BooleanField
(
default
=
True
,
verbose_name
=
"是否有效"
)
ocr_auto_result_pass
=
models
.
BooleanField
(
default
=
False
,
verbose_name
=
"整体结果"
)
ocr_auto_result_pass
=
models
.
BooleanField
(
null
=
True
,
verbose_name
=
"auto结果"
)
ocr_whole_result_pass
=
models
.
BooleanField
(
null
=
True
,
verbose_name
=
"整体结果"
)
ocr_auto_result
=
models
.
TextField
(
verbose_name
=
"auto比对结果"
)
ocr_latest_comparison_time
=
models
.
DateTimeField
(
auto_now
=
True
,
null
=
True
,
verbose_name
=
'最新比对时间'
)
...
...
src/apps/doc/views.py
View file @
a7a8687
...
...
@@ -1343,6 +1343,11 @@ class AutoSettlementView(GenericView):
auto_queryset
=
auto_class
.
objects
.
filter
(
query
)
.
values
(
*
val_tuple
)
.
order_by
(
'-ocr_latest_comparison_time'
)[
start_index
:
end_index
]
for
auto_dict
in
auto_queryset
:
auto_dict
[
'ocr_auto_result_pass'
]
=
consts
.
RE_RESULT_MAP
.
get
(
auto_dict
.
get
(
'ocr_auto_result_pass'
))
auto_dict
[
'ocr_whole_result_pass'
]
=
consts
.
RE_RESULT_MAP
.
get
(
auto_dict
.
get
(
'ocr_whole_result_pass'
))
auto_dict
[
'rpa_result'
]
=
consts
.
RE_RPA_RESULT_MAP
.
get
(
auto_dict
.
get
(
'rpa_result'
))
# total = len(doc_list)
pagination
=
{
'current'
:
page
,
'total'
:
total
,
'page_size'
:
page_size
}
res
=
{
...
...
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