fix bug
Showing
1 changed file
with
19 additions
and
10 deletions
| ... | @@ -656,24 +656,33 @@ class BSWorkbook(Workbook): | ... | @@ -656,24 +656,33 @@ class BSWorkbook(Workbook): |
| 656 | count_list.append((field_str, count)) | 656 | count_list.append((field_str, count)) |
| 657 | 657 | ||
| 658 | def simple_license_rebuild(self, license_summary, document_scheme): | 658 | def simple_license_rebuild(self, license_summary, document_scheme): |
| 659 | for ic_license_dict in license_summary.get(consts.IC_CLASSIFY, []): | 659 | # for ic_license_dict in license_summary.get(consts.IC_CLASSIFY, []): |
| 660 | if ic_license_dict.get('类别') == '1': | 660 | # if ic_license_dict.get('类别') == '1': |
| 661 | license_summary.setdefault(consts.RP_CLASSIFY, []).append(ic_license_dict) | 661 | # license_summary.setdefault(consts.RP_CLASSIFY, []).append(ic_license_dict) |
| 662 | continue | 662 | # continue |
| 663 | 663 | # | |
| 664 | for vat_license_dict in license_summary.get(consts.VAT_CLASSIFY, []): | 664 | # for vat_license_dict in license_summary.get(consts.VAT_CLASSIFY, []): |
| 665 | if vat_license_dict.get('发票类型') == 'special': | 665 | # if vat_license_dict.get('发票类型') == 'special': |
| 666 | license_summary.setdefault(consts.VATS_CLASSIFY, []).append(vat_license_dict) | 666 | # license_summary.setdefault(consts.VATS_CLASSIFY, []).append(vat_license_dict) |
| 667 | continue | 667 | # continue |
| 668 | 668 | ||
| 669 | for classify, (_, name, field_order, side_diff, scheme_diff, _) in consts.FOLDER_LICENSE_ORDER: | 669 | for classify, (_, name, field_order, side_diff, scheme_diff, _) in consts.FOLDER_LICENSE_ORDER: |
| 670 | license_list = license_summary.get(classify) | 670 | license_list = license_summary.get(classify) |
| 671 | if not license_list: | 671 | if not license_list: |
| 672 | continue | 672 | continue |
| 673 | ws = self.create_sheet(name) | ||
| 674 | # if scheme_diff and document_scheme == consts.DOC_SCHEME_LIST[1]: | 673 | # if scheme_diff and document_scheme == consts.DOC_SCHEME_LIST[1]: |
| 675 | # classify = consts.MVC_CLASSIFY_SE | 674 | # classify = consts.MVC_CLASSIFY_SE |
| 676 | for license_dict in license_list: | 675 | for license_dict in license_list: |
| 676 | if classify == consts.IC_CLASSIFY and license_dict.get('类别') == '1': # 居住证处理 | ||
| 677 | license_summary.setdefault(consts.RP_CLASSIFY, []).append(license_dict) | ||
| 678 | continue | ||
| 679 | if classify == consts.VAT_CLASSIFY and license_dict.get('发票类型') == 'special': | ||
| 680 | license_summary.setdefault(consts.VATS_CLASSIFY, []).append(license_dict) | ||
| 681 | continue | ||
| 682 | if name in self.sheetnames: | ||
| 683 | ws = self.get_sheet_by_name(name) | ||
| 684 | else: | ||
| 685 | ws = self.create_sheet(name) | ||
| 677 | if side_diff: | 686 | if side_diff: |
| 678 | key, field_order_yes, field_order_no = consts.FIELD_ORDER_MAP.get(classify) | 687 | key, field_order_yes, field_order_no = consts.FIELD_ORDER_MAP.get(classify) |
| 679 | field_order = field_order_yes if key in license_dict else field_order_no | 688 | field_order = field_order_yes if key in license_dict else field_order_no | ... | ... |
-
Please register or sign in to post a comment