MOD:取消区分fsm_activited激活前后的值
Showing
1 changed file
with
4 additions
and
7 deletions
| ... | @@ -580,12 +580,9 @@ class UploadDocView(GenericView, DocHandler): | ... | @@ -580,12 +580,9 @@ class UploadDocView(GenericView, DocHandler): |
| 580 | document_scheme = self.fix_scheme(document_scheme) | 580 | document_scheme = self.fix_scheme(document_scheme) |
| 581 | 581 | ||
| 582 | # fsm激活状态, 更新ocr_result 表fsm状态 | 582 | # fsm激活状态, 更新ocr_result 表fsm状态 |
| 583 | is_fsm = consts.FSM_ACTIVITED_STATUS.get(application_status) or consts.FSM_BEFORE_ACTIVITED_STATUS.get(application_status) | ||
| 584 | self.running_log.info('[doc upload applicationId-{0}] [applicationStatus-{1}, activated-{2}]' | 583 | self.running_log.info('[doc upload applicationId-{0}] [applicationStatus-{1}, activated-{2}]' |
| 585 | .format(application_id, application_status, is_fsm)) | 584 | .format(application_id, application_status, True if consts.FSM_ACTIVITED_STATUS.get(application_status) else False)) |
| 586 | if is_fsm: | 585 | if consts.FSM_ACTIVITED_STATUS.get(application_status): |
| 587 | # fsm激活状态 0(默认):非sfm;1:激活前;2:激活后 | ||
| 588 | fsm_activited = 2 if consts.FSM_ACTIVITED_STATUS.get(application_status) else 1 | ||
| 589 | result_class = None | 586 | result_class = None |
| 590 | if business_type == consts.HIL_PREFIX: | 587 | if business_type == consts.HIL_PREFIX: |
| 591 | if document_scheme == RequestTeam.ACCEPTANCE.name: | 588 | if document_scheme == RequestTeam.ACCEPTANCE.name: |
| ... | @@ -600,12 +597,12 @@ class UploadDocView(GenericView, DocHandler): | ... | @@ -600,12 +597,12 @@ class UploadDocView(GenericView, DocHandler): |
| 600 | 597 | ||
| 601 | ocr_result_obj = result_class.objects.filter(application_id=application_id).first() | 598 | ocr_result_obj = result_class.objects.filter(application_id=application_id).first() |
| 602 | if ocr_result_obj: | 599 | if ocr_result_obj: |
| 603 | ocr_result_obj.fsm_activited = fsm_activited | 600 | ocr_result_obj.fsm_activited = 1 |
| 604 | ocr_result_obj.save() | 601 | ocr_result_obj.save() |
| 605 | else: | 602 | else: |
| 606 | ocr_result_obj = result_class() | 603 | ocr_result_obj = result_class() |
| 607 | ocr_result_obj.application_id = application_id | 604 | ocr_result_obj.application_id = application_id |
| 608 | ocr_result_obj.fsm_activited = fsm_activited | 605 | ocr_result_obj.fsm_activited = 1 |
| 609 | ocr_result_obj.save() | 606 | ocr_result_obj.save() |
| 610 | 607 | ||
| 611 | if data_source == consts.DATA_SOURCE_LIST[1]: | 608 | if data_source == consts.DATA_SOURCE_LIST[1]: | ... | ... |
-
Please register or sign in to post a comment