Merge branch 'feature/CHINARPA-4944'
Showing
1 changed file
with
10 additions
and
1 deletions
... | @@ -97,9 +97,14 @@ class ECM(GenericView): | ... | @@ -97,9 +97,14 @@ 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_credit_check": True, | ||
103 | "b_id_number": '', | ||
100 | } | 104 | } |
101 | header_info = self.get_headers() | 105 | header_info = self.get_headers() |
102 | self.running_log.info("{0} download header_info:{1}".format(self.log_base, header_info)) | 106 | self.running_log.info("{0} download header_info:{1}".format(self.log_base, header_info)) |
107 | 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) | 108 | response = requests.post(self.download_url, headers=header_info, json=download_json, verify=False) |
104 | if response.status_code != 200: | 109 | if response.status_code != 200: |
105 | raise ECMException('ECM download failed with code: {0}'.format(response.status_code)) | 110 | raise ECMException('ECM download failed with code: {0}'.format(response.status_code)) |
... | @@ -137,6 +142,9 @@ class ECM(GenericView): | ... | @@ -137,6 +142,9 @@ class ECM(GenericView): |
137 | "b_region": "0", | 142 | "b_region": "0", |
138 | "b_region_name": self.b_region_name_map.get(business_type), | 143 | "b_region_name": self.b_region_name_map.get(business_type), |
139 | "b_input_date": time.strftime("%m/%d/%Y %X"), | 144 | "b_input_date": time.strftime("%m/%d/%Y %X"), |
145 | "b_credit_signing_date": time.strftime("%m/%d/%Y %X"), | ||
146 | "b_credit_check": True, | ||
147 | "b_id_number": '', | ||
140 | # "file_base64_content": "", | 148 | # "file_base64_content": "", |
141 | } | 149 | } |
142 | for key in self.upload_fields: | 150 | for key in self.upload_fields: |
... | @@ -148,9 +156,10 @@ class ECM(GenericView): | ... | @@ -148,9 +156,10 @@ class ECM(GenericView): |
148 | args['file_base64_content'] = file_data | 156 | args['file_base64_content'] = file_data |
149 | header_info = self.get_headers() | 157 | header_info = self.get_headers() |
150 | self.running_log.info("{0} upload header_info:{1}".format(self.log_base, header_info)) | 158 | self.running_log.info("{0} upload header_info:{1}".format(self.log_base, header_info)) |
159 | 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) | 160 | response = requests.post(self.upload_url, headers=header_info, json=args, verify=False) |
152 | if response.status_code != 200: | 161 | if response.status_code != 200: |
153 | raise ECMException('ECM upload failed with code: {0} , with headers: {1} , with content: {2}'.format( | 162 | raise ECMException('ECM upload failed with code: {0} , with headers: {1} , with content: {2}'.format( |
154 | response.status_code, response.headers, response.text)) | 163 | response.status_code, response.headers, response.text)) |
155 | if 'ns6:createResponse' not in response.json().get('S:Envelope', {}).get('S:Body', {}): | 164 | 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)) | 165 | raise ECMException('ECM upload failed: {0} , with headers: {1}'.format(response.json(), response.headers)) | ... | ... |
-
Please register or sign in to post a comment