Merge branch 'feature/portal-reocr' into feature/uat-tmp
Showing
1 changed file
with
4 additions
and
4 deletions
| ... | @@ -1358,9 +1358,6 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -1358,9 +1358,6 @@ class Command(BaseCommand, LoggerMixin): |
| 1358 | pwd_list = get_pwd_list_from_str(doc.document_name, doc.password) | 1358 | pwd_list = get_pwd_list_from_str(doc.document_name, doc.password) |
| 1359 | pdf_handler = PDFHandler(pdf_path, img_save_path, doc.document_name, pwd_list=pwd_list) | 1359 | pdf_handler = PDFHandler(pdf_path, img_save_path, doc.document_name, pwd_list=pwd_list) |
| 1360 | 1360 | ||
| 1361 | if classify_1_str == '0': | ||
| 1362 | try: | ||
| 1363 | # 2. 从EDMS获取PDF文件 | ||
| 1364 | try: | 1361 | try: |
| 1365 | max_count_obj = Configs.objects.filter(id=6).first() | 1362 | max_count_obj = Configs.objects.filter(id=6).first() |
| 1366 | max_img_count = int(max_count_obj.value) | 1363 | max_img_count = int(max_count_obj.value) |
| ... | @@ -1369,6 +1366,10 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -1369,6 +1366,10 @@ class Command(BaseCommand, LoggerMixin): |
| 1369 | self.online_log.info('{0} [get max_img_count fail] [task={1}]'.format(self.log_base, task_str)) | 1366 | self.online_log.info('{0} [get max_img_count fail] [task={1}]'.format(self.log_base, task_str)) |
| 1370 | self.online_log.info('{0} [max_img_count] [task={1}] [max_img_count={2}]'.format(self.log_base, task_str, max_img_count)) | 1367 | self.online_log.info('{0} [max_img_count] [task={1}] [max_img_count={2}]'.format(self.log_base, task_str, max_img_count)) |
| 1371 | 1368 | ||
| 1369 | if classify_1_str == '0': | ||
| 1370 | try: | ||
| 1371 | # 2. 从EDMS获取PDF文件 | ||
| 1372 | |||
| 1372 | for times in range(consts.RETRY_TIMES): | 1373 | for times in range(consts.RETRY_TIMES): |
| 1373 | try: | 1374 | try: |
| 1374 | if doc.application_id.startswith(consts.FIXED_APPLICATION_ID_PREFIX): | 1375 | if doc.application_id.startswith(consts.FIXED_APPLICATION_ID_PREFIX): |
| ... | @@ -1512,7 +1513,6 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -1512,7 +1513,6 @@ class Command(BaseCommand, LoggerMixin): |
| 1512 | # return | 1513 | # return |
| 1513 | elif classify_1_str == '12' or classify_1_str == '29': # weixin e-bs 或e-invoice 都走微信电子流水逻辑 | 1514 | elif classify_1_str == '12' or classify_1_str == '29': # weixin e-bs 或e-invoice 都走微信电子流水逻辑 |
| 1514 | try: | 1515 | try: |
| 1515 | max_img_count = 500 | ||
| 1516 | for times in range(consts.RETRY_TIMES): | 1516 | for times in range(consts.RETRY_TIMES): |
| 1517 | try: | 1517 | try: |
| 1518 | if doc.application_id.startswith(consts.FIXED_APPLICATION_ID_PREFIX): | 1518 | if doc.application_id.startswith(consts.FIXED_APPLICATION_ID_PREFIX): | ... | ... |
-
Please register or sign in to post a comment