考勤表,考勤状态表,规则表添加
This commit is contained in:
		| @@ -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__': | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 yujj128
					yujj128