|
@@ -1,5 +1,8 @@
|
|
|
import CBMSBatDiag
|
|
|
from SC_SamplingSafty import SamplingSafty
|
|
|
+from DataStatistics import DataSta
|
|
|
+from DiagDataMerge import DiagDataMerge
|
|
|
+from SC_CtrlSafty import CtrlSafty
|
|
|
import datetime
|
|
|
import pandas as pd
|
|
|
from LIB.BACKEND import DBManager, Log
|
|
@@ -12,8 +15,6 @@ from pandas.core.frame import DataFrame
|
|
|
import datacompy
|
|
|
from LIB.MIDDLE.SaftyCenter.Common import QX_BatteryParam
|
|
|
from LIB.MIDDLE.SaftyCenter.Common import DBDownload as DBDw
|
|
|
-from DataStatistics import DataSta
|
|
|
-from DiagDataMerge import DiagDataMerge
|
|
|
|
|
|
#...................................电池包电芯安全诊断函数......................................................................................................................
|
|
|
def diag_cal():
|
|
@@ -27,6 +28,8 @@ def diag_cal():
|
|
|
start_time=start_time.strftime('%Y-%m-%d %H:%M:%S')
|
|
|
end_time=end_time.strftime('%Y-%m-%d %H:%M:%S')
|
|
|
|
|
|
+
|
|
|
+
|
|
|
host='rm-bp10j10qy42bzy0q77o.mysql.rds.aliyuncs.com'
|
|
|
port=3306
|
|
|
db='safety_platform'
|
|
@@ -101,7 +104,8 @@ def diag_cal():
|
|
|
#获取当前故障电池的历史故障信息↑↑↑↑↑↑↑↑↑↑↑.......................................................................................................................................
|
|
|
if not df_bms.empty:
|
|
|
df_Diag_Batdiag_update_xq=SamplingSafty.main(sn,param,df_bms,CellFltInfo)#学琦计算故障
|
|
|
- batDiag=CBMSBatDiag.BatDiag(sn,celltype,df_bms, df_soh, df_uniform, df_Diag_Batdiag_update_xq)#鹏飞计算
|
|
|
+ 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:
|
|
@@ -255,7 +259,7 @@ if __name__ == "__main__":
|
|
|
SNnums_U7255=SNdata_U7255['SN号'].tolist()
|
|
|
SNnums=SNnums_L7255 + SNnums_C7255 + SNnums_6040 + SNnums_4840 + SNnums_U7255+ SNnums_6060
|
|
|
# SNnums=['MGMCLN750N215I005','PK504B10100004341','PK504B00100004172','MGMLXN750N2189014']
|
|
|
- #SNnums = ['MGMLXN750N218G006'] #SNnums_6040
|
|
|
+ SNnums = ['MGMLXN750N218N004'] #SNnums_6040
|
|
|
|
|
|
mylog=log.Mylog('log_diag.txt','error')
|
|
|
mylog.logcfg()
|