|
@@ -10,8 +10,8 @@ def low_soc_alarm_sta(db_qxcas_engine, conn, db_sp_engine):
|
|
|
|
|
|
cursor = conn.cursor()
|
|
|
|
|
|
- sql = "select sn, DATE_FORMAT(time, '%Y-%m-%d %H:%i:%s') as time, level from lowsoc_info where add_time >DATE_FORMAT( DATE_SUB(CURDATE(), INTERVAL -1 DAY), '%Y-%m-%d 00:00:00')"+ \
|
|
|
- " and add_time <DATE_FORMAT( DATE_SUB(CURDATE(), INTERVAL -1 DAY), '%Y-%m-%d 23:59:59')"
|
|
|
+ sql = "select sn, DATE_FORMAT(time, '%Y-%m-%d %H:%i:%s') as time, level from lowsoc_info where add_time >DATE_FORMAT( DATE_SUB(CURDATE(), INTERVAL 0 DAY), '%Y-%m-%d 00:00:00')"+ \
|
|
|
+ " and add_time <DATE_FORMAT( DATE_SUB(CURDATE(), INTERVAL 0 DAY), '%Y-%m-%d 23:59:59')"
|
|
|
df_lowsocalarm_lastday = pd.read_sql(sql, db_qxcas_engine)
|
|
|
sn_lowsoc = df_lowsocalarm_lastday['sn'].tolist()
|
|
|
|