sql="select region_name from lie_region where region_id in ("+str(province)+","+str(city)+","+str(district)+") "+"order by field ("+"region_id"+","+str(province)+","+str(city)+","+str(district)+") "
user_detail_address=""
defpur():
db=mysql.connector.connect(
host="master.db2.liexindev.me",
...
...
@@ -44,15 +57,28 @@ def liexin():
consignee_district=row[7]
consignee_address=row[8]
uc_id=row[9]
detail_address=""
# 获取收票地址
tax_detail_address=""
sql="select region_name from lie_region where region_id in "+"("+str(consignee_province)+","+str(consignee_city)+","+str(consignee_district)+") "+"order by field ("+"region_id"+","+str(consignee_province)+","+str(consignee_city)+","+str(consignee_district)+")"
cursor.execute(sql)
address_result=cursor.fetchall()
foriinrange(len(address_result)):
iflen(address_result[i])==0:
tax_address_result=cursor.fetchall()
foriinrange(len(tax_address_result)):
iflen(tax_address_result[i])==0:
continue
detail_address+=address_result[i][0]
detail_address+=consignee_address
tax_detail_address+=tax_address_result[i][0]
tax_detail_address+=consignee_address
# 获取客户地址
user_detail_address=[]
sql_user_address="select province, city, district, detail_address from lie_user_address where uc_id = "+str(uc_id)