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
dd49a253
authored
2022-12-13 15:38:16 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix keyword
1 parent
1122a082
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
src/apps/doc/consts.py
src/apps/doc/views.py
src/apps/doc/consts.py
View file @
dd49a25
...
...
@@ -2360,17 +2360,24 @@ ECONTRACT_KEYWORDS_MAP = {
(
'抵押贷款合同'
,
CONTRACT_CLASSIFY
),
(
'送达地址确认书'
,
CONTRACT_QRS_CLASSIFY
),
(
'抵押登记豁免函'
,
HMH_CLASSIFY
),
(
'延长保修'
,
FSM_CONTRACT_WEP_CLASSIFY
),
(
'长悦保养'
,
FSM_CONTRACT_MSI_CLASSIFY
),
(
'汽车销售合同'
,
FSM_CONTRACT_SC_CLASSIFY
),
],
HIL_PREFIX
:
[
(
'售后回租合同'
,
HIL_CONTRACT_1_CLASSIFY
),
(
'租赁抵押合同'
,
HIL_CONTRACT_2_CLASSIFY
),
(
'车辆处置协议'
,
HIL_CONTRACT_3_CLASSIFY
),
(
'抵押登记豁免函'
,
HMH_CLASSIFY
),
(
'延长保修'
,
FSM_CONTRACT_WEP_CLASSIFY
),
(
'长悦保养'
,
FSM_CONTRACT_MSI_CLASSIFY
),
]
}
FSM_ECONTRACT_KEYWORDS_MAP
=
{
AFC_PREFIX
:
[
(
'延长保修条款与条件'
,
FSM_CONTRACT_WEP_CLASSIFY
),
(
'长悦保养套餐服务合同'
,
FSM_CONTRACT_MSI_CLASSIFY
),
(
'汽车销售合同'
,
FSM_CONTRACT_SC_CLASSIFY
),
],
HIL_PREFIX
:
[
(
'延长保修条款与条件'
,
FSM_CONTRACT_WEP_CLASSIFY
),
(
'长悦保养套餐服务合同'
,
FSM_CONTRACT_MSI_CLASSIFY
),
(
'汽车销售合同'
,
FSM_CONTRACT_SC_CLASSIFY
),
]
}
...
...
src/apps/doc/views.py
View file @
dd49a25
...
...
@@ -596,7 +596,15 @@ class UploadDocView(GenericView, DocHandler):
if
keyword
in
document_name
:
classify_1
=
classify_1_tmp
break
elif
document_name
.
endswith
(
'.zip'
)
or
document_name
.
endswith
(
'.rar'
)
or
document_name
.
endswith
(
'.ZIP'
)
\
# FSM合同:WEP/MSI/SC
elif
data_source
==
consts
.
DATA_SOURCE_LIST
[
0
]
and
document_scheme
==
consts
.
DOC_SCHEME_LIST
[
0
]:
for
keyword
,
classify_1_tmp
in
consts
.
FSM_ECONTRACT_KEYWORDS_MAP
.
get
(
prefix
):
if
keyword
in
document_name
:
classify_1
=
classify_1_tmp
break
if
document_name
.
endswith
(
'.zip'
)
or
document_name
.
endswith
(
'.rar'
)
or
document_name
.
endswith
(
'.ZIP'
)
\
or
document_name
.
endswith
(
'.RAR'
):
is_zip
=
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