This commit is contained in:
dongchangxi committed 2025-08-04 16:31:16 +08:00
1 parent 2ca9aa0da4
commit bad67dacd1
1 file changed
+16 -15
+16 -15
View File
@@ -111,24 +111,11 @@ def checkDownloadFile(pid):
return isContain
#加载obj文件
def reload_obj(pid,order_ids):
#下载obj文件
down_obj_from_oss(config.workdir, pid, "print")
#检测mtl 文件是否正常,
isNormal = checkDownloadFile(pid)
if isNormal == False:
print(f'{pid}的mtl文件检测出现问题,不执行该笔任务,调用取消的接口')
for order_id in order_ids:
url = f"https://mp.api.suwa3d.com/api/order/cancelExternalOrder?id={order_id}&typename=system"
response = requests.get(url)
response = response.json()
if response['code'] != 1000:
continue
print(f'取消订单{order_id}成功')
return
for order_id in order_ids:
print(order_id)
@@ -297,6 +284,20 @@ def export_and_update_glbs(pid,order_ids):
def createGlb(pid,order_ids):
#下载obj文件
down_obj_from_oss(config.workdir, pid, "print")
#检测mtl 文件是否正常,
isNormal = checkDownloadFile(pid)
if isNormal == False:
print(f'{pid}的mtl文件检测出现问题,不执行该笔任务,调用取消的接口')
for order_id in order_ids:
url = f"https://mp.api.suwa3d.com/api/order/cancelExternalOrder?id={order_id}&typename=system"
response = requests.get(url)
response = response.json()
if response['code'] != 1000:
continue
print(f'取消订单{order_id}成功')
return
base_fix(pid,order_ids)
export_and_update_glbs(pid,order_ids)