frompot_libs.mysql_util.mysql_utilimportMysqlUtilasyncdefquery_sdu_power_wave(pid,cal_day):"""根据pid和时间查询功率波动数据"""asyncwithMysqlUtil()asconn:sql="select * from sdu_power_wave where pid=%s and cal_day=%s"res=awaitconn.fetchone(sql,args=(pid,cal_day))returnresasyncdefquery_sdu_recog_record(pid,start,end):"""根据pid查询用电设备识别结果"""asyncwithMysqlUtil()asconn:sql="select * from sdu_recog_record where pid=%s " \"and recog_dt>=%s and recog_dt<=%s"res=awaitconn.fetchall(sql,args=(pid,start,end))returnres