e914ba66 by 周伟奇

fix bug

1 parent 26641ca0
...@@ -333,7 +333,7 @@ class Command(BaseCommand, LoggerMixin): ...@@ -333,7 +333,7 @@ class Command(BaseCommand, LoggerMixin):
333 min_char_count_2 = 1000 333 min_char_count_2 = 1000
334 for product in license_data.get('result', {}).get('productList', []): 334 for product in license_data.get('result', {}).get('productList', []):
335 name = product.get('name', {}).get('words', '') 335 name = product.get('name', {}).get('words', '')
336 if name.find('机动车损失') != -1 or name.find('汽车损失') != -1: 336 if name.find('机动车损失') != -1 or name.find('汽车损失') != -1 or name.find('车损险') != -1:
337 if len(name) < min_char_count_1: 337 if len(name) < min_char_count_1:
338 min_char_count_1 = len(name) 338 min_char_count_1 = len(name)
339 product_result[0] = product.get('coverage', {}).get('words', '') 339 product_result[0] = product.get('coverage', {}).get('words', '')
......
...@@ -818,7 +818,7 @@ class HILAutoSettlement(models.Model): ...@@ -818,7 +818,7 @@ class HILAutoSettlement(models.Model):
818 application_id = models.CharField(max_length=64, verbose_name="申请id") # 索引 818 application_id = models.CharField(max_length=64, verbose_name="申请id") # 索引
819 aa_type = models.CharField(null=True, max_length=64, verbose_name="aa_type") 819 aa_type = models.CharField(null=True, max_length=64, verbose_name="aa_type")
820 820
821 rpa_result = models.SmallIntegerField(null=True, verbose_name="原因10数目") 821 rpa_result = models.SmallIntegerField(null=True, verbose_name="rpa_result")
822 rpa_1st_eye_tat = models.DecimalField(max_digits=18, decimal_places=0, null=True, verbose_name='rpa_1st_eye_tat') 822 rpa_1st_eye_tat = models.DecimalField(max_digits=18, decimal_places=0, null=True, verbose_name='rpa_1st_eye_tat')
823 rpa_2nd_eye_tat = models.DecimalField(max_digits=18, decimal_places=0, null=True, verbose_name='rpa_2nd_eye_tat') 823 rpa_2nd_eye_tat = models.DecimalField(max_digits=18, decimal_places=0, null=True, verbose_name='rpa_2nd_eye_tat')
824 rpa_3rd_eye_tat = models.DecimalField(max_digits=18, decimal_places=0, null=True, verbose_name='rpa_3rd_eye_tat') 824 rpa_3rd_eye_tat = models.DecimalField(max_digits=18, decimal_places=0, null=True, verbose_name='rpa_3rd_eye_tat')
...@@ -848,7 +848,7 @@ class AFCAutoSettlement(models.Model): ...@@ -848,7 +848,7 @@ class AFCAutoSettlement(models.Model):
848 application_id = models.CharField(max_length=64, verbose_name="申请id") # 索引 848 application_id = models.CharField(max_length=64, verbose_name="申请id") # 索引
849 aa_type = models.CharField(null=True, max_length=64, verbose_name="aa_type") 849 aa_type = models.CharField(null=True, max_length=64, verbose_name="aa_type")
850 850
851 rpa_result = models.SmallIntegerField(null=True, verbose_name="原因10数目") 851 rpa_result = models.SmallIntegerField(null=True, verbose_name="rpa_result")
852 rpa_1st_eye_tat = models.DecimalField(max_digits=18, decimal_places=0, null=True, verbose_name='rpa_1st_eye_tat') 852 rpa_1st_eye_tat = models.DecimalField(max_digits=18, decimal_places=0, null=True, verbose_name='rpa_1st_eye_tat')
853 rpa_2nd_eye_tat = models.DecimalField(max_digits=18, decimal_places=0, null=True, verbose_name='rpa_2nd_eye_tat') 853 rpa_2nd_eye_tat = models.DecimalField(max_digits=18, decimal_places=0, null=True, verbose_name='rpa_2nd_eye_tat')
854 rpa_3rd_eye_tat = models.DecimalField(max_digits=18, decimal_places=0, null=True, verbose_name='rpa_3rd_eye_tat') 854 rpa_3rd_eye_tat = models.DecimalField(max_digits=18, decimal_places=0, null=True, verbose_name='rpa_3rd_eye_tat')
......
...@@ -1420,5 +1420,5 @@ class AutoSettlementExcelView(GenericView): ...@@ -1420,5 +1420,5 @@ class AutoSettlementExcelView(GenericView):
1420 io_content = io.BytesIO() # 创建在内存中处理对象 1420 io_content = io.BytesIO() # 创建在内存中处理对象
1421 wb.save(io_content) 1421 wb.save(io_content)
1422 wb.close() 1422 wb.close()
1423 file_name = 'AutoSettlement' 1423 file_name = 'cr_auto_records_{0}'.format(timezone.now().strftime('%Y-%m-%d_%H:%M:%S'))
1424 return response.excel_response(file_name, io_content) 1424 return response.excel_response(file_name, io_content)
......
...@@ -2038,7 +2038,8 @@ def se_bs_compare(license_en, ocr_res_dict, strip_list): ...@@ -2038,7 +2038,8 @@ def se_bs_compare(license_en, ocr_res_dict, strip_list):
2038 pre_tmp_res_part = {} 2038 pre_tmp_res_part = {}
2039 for idx, (name, value) in enumerate(pre_field_list): 2039 for idx, (name, value) in enumerate(pre_field_list):
2040 ocr_str_or_list = ocr_res.get(compare_logic[name][0]) 2040 ocr_str_or_list = ocr_res.get(compare_logic[name][0])
2041 if isinstance(ocr_str_or_list, str) or isinstance(ocr_str_or_list, list): 2041 if isinstance(ocr_str_or_list, str) or isinstance(ocr_str_or_list, list) \
2042 or isinstance(ocr_str_or_list, int):
2042 result = getattr(cp, compare_logic[name][1])(value, ocr_str_or_list, **compare_logic[name][2]) 2043 result = getattr(cp, compare_logic[name][1])(value, ocr_str_or_list, **compare_logic[name][2])
2043 if isinstance(ocr_str_or_list, list): 2044 if isinstance(ocr_str_or_list, list):
2044 ocr_str = json.dumps(ocr_str_or_list, ensure_ascii=False) 2045 ocr_str = json.dumps(ocr_str_or_list, ensure_ascii=False)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!