5f017a8f by 周伟奇

fix bug

1 parent 38acff43
...@@ -82,6 +82,7 @@ class IWALoginView(IWABaseView, GenericView): ...@@ -82,6 +82,7 @@ class IWALoginView(IWABaseView, GenericView):
82 is_valid, data = self.validate(q_number) 82 is_valid, data = self.validate(q_number)
83 83
84 if is_valid: 84 if is_valid:
85 rh.set_token(data.get('token')[-10:], data.get('user_name'))
85 return response.ok(data=data) 86 return response.ok(data=data)
86 else: 87 else:
87 self.no_permission(data) 88 self.no_permission(data)
......
...@@ -1479,7 +1479,7 @@ class AutoSettlementExcelView(GenericView): ...@@ -1479,7 +1479,7 @@ class AutoSettlementExcelView(GenericView):
1479 io_content = io.BytesIO() # 创建在内存中处理对象 1479 io_content = io.BytesIO() # 创建在内存中处理对象
1480 wb.save(io_content) 1480 wb.save(io_content)
1481 wb.close() 1481 wb.close()
1482 file_name = 'cr_auto_records_{0}'.format(timezone.now().strftime('%Y-%m-%d_%H:%M:%S')) 1482 file_name = 'ocr_auto_records_{0}'.format(timezone.now().strftime('%Y-%m-%d_%H:%M:%S'))
1483 return response.excel_response(file_name, io_content) 1483 return response.excel_response(file_name, io_content)
1484 1484
1485 1485
......
...@@ -1732,7 +1732,7 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list, auto=Fals ...@@ -1732,7 +1732,7 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list, auto=Fals
1732 fp_campaign = cms_info.get('fpCampaign', '') 1732 fp_campaign = cms_info.get('fpCampaign', '')
1733 fp_group = cms_info.get('fpGroup', '') 1733 fp_group = cms_info.get('fpGroup', '')
1734 insurance_type = cms_info.get('insuranceDetails', {}).get('insuranceType', '') 1734 insurance_type = cms_info.get('insuranceDetails', {}).get('insuranceType', '')
1735 if insurance_type == 'Waive Insurance' and isinstance(insurance_price, str): 1735 if isinstance(insurance_price, str):
1736 is_insurance = 1 1736 is_insurance = 1
1737 elif insurance_type == 'Comprehensive Insurance': 1737 elif insurance_type == 'Comprehensive Insurance':
1738 is_insurance = 2 1738 is_insurance = 2
......
...@@ -6,6 +6,7 @@ import fitz ...@@ -6,6 +6,7 @@ import fitz
6 import math 6 import math
7 from PIL import Image 7 from PIL import Image
8 from io import BytesIO 8 from io import BytesIO
9 from unicodedata import normalize
9 10
10 # 页面保存为png图片参数 11 # 页面保存为png图片参数
11 ZOOM_X_1 = ZOOM_Y_1 = 1.0 12 ZOOM_X_1 = ZOOM_Y_1 = 1.0
...@@ -124,7 +125,7 @@ class PDFHandler: ...@@ -124,7 +125,7 @@ class PDFHandler:
124 x1 = x1 * width_scale 125 x1 = x1 * width_scale
125 y1 = y1 * height_scale 126 y1 = y1 * height_scale
126 rebuild_text_list.append( 127 rebuild_text_list.append(
127 ((x0, y0, x1, y0, x1, y1, x0, y1), text) 128 ((x0, y0, x1, y0, x1, y1, x0, y1), normalize('NFKC',text))
128 ) 129 )
129 self.page_text_list[pno]['rebuild_text'] = rebuild_text_list 130 self.page_text_list[pno]['rebuild_text'] = rebuild_text_list
130 except Exception as e: 131 except Exception as e:
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!