Ver código fonte

Merge branch 'dev' of http://git.fast-fun.cn:92/lmstack/data_analyze_platform into dev

qingfeng 3 anos atrás
pai
commit
4b2227d584

+ 19 - 0
LIB/MIDDLE/CellStateEstimation/Common/BatParam.py

@@ -93,6 +93,25 @@ class BatParam:
             self.LookTab_SOC = [0.00, 	2.40, 	6.38, 	10.37, 	14.35, 	18.33, 	22.32, 	26.30, 	30.28, 	35.26, 	40.24, 	45.22, 	50.20, 	54.19, 	58.17, 	60.16, 	65.14, 	70.12, 	75.10, 	80.08, 	84.06, 	88.05, 	92.03, 	96.02, 	100.00]
             self.LookTab_OCV = [2.7151,	3.0298,	3.1935,	3.2009,	3.2167,	3.2393,	3.2561,	3.2703,	3.2843,	3.2871,	3.2874,	3.2868,	3.2896,	3.2917,	3.2967,	3.3128,	3.3283,	3.3286,	3.3287,	3.3288,	3.3289,	3.3296,	3.3302,	3.3314,	3.3429]
         
+        elif celltype==100:
+            self.Capacity = 228*2
+            self.PackFullChrgVolt=3.65*192
+            self.CellFullChrgVolt=3.5
+            self.OcvInflexionBelow=3.285
+            self.OcvInflexion2=3.296
+            self.OcvInflexion3=3.328
+            self.OcvInflexionAbove=3.4
+            self.CellVoltNums=384
+            self.CellTempNums=64
+            self.FullChrgSoc=98
+            self.PeakSoc=59
+            self.PeakVoltLowLmt=3.35
+            self.PeakVoltUpLmt=3.4
+            self.PeakCellVolt=[3.362,3.363,3.365,3.366,3.367]
+            self.PackCrntDec=1
+            self.BalCurrent=0.015
+            self.LookTab_SOC = [0.00, 	2.40, 	6.38, 	10.37, 	14.35, 	18.33, 	22.32, 	26.30, 	30.28, 	35.26, 	40.24, 	45.22, 	50.20, 	54.19, 	58.17, 	60.16, 	65.14, 	70.12, 	75.10, 	80.08, 	84.06, 	88.05, 	92.03, 	96.02, 	100.00]
+            self.LookTab_OCV = [2.7151,	3.0298,	3.1935,	3.2009,	3.2167,	3.2393,	3.2561,	3.2703,	3.2843,	3.2871,	3.2874,	3.2868,	3.2896,	3.2917,	3.2967,	3.3128,	3.3283,	3.3286,	3.3287,	3.3288,	3.3289,	3.3296,	3.3302,	3.3314,	3.3429]
         else:
             print('未找到对应电池编号!!!')
             # sys.exit()

+ 1 - 1
LIB/MIDDLE/CellStateEstimation/Common/V1_0_1/log.py

@@ -17,7 +17,7 @@ class Mylog:
                 Level=logging.WARNING
             else:
                 Level=logging.ERROR
-        logging.basicConfig(filename=r'D:\Platform\platform_python\data_analyze_platform\USER\spf\101log\\'+self.name, level=Level,format='%(asctime)s - %(levelname)s - %(message)s')
+        logging.basicConfig(filename=r'D:\ZLWORK\code\data_analyze_platform\USER\eric\\'+self.name, level=Level,format='%(asctime)s - %(levelname)s - %(message)s')
 
 
     def logopt(self,*info):

+ 19 - 1
LIB/MIDDLE/SaftyCenter/Common/QX_BatteryParam.py

@@ -113,7 +113,25 @@ class BatteryInfo():
             self.CantChrgVol=2.6
  
 
