fix bug
Showing
1 changed file
with
4 additions
and
3 deletions
... | @@ -299,7 +299,7 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -299,7 +299,7 @@ class Command(BaseCommand, LoggerMixin): |
299 | if do_dda and isinstance(id_card_dict.get(consts.IC_KEY_FIELD[0]), str) and isinstance(id_card_dict.get(consts.IC_KEY_FIELD[1]), str): | 299 | if do_dda and isinstance(id_card_dict.get(consts.IC_KEY_FIELD[0]), str) and isinstance(id_card_dict.get(consts.IC_KEY_FIELD[1]), str): |
300 | ic_name = id_card_dict[consts.IC_KEY_FIELD[0]].strip() | 300 | ic_name = id_card_dict[consts.IC_KEY_FIELD[0]].strip() |
301 | ic_id = id_card_dict[consts.IC_KEY_FIELD[1]].strip() | 301 | ic_id = id_card_dict[consts.IC_KEY_FIELD[1]].strip() |
302 | if len(ic_name) > 0 and ic_id > 0: | 302 | if len(ic_name) > 0 and len(ic_id) > 0: |
303 | dda_id_bc_mapping.setdefault(consts.IC_FIELD, []).append((ic_name, ic_id, img_path)) | 303 | dda_id_bc_mapping.setdefault(consts.IC_FIELD, []).append((ic_name, ic_id, img_path)) |
304 | license_summary.setdefault(classify, []).extend(license_data) | 304 | license_summary.setdefault(classify, []).extend(license_data) |
305 | 305 | ||
... | @@ -1137,9 +1137,8 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -1137,9 +1137,8 @@ class Command(BaseCommand, LoggerMixin): |
1137 | 1137 | ||
1138 | # id & bc 入库 | 1138 | # id & bc 入库 |
1139 | try: | 1139 | try: |
1140 | if not dda_record.is_dda_found: | 1140 | if not dda_record.is_dda_found and not dda_record.is_id_found: |
1141 | ic_set = set() | 1141 | ic_set = set() |
1142 | bc_set = set() | ||
1143 | for ic_name, ic_id, ic_img_path in ic_res_list: | 1142 | for ic_name, ic_id, ic_img_path in ic_res_list: |
1144 | query_str = '{0}{1}'.format(ic_name, ic_id) | 1143 | query_str = '{0}{1}'.format(ic_name, ic_id) |
1145 | if query_str in ic_set: | 1144 | if query_str in ic_set: |
... | @@ -1152,6 +1151,8 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -1152,6 +1151,8 @@ class Command(BaseCommand, LoggerMixin): |
1152 | is_id=True, | 1151 | is_id=True, |
1153 | file_path=ic_img_path | 1152 | file_path=ic_img_path |
1154 | ) | 1153 | ) |
1154 | if not dda_record.is_dda_found and not dda_record.is_bc_found: | ||
1155 | bc_set = set() | ||
1155 | for bc_no, bc_img_path in bc_res_list: | 1156 | for bc_no, bc_img_path in bc_res_list: |
1156 | if bc_no in bc_set: | 1157 | if bc_no in bc_set: |
1157 | continue | 1158 | continue | ... | ... |
-
Please register or sign in to post a comment