上传坐标的时候判断是否走新的建模系统,不是的话要修改成是

This commit is contained in:
dongchangxi committed 2023-10-22 16:38:56 +08:00
1 parent 05438bb2da
commit fb5a0683e9
2 files changed
+19 -1

No files matched your search

+17 -1
View File
@@ -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"