Merge branch 'feature/fsm-contract' into fix/report_ca
Showing
2 changed files
with
6 additions
and
2 deletions
| ... | @@ -1086,9 +1086,10 @@ CONTRACT_MAP = { | ... | @@ -1086,9 +1086,10 @@ CONTRACT_MAP = { |
| 1086 | FSM_CONTRACT_WEP_CLASSIFY: FSM_CONTRACT_WEP_CN_NAME, | 1086 | FSM_CONTRACT_WEP_CLASSIFY: FSM_CONTRACT_WEP_CN_NAME, |
| 1087 | FSM_CONTRACT_MSI_CLASSIFY: FSM_CONTRACT_MSI_CN_NAME, | 1087 | FSM_CONTRACT_MSI_CLASSIFY: FSM_CONTRACT_MSI_CN_NAME, |
| 1088 | FSM_CONTRACT_SC_CLASSIFY: FSM_CONTRACT_SC_CN_NAME, | 1088 | FSM_CONTRACT_SC_CLASSIFY: FSM_CONTRACT_SC_CN_NAME, |
| 1089 | |||
| 1090 | } | 1089 | } |
| 1091 | 1090 | ||
| 1091 | FSM_CONTRACT_CLASSIFY_SET = {FSM_CONTRACT_WEP_CLASSIFY, FSM_CONTRACT_MSI_CLASSIFY, FSM_CONTRACT_SC_CLASSIFY} | ||
| 1092 | |||
| 1092 | # 保单 | 1093 | # 保单 |
| 1093 | INSURANCE_CN_NAME = '保单' | 1094 | INSURANCE_CN_NAME = '保单' |
| 1094 | INSURANCE_CLASSIFY = 42 | 1095 | INSURANCE_CLASSIFY = 42 | ... | ... |
| ... | @@ -780,10 +780,12 @@ class BSWorkbook(Workbook): | ... | @@ -780,10 +780,12 @@ class BSWorkbook(Workbook): |
| 780 | if field_str is not None: | 780 | if field_str is not None: |
| 781 | count_list.append((field_str, count)) | 781 | count_list.append((field_str, count)) |
| 782 | 782 | ||
| 783 | def contract_rebuild(self, contract_result_dict): | 783 | def contract_rebuild(self, contract_result_dict, is_ca=False): |
| 784 | for classify, contract_result in contract_result_dict.items(): | 784 | for classify, contract_result in contract_result_dict.items(): |
| 785 | if len(contract_result) == 0: | 785 | if len(contract_result) == 0: |
| 786 | continue | 786 | continue |
| 787 | if is_ca and classify not in consts.FSM_CONTRACT_CLASSIFY_SET: | ||
| 788 | continue | ||
| 787 | ws = self.create_sheet(consts.CONTRACT_MAP.get(classify)) | 789 | ws = self.create_sheet(consts.CONTRACT_MAP.get(classify)) |
| 788 | for i in range(30): | 790 | for i in range(30): |
| 789 | if str(i) in contract_result: | 791 | if str(i) in contract_result: |
| ... | @@ -906,6 +908,7 @@ class BSWorkbook(Workbook): | ... | @@ -906,6 +908,7 @@ class BSWorkbook(Workbook): |
| 906 | else: | 908 | else: |
| 907 | self.bs_rebuild(bs_summary, res_count_tuple, metadata) | 909 | self.bs_rebuild(bs_summary, res_count_tuple, metadata) |
| 908 | self.license_rebuild(license_summary, document_scheme, count_list) | 910 | self.license_rebuild(license_summary, document_scheme, count_list) |
| 911 | self.contract_rebuild(contract_result, True) | ||
| 909 | self.move_res_sheet() | 912 | self.move_res_sheet() |
| 910 | self.remove_base_sheet() | 913 | self.remove_base_sheet() |
| 911 | return count_list | 914 | return count_list | ... | ... |
-
Please register or sign in to post a comment