init:4944
Showing
1 changed file
with
8 additions
and
1 deletions
... | @@ -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)) | ... | ... |
-
Please register or sign in to post a comment