|
|
|
@ -83,9 +83,12 @@ def down_obj_fromoss(pid, print_type=1, order_id=None): |
|
|
|
path = os.path.join(workdir, pid) |
|
|
|
path = os.path.join(workdir, pid) |
|
|
|
if os.path.exists(path): |
|
|
|
if os.path.exists(path): |
|
|
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} pid: {pid} 已存在模型文件,删除后重新下载') |
|
|
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} pid: {pid} 已存在模型文件,删除后重新下载') |
|
|
|
|
|
|
|
print("AAAAAAAAAAAA") |
|
|
|
shutil.rmtree(path, ignore_errors=True) |
|
|
|
shutil.rmtree(path, ignore_errors=True) |
|
|
|
|
|
|
|
print("BBBBBBBBBBBBBBB") |
|
|
|
os.makedirs(path) |
|
|
|
os.makedirs(path) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print("准备下载,获取ossPath") |
|
|
|
prefix = f'objs/print/{pid}' |
|
|
|
prefix = f'objs/print/{pid}' |
|
|
|
#根据order_id 获取文件在 oss 上的存储路径 |
|
|
|
#根据order_id 获取文件在 oss 上的存储路径 |
|
|
|
if order_id is not None: |
|
|
|
if order_id is not None: |
|
|
|
@ -525,7 +528,9 @@ def main(workdir, r, print_id): |
|
|
|
order_id = arrResText['data']['order_id'] # order_id |
|
|
|
order_id = arrResText['data']['order_id'] # order_id |
|
|
|
|
|
|
|
|
|
|
|
#文件路劲 |
|
|
|
#文件路劲 |
|
|
|
filename = os.path.join(workdir, f'{pid}_{order_id}', find_obj(pid, order_id)) |
|
|
|
tempName = find_obj(pid, order_id) |
|
|
|
|
|
|
|
print("tempName",tempName) |
|
|
|
|
|
|
|
filename = os.path.join(workdir, f'{pid}_{order_id}', tempName) |
|
|
|
print('导入obj文件:', filename) |
|
|
|
print('导入obj文件:', filename) |
|
|
|
|
|
|
|
|
|
|
|
#获取该笔订单的坐标 |
|
|
|
#获取该笔订单的坐标 |
|
|
|
|