d7b7f2d4 by 冯轩

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

2 parents 5647b681 665acbf4
...@@ -102,9 +102,13 @@ class ECM(GenericView): ...@@ -102,9 +102,13 @@ class ECM(GenericView):
102 "docbase": self.doc_base_map.get(business_type), 102 "docbase": self.doc_base_map.get(business_type),
103 "documentType": doc_type, 103 "documentType": doc_type,
104 "objectId": object_id, 104 "objectId": object_id,
105 "b_input_date": time.strftime("%m/%d/%Y %X"),
106 "b_credit_signing_date": time.strftime("%m/%d/%Y %X"),
107 "b_id_number": '',
105 } 108 }
106 header_info = self.get_headers() 109 header_info = self.get_headers()
107 self.running_log.info("{0} download header_info:{1}".format(self.log_base, header_info)) 110 self.running_log.info("{0} download header_info:{1}".format(self.log_base, header_info))
111 self.running_log.info("{0} download args_info:{1}".format(self.log_base, download_json))
108 response = requests.post(self.download_url, headers=header_info, json=download_json, verify=False) 112 response = requests.post(self.download_url, headers=header_info, json=download_json, verify=False)
109 if response.status_code != 200: 113 if response.status_code != 200:
110 raise ECMException('ECM download failed with code: {0}'.format(response.status_code)) 114 raise ECMException('ECM download failed with code: {0}'.format(response.status_code))
...@@ -142,6 +146,8 @@ class ECM(GenericView): ...@@ -142,6 +146,8 @@ class ECM(GenericView):
142 "b_region": "0", 146 "b_region": "0",
143 "b_region_name": self.b_region_name_map.get(business_type), 147 "b_region_name": self.b_region_name_map.get(business_type),
144 "b_input_date": time.strftime("%m/%d/%Y %X"), 148 "b_input_date": time.strftime("%m/%d/%Y %X"),
149 "b_credit_signing_date": time.strftime("%m/%d/%Y %X"),
150 "b_id_number": '',
145 # "file_base64_content": "", 151 # "file_base64_content": "",
146 } 152 }
147 for key in self.upload_fields: 153 for key in self.upload_fields:
...@@ -153,9 +159,10 @@ class ECM(GenericView): ...@@ -153,9 +159,10 @@ class ECM(GenericView):
153 args['file_base64_content'] = file_data 159 args['file_base64_content'] = file_data
154 header_info = self.get_headers() 160 header_info = self.get_headers()
155 self.running_log.info("{0} upload header_info:{1}".format(self.log_base, header_info)) 161 self.running_log.info("{0} upload header_info:{1}".format(self.log_base, header_info))
162 self.running_log.info("{0} upload args_info:{1}".format(self.log_base, args))
156 response = requests.post(self.upload_url, headers=header_info, json=args, verify=False) 163 response = requests.post(self.upload_url, headers=header_info, json=args, verify=False)
157 if response.status_code != 200: 164 if response.status_code != 200:
158 raise ECMException('ECM upload failed with code: {0} , with headers: {1} , with content: {2}'.format( 165 raise ECMException('ECM upload failed with code: {0} , with headers: {1} , with content: {2}'.format(
159 response.status_code, response.headers, response.text)) 166 response.status_code, response.headers, response.text))
160 if 'ns6:createResponse' not in response.json().get('S:Envelope', {}).get('S:Body', {}): 167 if 'ns12:createResponse' not in response.json().get('S:Envelope', {}).get('S:Body', {}):
161 raise ECMException('ECM upload failed: {0} , with headers: {1}'.format(response.json(), response.headers)) 168 raise ECMException('ECM upload failed: {0} , with headers: {1}'.format(response.json(), response.headers))
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!