5693531c by 冯轩

Merge branch 'CHINARPA-4562' into feature/uat-tmp

2 parents 6ae14e64 98fb6f96
...@@ -93,7 +93,7 @@ def load_data(request, schema): ...@@ -93,7 +93,7 @@ def load_data(request, schema):
93 return request.data 93 return request.data
94 94
95 employee_args = { 95 employee_args = {
96 'applicationId': fields.Str(required=True, validate=validate.Length(max=64)), 96 'application_id': fields.Str(required=True, validate=validate.Length(max=64)),
97 'business_type': fields.Str(required=True, validate=validate.Length(max=64)), 97 'business_type': fields.Str(required=True, validate=validate.Length(max=64)),
98 } 98 }
99 99
...@@ -1906,12 +1906,16 @@ class EmployeeView(GenericView): ...@@ -1906,12 +1906,16 @@ class EmployeeView(GenericView):
1906 1906
1907 ocr_result_class = HILOCRResult if business_type in consts.HIL_SET else AFCOCRResult 1907 ocr_result_class = HILOCRResult if business_type in consts.HIL_SET else AFCOCRResult
1908 ocr_result_info = ocr_result_class.objects.filter(application_id=application_id).first() 1908 ocr_result_info = ocr_result_class.objects.filter(application_id=application_id).first()
1909 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))
1909 if not ocr_result_info: 1910 if not ocr_result_info:
1911 self.running_log.info('[query Employee] [application_id={0}] ocr_result none'.format(application_id))
1910 return response.ok(data=False) 1912 return response.ok(data=False)
1911 bss_ocr_str = ocr_result_info.bss_ocr 1913 bss_ocr_str = ocr_result_info.bss_ocr
1912 bss_ocr = json.loads(bss_ocr_str) 1914 bss_ocr = json.loads(bss_ocr_str)
1915 self.running_log.info('[query Employee] [application_id={0}] [bss_ocr={1}]'.format(application_id, bss_ocr))
1913 for one_bss in bss_ocr: 1916 for one_bss in bss_ocr:
1914 income_keywords = one_bss['income_keywords'] 1917 income_keywords = one_bss['income_keywords']
1918 self.running_log.info('[query Employee] [application_id={0}] [income_keywords={1}]'.format(application_id, income_keywords))
1915 if income_keywords is not None and len(income_keywords) > 0: 1919 if income_keywords is not None and len(income_keywords) > 0:
1916 return response.ok(data=True) 1920 return response.ok(data=True)
1917 return response.ok(data=False) 1921 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!