-
+        elif celltype==100:
+            self.Capacity = 228*2
+            self.PackFullChrgVolt=3.65*192
+            self.CellFullChrgVolt=3.5
+            self.OcvInflexionBelow=3.285
+            self.OcvInflexion2=3.296
+            self.OcvInflexion3=3.328
+            self.OcvInflexionAbove=3.4
+            self.CellVoltNums=384
+            self.CellTempNums=64
+            self.FullChrgSoc=98
+            self.PeakSoc=59
+            self.PeakVoltLowLmt=3.35
+            self.PeakVoltUpLmt=3.4
+            self.PeakCellVolt=[3.362,3.363,3.365,3.366,3.367]
+            self.PackCrntDec=1
+            self.BalCurrent=0.015
+            self.LookTab_SOC = [0.00, 	2.40, 	6.38, 	10.37, 	14.35, 	18.33, 	22.32, 	26.30, 	30.28, 	35.26, 	40.24, 	45.22, 	50.20, 	54.19, 	58.17, 	60.16, 	65.14, 	70.12, 	75.10, 	80.08, 	84.06, 	88.05, 	92.03, 	96.02, 	100.00]
+            self.LookTab_OCV = [2.7151,	3.0298,	3.1935,	3.2009,	3.2167,	3.2393,	3.2561,	3.2703,	3.2843,	3.2871,	3.2874,	3.2868,	3.2896,	3.2917,	3.2967,	3.3128,	3.3283,	3.3286,	3.3287,	3.3288,	3.3289,	3.3296,	3.3302,	3.3314,	3.3429]
 
 
         else:

+ 1 - 1
LIB/MIDDLE/SaftyCenter/DataDiag_Static/CBMSBatDiag.py

@@ -274,7 +274,7 @@ class BatDiag:
             #电流过流诊断.......................................................................................................................
             step=(self.bmstime[i]-self.bmstime[i-1]).total_seconds()
             if step<120 and self.packcrnt[i]>self.param.PackDisOc:
-                as_dis=as_dis+(self.packcrnt[i]-self.param.self.PackDisOc)*step    #ah累计
+                as_dis=as_dis+(self.packcrnt[i]-self.param.PackDisOc)*step    #ah累计
             elif step<120 and self.packcrnt[i]<self.param.PackChgOc:
                 as_chg=as_chg+(self.param.PackDisOc-self.packcrnt[i])*step    #ah累计
             else:

+ 3 - 2
LIB/MIDDLE/SaftyCenter/DataDiag_Static/DataStatistics.py

@@ -38,6 +38,7 @@ class DataSta():
         PK500FltData_Count=len(df_fltinfo[df_fltinfo['product_id'].str.contains('PK500')])
         MGMCLFltData_Count=len(df_fltinfo[df_fltinfo['product_id'].str.contains('MGMCL')])
         MGMLXFltData_Count=len(df_fltinfo[df_fltinfo['product_id'].str.contains('MGMLX')])
+        TJMCLFltData_Count=len(df_fltinfo[df_fltinfo['product_id'].str.contains('TJMCL')])
         # print('总报警数=',SftyPlt_Data_Total)
         # print('总完成运维数=',CS_Warning_Total_Finish_Count)
         # print('周报警数=',SftyPlt_Data_day)
@@ -52,9 +53,9 @@ class DataSta():
         # print('格林美总报警=',MGMCLFltData_Count)
         # print('自研总报警=',MGMLXFltData_Count)
         FltAlarmInfo=DataFrame(columns=['SftyPlt_Data_Total','CS_Warning_Total_Finish_Count','SftyPlt_Data_day','CS_Warning_day_Finish_Count','SftyPlt_EmgcyData_day','SftyPlt_EmgcyData_day_Finish_Count','OprationManageRate','OprationManageEmgcyRate'])
-        Celltype=DataFrame(columns=['PK504','PK502','PK500','MGMCL','MGMLX'])
+        Celltype=DataFrame(columns=['PK504','PK502','PK500','MGMCL','MGMLX','TJMCL'])
         FltAlarmInfo.loc[0]=[SftyPlt_Data_Total,CS_Warning_Total_Finish_Count,SftyPlt_Data_day,CS_Warning_day_Finish_Count,SftyPlt_EmgcyData_day_Count,SftyPlt_EmgcyData_day_Finish_Count,OprationManageRate,OprationManageEmgcyRate]
