2 İşlemeler 57ec6ba7f4 ... 44ad5b0f09

Yazar SHA1 Mesaj Tarih
  Administrator 44ad5b0f09 众安非车问题处理 7 ay önce
  Administrator 84953bd4ab 众安货车报价问题处理 7 ay önce

+ 0 - 2
spiders/guoshou/baojia/gs_bfjs.py

@@ -1168,7 +1168,6 @@ class gs_calculation(object):
 			  "desensitizationJson": self.desensitizationJson,
 			  "newVehicleRecordFlag": "0"
 		}
-		print(data)
 		response = requests.post("https://mesbj.chinalife-p.com.cn/mesci/order/MesOrderInfos/submitInsuranceInformation", headers=self.headers, data=json.dumps(data))
 
 		if response.json().get('status')=='500':
@@ -1752,7 +1751,6 @@ class gs_calculation(object):
 		n_data['vehicleTonnage'] = self.car_info.get('vehicleTonnage')
 		url = "https://mesbj.chinalife-p.com.cn/mesci/order/MesOrderInfos/updateCarInfo"
 		response = requests.post(url, headers=self.headers, data=json.dumps(n_data))
-		print(response.text)
 		# -------------------------------------------------------------------------------------------------------
 		url = "https://mesbj.chinalife-p.com.cn/mesci/order/MesOrderInfos/getPlatCarInfo"
 		data = {

+ 25 - 22
spiders/zhongan/baojia/za_bfjs.py

@@ -569,7 +569,7 @@ class ZA_bfjs(object):
 				'desVehicleOwnerName': '',
 				'applicantType': 'PERSONAL',
 				'applicantUseAttribute': '03',
-				'useAttribute': 'NONBUSINESS',
+				'useAttribute': 'NONBUSINESS' if self.vehicleUse!='04' else 'BUSINESS',
 				'subOwnershipAttribute': "" if (self.vehicleUse!='04' and self.vehicleUse!='08') else "TRUCK",
 				'ownershipAttribute': 'PER',
 				'vehicleLicenceType': '',
@@ -701,7 +701,7 @@ class ZA_bfjs(object):
 						'desVehicleOwnerName': '',
 						'applicantType': 'PERSONAL',
 						'applicantUseAttribute': '03',
-						'useAttribute': 'NONBUSINESS',
+						'useAttribute': 'NONBUSINESS' if self.vehicleUse!='04' else 'BUSINESS',
 						'subOwnershipAttribute': "" if (self.vehicleUse!='04' and self.vehicleUse!='08') else "TRUCK",
 						'ownershipAttribute': 'PER',
 						'vehicleLicenceType': '',
@@ -880,7 +880,7 @@ class ZA_bfjs(object):
 				'desVehicleOwnerName': '',
 				'applicantType': 'PERSONAL',
 				'applicantUseAttribute': '03',
-				'useAttribute': 'NONBUSINESS',
+				'useAttribute': 'NONBUSINESS' if self.vehicleUse!='04' else 'BUSINESS',
 				'subOwnershipAttribute': "" if (self.vehicleUse!='04' and self.vehicleUse!='08') else "TRUCK",
 				'ownershipAttribute': 'PER',
 				'vehicleLicenceType': '',
@@ -999,7 +999,7 @@ class ZA_bfjs(object):
 						'desVehicleOwnerName': '',
 						'applicantType': 'PERSONAL',
 						'applicantUseAttribute': '03',
-						'useAttribute': 'NONBUSINESS',
+						'useAttribute': 'NONBUSINESS' if self.vehicleUse!='04' else 'BUSINESS',
 						'subOwnershipAttribute': "" if (self.vehicleUse!='04' and self.vehicleUse!='08') else "TRUCK",
 						'ownershipAttribute': 'PER',
 						'vehicleLicenceType': '',
@@ -1753,24 +1753,7 @@ class ZA_bfjs(object):
 					sy_discount=''
 				#
 				isQuoteGreenWay = re.findall(r'isQuoteGreenWay":"(.*?)"', response.text, re.S)
-				errorCodeMap_list = []
-				if isQuoteGreenWay:
-					isQuoteGreenWay = isQuoteGreenWay[0]
-					url = "https://c.zhongan.com/open/bmw/quote_controller/get_green_base_info.json"
-					data = {
-						"quoteId":self.quoteId,
-						"flowId": self.flowId,
-						"page": "%2FinsureProgram",
-						"i": "e",
-						"flag": "0"
-					}
-					response = requests.post(url, headers=self.headers, data=data)
-					errorCodeMap=response.json().get('value').get('datas').get('errorCodeMap')
-					errorCodeMap_list=[]
-					for i in errorCodeMap:
-						errorCodeMap_list.append(i+':'+errorCodeMap.get(i))
-				else:
-					isQuoteGreenWay = '0'
+
 
 				jq_startDate = ''
 				jq_endDate = ''
@@ -1839,6 +1822,26 @@ class ZA_bfjs(object):
 				# 年款
 				carInfo['caryear'] = self.car_info.get('configName')
 
+				errorCodeMap_list = []
+				if isQuoteGreenWay:
+					isQuoteGreenWay = isQuoteGreenWay[0]
+					url = "https://c.zhongan.com/open/bmw/quote_controller/get_green_base_info.json"
+					data = {
+						"quoteId": self.quoteId,
+						"flowId": self.flowId,
+						"page": "%2FinsureProgram",
+						"i": "e",
+						"flag": "0"
+					}
+					response = requests.post(url, headers=self.headers, data=data)
+					errorCodeMap = response.json().get('value').get('datas').get('errorCodeMap')
+					errorCodeMap_list = []
+					for i in errorCodeMap:
+						errorCodeMap_list.append(i + ':' + errorCodeMap.get(i))
+				else:
+					isQuoteGreenWay = '0'
+
+
 				redis_conn.hset('zhongan_' + plyappno, 'username', self.username)
 				return {
 					'code': 200,