Merge branch 'feature/bs_excel' into feature/0611
Showing
4 changed files
with
5 additions
and
1 deletions
... | @@ -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): | ... | ... |
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment