98fb6f96 by 冯轩

ADD:log

1 parent b0ca4ade
...@@ -91,7 +91,7 @@ def load_data(request, schema): ...@@ -91,7 +91,7 @@ def load_data(request, schema):
91 return request.data 91 return request.data
92 92
93 employee_args = { 93 employee_args = {
94 'applicationId': fields.Str(required=True, validate=validate.Length(max=64)), 94 'application_id': fields.Str(required=True, validate=validate.Length(max=64)),
95 'business_type': fields.Str(required=True, validate=validate.Length(max=64)), 95 'business_type': fields.Str(required=True, validate=validate.Length(max=64)),
96 } 96 }
97 97
...@@ -1862,12 +1862,16 @@ class EmployeeView(GenericView): ...@@ -1862,12 +1862,16 @@ class EmployeeView(GenericView):
1862 1862
1863 ocr_result_class = HILOCRResult if business_type in consts.HIL_SET else AFCOCRResult 1863 ocr_result_class = HILOCRResult if business_type in consts.HIL_SET else AFCOCRResult
1864 ocr_result_info = ocr_result_class.objects.filter(application_id=application_id).first() 1864 ocr_result_info = ocr_result_class.objects.filter(application_id=application_id).first()
1865 self.running_log.info('[query Employee] [application_id={0}] [business_type={1}] [ocr_result_info exist={2}]'.format(application_id, business_type, ocr_result_info is not None))
1865 if not ocr_result_info: 1866 if not ocr_result_info:
1867 self.running_log.info('[query Employee] [application_id={0}] ocr_result none'.format(application_id))
1866 return response.ok(data=False) 1868 return response.ok(data=False)
1867 bss_ocr_str = ocr_result_info.bss_ocr 1869 bss_ocr_str = ocr_result_info.bss_ocr
1868 bss_ocr = json.loads(bss_ocr_str) 1870 bss_ocr = json.loads(bss_ocr_str)
1871 self.running_log.info('[query Employee] [application_id={0}] [bss_ocr={1}]'.format(application_id, bss_ocr))
1869 for one_bss in bss_ocr: 1872 for one_bss in bss_ocr:
1870 income_keywords = one_bss['income_keywords'] 1873 income_keywords = one_bss['income_keywords']
1874 self.running_log.info('[query Employee] [application_id={0}] [income_keywords={1}]'.format(application_id, income_keywords))
1871 if income_keywords is not None and len(income_keywords) > 0: 1875 if income_keywords is not None and len(income_keywords) > 0:
1872 return response.ok(data=True) 1876 return response.ok(data=True)
1873 return response.ok(data=False) 1877 return response.ok(data=False)
...\ No newline at end of file ...\ No newline at end of file
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!