554d2f4f by 周伟奇

Merge branch 'feature/bs_excel' into feature/0611

2 parents 174d2005 b17b3c65
...@@ -99,6 +99,7 @@ RES_FAILED = '识别失败' ...@@ -99,6 +99,7 @@ RES_FAILED = '识别失败'
99 RES_FAILED_1 = '识别失败(阶段1)' 99 RES_FAILED_1 = '识别失败(阶段1)'
100 RES_FAILED_2 = '识别失败(阶段2)' 100 RES_FAILED_2 = '识别失败(阶段2)'
101 RES_FAILED_3 = '识别失败(阶段1数据格式错误)' 101 RES_FAILED_3 = '识别失败(阶段1数据格式错误)'
102 RES_FAILED_SET = {RES_FAILED, RES_FAILED_1, RES_FAILED_2, RES_FAILED_3}
102 103
103 CARD_RATIO = 0.9 104 CARD_RATIO = 0.9
104 UNKNOWN_CARD = '未知卡号' 105 UNKNOWN_CARD = '未知卡号'
......
...@@ -768,7 +768,9 @@ class Command(BaseCommand, LoggerMixin): ...@@ -768,7 +768,9 @@ class Command(BaseCommand, LoggerMixin):
768 type=KeywordsType.LOAN.value, on_off=True).values_list('keyword', flat=True) 768 type=KeywordsType.LOAN.value, on_off=True).values_list('keyword', flat=True)
769 wechat_keyword = Keywords.objects.filter( 769 wechat_keyword = Keywords.objects.filter(
770 type=KeywordsType.ALI_WECHART.value, on_off=True).values_list('keyword', flat=True) 770 type=KeywordsType.ALI_WECHART.value, on_off=True).values_list('keyword', flat=True)
771 wb = BSWorkbook(interest_keyword, salary_keyword, loan_keyword, wechat_keyword) 771 repayments_keyword = Keywords.objects.filter(
772 type=KeywordsType.REPAYMENTS.value, on_off=True).values_list('keyword', flat=True)
773 wb = BSWorkbook(interest_keyword, salary_keyword, loan_keyword, wechat_keyword, repayments_keyword)
772 for img_path, res in ocr_1_res.items(): 774 for img_path, res in ocr_1_res.items():
773 pno, ino = self.parse_img_path(img_path) 775 pno, ino = self.parse_img_path(img_path)
774 part_idx = 1 776 part_idx = 1
......
...@@ -19,6 +19,7 @@ class KeywordsType(NamedEnum): ...@@ -19,6 +19,7 @@ class KeywordsType(NamedEnum):
19 SALARY = (1, '薪资') 19 SALARY = (1, '薪资')
20 LOAN = (2, '贷款') 20 LOAN = (2, '贷款')
21 ALI_WECHART = (3, '微信/支付宝') 21 ALI_WECHART = (3, '微信/支付宝')
22 REPAYMENTS = (4, '还款')
22 23
23 24
24 class RequestTeam(NamedEnum): 25 class RequestTeam(NamedEnum):
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!