fix new hil contract
Showing
1 changed file
with
171 additions
and
171 deletions
| ... | @@ -34,9 +34,9 @@ class Finder: | ... | @@ -34,9 +34,9 @@ class Finder: |
| 34 | "承租人-证件号码": self.item, | 34 | "承租人-证件号码": self.item, |
| 35 | "承租人-法定代表人或授权代表": self.item, | 35 | "承租人-法定代表人或授权代表": self.item, |
| 36 | 36 | ||
| 37 | "共同承租人-姓名": self.item, | 37 | # "共同承租人-姓名": self.item, |
| 38 | "共同承租人-证件号码": self.item, | 38 | # "共同承租人-证件号码": self.item, |
| 39 | "共同承租人-法定代表人或授权代表": self.item, | 39 | # "共同承租人-法定代表人或授权代表": self.item, |
| 40 | 40 | ||
| 41 | "保证人1-姓名": self.item, | 41 | "保证人1-姓名": self.item, |
| 42 | "保证人1-证件号码": self.item, | 42 | "保证人1-证件号码": self.item, |
| ... | @@ -66,8 +66,8 @@ class Finder: | ... | @@ -66,8 +66,8 @@ class Finder: |
| 66 | "签字页-承租人姓名": self.item, | 66 | "签字页-承租人姓名": self.item, |
| 67 | "签字页-承租人签章": self.item, | 67 | "签字页-承租人签章": self.item, |
| 68 | 68 | ||
| 69 | "签字页-共同承租人姓名": self.item, | 69 | # "签字页-共同承租人姓名": self.item, |
| 70 | "签字页-共同承租人签章": self.item, | 70 | # "签字页-共同承租人签章": self.item, |
| 71 | 71 | ||
| 72 | "签字页-保证人1姓名": self.item, | 72 | "签字页-保证人1姓名": self.item, |
| 73 | "签字页-保证人1签章": self.item, | 73 | "签字页-保证人1签章": self.item, |
| ... | @@ -773,10 +773,10 @@ class Finder: | ... | @@ -773,10 +773,10 @@ class Finder: |
| 773 | words = text.split(':')[-1] | 773 | words = text.split(':')[-1] |
| 774 | if len(words) == 0: | 774 | if len(words) == 0: |
| 775 | need_bbox_find_keys_bbox[0] = bbox | 775 | need_bbox_find_keys_bbox[0] = bbox |
| 776 | else: | 776 | # else: |
| 777 | name['words'] = words | 777 | name['words'] = words |
| 778 | name['page'] = page_num | 778 | name['page'] = page_num |
| 779 | name['position'] = bbox | 779 | name['position'] = bbox |
| 780 | continue | 780 | continue |
| 781 | if role_key == '承租人:': | 781 | if role_key == '承租人:': |
| 782 | # 找到证件号码且确定位置 | 782 | # 找到证件号码且确定位置 |
| ... | @@ -784,76 +784,76 @@ class Finder: | ... | @@ -784,76 +784,76 @@ class Finder: |
| 784 | words = text.split(':')[-1] | 784 | words = text.split(':')[-1] |
| 785 | if len(words) == 0: | 785 | if len(words) == 0: |
| 786 | need_bbox_find_keys_bbox[1] = bbox | 786 | need_bbox_find_keys_bbox[1] = bbox |
| 787 | else: | 787 | # else: |
| 788 | id_num['words'] = words | 788 | id_num['words'] = words |
| 789 | id_num['page'] = page_num | 789 | id_num['page'] = page_num |
| 790 | id_num['position'] = bbox | 790 | id_num['position'] = bbox |
| 791 | # 找到法人代表且确定位置 | 791 | # 找到法人代表且确定位置 |
| 792 | if re.match('法定代表人或授权代表:', text) is not None and np.mean(bbox[::2]) < anchor[0] and np.mean(bbox[1::2]) < anchor[1]: | 792 | if re.match('法定代表人或授权代表:', text) is not None and np.mean(bbox[::2]) < anchor[0] and np.mean(bbox[1::2]) < anchor[1]: |
| 793 | words = text.split(':')[-1] | 793 | words = text.split(':')[-1] |
| 794 | if len(words) == 0: | 794 | if len(words) == 0: |
| 795 | need_bbox_find_keys_bbox[2] = bbox | 795 | need_bbox_find_keys_bbox[2] = bbox |
| 796 | else: | 796 | # else: |
| 797 | representative['words'] = words | 797 | representative['words'] = words |
| 798 | representative['page'] = page_num | 798 | representative['page'] = page_num |
| 799 | representative['position'] = bbox | 799 | representative['position'] = bbox |
| 800 | elif role_key == '保证人1:': | 800 | elif role_key == '保证人1:': |
| 801 | # 找到证件号码且确定位置 | 801 | # 找到证件号码且确定位置 |
| 802 | if re.match('证件号码:', text) is not None and np.mean(bbox[::2]) < anchor[0] and np.mean(bbox[1::2]) > anchor[1]: | 802 | if re.match('证件号码:', text) is not None and np.mean(bbox[::2]) < anchor[0] and np.mean(bbox[1::2]) > anchor[1]: |
| 803 | words = text.split(':')[-1] | 803 | words = text.split(':')[-1] |
| 804 | if len(words) == 0: | 804 | if len(words) == 0: |
| 805 | need_bbox_find_keys_bbox[1] = bbox | 805 | need_bbox_find_keys_bbox[1] = bbox |
| 806 | else: | 806 | # else: |
| 807 | id_num['words'] = words | 807 | id_num['words'] = words |
| 808 | id_num['page'] = page_num | 808 | id_num['page'] = page_num |
| 809 | id_num['position'] = bbox | 809 | id_num['position'] = bbox |
| 810 | # 找到法人代表且确定位置 | 810 | # 找到法人代表且确定位置 |
| 811 | if re.match('法定代表人或授权代表:', text) is not None and np.mean(bbox[::2]) < anchor[0] and np.mean(bbox[1::2]) > anchor[1]: | 811 | if re.match('法定代表人或授权代表:', text) is not None and np.mean(bbox[::2]) < anchor[0] and np.mean(bbox[1::2]) > anchor[1]: |
| 812 | words = text.split(':')[-1] | 812 | words = text.split(':')[-1] |
| 813 | if len(words) == 0: | 813 | if len(words) == 0: |
| 814 | need_bbox_find_keys_bbox[2] = bbox | 814 | need_bbox_find_keys_bbox[2] = bbox |
| 815 | else: | 815 | # else: |
| 816 | representative['words'] = words | 816 | representative['words'] = words |
| 817 | representative['page'] = page_num | 817 | representative['page'] = page_num |
| 818 | representative['position'] = bbox | 818 | representative['position'] = bbox |
| 819 | elif role_key == '保证人2:': | 819 | elif role_key == '保证人2:': |
| 820 | # 找到证件号码且确定位置 | 820 | # 找到证件号码且确定位置 |
| 821 | if re.match('证件号码:', text) is not None and np.mean(bbox[::2]) > anchor[0] and np.mean(bbox[1::2]) < anchor[1]: | 821 | if re.match('证件号码:', text) is not None and np.mean(bbox[::2]) > anchor[0] and np.mean(bbox[1::2]) < anchor[1]: |
| 822 | words = text.split(':')[-1] | 822 | words = text.split(':')[-1] |
| 823 | if len(words) == 0: | 823 | if len(words) == 0: |
| 824 | need_bbox_find_keys_bbox[1] = bbox | 824 | need_bbox_find_keys_bbox[1] = bbox |
| 825 | else: | 825 | # else: |
| 826 | id_num['words'] = words | 826 | id_num['words'] = words |
| 827 | id_num['page'] = page_num | 827 | id_num['page'] = page_num |
| 828 | id_num['position'] = bbox | 828 | id_num['position'] = bbox |
| 829 | # 找到法人代表且确定位置 | 829 | # 找到法人代表且确定位置 |
| 830 | if re.match('法定代表人或授权代表:', text) is not None and np.mean(bbox[::2]) > anchor[0] and np.mean(bbox[1::2]) < anchor[1]: | 830 | if re.match('法定代表人或授权代表:', text) is not None and np.mean(bbox[::2]) > anchor[0] and np.mean(bbox[1::2]) < anchor[1]: |
| 831 | words = text.split(':')[-1] | 831 | words = text.split(':')[-1] |
| 832 | if len(words) == 0: | 832 | if len(words) == 0: |
| 833 | need_bbox_find_keys_bbox[2] = bbox | 833 | need_bbox_find_keys_bbox[2] = bbox |
| 834 | else: | 834 | # else: |
| 835 | representative['words'] = words | 835 | representative['words'] = words |
| 836 | representative['page'] = page_num | 836 | representative['page'] = page_num |
| 837 | representative['position'] = bbox | 837 | representative['position'] = bbox |
| 838 | elif role_key == '保证人3:': | 838 | elif role_key == '保证人3:': |
| 839 | # 找到证件号码且确定位置 | 839 | # 找到证件号码且确定位置 |
| 840 | if re.match('证件号码:', text) is not None and np.mean(bbox[::2]) > anchor[0] and np.mean(bbox[1::2]) > anchor[1]: | 840 | if re.match('证件号码:', text) is not None and np.mean(bbox[::2]) > anchor[0] and np.mean(bbox[1::2]) > anchor[1]: |
| 841 | words = text.split(':')[-1] | 841 | words = text.split(':')[-1] |
| 842 | if len(words) == 0: | 842 | if len(words) == 0: |
| 843 | need_bbox_find_keys_bbox[1] = bbox | 843 | need_bbox_find_keys_bbox[1] = bbox |
| 844 | else: | 844 | # else: |
| 845 | id_num['words'] = words | 845 | id_num['words'] = words |
| 846 | id_num['page'] = page_num | 846 | id_num['page'] = page_num |
| 847 | id_num['position'] = bbox | 847 | id_num['position'] = bbox |
| 848 | # 找到法人代表且确定位置 | 848 | # 找到法人代表且确定位置 |
| 849 | if re.match('法定代表人或授权代表:', text) is not None and np.mean(bbox[::2]) > anchor[0] and np.mean(bbox[1::2]) > anchor[1]: | 849 | if re.match('法定代表人或授权代表:', text) is not None and np.mean(bbox[::2]) > anchor[0] and np.mean(bbox[1::2]) > anchor[1]: |
| 850 | words = text.split(':')[-1] | 850 | words = text.split(':')[-1] |
| 851 | if len(words) == 0: | 851 | if len(words) == 0: |
| 852 | need_bbox_find_keys_bbox[2] = bbox | 852 | need_bbox_find_keys_bbox[2] = bbox |
| 853 | else: | 853 | # else: |
| 854 | representative['words'] = words | 854 | representative['words'] = words |
| 855 | representative['page'] = page_num | 855 | representative['page'] = page_num |
| 856 | representative['position'] = bbox | 856 | representative['position'] = bbox |
| 857 | for idx, bbox in enumerate(need_bbox_find_keys_bbox): | 857 | for idx, bbox in enumerate(need_bbox_find_keys_bbox): |
| 858 | if bbox is None: | 858 | if bbox is None: |
| 859 | continue | 859 | continue |
| ... | @@ -1243,77 +1243,77 @@ class Finder: | ... | @@ -1243,77 +1243,77 @@ class Finder: |
| 1243 | self.init_result['合同编号'] = contract_no | 1243 | self.init_result['合同编号'] = contract_no |
| 1244 | 1244 | ||
| 1245 | # 粗略判断是否是 ‘车贷分离版本’ 的合同 | 1245 | # 粗略判断是否是 ‘车贷分离版本’ 的合同 |
| 1246 | is_cdfl = False | 1246 | # is_cdfl = False |
| 1247 | for block in self.pdf_info['0']['blocks']: | 1247 | # for block in self.pdf_info['0']['blocks']: |
| 1248 | if block['type'] != 0: | 1248 | # if block['type'] != 0: |
| 1249 | continue | 1249 | # continue |
| 1250 | for line in block['lines']: | 1250 | # for line in block['lines']: |
| 1251 | for span in line['spans']: | 1251 | # for span in line['spans']: |
| 1252 | bbox, text = span['bbox'], span['text'] | 1252 | # bbox, text = span['bbox'], span['text'] |
| 1253 | if '共同承租人:' in text: | 1253 | # if '共同承租人:' in text: |
| 1254 | is_cdfl = True | 1254 | # is_cdfl = True |
| 1255 | 1255 | ||
| 1256 | if is_cdfl == False: | 1256 | # if is_cdfl == False: |
| 1257 | # 从第一页上取四个角色的姓名和证件号码 | 1257 | # 从第一页上取四个角色的姓名和证件号码 |
| 1258 | name, id_num, representative = self.get_role_info(role_key='承租人:', page_num='0') | 1258 | name, id_num, representative = self.get_role_info(role_key='承租人:', page_num='0') |
| 1259 | |||
| 1260 | if name["words"] == None: | ||
| 1261 | name, id_num, representative = self.get_role_info_3_3(role_key='承租人一:', page_num='0') | ||
| 1262 | self.init_result['承租人-姓名'] = name | ||
| 1263 | self.init_result['承租人-证件号码'] = id_num | ||
| 1264 | self.init_result['承租人-法定代表人或授权代表'] = representative | ||
| 1265 | |||
| 1266 | name, id_num, representative = self.get_role_info(role_key='保证人1:', page_num='0') | ||
| 1267 | self.init_result['保证人1-姓名'] = name | ||
| 1268 | self.init_result['保证人1-证件号码'] = id_num | ||
| 1269 | self.init_result['保证人1-法定代表人或授权代表'] = representative | ||
| 1270 | # if条件判别 对应3_3版本 | ||
| 1271 | if name["words"] == None: | ||
| 1272 | name, id_num, representative = self.get_role_info_3_3(role_key='共同承租人:', page_num='0') | ||
| 1273 | self.init_result['共同承租人-姓名'] = name | ||
| 1274 | self.init_result['共同承租人-证件号码'] = id_num | ||
| 1275 | self.init_result['共同承租人-法定代表人或授权代表'] = representative | ||
| 1276 | |||
| 1277 | name, id_num, representative = self.get_role_info(role_key='保证人2:', page_num='0') | ||
| 1278 | self.init_result['保证人2-姓名'] = name | ||
| 1279 | self.init_result['保证人2-证件号码'] = id_num | ||
| 1280 | self.init_result['保证人2-法定代表人或授权代表'] = representative | ||
| 1281 | # if条件判别 对应3_3版本 | ||
| 1282 | if name["words"] == None: | ||
| 1283 | name, id_num, representative = self.get_role_info_3_3(role_key='保证人1:', page_num='0') | ||
| 1284 | self.init_result['保证人2-姓名'] = name | ||
| 1285 | self.init_result['保证人2-证件号码'] = id_num | ||
| 1286 | self.init_result['保证人2-法定代表人或授权代表'] = representative | ||
| 1287 | |||
| 1288 | name, id_num, representative = self.get_role_info(role_key='保证人3:', page_num='0') | ||
| 1289 | self.init_result['保证人3-姓名'] = name | ||
| 1290 | self.init_result['保证人3-证件号码'] = id_num | ||
| 1291 | self.init_result['保证人3-法定代表人或授权代表'] = representative | ||
| 1292 | if name["words"] == None: | ||
| 1293 | name, id_num, representative = self.get_role_info_3_3(role_key='保证人2:', page_num='0') | ||
| 1294 | self.init_result['保证人3-姓名'] = name | ||
| 1295 | self.init_result['保证人3-证件号码'] = id_num | ||
| 1296 | self.init_result['保证人3-法定代表人或授权代表'] = representative | ||
| 1297 | else: | ||
| 1298 | name, id_num, representative = self.get_role_info_3_3(role_key='承租人一:', page_num='0') | ||
| 1299 | self.init_result['承租人-姓名'] = name | ||
| 1300 | self.init_result['承租人-证件号码'] = id_num | ||
| 1301 | self.init_result['承租人-法定代表人或授权代表'] = representative | ||
| 1302 | |||
| 1303 | name, id_num, representative = self.get_role_info_3_3(role_key='共同承租人:', page_num='0') | ||
| 1304 | self.init_result['共同承租人-姓名'] = name | ||
| 1305 | self.init_result['共同承租人-证件号码'] = id_num | ||
| 1306 | self.init_result['共同承租人-法定代表人或授权代表'] = representative | ||
| 1307 | 1259 | ||
| 1308 | name, id_num, representative = self.get_role_info_3_3(role_key='保证人1:', page_num='0') | 1260 | if name["words"] == None: |
| 1309 | self.init_result['保证人1-姓名'] = name | 1261 | name, id_num, representative = self.get_role_info_3_3(role_key='承租人一:', page_num='0') |
| 1310 | self.init_result['保证人1-证件号码'] = id_num | 1262 | self.init_result['承租人-姓名'] = name |
| 1311 | self.init_result['保证人1-法定代表人或授权代表'] = representative | 1263 | self.init_result['承租人-证件号码'] = id_num |
| 1312 | 1264 | self.init_result['承租人-法定代表人或授权代表'] = representative | |
| 1313 | name, id_num, representative = self.get_role_info_3_3(role_key='保证人2:', page_num='0') | 1265 | |
| 1314 | self.init_result['保证人2-姓名'] = name | 1266 | name, id_num, representative = self.get_role_info(role_key='保证人1:', page_num='0') |
| 1315 | self.init_result['保证人2-证件号码'] = id_num | 1267 | self.init_result['保证人1-姓名'] = name |
| 1316 | self.init_result['保证人2-法定代表人或授权代表'] = representative | 1268 | self.init_result['保证人1-证件号码'] = id_num |
| 1269 | self.init_result['保证人1-法定代表人或授权代表'] = representative | ||
| 1270 | # if条件判别 对应3_3版本 | ||
| 1271 | # if name["words"] == None: | ||
| 1272 | # name, id_num, representative = self.get_role_info_3_3(role_key='共同承租人:', page_num='0') | ||
| 1273 | # self.init_result['共同承租人-姓名'] = name | ||
| 1274 | # self.init_result['共同承租人-证件号码'] = id_num | ||
| 1275 | # self.init_result['共同承租人-法定代表人或授权代表'] = representative | ||
| 1276 | |||
| 1277 | name, id_num, representative = self.get_role_info(role_key='保证人2:', page_num='0') | ||
| 1278 | self.init_result['保证人2-姓名'] = name | ||
| 1279 | self.init_result['保证人2-证件号码'] = id_num | ||
| 1280 | self.init_result['保证人2-法定代表人或授权代表'] = representative | ||
| 1281 | # if条件判别 对应3_3版本 | ||
| 1282 | # if name["words"] == None: | ||
| 1283 | # name, id_num, representative = self.get_role_info_3_3(role_key='保证人1:', page_num='0') | ||
| 1284 | # self.init_result['保证人2-姓名'] = name | ||
| 1285 | # self.init_result['保证人2-证件号码'] = id_num | ||
| 1286 | # self.init_result['保证人2-法定代表人或授权代表'] = representative | ||
| 1287 | |||
| 1288 | name, id_num, representative = self.get_role_info(role_key='保证人3:', page_num='0') | ||
| 1289 | self.init_result['保证人3-姓名'] = name | ||
| 1290 | self.init_result['保证人3-证件号码'] = id_num | ||
| 1291 | self.init_result['保证人3-法定代表人或授权代表'] = representative | ||
| 1292 | # if name["words"] == None: | ||
| 1293 | # name, id_num, representative = self.get_role_info_3_3(role_key='保证人2:', page_num='0') | ||
| 1294 | # self.init_result['保证人3-姓名'] = name | ||
| 1295 | # self.init_result['保证人3-证件号码'] = id_num | ||
| 1296 | # self.init_result['保证人3-法定代表人或授权代表'] = representative | ||
| 1297 | # else: | ||
| 1298 | # name, id_num, representative = self.get_role_info_3_3(role_key='承租人一:', page_num='0') | ||
| 1299 | # self.init_result['承租人-姓名'] = name | ||
| 1300 | # self.init_result['承租人-证件号码'] = id_num | ||
| 1301 | # self.init_result['承租人-法定代表人或授权代表'] = representative | ||
| 1302 | |||
| 1303 | # name, id_num, representative = self.get_role_info_3_3(role_key='共同承租人:', page_num='0') | ||
| 1304 | # self.init_result['共同承租人-姓名'] = name | ||
| 1305 | # self.init_result['共同承租人-证件号码'] = id_num | ||
| 1306 | # self.init_result['共同承租人-法定代表人或授权代表'] = representative | ||
| 1307 | |||
| 1308 | # name, id_num, representative = self.get_role_info_3_3(role_key='保证人1:', page_num='0') | ||
| 1309 | # self.init_result['保证人1-姓名'] = name | ||
| 1310 | # self.init_result['保证人1-证件号码'] = id_num | ||
| 1311 | # self.init_result['保证人1-法定代表人或授权代表'] = representative | ||
| 1312 | |||
| 1313 | # name, id_num, representative = self.get_role_info_3_3(role_key='保证人2:', page_num='0') | ||
| 1314 | # self.init_result['保证人2-姓名'] = name | ||
| 1315 | # self.init_result['保证人2-证件号码'] = id_num | ||
| 1316 | # self.init_result['保证人2-法定代表人或授权代表'] = representative | ||
| 1317 | 1317 | ||
| 1318 | # 在所有页面中找正文中(第二部分 融资租赁主要条款及付款计划)的那个编号,因为存在换行的情况所以暂时不带位置输出 | 1318 | # 在所有页面中找正文中(第二部分 融资租赁主要条款及付款计划)的那个编号,因为存在换行的情况所以暂时不带位置输出 |
| 1319 | contract_no = self.get_contract_no_one() | 1319 | contract_no = self.get_contract_no_one() |
| ... | @@ -1361,69 +1361,69 @@ class Finder: | ... | @@ -1361,69 +1361,69 @@ class Finder: |
| 1361 | 1361 | ||
| 1362 | # 找签字页上的系列信息 | 1362 | # 找签字页上的系列信息 |
| 1363 | # 承租人姓名、签章 | 1363 | # 承租人姓名、签章 |
| 1364 | if is_cdfl == False: | 1364 | # if is_cdfl == False: |
| 1365 | name = self.get_key_value(key='承租人姓名:') | 1365 | name = self.get_key_value(key='承租人姓名:') |
| 1366 | electronic_signature = self.get_electronic_signature(top='承租人姓名:', bottom='保证人1姓名:', t_pno='5') | 1366 | electronic_signature = self.get_electronic_signature(top='承租人姓名:', bottom='保证人1姓名:', t_pno='5') |
| 1367 | 1367 | ||
| 1368 | if name["words"] == None: | 1368 | if name["words"] == None: |
| 1369 | name = self.get_key_value(key='承租人一姓名:') | ||
| 1370 | electronic_signature = self.get_electronic_signature(top='承租人一姓名:', bottom='共同承租人名称:', t_pno='5') | ||
| 1371 | |||
| 1372 | self.init_result['签字页-承租人姓名'] = name | ||
| 1373 | self.init_result['签字页-承租人签章'] = electronic_signature | ||
| 1374 | # 保证人1姓名、签章 | ||
| 1375 | name = self.get_key_value(key='保证人1姓名:') | ||
| 1376 | electronic_signature = self.get_electronic_signature(top='保证人1姓名:', bottom='保证人2姓名:', t_pno='5') | ||
| 1377 | self.init_result['签字页-保证人1姓名'] = name | ||
| 1378 | self.init_result['签字页-保证人1签章'] = electronic_signature | ||
| 1379 | # 这里用的是 name["words"] == "" | ||
| 1380 | if name["words"] == "": | ||
| 1381 | name = self.get_key_value(key='共同承租人名称:') | ||
| 1382 | electronic_signature = self.get_electronic_signature(top='共同承租人名称:', bottom='保证人1姓名:', t_pno='5') | ||
| 1383 | self.init_result['签字页-共同承租人姓名'] = name | ||
| 1384 | self.init_result['签字页-共同承租人签章'] = electronic_signature | ||
| 1385 | # 保证人2姓名、签章 | ||
| 1386 | name = self.get_key_value(key='保证人2姓名:') | ||
| 1387 | electronic_signature = self.get_electronic_signature(top='保证人2姓名:', bottom='保证人3姓名:', t_pno='5') | ||
| 1388 | self.init_result['签字页-保证人2姓名'] = name | ||
| 1389 | self.init_result['签字页-保证人2签章'] = electronic_signature | ||
| 1390 | # if判断条件对应3_3版本 | ||
| 1391 | if name["words"] == "": | ||
| 1392 | name = self.get_key_value(key='保证人1姓名:') | ||
| 1393 | electronic_signature = self.get_electronic_signature(top='保证人1姓名:', bottom='保证人2姓名:', t_pno='5') | ||
| 1394 | self.init_result['签字页-保证人1姓名'] = name | ||
| 1395 | self.init_result['签字页-保证人1签章'] = electronic_signature | ||
| 1396 | # 保证人3姓名、签章 | ||
| 1397 | name = self.get_key_value(key='保证人3姓名:') | ||
| 1398 | electronic_signature = self.get_electronic_signature(top='保证人3姓名:', bottom='日期:', t_pno='5') | ||
| 1399 | self.init_result['签字页-保证人3姓名'] = name | ||
| 1400 | self.init_result['签字页-保证人3签章'] = electronic_signature | ||
| 1401 | # if判断条件对应3_3版本 | ||
| 1402 | if name["words"] == None: | ||
| 1403 | name = self.get_key_value(key='保证人2姓名:') | ||
| 1404 | electronic_signature = self.get_electronic_signature(top='保证人2姓名:', bottom='日期:', t_pno='5') | ||
| 1405 | self.init_result['签字页-保证人2姓名'] = name | ||
| 1406 | self.init_result['签字页-保证人2签章'] = electronic_signature | ||
| 1407 | else: | ||
| 1408 | name = self.get_key_value(key='承租人一姓名:') | 1369 | name = self.get_key_value(key='承租人一姓名:') |
| 1409 | electronic_signature = self.get_electronic_signature(top='承租人一姓名:', bottom='共同承租人名称:', t_pno='5') | 1370 | electronic_signature = self.get_electronic_signature(top='承租人一姓名:', bottom='共同承租人名称:', t_pno='5') |
| 1410 | self.init_result['签字页-承租人姓名'] = name | 1371 | |
| 1411 | self.init_result['签字页-承租人签章'] = electronic_signature | 1372 | self.init_result['签字页-承租人姓名'] = name |
| 1412 | 1373 | self.init_result['签字页-承租人签章'] = electronic_signature | |
| 1413 | name = self.get_key_value(key='共同承租人名称:') | 1374 | # 保证人1姓名、签章 |
| 1414 | electronic_signature = self.get_electronic_signature(top='共同承租人名称:', bottom='保证人1姓名:', t_pno='5') | 1375 | name = self.get_key_value(key='保证人1姓名:') |
| 1415 | self.init_result['签字页-共同承租人姓名'] = name | 1376 | electronic_signature = self.get_electronic_signature(top='保证人1姓名:', bottom='保证人2姓名:', t_pno='5') |
| 1416 | self.init_result['签字页-共同承租人签章'] = electronic_signature | 1377 | self.init_result['签字页-保证人1姓名'] = name |
| 1417 | 1378 | self.init_result['签字页-保证人1签章'] = electronic_signature | |
| 1418 | name = self.get_key_value(key='保证人1姓名:') | 1379 | # 这里用的是 name["words"] == "" |
| 1419 | electronic_signature = self.get_electronic_signature(top='保证人1姓名:', bottom='保证人2姓名:', t_pno='5') | 1380 | # if name["words"] == "": |
| 1420 | self.init_result['签字页-保证人1姓名'] = name | 1381 | # name = self.get_key_value(key='共同承租人名称:') |
| 1421 | self.init_result['签字页-保证人1签章'] = electronic_signature | 1382 | # electronic_signature = self.get_electronic_signature(top='共同承租人名称:', bottom='保证人1姓名:', t_pno='5') |
| 1422 | 1383 | # self.init_result['签字页-共同承租人姓名'] = name | |
| 1423 | name = self.get_key_value(key='保证人2姓名:') | 1384 | # self.init_result['签字页-共同承租人签章'] = electronic_signature |
| 1424 | electronic_signature = self.get_electronic_signature(top='保证人2姓名:', bottom='保证人3姓名:', t_pno='5') | 1385 | # 保证人2姓名、签章 |
| 1425 | self.init_result['签字页-保证人2姓名'] = name | 1386 | name = self.get_key_value(key='保证人2姓名:') |
| 1426 | self.init_result['签字页-保证人2签章'] = electronic_signature | 1387 | electronic_signature = self.get_electronic_signature(top='保证人2姓名:', bottom='保证人3姓名:', t_pno='5') |
| 1388 | self.init_result['签字页-保证人2姓名'] = name | ||
| 1389 | self.init_result['签字页-保证人2签章'] = electronic_signature | ||
| 1390 | # if判断条件对应3_3版本 | ||
| 1391 | # if name["words"] == "": | ||
| 1392 | # name = self.get_key_value(key='保证人1姓名:') | ||
| 1393 | # electronic_signature = self.get_electronic_signature(top='保证人1姓名:', bottom='保证人2姓名:', t_pno='5') | ||
| 1394 | # self.init_result['签字页-保证人1姓名'] = name | ||
| 1395 | # self.init_result['签字页-保证人1签章'] = electronic_signature | ||
| 1396 | # 保证人3姓名、签章 | ||
| 1397 | name = self.get_key_value(key='保证人3姓名:') | ||
| 1398 | electronic_signature = self.get_electronic_signature(top='保证人3姓名:', bottom='日期:', t_pno='5') | ||
| 1399 | self.init_result['签字页-保证人3姓名'] = name | ||
| 1400 | self.init_result['签字页-保证人3签章'] = electronic_signature | ||
| 1401 | # if判断条件对应3_3版本 | ||
| 1402 | # if name["words"] == None: | ||
| 1403 | # name = self.get_key_value(key='保证人2姓名:') | ||
| 1404 | # electronic_signature = self.get_electronic_signature(top='保证人2姓名:', bottom='日期:', t_pno='5') | ||
| 1405 | # self.init_result['签字页-保证人2姓名'] = name | ||
| 1406 | # self.init_result['签字页-保证人2签章'] = electronic_signature | ||
| 1407 | # else: | ||
| 1408 | # name = self.get_key_value(key='承租人一姓名:') | ||
| 1409 | # electronic_signature = self.get_electronic_signature(top='承租人一姓名:', bottom='共同承租人名称:', t_pno='5') | ||
| 1410 | # self.init_result['签字页-承租人姓名'] = name | ||
| 1411 | # self.init_result['签字页-承租人签章'] = electronic_signature | ||
| 1412 | |||
| 1413 | # name = self.get_key_value(key='共同承租人名称:') | ||
| 1414 | # electronic_signature = self.get_electronic_signature(top='共同承租人名称:', bottom='保证人1姓名:', t_pno='5') | ||
| 1415 | # self.init_result['签字页-共同承租人姓名'] = name | ||
| 1416 | # self.init_result['签字页-共同承租人签章'] = electronic_signature | ||
| 1417 | |||
| 1418 | # name = self.get_key_value(key='保证人1姓名:') | ||
| 1419 | # electronic_signature = self.get_electronic_signature(top='保证人1姓名:', bottom='保证人2姓名:', t_pno='5') | ||
| 1420 | # self.init_result['签字页-保证人1姓名'] = name | ||
| 1421 | # self.init_result['签字页-保证人1签章'] = electronic_signature | ||
| 1422 | |||
| 1423 | # name = self.get_key_value(key='保证人2姓名:') | ||
| 1424 | # electronic_signature = self.get_electronic_signature(top='保证人2姓名:', bottom='保证人3姓名:', t_pno='5') | ||
| 1425 | # self.init_result['签字页-保证人2姓名'] = name | ||
| 1426 | # self.init_result['签字页-保证人2签章'] = electronic_signature | ||
| 1427 | 1427 | ||
| 1428 | return self.init_result | 1428 | return self.init_result |
| 1429 | 1429 | ... | ... |
-
Please register or sign in to post a comment