665acbf4 by 冯轩

init:4944

1 parent a0d6443d
...@@ -97,9 +97,13 @@ class ECM(GenericView): ...@@ -97,9 +97,13 @@ class ECM(GenericView):
97 "docbase": self.doc_base_map.get(business_type), 97 "docbase": self.doc_base_map.get(business_type),
98 "documentType": doc_type, 98 "documentType": doc_type,
99 "objectId": object_id, 99 "objectId": object_id,
100 "b_input_date": time.strftime("%m/%d/%Y %X"),
101 "b_credit_signing_date": time.strftime("%m/%d/%Y %X"),
102 "b_id_number": '',
100 } 103 }
101 header_info = self.get_headers() 104 header_info = self.get_headers()
102 self.running_log.info("{0} download header_info:{1}".format(self.log_base, header_info)) 105 self.running_log.info("{0} download header_info:{1}".format(self.log_base, header_info))
106 self.running_log.info("{0} download args_info:{1}".format(self.log_base, download_json))
103 response = requests.post(self.download_url, headers=header_info, json=download_json, verify=False) 107 response = requests.post(self.download_url, headers=header_info, json=download_json, verify=False)
104 if response.status_code != 200: 108 if response.status_code != 200:
105 raise ECMException('ECM download failed with code: {0}'.format(response.status_code)) 109 raise ECMException('ECM download failed with code: {0}'.format(response.status_code))
...@@ -137,6 +141,8 @@ class ECM(GenericView): ...@@ -137,6 +141,8 @@ class ECM(GenericView):
137 "b_region": "0", 141 "b_region": "0",
138 "b_region_name": self.b_region_name_map.get(business_type), 142 "b_region_name": self.b_region_name_map.get(business_type),
139 "b_input_date": time.strftime("%m/%d/%Y %X"), 143 "b_input_date": time.strftime("%m/%d/%Y %X"),
144 "b_credit_signing_date": time.strftime("%m/%d/%Y %X"),
145 "b_id_number": '',
140 # "file_base64_content": "", 146 # "file_base64_content": "",
141 } 147 }
142 for key in self.upload_fields: 148 for key in self.upload_fields:
...@@ -148,9 +154,10 @@ class ECM(GenericView): ...@@ -148,9 +154,10 @@ class ECM(GenericView):
148 args['file_base64_content'] = file_data 154 args['file_base64_content'] = file_data
149 header_info = self.get_headers() 155 header_info = self.get_headers()
150 self.running_log.info("{0} upload header_info:{1}".format(self.log_base, header_info)) 156 self.running_log.info("{0} upload header_info:{1}".format(self.log_base, header_info))
157 self.running_log.info("{0} upload args_info:{1}".format(self.log_base, args))
151 response = requests.post(self.upload_url, headers=header_info, json=args, verify=False) 158 response = requests.post(self.upload_url, headers=header_info, json=args, verify=False)
152 if response.status_code != 200: 159 if response.status_code != 200:
153 raise ECMException('ECM upload failed with code: {0} , with headers: {1} , with content: {2}'.format( 160 raise ECMException('ECM upload failed with code: {0} , with headers: {1} , with content: {2}'.format(
154 response.status_code, response.headers, response.text)) 161 response.status_code, response.headers, response.text))
155 if 'ns6:createResponse' not in response.json().get('S:Envelope', {}).get('S:Body', {}): 162 if 'ns12:createResponse' not in response.json().get('S:Envelope', {}).get('S:Body', {}):
156 raise ECMException('ECM upload failed: {0} , with headers: {1}'.format(response.json(), response.headers)) 163 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!