b9c80f62 by 冯轩

MOD:merge

2 parents c10429b1 d45e104a
...@@ -2016,12 +2016,12 @@ BS_COMPARE_LOGIC = { ...@@ -2016,12 +2016,12 @@ BS_COMPARE_LOGIC = {
2016 '户名': ('role', 'se_bs_one_compare', {}, '主共借人未提供银行流水'), 2016 '户名': ('role', 'se_bs_one_compare', {}, '主共借人未提供银行流水'),
2017 '(担保人1)户名': ('role', 'se_bs_name_compare', {}, '担保人1未提供银行流水'), 2017 '(担保人1)户名': ('role', 'se_bs_name_compare', {}, '担保人1未提供银行流水'),
2018 '(担保人2)户名': ('role', 'se_bs_name_compare', {}, '担保人2未提供银行流水'), 2018 '(担保人2)户名': ('role', 'se_bs_name_compare', {}, '担保人2未提供银行流水'),
2019 '打印日期': ('print_time', 'se_bs_print_date_compare', {'days': 15}, '主共借人银行流水打印日期超过15天'), 2019 '打印日期': ('print_time', 'se_bs_print_date_compare', {'days': 30}, '主共借人银行流水打印日期超过30天'),
2020 '(担保人1)打印日期': ('print_time', 'se_bs_print_date_compare', {'days': 15}, '担保人1银行流水打印日期超过15天'), 2020 '(担保人1)打印日期': ('print_time', 'se_bs_print_date_compare', {'days': 30}, '担保人1银行流水打印日期超过30天'),
2021 '(担保人2)打印日期': ('print_time', 'se_bs_print_date_compare', {'days': 15}, '担保人2银行流水打印日期超过15天'), 2021 '(担保人2)打印日期': ('print_time', 'se_bs_print_date_compare', {'days': 30}, '担保人2银行流水打印日期超过30天'),
2022 '流水日期': ('timedelta', 'se_bs_date_compare', {}, '主共借人银行流水日期不满足3个月'), 2022 '流水日期': ('timedelta', 'se_bs_date_compare', {}, '主共借人银行流水区间异常,请核查'),
2023 '(担保人1)流水日期': ('timedelta', 'se_bs_date_compare', {}, '担保人1银行流水日期不满足3个月'), 2023 '(担保人1)流水日期': ('timedelta', 'se_bs_date_compare', {}, '担保人1银行流水区间异常,请核查'),
2024 '(担保人2)流水日期': ('timedelta', 'se_bs_date_compare', {}, '担保人2银行流水日期不满足3个月'), 2024 '(担保人2)流水日期': ('timedelta', 'se_bs_date_compare', {}, '担保人2银行流水区间异常,请核查'),
2025 '类型': ('bankStatement_type', 'se_bs_type_compare', {}, '高风险经销商流水类型异常'), 2025 '类型': ('bankStatement_type', 'se_bs_type_compare', {}, '高风险经销商流水类型异常'),
2026 } 2026 }
2027 2027
...@@ -2032,9 +2032,9 @@ BS_COMPARE_LOGIC_AUTO = { ...@@ -2032,9 +2032,9 @@ BS_COMPARE_LOGIC_AUTO = {
2032 '打印日期': ('print_time', 'se_bs_print_date_compare', {'days': 30}, '主共借人银行流水打印日期超过30天'), 2032 '打印日期': ('print_time', 'se_bs_print_date_compare', {'days': 30}, '主共借人银行流水打印日期超过30天'),
2033 '(担保人1)打印日期': ('print_time', 'se_bs_print_date_compare', {'days': 30}, '担保人1银行流水打印日期超过30天'), 2033 '(担保人1)打印日期': ('print_time', 'se_bs_print_date_compare', {'days': 30}, '担保人1银行流水打印日期超过30天'),
2034 '(担保人2)打印日期': ('print_time', 'se_bs_print_date_compare', {'days': 30}, '担保人2银行流水打印日期超过30天'), 2034 '(担保人2)打印日期': ('print_time', 'se_bs_print_date_compare', {'days': 30}, '担保人2银行流水打印日期超过30天'),
2035 '流水日期': ('timedelta', 'se_bs_date_compare', {}, '主共借人银行流水日期不满足2个月'), 2035 '流水日期': ('timedelta', 'se_bs_date_compare', {}, '主共借人银行流水区间异常,请核查'),
2036 '(担保人1)流水日期': ('timedelta', 'se_bs_date_compare', {}, '担保人1银行流水日期不满足2个月'), 2036 '(担保人1)流水日期': ('timedelta', 'se_bs_date_compare', {}, '担保人1银行流水区间异常,请核查'),
2037 '(担保人2)流水日期': ('timedelta', 'se_bs_date_compare', {}, '担保人2银行流水日期不满足2个月'), 2037 '(担保人2)流水日期': ('timedelta', 'se_bs_date_compare', {}, '担保人2银行流水区间异常,请核查'),
2038 '类型': ('bankStatement_type', 'se_bs_type_compare', {}, '高风险经销商流水类型异常'), 2038 '类型': ('bankStatement_type', 'se_bs_type_compare', {}, '高风险经销商流水类型异常'),
2039 } 2039 }
2040 2040
...@@ -2192,7 +2192,7 @@ FSS_COMPARE_LOGIC = { ...@@ -2192,7 +2192,7 @@ FSS_COMPARE_LOGIC = {
2192 2192
2193 DP_COMPARE_LOGIC = { 2193 DP_COMPARE_LOGIC = {
2194 '渠道': ('financial_org_name', 'se_common_compare', {'remove_space': True}, '首付款支付承诺书渠道错误'), 2194 '渠道': ('financial_org_name', 'se_common_compare', {'remove_space': True}, '首付款支付承诺书渠道错误'),
2195 '姓名': ('main_borrower_name', 'se_common_compare', {'remove_space': True}, '首付款支付承诺书姓名与系统不一致'), 2195 '姓名': ('main_borrower_name', 'se_common_compare', {'remove_all_space': True}, '首付款支付承诺书姓名与系统不一致'),
2196 '证件号码': ('main_borrower_id_no', 'se_common_compare', {'remove_space': True}, '首付款支付承诺书证件号码与系统不一致'), 2196 '证件号码': ('main_borrower_id_no', 'se_common_compare', {'remove_space': True}, '首付款支付承诺书证件号码与系统不一致'),
2197 '合同编号(含版本号)': ('apply_no', 'se_common_compare', {'remove_space': True}, '首付款支付承诺书合同编号与系统不一致'), 2197 '合同编号(含版本号)': ('apply_no', 'se_common_compare', {'remove_space': True}, '首付款支付承诺书合同编号与系统不一致'),
2198 '承诺人签字-电子': ('promisor_signature', 'se_common_compare', {'remove_all_space': True}, '首付款支付承诺书承诺人签字与系统不一致'), 2198 '承诺人签字-电子': ('promisor_signature', 'se_common_compare', {'remove_all_space': True}, '首付款支付承诺书承诺人签字与系统不一致'),
...@@ -2592,6 +2592,8 @@ DOWN_PAYMENT_CLASSIFY_LIST = [96] ...@@ -2592,6 +2592,8 @@ DOWN_PAYMENT_CLASSIFY_LIST = [96]
2592 # 首付款支付承诺书sheet名称 2592 # 首付款支付承诺书sheet名称
2593 DOWN_PAYMENT_SHEET_NAME = "首付款支付承诺书" 2593 DOWN_PAYMENT_SHEET_NAME = "首付款支付承诺书"
2594 2594
2595 NEW_FILE_COMPARE_SET = [96]
2596
2595 # Jira-4562 - 银行流水首页提取关键词 2597 # Jira-4562 - 银行流水首页提取关键词
2596 INCOME_KEYWORDS_LIST = ["养老金", "社保", "代发工资", "工资入账", "奖金", "养老保险", "代发", "工资"] 2598 INCOME_KEYWORDS_LIST = ["养老金", "社保", "代发工资", "工资入账", "奖金", "养老保险", "代发", "工资"]
2597 INCOME_KEYWORDS_DICT = { 2599 INCOME_KEYWORDS_DICT = {
...@@ -2603,6 +2605,4 @@ INCOME_KEYWORDS_DICT = { ...@@ -2603,6 +2605,4 @@ INCOME_KEYWORDS_DICT = {
2603 "养老保险": "yanglaobaoxian", 2605 "养老保险": "yanglaobaoxian",
2604 "代发": "daifa", 2606 "代发": "daifa",
2605 "工资": "gongzi" 2607 "工资": "gongzi"
2606 }
2607
2608 NEW_FILE_COMPARE_SET = [96]
...\ No newline at end of file ...\ No newline at end of file
2608 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -1646,7 +1646,7 @@ class Command(BaseCommand, LoggerMixin): ...@@ -1646,7 +1646,7 @@ class Command(BaseCommand, LoggerMixin):
1646 try: 1646 try:
1647 channel, img_path, text_list = img_queue.get(block=False) 1647 channel, img_path, text_list = img_queue.get(block=False)
1648 except Exception as e: 1648 except Exception as e:
1649 # self.online_log.info('{0} [img_2_ocr_1] [queue empty]'.format(self.log_base)) 1649 # # self.online_log.info('{0} [img_2_ocr_1] [queue empty]'.format(self.log_base))
1650 time.sleep(self.sleep_time_img_get) 1650 time.sleep(self.sleep_time_img_get)
1651 continue 1651 continue
1652 else: 1652 else:
...@@ -2159,19 +2159,19 @@ class Command(BaseCommand, LoggerMixin): ...@@ -2159,19 +2159,19 @@ class Command(BaseCommand, LoggerMixin):
2159 if business_type == consts.HIL_PREFIX: 2159 if business_type == consts.HIL_PREFIX:
2160 result_class = HILOCRResult if is_ca else HILSEOCRResult 2160 result_class = HILOCRResult if is_ca else HILSEOCRResult
2161 try: 2161 try:
2162 res_obj = atomicSaveDBHIL(self,result_class,doc,license_summary,ic_merge,rp_merge, task_str, financial_statement_dict, financial_explanation_dict) 2162 res_obj = atomicSaveDBHIL(self,result_class,doc,license_summary,ic_merge,rp_merge, task_str, financial_statement_dict, financial_explanation_dict, down_payment_dict)
2163 except Exception as e: 2163 except Exception as e:
2164 # 遇到报错重试一次,希望解决两个文件首次入库都插入的问题 2164 # 遇到报错重试一次,希望解决两个文件首次入库都插入的问题
2165 self.online_log.error('{0} [process error (ocr result save) retry] [task={1}] [error={2}]'.format(self.log_base, task_str, traceback.format_exc())) 2165 self.online_log.error('{0} [process error (ocr result save) retry] [task={1}] [error={2}]'.format(self.log_base, task_str, traceback.format_exc()))
2166 res_obj = atomicSaveDBHIL(self,result_class,doc,license_summary,ic_merge,rp_merge, task_str, financial_statement_dict, financial_explanation_dict) 2166 res_obj = atomicSaveDBHIL(self,result_class,doc,license_summary,ic_merge,rp_merge, task_str, financial_statement_dict, financial_explanation_dict, down_payment_dict)
2167 else: 2167 else:
2168 result_class = AFCOCRResult if is_ca else AFCSEOCRResult 2168 result_class = AFCOCRResult if is_ca else AFCSEOCRResult
2169 try: 2169 try:
2170 res_obj = atomicSaveDBAFC(self,result_class,doc,license_summary,ic_merge,rp_merge, task_str, financial_statement_dict, financial_explanation_dict) 2170 res_obj = atomicSaveDBAFC(self,result_class,doc,license_summary,ic_merge,rp_merge, task_str, financial_statement_dict, financial_explanation_dict, down_payment_dict)
2171 except Exception as e: 2171 except Exception as e:
2172 # 遇到报错重试一次,希望解决两个文件首次入库都插入的问题 2172 # 遇到报错重试一次,希望解决两个文件首次入库都插入的问题
2173 self.online_log.error('{0} [process error (ocr result save) retry] [task={1}] [error={2}]'.format(self.log_base, task_str, traceback.format_exc())) 2173 self.online_log.error('{0} [process error (ocr result save) retry] [task={1}] [error={2}]'.format(self.log_base, task_str, traceback.format_exc()))
2174 res_obj = atomicSaveDBAFC(self,result_class,doc,license_summary,ic_merge,rp_merge, task_str, financial_statement_dict, financial_explanation_dict) 2174 res_obj = atomicSaveDBAFC(self,result_class,doc,license_summary,ic_merge,rp_merge, task_str, financial_statement_dict, financial_explanation_dict, down_payment_dict)
2175 2175
2176 except Exception as e: 2176 except Exception as e:
2177 self.online_log.error( 2177 self.online_log.error(
...@@ -2211,19 +2211,19 @@ class Command(BaseCommand, LoggerMixin): ...@@ -2211,19 +2211,19 @@ class Command(BaseCommand, LoggerMixin):
2211 if business_type == consts.HIL_PREFIX: 2211 if business_type == consts.HIL_PREFIX:
2212 result_class = HILOCRResult if is_ca else HILSEOCRResult 2212 result_class = HILOCRResult if is_ca else HILSEOCRResult
2213 try: 2213 try:
2214 res_obj = atomicSaveDBHIL(self,result_class,doc,license_summary,ic_merge,rp_merge, task_str, financial_statement_dict, financial_explanation_dict) 2214 res_obj = atomicSaveDBHIL(self,result_class,doc,license_summary,ic_merge,rp_merge, task_str, financial_statement_dict, financial_explanation_dict, down_payment_dict)
2215 except Exception as e: 2215 except Exception as e:
2216 # 遇到报错重试一次,希望解决两个文件首次入库都插入的问题 2216 # 遇到报错重试一次,希望解决两个文件首次入库都插入的问题
2217 self.online_log.error('{0} [process error (ocr result save) retry] [task={1}] [error={2}]'.format(self.log_base, task_str, traceback.format_exc())) 2217 self.online_log.error('{0} [process error (ocr result save) retry] [task={1}] [error={2}]'.format(self.log_base, task_str, traceback.format_exc()))
2218 res_obj = atomicSaveDBHIL(self,result_class,doc,license_summary,ic_merge,rp_merge, task_str, financial_statement_dict, financial_explanation_dict) 2218 res_obj = atomicSaveDBHIL(self,result_class,doc,license_summary,ic_merge,rp_merge, task_str, financial_statement_dict, financial_explanation_dict, down_payment_dict)
2219 else: 2219 else:
2220 result_class = AFCOCRResult if is_ca else AFCSEOCRResult 2220 result_class = AFCOCRResult if is_ca else AFCSEOCRResult
2221 try: 2221 try:
2222 res_obj = atomicSaveDBAFC(self,result_class,doc,license_summary,ic_merge,rp_merge, task_str, financial_statement_dict, financial_explanation_dict) 2222 res_obj = atomicSaveDBAFC(self,result_class,doc,license_summary,ic_merge,rp_merge, task_str, financial_statement_dict, financial_explanation_dict, down_payment_dict)
2223 except Exception as e: 2223 except Exception as e:
2224 # 遇到报错重试一次,希望解决两个文件首次入库都插入的问题 2224 # 遇到报错重试一次,希望解决两个文件首次入库都插入的问题
2225 self.online_log.error('{0} [process error (ocr result save) retry] [task={1}] [error={2}]'.format(self.log_base, task_str, traceback.format_exc())) 2225 self.online_log.error('{0} [process error (ocr result save) retry] [task={1}] [error={2}]'.format(self.log_base, task_str, traceback.format_exc()))
2226 res_obj = atomicSaveDBAFC(self,result_class,doc,license_summary,ic_merge,rp_merge, task_str, financial_statement_dict, financial_explanation_dict) 2226 res_obj = atomicSaveDBAFC(self,result_class,doc,license_summary,ic_merge,rp_merge, task_str, financial_statement_dict, financial_explanation_dict, down_payment_dict)
2227 except Exception as e: 2227 except Exception as e:
2228 self.online_log.error( 2228 self.online_log.error(
2229 '{0} [process error (ocr result save)] [task={1}] [error={2}]'.format( 2229 '{0} [process error (ocr result save)] [task={1}] [error={2}]'.format(
......
...@@ -1225,7 +1225,7 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d ...@@ -1225,7 +1225,7 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d
1225 allow_bs_type = '全部' 1225 allow_bs_type = '全部'
1226 if cms_info.get('autoApprovedDetails', {}).get('aaType', '') in ['CAA1', 'CAA2'] and \ 1226 if cms_info.get('autoApprovedDetails', {}).get('aaType', '') in ['CAA1', 'CAA2'] and \
1227 '无需提供银行流水' not in cms_info.get('autoApprovedDetails', {}).get('PolicyComments', ''): 1227 '无需提供银行流水' not in cms_info.get('autoApprovedDetails', {}).get('PolicyComments', ''):
1228 date_timedelta = 60 if auto else 90 1228 date_timedelta = 83 if auto else 83
1229 bs_role_list = [] 1229 bs_role_list = []
1230 for applicant_type in consts.APPLICANT_TYPE_ORDER[:2]: 1230 for applicant_type in consts.APPLICANT_TYPE_ORDER[:2]:
1231 if applicant_type in main_role_info: 1231 if applicant_type in main_role_info:
...@@ -1916,7 +1916,7 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect ...@@ -1916,7 +1916,7 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect
1916 allow_bs_type = '全部' 1916 allow_bs_type = '全部'
1917 if cms_info.get('autoApprovedDetails', {}).get('aaType', '') in ['CAA1', 'CAA2'] and \ 1917 if cms_info.get('autoApprovedDetails', {}).get('aaType', '') in ['CAA1', 'CAA2'] and \
1918 '无需提供银行流水' not in cms_info.get('autoApprovedDetails', {}).get('PolicyComments', ''): 1918 '无需提供银行流水' not in cms_info.get('autoApprovedDetails', {}).get('PolicyComments', ''):
1919 date_timedelta = 60 if auto else 90 1919 date_timedelta = 83 if auto else 83
1920 bs_role_list = [] 1920 bs_role_list = []
1921 for applicant_type in consts.APPLICANT_TYPE_ORDER[:2]: 1921 for applicant_type in consts.APPLICANT_TYPE_ORDER[:2]:
1922 if applicant_type in main_role_info: 1922 if applicant_type in main_role_info:
......
...@@ -102,7 +102,7 @@ for db_setting in DATABASES.values(): ...@@ -102,7 +102,7 @@ for db_setting in DATABASES.values():
102 'driver': 'ODBC Driver 17 for SQL Server', 102 'driver': 'ODBC Driver 17 for SQL Server',
103 'extra_params': "odbc_cursortype=2;TrustServerCertificate=yes;Encrypt=yes" 103 'extra_params': "odbc_cursortype=2;TrustServerCertificate=yes;Encrypt=yes"
104 } 104 }
105 db_setting['CONN_MAX_AGE'] = 60 105 db_setting['CONN_MAX_AGE'] = 0
106 # set this to False if you want to turn off pyodbc's connection pooling 106 # set this to False if you want to turn off pyodbc's connection pooling
107 DATABASE_CONNECTION_POOLING = True 107 DATABASE_CONNECTION_POOLING = True
108 108
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!