考勤表,考勤状态表,规则表添加

This commit is contained in:
yujj128
2025-09-26 17:35:23 +08:00
parent 26661396d0
commit fe4705fea1
4 changed files with 987 additions and 121 deletions

View File

@@ -111,6 +111,7 @@ def generate_sql_2():
data["type"]="success"
return jsonify(data)
except Exception as e:
logger.error("generate sql failed:{e}")
return jsonify({"type": "error", "error": str(e)})
@@ -156,9 +157,9 @@ def run_sql_2(id: str, sql: str):
df = vn.run_sql(sql=sql)
logger.info("")
app.cache.set(id=id, field="df", value=df)
x = df.to_dict(orient='records')
logger.info("df ---------------{0} {1}".format(x,type(x)))
result = util.utils.deal_result(data=x)
result = df.to_dict(orient='records')
logger.info("df ---------------{0} {1}".format(result,type(result)))
# result = util.utils.deal_result(data=result)
return jsonify(
{
@@ -169,6 +170,7 @@ def run_sql_2(id: str, sql: str):
)
except Exception as e:
logger.error("run sql failed:{e}")
return jsonify({"type": "sql_error", "error": str(e)})
if __name__ == '__main__':