-        Celltype.loc[0]=[PK504FltData_Count,PK502FltData_Count,PK500FltData_Count,MGMCLFltData_Count,MGMLXFltData_Count]
+        Celltype.loc[0]=[PK504FltData_Count,PK502FltData_Count,PK500FltData_Count,MGMCLFltData_Count,MGMLXFltData_Count,TJMCLFltData_Count]
         return FltAlarmInfo,Celltype
     def WeekInfoSta(df_fltinfo,start_time,end_time):
         df_fltinfo=df_fltinfo[df_fltinfo['start_time']>=start_time]

+ 86 - 76
LIB/MIDDLE/SaftyCenter/DataDiag_Static/main.py

@@ -40,9 +40,8 @@ def diag_cal():
     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=df_Diag_Ram.dropna(how='any')
     
-
-    print('起',len(df_Diag_Ram))
     for sn in SNnums:#SN遍历
         print(sn)
         if 'PK500' in sn:
@@ -55,6 +54,8 @@ def diag_cal():
             celltype=3 #力信50ah三元电芯
         elif 'MGMCLN750' or 'UD' in sn: 
             celltype=4 #CATL 50ah三元电芯
+        elif 'TJMCL'in sn:
+            celltype=100 #CATL 50ah三元电芯
         else:
             print('SN:{},未找到对应电池类型!!!'.format(sn))
             continue
@@ -64,7 +65,7 @@ def diag_cal():
         dbManager = DBManager.DBManager()
         df_data = dbManager.get_data(sn=sn, start_time=start_time, end_time=end_time, data_groups=['bms'])
         df_bms = df_data['bms']
-
+        df_bms=df_bms.dropna(how='any')
         #读取结果数据库数据........................................................................................................................................................
         host='rm-bp10j10qy42bzy0q77o.mysql.rds.aliyuncs.com'
         port=3306
@@ -116,8 +117,8 @@ def diag_cal():
 #.................................统计程序...............................
 def DaTa_Sta_Week_Task():
     task_on=1
+    factory_info=['骑享','金茂换电']
     all_period_fault_info=DataFrame(columns=['factory','week','level1_count','level2_count','level3_count','level4_count','level5_count','solve_rate'])
-    #............................获取数据................................
     toweek='Week'+time.strftime('%W')
     host='rm-bp10j10qy42bzy0q77o.mysql.rds.aliyuncs.com'
     port=3306
@@ -128,28 +129,32 @@ def DaTa_Sta_Week_Task():
     tablename1='all_fault_info'
     DBRead=DBDw.DBDownload(host, port, db, user, password,mode)
     with DBRead as DBRead:
-        df_fltinfo=DBRead.getdata('product_id','level','code','start_time','end_time','batpos',tablename=tablename1,factory='骑享',sn='',timename='',st='',sp='')#dbdownload经过了改编
-    #............................获取时间................................      
-    end_time=datetime.datetime.now()
-    # end_time=datetime.datetime.strptime(end_time,'%Y-%m-%d')
-    start_time_week=end_time-datetime.timedelta(days=7)
-    start_time_week=start_time_week.strftime('%Y-%m-%d')
-    end_time=end_time.strftime('%Y-%m-%d')
-    FltAlarmInfo,Celltype=DataSta.SaftyWarningSta(df_fltinfo,start_time_week,end_time)
-    FaultLvlCount=DataSta.WeekInfoSta(df_fltinfo,start_time_week,end_time)
-    for i in range(1,6):
-        if not FaultLvlCount[FaultLvlCount['level']==i]['product_id'].empty:
-            all_period_fault_info.loc[0,'level'+str(i)+'_count']=int(FaultLvlCount[FaultLvlCount['level']==i]['product_id'].values)
-        else:
-            all_period_fault_info.loc[0,'level'+str(i)+'_count']=int(0)
-    all_period_fault_info.loc[0,'factory']='骑享'
-    all_period_fault_info.loc[0,'week']=toweek
-    all_period_fault_info.loc[0,'solve_rate']=FltAlarmInfo.loc[0,'OprationManageRate']
-    all_period_fault_info.fillna(0,inplace=False)
+        df_fltinfo=DBRead.getdata('product_id','level','code','start_time','end_time','batpos','factory',tablename=tablename1,factory='',sn='',timename='',st='',sp='')#dbdownload经过了改编
+#............................获取数据................................
+    for j in range(0,len(factory_info)):
+        df_fltinfo=df_fltinfo[df_fltinfo['factory']==factory_info[j]]
+        #............................获取时间................................      
+        end_time=datetime.datetime.now()
+        # end_time=datetime.datetime.strptime(end_time,'%Y-%m-%d')
+        start_time_week=end_time-datetime.timedelta(days=7)
+        start_time_week=start_time_week.strftime('%Y-%m-%d')
+        end_time=end_time.strftime('%Y-%m-%d')
+        FltAlarmInfo,Celltype=DataSta.SaftyWarningSta(df_fltinfo,start_time_week,end_time)
+        FaultLvlCount=DataSta.WeekInfoSta(df_fltinfo,start_time_week,end_time)
+        for i in range(1,6):
+            if not FaultLvlCount[FaultLvlCount['level']==i]['product_id'].empty:
+                all_period_fault_info.loc[j,'level'+str(i)+'_count']=int(FaultLvlCount[FaultLvlCount['level']==i]['product_id'].values)
+            else:
+                all_period_fault_info.loc[j,'level'+str(i)+'_count']=int(0)
+        all_period_fault_info.loc[j,'factory']=factory_info[j]
+        all_period_fault_info.loc[j,'week']=toweek
+        all_period_fault_info.loc[j,'solve_rate']=FltAlarmInfo.loc[0,'OprationManageRate']
+        all_period_fault_info.fillna(0,inplace=False)
 
