fix bug
Showing
3 changed files
with
17 additions
and
5 deletions
... | @@ -1373,7 +1373,7 @@ DDA_COMPARE_LOGIC = { | ... | @@ -1373,7 +1373,7 @@ DDA_COMPARE_LOGIC = { |
1373 | 'companyName': ('to_company', 'se_company_compare', {}), | 1373 | 'companyName': ('to_company', 'se_company_compare', {}), |
1374 | 'customerName': (DDA_IC_NAME, 'se_contain_compare_2', {}), | 1374 | 'customerName': (DDA_IC_NAME, 'se_contain_compare_2', {}), |
1375 | 'idNum': (DDA_IC_ID, 'se_contain_compare_2', {}), | 1375 | 'idNum': (DDA_IC_ID, 'se_contain_compare_2', {}), |
1376 | 'accountHolderName': (DDA_BC_NAME, 'se_common_compare', {}), | 1376 | 'accountHolderName': (DDA_BC_NAME, 'se_name_compare', {}), |
1377 | 'accountNo': (DDA_BC_ID, 'se_common_compare', {}), | 1377 | 'accountNo': (DDA_BC_ID, 'se_common_compare', {}), |
1378 | } | 1378 | } |
1379 | 1379 | ... | ... |
... | @@ -445,7 +445,7 @@ def get_se_compare_info(last_obj, application_entity): | ... | @@ -445,7 +445,7 @@ def get_se_compare_info(last_obj, application_entity): |
445 | else: | 445 | else: |
446 | id_num = individual_info['idNum'] | 446 | id_num = individual_info['idNum'] |
447 | main_role_info.setdefault(individual_info['applicantType'], []).append( | 447 | main_role_info.setdefault(individual_info['applicantType'], []).append( |
448 | (individual_info['customerName'], id_num)) | 448 | (individual_info['customerName'], id_num, individual_info['idNum'])) |
449 | 449 | ||
450 | license_dict = {} | 450 | license_dict = {} |
451 | 451 | ||
... | @@ -482,11 +482,11 @@ def get_se_compare_info(last_obj, application_entity): | ... | @@ -482,11 +482,11 @@ def get_se_compare_info(last_obj, application_entity): |
482 | dda_num_list = [] | 482 | dda_num_list = [] |
483 | for applicant_type in consts.APPLICANT_TYPE: | 483 | for applicant_type in consts.APPLICANT_TYPE: |
484 | if applicant_type in main_role_info: | 484 | if applicant_type in main_role_info: |
485 | main_name, main_num = main_role_info[applicant_type][0] | 485 | main_name, main_num, _ = main_role_info[applicant_type][0] |
486 | break | 486 | break |
487 | for applicant_type in consts.APPLICANT_TYPE[:2]: | 487 | for applicant_type in consts.APPLICANT_TYPE[:2]: |
488 | if applicant_type in main_role_info: | 488 | if applicant_type in main_role_info: |
489 | for dda_name_part, dda_num_part in main_role_info[applicant_type]: | 489 | for dda_name_part, _, dda_num_part in main_role_info[applicant_type]: |
490 | dda_name_list.append(dda_name_part) | 490 | dda_name_list.append(dda_name_part) |
491 | dda_num_list.append(dda_num_part) | 491 | dda_num_list.append(dda_num_part) |
492 | dda_name = '、'.join(dda_name_list) | 492 | dda_name = '、'.join(dda_name_list) | ... | ... |
... | @@ -144,6 +144,9 @@ class Comparison: | ... | @@ -144,6 +144,9 @@ class Comparison: |
144 | if input_tmp.find(ocr_tmp) == -1: | 144 | if input_tmp.find(ocr_tmp) == -1: |
145 | return self.RESULT_N | 145 | return self.RESULT_N |
146 | else: | 146 | else: |
147 | if ocr_str.strip() == '': | ||
148 | return self.RESULT_N | ||
149 | else: | ||
147 | return self.RESULT_Y | 150 | return self.RESULT_Y |
148 | else: | 151 | else: |
149 | # if re.search(r'[a-zA-Z]]', input_str): | 152 | # if re.search(r'[a-zA-Z]]', input_str): |
... | @@ -177,18 +180,27 @@ class Comparison: | ... | @@ -177,18 +180,27 @@ class Comparison: |
177 | if ocr_str.find(input_str) == -1: | 180 | if ocr_str.find(input_str) == -1: |
178 | return self.RESULT_N | 181 | return self.RESULT_N |
179 | else: | 182 | else: |
183 | if ocr_str.strip() == '': | ||
184 | return self.RESULT_N | ||
185 | else: | ||
180 | return self.RESULT_Y | 186 | return self.RESULT_Y |
181 | 187 | ||
182 | def se_contain_compare_2(self, input_str, ocr_str, **kwargs): | 188 | def se_contain_compare_2(self, input_str, ocr_str, **kwargs): |
183 | if input_str.find(ocr_str) == -1: | 189 | if input_str.find(ocr_str) == -1: |
184 | return self.RESULT_N | 190 | return self.RESULT_N |
185 | else: | 191 | else: |
192 | if ocr_str.strip() == '': | ||
193 | return self.RESULT_N | ||
194 | else: | ||
186 | return self.RESULT_Y | 195 | return self.RESULT_Y |
187 | 196 | ||
188 | def se_both_contain_compare(self, input_str, ocr_str, **kwargs): | 197 | def se_both_contain_compare(self, input_str, ocr_str, **kwargs): |
189 | if ocr_str.find(input_str) == -1 and input_str.find(ocr_str) == -1: | 198 | if ocr_str.find(input_str) == -1 and input_str.find(ocr_str) == -1: |
190 | return self.RESULT_N | 199 | return self.RESULT_N |
191 | else: | 200 | else: |
201 | if ocr_str.strip() == '': | ||
202 | return self.RESULT_N | ||
203 | else: | ||
192 | return self.RESULT_Y | 204 | return self.RESULT_Y |
193 | 205 | ||
194 | def se_amount_compare(self, input_str, ocr_str, **kwargs): | 206 | def se_amount_compare(self, input_str, ocr_str, **kwargs): |
... | @@ -235,7 +247,7 @@ class Comparison: | ... | @@ -235,7 +247,7 @@ class Comparison: |
235 | except Exception as e: | 247 | except Exception as e: |
236 | return self.RESULT_N | 248 | return self.RESULT_N |
237 | else: | 249 | else: |
238 | return self.build_res(input_date >= ocr_date) | 250 | return self.build_res(input_date <= ocr_date) |
239 | 251 | ||
240 | 252 | ||
241 | cp = Comparison() | 253 | cp = Comparison() | ... | ... |
-
Please register or sign in to post a comment