This commit is contained in:
lwl0608 2024-05-08 19:36:18 +08:00
parent edbfdc25f7
commit d4a316aaae
1 changed files with 5 additions and 7 deletions

View File

@ -44,15 +44,13 @@ class S:
formatted_dt = dt.strftime('%Y-%m-%d 00:00:00')
sql_q = "select ptime from vas_day_flow where ptime='{}'".format(get_time_str_by_ts(t))
print(sql_q)
return
rows = self.mysql_db_vas.query(sql_q)
if len(rows) > 0:
return safe_get_int(rows[0], "flow")
sql = '''update vas_day_flow set flow=%s where ptime=%s'''
return self.mysql_db_bi.exec(sql, (flow, formatted_dt))
print(safe_get_int(rows[0], "flow"))
else:
print(0)
# sql = '''update vas_day_flow set flow=%s where ptime=%s'''
# return self.mysql_db_bi.exec(sql, (flow, formatted_dt))
def proc(self):
zero_time = get_today_zero_time()