Merge branch 'feature/se_compare3' into feature/0611
Showing
3 changed files
with
17 additions
and
5 deletions
... | @@ -1409,7 +1409,7 @@ DDA_COMPARE_LOGIC = { | ... | @@ -1409,7 +1409,7 @@ DDA_COMPARE_LOGIC = { |
1409 | 'companyName': ('to_company', 'se_company_compare', {}), | 1409 | 'companyName': ('to_company', 'se_company_compare', {}), |
1410 | 'customerName': (DDA_IC_NAME, 'se_contain_compare_2', {}), | 1410 | 'customerName': (DDA_IC_NAME, 'se_contain_compare_2', {}), |
1411 | 'idNum': (DDA_IC_ID, 'se_contain_compare_2', {}), | 1411 | 'idNum': (DDA_IC_ID, 'se_contain_compare_2', {}), |
1412 | 'accountHolderName': (DDA_BC_NAME, 'se_common_compare', {}), | 1412 | 'accountHolderName': (DDA_BC_NAME, 'se_name_compare', {}), |
1413 | 'accountNo': (DDA_BC_ID, 'se_common_compare', {}), | 1413 | 'accountNo': (DDA_BC_ID, 'se_common_compare', {}), |
1414 | } | 1414 | } |
1415 | 1415 | ... | ... |
... | @@ -489,7 +489,7 @@ def get_se_compare_info(last_obj, application_entity): | ... | @@ -489,7 +489,7 @@ def get_se_compare_info(last_obj, application_entity): |
489 | else: | 489 | else: |
490 | id_num = individual_info['idNum'] | 490 | id_num = individual_info['idNum'] |
491 | main_role_info.setdefault(individual_info['applicantType'], []).append( | 491 | main_role_info.setdefault(individual_info['applicantType'], []).append( |
492 | (individual_info['customerName'], id_num)) | 492 | (individual_info['customerName'], id_num, individual_info['idNum'])) |
493 | 493 | ||
494 | license_dict = {} | 494 | license_dict = {} |
495 | 495 | ||
... | @@ -526,11 +526,11 @@ def get_se_compare_info(last_obj, application_entity): | ... | @@ -526,11 +526,11 @@ def get_se_compare_info(last_obj, application_entity): |
526 | dda_num_list = [] | 526 | dda_num_list = [] |
527 | for applicant_type in consts.APPLICANT_TYPE: | 527 | for applicant_type in consts.APPLICANT_TYPE: |
528 | if applicant_type in main_role_info: | 528 | if applicant_type in main_role_info: |
529 | main_name, main_num = main_role_info[applicant_type][0] | 529 | main_name, main_num, _ = main_role_info[applicant_type][0] |
530 | break | 530 | break |
531 | for applicant_type in consts.APPLICANT_TYPE[:2]: | 531 | for applicant_type in consts.APPLICANT_TYPE[:2]: |
532 | if applicant_type in main_role_info: | 532 | if applicant_type in main_role_info: |
533 | for dda_name_part, dda_num_part in main_role_info[applicant_type]: | 533 | for dda_name_part, _, dda_num_part in main_role_info[applicant_type]: |
534 | dda_name_list.append(dda_name_part) | 534 | dda_name_list.append(dda_name_part) |
535 | dda_num_list.append(dda_num_part) | 535 | dda_num_list.append(dda_num_part) |
536 | dda_name = '、'.join(dda_name_list) | 536 | 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