e914ba66 by 周伟奇

fix bug

1 parent 26641ca0
......@@ -333,7 +333,7 @@ class Command(BaseCommand, LoggerMixin):
min_char_count_2 = 1000
for product in license_data.get('result', {}).get('productList', []):
name = product.get('name', {}).get('words', '')
if name.find('机动车损失') != -1 or name.find('汽车损失') != -1:
if name.find('机动车损失') != -1 or name.find('汽车损失') != -1 or name.find('车损险') != -1:
if len(name) < min_char_count_1:
min_char_count_1 = len(name)
product_result[0] = product.get('coverage', {}).get('words', '')
......
......@@ -818,7 +818,7 @@ class HILAutoSettlement(models.Model):
application_id = models.CharField(max_length=64, verbose_name="申请id") # 索引
aa_type = models.CharField(null=True, max_length=64, verbose_name="aa_type")
rpa_result = models.SmallIntegerField(null=True, verbose_name="原因10数目")
rpa_result = models.SmallIntegerField(null=True, verbose_name="rpa_result")
rpa_1st_eye_tat = models.DecimalField(max_digits=18, decimal_places=0, null=True, verbose_name='rpa_1st_eye_tat')
rpa_2nd_eye_tat = models.DecimalField(max_digits=18, decimal_places=0, null=True, verbose_name='rpa_2nd_eye_tat')
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):
application_id = models.CharField(max_length=64, verbose_name="申请id") # 索引
aa_type = models.CharField(null=True, max_length=64, verbose_name="aa_type")
rpa_result = models.SmallIntegerField(null=True, verbose_name="原因10数目")
rpa_result = models.SmallIntegerField(null=True, verbose_name="rpa_result")
rpa_1st_eye_tat = models.DecimalField(max_digits=18, decimal_places=0, null=True, verbose_name='rpa_1st_eye_tat')
rpa_2nd_eye_tat = models.DecimalField(max_digits=18, decimal_places=0, null=True, verbose_name='rpa_2nd_eye_tat')
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):
io_content = io.BytesIO() # 创建在内存中处理对象
wb.save(io_content)
wb.close()
file_name = 'AutoSettlement'
file_name = 'cr_auto_records_{0}'.format(timezone.now().strftime('%Y-%m-%d_%H:%M:%S'))
return response.excel_response(file_name, io_content)
......
......@@ -2038,7 +2038,8 @@ def se_bs_compare(license_en, ocr_res_dict, strip_list):
pre_tmp_res_part = {}
for idx, (name, value) in enumerate(pre_field_list):
ocr_str_or_list = ocr_res.get(compare_logic[name][0])
if isinstance(ocr_str_or_list, str) or isinstance(ocr_str_or_list, list):
if isinstance(ocr_str_or_list, str) or isinstance(ocr_str_or_list, list) \
or isinstance(ocr_str_or_list, int):
result = getattr(cp, compare_logic[name][1])(value, ocr_str_or_list, **compare_logic[name][2])
if isinstance(ocr_str_or_list, list):
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!