-    task_on=0
+        task_on=0
 def DaTa_Sta_Minutes_Task():
     task_on=1
+    factory_info=['骑享','金茂换电']
     #............................获取数据................................
     host='172.16.121.236'
     port=3306
@@ -177,16 +182,7 @@ def DaTa_Sta_Minutes_Task():
         df_FirstDataTime=DBRead.getdata('sn','first_data_time',tablename=tablename2,factory='',sn='',timename='',st='',sp='')#dbdownload经过了改编
         
         
-    host='rm-bp10j10qy42bzy0q77o.mysql.rds.aliyuncs.com'
-    port=3306
-    db='safety_platform'
-    user='qx_algo_readonly'
-    password='qx@123456'
-    mode=2
-    tablename1='all_fault_info'
-    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='骑享',sn='',timename='',st='',sp='')#dbdownload经过了改编
+
     #............................获取时间................................
     end_time=datetime.datetime.now()
     # end_time=datetime.datetime.strptime(end_time,'%Y-%m-%d')
@@ -194,48 +190,61 @@ def DaTa_Sta_Minutes_Task():
     start_time=start_time.strftime('%Y-%m-%d')
     end_time=end_time.strftime('%Y-%m-%d')
     #............................执行程序................................
-    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)
-    all_location_info=DataSta.FltBatPosition(df_last_pos,df_fltinfo)
-
     all_statistic_info=DataFrame(columns=['factory','total_alarm','alarm_total_today','alarm_not_close_today','alarm_close_today','alarm_uregent_total_today','alarm_uregent_close_today','alarm_uregent_not_close_today','alarm_close_total','run_time_total','dischrg_total','odo_total','max_dischrg_one','max_runtime_one','max_cycle_one','max_odo_one','alarm_close_total','alarm_total','cell_type','cell_type_count','cell_safety_risk_count','data_safety_risk_count','status_safety_risk_count','hv_safety_risk_count','system_safety_risk_count','sample_safety_risk_count','controller_safety_risk_count','design_safety_risk_count'])
