dd49a253 by 周伟奇

fix keyword

1 parent 1122a082
......@@ -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),
]
}
......
......@@ -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
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!