Bläddra i källkod

E店非车信息修改

Administrator 6 månader sedan
förälder
incheckning
3a509b0d6d

+ 22 - 18
spiders/edian/baojia/ed_bfjs.py

@@ -711,6 +711,7 @@ class ed_calculation(object):
 				"carPostalAddress": ""
 			  },
 			  "customerVo": {
+				  #投保人信息
 				"applicantIVo": {
 				  "customerName": self.encrypt.call('get_RSAencrypt',self.tb_uname),
 				  "identifyNumber":  self.encrypt.call('get_RSAencrypt',self.tb_identifyNumber),
@@ -817,6 +818,7 @@ class ed_calculation(object):
 				"applicantSameOwern": 0,
 				"applicantType": "1",
 				"orderNo": self.orderId,
+				  #被保人信息
 				"publicinsurantIVo": {
 				  "customerName": self.encrypt.call('get_RSAencrypt',self.bb_uname),
 				  "identifyNumber": self.encrypt.call('get_RSAencrypt',self.bb_identifyNumber),
@@ -842,8 +844,8 @@ class ed_calculation(object):
 					"cityName": self.get_cityname(self.bb_address)[-2],
 					"districtCode": self.get_ProvinceCode(self.bb_address)[0],
 					"districtName": self.get_cityname(self.bb_address)[-1],
-					"relationOfCarCode": "1",
-				  "relationOfCarName": "所有",
+					"relationOfCarCode": "1" if self.bb_uname==self.uname else '2',
+				  "relationOfCarName": "所有"  if self.bb_uname==self.uname else '使用',
 				  "email": "",
 				  "birthDate":  self.get_birthday(self.bb_identifyNumber),
 				  "mobileOwnerIdType": "",
@@ -865,6 +867,7 @@ class ed_calculation(object):
 				  "financialValue": '',
 				  "customerRiskGradeName": ""
 				},
+
 				"publicinsurantOVo": {
 				  "busiLicense": "",
 				  "customerName": "",
@@ -931,8 +934,8 @@ class ed_calculation(object):
 				"agricultureCode": "",
 				"agricultureFlag": "0",
 				"agricultureName": "非涉农",
-				"applicantInsuredRelationCode": "01",
-				"applicantInsuredRelationName": "本人",
+				"applicantInsuredRelationCode": "01" if self.tb_uname==self.bb_uname else '72',
+				"applicantInsuredRelationName": "本人" if self.tb_uname==self.bb_uname else '其他',
 				"arbitboardCode": "",
 				"arbitboardName": "",
 				"argueSolution": "1",
@@ -1337,6 +1340,7 @@ class ed_calculation(object):
 					if modular.get('sortNo')==0:
 						new_ncispUnderwritingInfoList=[]
 						ncispUnderwritingInfoList=modular.get('ncispUnderwritingInfoList')
+						#投保人信息
 						for i in ncispUnderwritingInfoList:
 							if i.get('backEndTranslationNameYl')=='customerName':
 								if i['type'] == '1':
@@ -1442,8 +1446,8 @@ class ed_calculation(object):
 						for i in ncispUnderwritingInfoList:
 							if i.get('backEndTranslationNameYl') == 'relationToApplicantCode':
 								if i['type'] == '1':
-									i['fieldValue'] = '1'
-									i['fieldValueName'] = '本人'
+									i['fieldValue'] = '1' if self.tb_uname==self.bb_uname else '64'
+									i['fieldValueName'] = '本人' if self.tb_uname==self.bb_uname else '关系密切的其他亲属'
 									i['display'] = 'block'
 									new_ncispUnderwritingInfoList.append(i)
 							elif i.get('backEndTranslationNameYl') == 'customerName':
@@ -2274,12 +2278,12 @@ class ed_calculation(object):
 				'sy_startDate': sy_startDate if self.shangye_chooseFlag=='on' else '',
 				'sy_endDate': sy_endDate if self.shangye_chooseFlag=='on' else '',
 				'other':{
-						'mark': mark,
-						'jq_mark':jq_mark,
-						'sy_mark':sy_mark,
-						'discount':str(self.discountRate),
-						'jq_discount': str(self.jq_discountRate),
-						'sy_discount': str(self.sy_discountRate),
+						'mark': mark if mark!='null' else '',
+						'jq_mark':jq_mark if jq_mark!='null' else '',
+						'sy_mark':sy_mark if sy_mark!='null' else '',
+						'discount':str(self.discountRate) if self.discountRate else '',
+						'jq_discount': str(self.jq_discountRate) if self.jq_discountRate else '',
+						'sy_discount': str(self.sy_discountRate) if self.sy_discountRate else '',
 						'isQuoteGreenWay': '',
 						'predict_info':predict_info,
 					},
@@ -2551,12 +2555,12 @@ class ed_calculation(object):
 				'sy_startDate': sy_startDate if self.shangye_chooseFlag == 'on' else '',
 				'sy_endDate': sy_endDate if self.shangye_chooseFlag == 'on' else '',
 				'other': {
-					'mark': mark,
-					'jq_mark':jq_mark,
-					'sy_mark':sy_mark,
-					'discount':str(self.discountRate),
-					'jq_discount': str(self.jq_discountRate),
-					'sy_discount': str(self.sy_discountRate),
+					'mark': mark if mark!='null' else '',
+					'jq_mark':jq_mark if jq_mark!='null' else '',
+					'sy_mark':sy_mark if sy_mark!='null' else '',
+					'discount':str(self.discountRate) if self.discountRate else '',
+					'jq_discount': str(self.jq_discountRate) if self.jq_discountRate else '',
+					'sy_discount': str(self.sy_discountRate) if self.sy_discountRate else '',
 					'isQuoteGreenWay': '',
 					'predict_info': predict_info,
 				},

+ 3 - 1
spiders/edian/guishu/ed_config.py

@@ -34,7 +34,9 @@ def  get_userinfo(uname):
     guishu = str(redis_conn.hget('edian_' + uname, 'gs_name'), 'utf8')
     set_userinfo({
         'username':uname,
-        'other':{"attributiveName":guishu}
+        'other':{"attributiveName":guishu,
+                 "type": "1",
+                 }
     })
 
 if __name__ == '__main__':

+ 4 - 1
spiders/guoshou/guishu/gs_config.py

@@ -36,6 +36,7 @@ def set_userinfo(userinfo):
             redis_conn.hset('guoshou_'+uname, 'username', uname)
             redis_conn.hset('guoshou_'+uname, 'pwd', password)
             redis_conn.hset('guoshou_' + uname, 'gs_name', guishu)
+            redis_conn.hset('guoshou_' + uname, 'type', '0')
             redis_conn.hset('guoshou_'+uname, 'token', '')
             return {'code': 400,
                     'message': '登录失败'
@@ -51,7 +52,9 @@ def  get_userinfo(uname):
     set_userinfo({
         'username':uname,
         'pwd':pwd,
-        'other':{"attributiveName":guishu}
+        'other':{"attributiveName":guishu,
+                 "type":"0",
+                 }
     })
 
 if __name__ == '__main__':