-    all_statistic_info.loc[0,'factory']='骑享'
-    all_statistic_info.loc[0,'total_alarm']=FltAlarmInfo.loc[0,'SftyPlt_Data_Total']
-    all_statistic_info.loc[0,'alarm_total_today']=FltAlarmInfo.loc[0,'SftyPlt_Data_day']
-    all_statistic_info.loc[0,'alarm_close_today']=FltAlarmInfo.loc[0,'CS_Warning_day_Finish_Count']
-    all_statistic_info.loc[0,'alarm_not_close_today']=FltAlarmInfo.loc[0,'SftyPlt_Data_day']-FltAlarmInfo.loc[0,'CS_Warning_day_Finish_Count']
-    all_statistic_info.loc[0,'alarm_uregent_total_today']=FltAlarmInfo.loc[0,'SftyPlt_EmgcyData_day']
-    all_statistic_info.loc[0,'alarm_uregent_close_today']=FltAlarmInfo.loc[0,'SftyPlt_EmgcyData_day_Finish_Count']
-    all_statistic_info.loc[0,'alarm_uregent_not_close_today']=FltAlarmInfo.loc[0,'SftyPlt_EmgcyData_day']-FltAlarmInfo.loc[0,'SftyPlt_EmgcyData_day_Finish_Count']
-    all_statistic_info.loc[0,'run_time_total']=TotalRunHour
-    all_statistic_info.loc[0,'dischrg_total']=TotalAccumAh
-    all_statistic_info.loc[0,'odo_total']=0
-    all_statistic_info.loc[0,'max_dischrg_one']=MaxAccumAh
-    all_statistic_info.loc[0,'max_runtime_one']=MaxRunningHour
-    all_statistic_info.loc[0,'max_cycle_one']=MaxCycle
-    all_statistic_info.loc[0,'max_odo_one']=0
-    all_statistic_info.loc[0,'alarm_close_total']=FltAlarmInfo.loc[0,'CS_Warning_Total_Finish_Count']
-    all_statistic_info.loc[0,'alarm_total']=FltAlarmInfo.loc[0,'SftyPlt_Data_Total']
-    CellType=Celltype.columns.tolist()
-    CellType=','.join(CellType) 
-    all_statistic_info.loc[0,'cell_type']=str(CellType)
-    CellTypeCount=Celltype.loc[0].tolist()
-    CellTypeCount=[str(x) for x in CellTypeCount]
-    CellTypeCount=','.join(CellTypeCount) 
-    all_statistic_info.loc[0,'cell_type_count']=str(CellTypeCount)
-    all_statistic_info.loc[0,'cell_safety_risk_count']=SatftyCount.loc[0,'CellSaftyCount']
-    all_statistic_info.loc[0,'data_safety_risk_count']=SatftyCount.loc[0,'DataSaftyCodeCount']
-    all_statistic_info.loc[0,'status_safety_risk_count']=SatftyCount.loc[0,'StateSaftyCodeCount']
-    all_statistic_info.loc[0,'hv_safety_risk_count']=SatftyCount.loc[0,'HvSaftyCodeCount']
-    all_statistic_info.loc[0,'system_safety_risk_count']=SatftyCount.loc[0,'SysSaftyCodeCount']
-    all_statistic_info.loc[0,'sample_safety_risk_count']=SatftyCount.loc[0,'SamplingSatyCount']
-    all_statistic_info.loc[0,'controller_safety_risk_count']=SatftyCount.loc[0,'CtrlSaftyCodeCount']
-    all_statistic_info.loc[0,'design_safety_risk_count']=SatftyCount.loc[0,'DsnSaftyCodeCount']
-    end=time.time()
-    print(end-start)
-    task_on=0
+    for j in range(0,len(factory_info)):
+        host='rm-bp10j10qy42bzy0q77o.mysql.rds.aliyuncs.com'
+        port=3306
+        db='safety_platform'
+        user='qx_algo_readonly'
+        password='qx@123456'
+        mode=2
+        tablename1='all_fault_info'
+        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)
+        all_location_info=DataSta.FltBatPosition(df_last_pos,df_fltinfo)
 
