673ae204 by 冯轩

Merge branch 'hotfix/2025-02' into feature/uat-tmp

2 parents 46c738c0 6539e1d1
...@@ -3816,38 +3816,37 @@ def fsm_compare_thread(application_id, application_entity, uniq_seq, ocr_res_id, ...@@ -3816,38 +3816,37 @@ def fsm_compare_thread(application_id, application_entity, uniq_seq, ocr_res_id,
3816 except Exception as e: 3816 except Exception as e:
3817 compare_log.info('[sleep error] [error={0}]'.format(traceback.format_exc())) 3817 compare_log.info('[sleep error] [error={0}]'.format(traceback.format_exc()))
3818 compare_log.info('{0} [comparison unfinished file wait delay_time end] [entity={1}] [id={2}] [doc_id={3}]'.format(log_base, application_entity, application_id, doc_wait_file_result.id)) 3818 compare_log.info('{0} [comparison unfinished file wait delay_time end] [entity={1}] [id={2}] [doc_id={3}]'.format(log_base, application_entity, application_id, doc_wait_file_result.id))
3819 except Exception as e:
3820 compare_log.info('[fsm_compare_thread error] [error={0}]'.format(traceback.format_exc()))
3821 3819
3820 # 调用java fsm 比对流程接口(http)
3821 # 调用Java fsm 比对流程接口, fsm 是se流程, ca可以暂时忽略
3822 auto_class = HILAutoSettlement if application_entity == consts.HIL_PREFIX else AFCAutoSettlement
3823 auto_obj = auto_class.objects.filter(application_id=application_id, on_off=True).first()
3824 if auto_obj is not None:
3825 url = conf.FSM_AUTO_URL
3826 is_auto = True
3827 else:
3828 url = conf.FSM_URL
3829 is_auto = False
3822 3830
3823 # 调用java fsm 比对流程接口(http) 3831 body = {
3824 # 调用Java fsm 比对流程接口, fsm 是se流程, ca可以暂时忽略 3832 'applicationId': application_id,
3825 auto_class = HILAutoSettlement if application_entity == consts.HIL_PREFIX else AFCAutoSettlement 3833 'businessType': application_entity,
3826 auto_obj = auto_class.objects.filter(application_id=application_id, on_off=True).first() 3834 'ocrResId': ocr_res_id,
3827 if auto_obj is not None: 3835 'isCa': is_ca,
3828 url = conf.FSM_AUTO_URL 3836 'isCms': is_cms
3829 is_auto = True
3830 else:
3831 url = conf.FSM_URL
3832 is_auto = False
3833
3834 body = {
3835 'applicationId': application_id,
3836 'businessType': application_entity,
3837 'ocrResId': ocr_res_id,
3838 'isCa': is_ca,
3839 'isCms': is_cms
3840 }
3841 try:
3842 compare_log.info("request java fsm api, url:{0}, body:{1}, is_auto:{2}".format(url, json.dumps(body), is_auto))
3843 headers = {
3844 'Content-Type': 'application/json'
3845 } 3837 }
3846 resp = requests.post(url, headers=headers, json=body) 3838 try:
3847 compare_log.info("response from fsm api, resp:{0}".format(resp.text)) 3839 compare_log.info("request java fsm api, url:{0}, body:{1}, is_auto:{2}".format(url, json.dumps(body), is_auto))
3840 headers = {
3841 'Content-Type': 'application/json'
3842 }
3843 resp = requests.post(url, headers=headers, json=body)
3844 compare_log.info("response from fsm api, resp:{0}".format(resp.text))
3845 except Exception as e:
3846 compare_log.error("fsm full request to java error, url:{0}, param:{1}, errorMsg:{2}".format(
3847 url, json.dumps(body), traceback.format_exc()))
3848 except Exception as e: 3848 except Exception as e:
3849 compare_log.error("fsm full request to java error, url:{0}, param:{1}, errorMsg:{2}".format( 3849 compare_log.info('[fsm_compare_thread error] [error={0}]'.format(traceback.format_exc()))
3850 url, json.dumps(body), traceback.format_exc()))
3851 3850
3852 3851
3853 @app.task 3852 @app.task
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!