dc8d0d47 by 周伟奇

fix bug

1 parent 984fdff1
......@@ -256,12 +256,16 @@ class Command(BaseCommand, LoggerMixin):
product_result = ['', '', '']
for product in license_data.get('result', {}).get('productList', []):
name = product.get('name', {}).get('words', '')
if name.find('机动车损失保险') != -1:
if name.find('机动车损失') != -1:
product_result[0] = product.get('coverage', {}).get('words', '')
product_result[2] = product.get('deductible_franchise', {}).get('words', '')
elif name.find('机动车第三者责任保险') != -1:
elif name.find('第三者责任') != -1:
product_result[1] = product.get('coverage', {}).get('words', '')
special_str = license_data.get('result', {}).get('1stBeneficiary', {}).get('words', '')
special = '无'
if special_str.find('宝马') != -1 or special_str.find('先锋国际融资租赁有限公司') != -1:
special = '有'
insurance_ocr_result = {
'被保险人姓名': license_data.get('result', {}).get('insured', {}).get('name', {}).get('words', ''),
'被保险人证件号码': license_data.get('result', {}).get('insured', {}).get('certiCode', {}).get('words', ''),
......@@ -273,7 +277,7 @@ class Command(BaseCommand, LoggerMixin):
'保险起始日期': license_data.get('result', {}).get('startDate', {}).get('words', ''),
'保险截止日期': license_data.get('result', {}).get('endDate', {}).get('words', ''),
'保单章': '',
'特别约定第一受益人': license_data.get('result', {}).get('1stBeneficiary', {}).get('words', ''),
'特别约定第一受益人': special,
}
license_summary.setdefault(classify, []).append(insurance_ocr_result)
elif classify == consts.DDA_CLASSIFY: # DDA处理
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!