c6290fa1 by 周伟奇

gcap close

1 parent 7967d700
......@@ -5,7 +5,7 @@ import traceback
from datetime import datetime, timedelta
from collections import OrderedDict
from . import app
from apps.doc.models import AFCOCRResult, HILOCRResult, AFCComparisonInfo, HILComparisonInfo
from apps.doc.models import AFCOCRResult, HILOCRResult, AFCComparisonInfo, HILComparisonInfo, Configs
from apps.doc import consts
from apps.doc.ocr.gcap import gcap
from apps.doc.exceptions import GCAPException
......@@ -162,7 +162,7 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id):
'vehicleStatus': last_obj.vehicle_status,
'wholeResult': 'Y',
'wholeResultMessage': '',
'applicationLink': r'file://china.bmw.corp/WINFS/SF-CN-data/SF3-CN-S/SF3-CN-S-1-New Business/CA/OCR II test',
'applicationLink': r'//china.bmw.corp/WINFS/SF-CN-data/SF3-CN-S/SF3-CN-S-1-New Business/CA/OCR II test',
}
})
......@@ -255,6 +255,12 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id):
log_base, application_entity, application_id, uniq_seq, ocr_res_id))
time.sleep(5)
is_gcap_send = Configs.objects.filter(id=1).first()
if is_gcap_send is not None and is_gcap_send.value == 'N':
compare_log.info('{0} [gcap closed] [entity={1}] [id={2}] [uniq_seq={3}] [ocr_res_id={4}]'.format(
log_base, application_entity, application_id, uniq_seq, ocr_res_id))
return
# 将比对结果发送GCAP
try:
data = gcap.dict_to_xml(comparison_res)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!