5b9338bd by 周伟奇

Merge branch 'feature/bd' into feature/0918

2 parents a1f6365c dc8d0d47
...@@ -256,12 +256,16 @@ class Command(BaseCommand, LoggerMixin): ...@@ -256,12 +256,16 @@ class Command(BaseCommand, LoggerMixin):
256 product_result = ['', '', ''] 256 product_result = ['', '', '']
257 for product in license_data.get('result', {}).get('productList', []): 257 for product in license_data.get('result', {}).get('productList', []):
258 name = product.get('name', {}).get('words', '') 258 name = product.get('name', {}).get('words', '')
259 if name.find('机动车损失保险') != -1: 259 if name.find('机动车损失') != -1:
260 product_result[0] = product.get('coverage', {}).get('words', '') 260 product_result[0] = product.get('coverage', {}).get('words', '')
261 product_result[2] = product.get('deductible_franchise', {}).get('words', '') 261 product_result[2] = product.get('deductible_franchise', {}).get('words', '')
262 elif name.find('机动车第三者责任保险') != -1: 262 elif name.find('第三者责任') != -1:
263 product_result[1] = product.get('coverage', {}).get('words', '') 263 product_result[1] = product.get('coverage', {}).get('words', '')
264 264
265 special_str = license_data.get('result', {}).get('1stBeneficiary', {}).get('words', '')
266 special = '无'
267 if special_str.find('宝马') != -1 or special_str.find('先锋国际融资租赁有限公司') != -1:
268 special = '有'
265 insurance_ocr_result = { 269 insurance_ocr_result = {
266 '被保险人姓名': license_data.get('result', {}).get('insured', {}).get('name', {}).get('words', ''), 270 '被保险人姓名': license_data.get('result', {}).get('insured', {}).get('name', {}).get('words', ''),
267 '被保险人证件号码': license_data.get('result', {}).get('insured', {}).get('certiCode', {}).get('words', ''), 271 '被保险人证件号码': license_data.get('result', {}).get('insured', {}).get('certiCode', {}).get('words', ''),
...@@ -273,7 +277,7 @@ class Command(BaseCommand, LoggerMixin): ...@@ -273,7 +277,7 @@ class Command(BaseCommand, LoggerMixin):
273 '保险起始日期': license_data.get('result', {}).get('startDate', {}).get('words', ''), 277 '保险起始日期': license_data.get('result', {}).get('startDate', {}).get('words', ''),
274 '保险截止日期': license_data.get('result', {}).get('endDate', {}).get('words', ''), 278 '保险截止日期': license_data.get('result', {}).get('endDate', {}).get('words', ''),
275 '保单章': '', 279 '保单章': '',
276 '特别约定第一受益人': license_data.get('result', {}).get('1stBeneficiary', {}).get('words', ''), 280 '特别约定第一受益人': special,
277 } 281 }
278 license_summary.setdefault(classify, []).append(insurance_ocr_result) 282 license_summary.setdefault(classify, []).append(insurance_ocr_result)
279 elif classify == consts.DDA_CLASSIFY: # DDA处理 283 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!