|
@@ -39,7 +39,7 @@ def diag_cal():
|
|
|
tablename2='all_fault_info'
|
|
|
DBRead = DBDw.DBDownload(host, port, db, user, password,mode)
|
|
|
with DBRead as DBRead:
|
|
|
- df_Diag_Ram = DBRead.getdata('start_time','end_time','product_id','code','level','info','advice','Batpos',tablename=tablename2,factory='骑享',sn='',timename='',st='',sp='')
|
|
|
+ df_Diag_Ram = DBRead.getdata('start_time','end_time','product_id','code','level','info','advice','Batpos',tablename=tablename2,factory='',sn='',timename='',st='',sp='')
|
|
|
df_Diag_Ram=df_Diag_Ram.dropna(how='any')
|
|
|
df_Diag_Ram=df_Diag_Ram.reset_index(drop=True)
|
|
|
|
|
@@ -105,13 +105,14 @@ def diag_cal():
|
|
|
CellFltInfo = df_Diag_Ram_sn.drop('Batpos',axis=1)
|
|
|
#获取当前故障电池的历史故障信息↑↑↑↑↑↑↑↑↑↑↑.......................................................................................................................................
|
|
|
if not df_bms.empty:
|
|
|
- df_Diag_Batdiag_update_xq=SamplingSafty.main(sn,param,df_bms,CellFltInfo)#学琦计算故障
|
|
|
- df_Diag_Batdiag_update_xq2=CtrlSafty.main(sn,param,df_bms,df_Diag_Batdiag_update_xq)
|
|
|
+ df_Diag_Batdiag_update_xq=SamplingSafty.main(sn,param,df_bms,CellFltInfo)#采样安全
|
|
|
+ df_Diag_Batdiag_update_xq2=CtrlSafty.main(sn,param,df_bms,df_Diag_Batdiag_update_xq)#控制安全
|
|
|
batDiag=CBMSBatDiag.BatDiag(sn,celltype,df_bms, df_soh, df_uniform, df_Diag_Batdiag_update_xq2)#鹏飞计算
|
|
|
df_Diag_Batdiag_update=batDiag.diag()
|
|
|
# df_Diag_Batdiag_update=BatDiag.diag()
|
|
|
else:
|
|
|
df_Diag_Batdiag_update_xq=DataFrame(columns=['start_time','end_time','product_id','code','level','info','advice','Batpos'])
|
|
|
+ df_Diag_Batdiag_update_xq2=DataFrame(columns=['start_time','end_time','product_id','code','level','info','advice','Batpos'])
|
|
|
df_Diag_Batdiag_update=DataFrame(columns=['start_time','end_time','product_id','code','level','info','advice','Batpos'])
|
|
|
df_Diag_Ram_add,df_Diag_Ram_Update=DiagDataMerge.DetaMerge(df_Diag_Ram_sn,df_Diag_Batdiag_update,df_OprtnSta,df_Diag_Ram_sn_else)
|
|
|
task_on=0
|
|
@@ -203,7 +204,6 @@ def DaTa_Sta_Minutes_Task():
|
|
|
DBRead=DBDw.DBDownload(host, port, db, user, password,mode)
|
|
|
with DBRead as DBRead:
|
|
|
df_fltinfo=DBRead.getdata('product_id','level','code','start_time','batpos',tablename=tablename1,factory=factory_info[j],sn='',timename='',st='',sp='')#dbdownload经过了改编
|
|
|
- print(df_fltinfo)
|
|
|
FltAlarmInfo,Celltype=DataSta.SaftyWarningSta(df_fltinfo,start_time,end_time)
|
|
|
SatftyCount=DataSta.SftyWrngClsfy(df_fltinfo)
|
|
|
MaxAccumAh,TotalAccumAh,MaxCycle,MaxRunningHour,TotalRunHour=DataSta.AccumInfo(df_last_accum,df_FirstDataTime,end_time)
|