+       
+        all_statistic_info.loc[j,'factory']=factory_info[j]
+        all_statistic_info.loc[j,'total_alarm']=FltAlarmInfo.loc[0,'SftyPlt_Data_Total']
+        all_statistic_info.loc[j,'alarm_total_today']=FltAlarmInfo.loc[0,'SftyPlt_Data_day']
+        all_statistic_info.loc[j,'alarm_close_today']=FltAlarmInfo.loc[0,'CS_Warning_day_Finish_Count']
+        all_statistic_info.loc[j,'alarm_not_close_today']=FltAlarmInfo.loc[0,'SftyPlt_Data_day']-FltAlarmInfo.loc[0,'CS_Warning_day_Finish_Count']
+        all_statistic_info.loc[j,'alarm_uregent_total_today']=FltAlarmInfo.loc[0,'SftyPlt_EmgcyData_day']
+        all_statistic_info.loc[j,'alarm_uregent_close_today']=FltAlarmInfo.loc[0,'SftyPlt_EmgcyData_day_Finish_Count']
+        all_statistic_info.loc[j,'alarm_uregent_not_close_today']=FltAlarmInfo.loc[0,'SftyPlt_EmgcyData_day']-FltAlarmInfo.loc[0,'SftyPlt_EmgcyData_day_Finish_Count']
+        all_statistic_info.loc[j,'run_time_total']=TotalRunHour
+        all_statistic_info.loc[j,'dischrg_total']=TotalAccumAh
+        all_statistic_info.loc[j,'odo_total']=0
+        all_statistic_info.loc[j,'max_dischrg_one']=MaxAccumAh
+        all_statistic_info.loc[j,'max_runtime_one']=MaxRunningHour
+        all_statistic_info.loc[j,'max_cycle_one']=MaxCycle
+        all_statistic_info.loc[j,'max_odo_one']=0
+        all_statistic_info.loc[j,'alarm_close_total']=FltAlarmInfo.loc[0,'CS_Warning_Total_Finish_Count']
+        all_statistic_info.loc[j,'alarm_total']=FltAlarmInfo.loc[0,'SftyPlt_Data_Total']
+        CellType=Celltype.columns.tolist()
+        CellType=','.join(CellType) 
+        all_statistic_info.loc[0,'cell_type']=str(CellType)
+        CellTypeCount=Celltype.loc[0].tolist()
+        CellTypeCount=[str(x) for x in CellTypeCount]
+        CellTypeCount=','.join(CellTypeCount) 
+        all_statistic_info.loc[j,'cell_type_count']=str(CellTypeCount)
+        all_statistic_info.loc[j,'cell_safety_risk_count']=SatftyCount.loc[0,'CellSaftyCount']
+        all_statistic_info.loc[j,'data_safety_risk_count']=SatftyCount.loc[0,'DataSaftyCodeCount']
+        all_statistic_info.loc[j,'status_safety_risk_count']=SatftyCount.loc[0,'StateSaftyCodeCount']
+        all_statistic_info.loc[j,'hv_safety_risk_count']=SatftyCount.loc[0,'HvSaftyCodeCount']
+        all_statistic_info.loc[j,'system_safety_risk_count']=SatftyCount.loc[0,'SysSaftyCodeCount']
+        all_statistic_info.loc[j,'sample_safety_risk_count']=SatftyCount.loc[0,'SamplingSatyCount']
+        all_statistic_info.loc[j,'controller_safety_risk_count']=SatftyCount.loc[0,'CtrlSaftyCodeCount']
+        all_statistic_info.loc[j,'design_safety_risk_count']=SatftyCount.loc[0,'DsnSaftyCodeCount']
+        end=time.time()
+        #print(end-start)
+        task_on=0
+    print(all_statistic_info)
 
 
 #...............................................主函数.......................................................................................................................
@@ -258,10 +267,10 @@ if __name__ == "__main__":
     SNnums_C7255=SNdata_C7255['SN号'].tolist()
     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=['TJMCL120502305038','TJMCL120502305032','TJMCL120502305022','TJMCL120502305026','TJMCL120502305032','TJMCL120502305044','TJMCL120502305048','TJMCL120502305012','TJMCL120502305010']
     #SNnums = ['MGMLXN750N218N004'] #SNnums_6040
     
-    mylog=log.Mylog('log_diag.txt','error')
+    mylog=log.Mylog('log.txt','error')
     mylog.logcfg()
     #............................模块运行前,先读取数据库中所有结束时间为0的数据,需要从数据库中读取................
     host='rm-bp10j10qy42bzy0q77o.mysql.rds.aliyuncs.com'
@@ -273,7 +282,8 @@ if __name__ == "__main__":
     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','factory',tablename=tablename2,factory='',sn='',timename='',st='',sp='')
+    df_Diag_Ram=df_Diag_Ram.dropna(how='any')
     # result=pd.read_csv(r'D:\Work\Code_write\data_analyze_platform\USER\01Screen_Problem\result.csv',encoding='gbk')
 
     #定时任务.......................................................................................................................................................................