上传坐标的时候判断是否走新的建模系统,不是的话要修改成是
This commit is contained in:
1 parent
05438bb2da
commit
fb5a0683e9
2 files changed
+19
-1
No files matched your search
+17
-1
@@ -116,4 +116,20 @@ def is_new_make_psid(psid):
|
||||
except Exception as e:
|
||||
print(f"{time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())} 执行is_new_make_psid()异常: {str(e)}")
|
||||
return "error"
|
||||
|
||||
|
||||
#判断影棚是否走的新的建模系统,不是的话修改成走新的建模系统
|
||||
def change_to_new_make_psid(psid):
|
||||
try:
|
||||
with pymysqlAlias() as conn:
|
||||
cursor = conn.cursor()
|
||||
sql = f'select count(*) from new_make_psid where studio_id = {psid}'
|
||||
cursor.execute(sql)
|
||||
result = cursor.fetchone()
|
||||
if result[0] == 0:
|
||||
sql = f'insert into new_make_psid (studio_id,createTime) values ({psid},now())'
|
||||
cursor.execute(sql)
|
||||
conn.commit()
|
||||
print(f'修改影棚{psid}为走新的建模系统')
|
||||
except Exception as e:
|
||||
print(f"{time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())} 执行change_to_new_make_psid()异常: {str(e)}")
|
||||
return "error"
|
||||
@@ -92,6 +92,8 @@ def main(pid, lock=False):
|
||||
upload_or_not = input('是否上传oss?(y/n)')
|
||||
if upload_or_not == 'y':
|
||||
upload_xmp(pid)
|
||||
#上传坐标的话要判断该影棚是否走新的建模系统,如果不是走新的建模系统,就要更新为走新的建模系统
|
||||
libs_db.change_to_new_make_psid(psid):
|
||||
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} {pid} xmp文件上传完成,共费时{libs.diff_time(start_time)}')
|
||||
|
||||
delete_or_not = input('是否删除本地文件?(y/n)')
|
||||
|
||||
Reference in new issue
Block a user