Initial project import.

Add the cartype scripts, incremental runner, scheduler helper, and project notes so the project can be versioned and pushed to the remote repository.
This commit is contained in:
2026-11-11 09:43:32 +08:00
commit 3a100ec41f
7 changed files with 456 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
import json
import newsetting
tent = newsetting.All_Setting('192.168.5.2',3306,'project_company_travel')
def get_cartype(raw_uuid):
sql1 = f"""
select json_data from rawdata where uuid = '{raw_uuid}'
"""
data = tent.get_shoppingmalls(sql1)[0][0]
# data2 = json.loads(data)['requests']
json_data = json.loads(json.loads(data)['requests'])
vehicle = json_data['data']['vehicle']
carType = vehicle['carType']
color = vehicle['color']
return carType,color
# input(1)
def update_data(id,carType,color):
sql = f"""
update order_detail_new set carType = '{carType}',color = '{color}' where id = {id}
"""
tent.update_data(sql)
sql1 = """
select id,raw_uuid from order_detail_new where raw_uuid is not null and amap_order_id is not null and id >= 103396
"""
a1 = tent.get_shoppingmalls(sql1)
for i in a1:
id, raw_uuid = i
print(i)
carType,color = get_cartype(raw_uuid)
update_data(id,carType,color)
# input(1)