Eric412V 3 سال پیش
والد
کامیت
c570821e21
2فایلهای تغییر یافته به همراه4 افزوده شده و 5 حذف شده
  1. 2 3
      LIB/MIDDLE/SaftyCenter/DataDiag_Static/SC_CtrlSafty.py
  2. 2 2
      LIB/MIDDLE/SaftyCenter/DataDiag_Static/main.py

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

@@ -48,9 +48,9 @@ class CtrlSafty:
             OtherTempNum=['其他温度'+str(i) for i in range(1,param.OtherTempNums+1)]
         
         CellTempMax=bms_info[bms_info[CellTempNum]>(param.CellMaxUSBTemp-5)]
-        CellTempMax=CellTempMax[CellTempMax<(param.CellMaxUSBTemp+5)]
+        CellTempMax=CellTempMax[CellTempMax<(param.CellMaxUSBTemp+5)].dropna(axis=0,how='all')
         OtherTempMax=bms_info[bms_info[OtherTempNum]>(param.OtherOTlmt-10)]
-        OtherTempMax=OtherTempMax[OtherTempMax[OtherTempNum]<(param.OtherOTlmt+5)]
+        OtherTempMax=OtherTempMax[OtherTempMax[OtherTempNum]<(param.OtherOTlmt+5)].dropna(axis=0,how='all')
         if len(CellTempMax) and len(OtherTempMax):
             QuitErrCount[57]=0
             if not 57 in df_Diag_Ram['code'].values.tolist():#如果故障发生当前故障中没有该故障,则压入该故障
@@ -70,5 +70,4 @@ class CtrlSafty:
                     pass
             else:
                 pass
-        print(df_Diag_Ram)   
         return df_Diag_Ram

+ 2 - 2
LIB/MIDDLE/SaftyCenter/DataDiag_Static/main.py

@@ -27,7 +27,7 @@ def diag_cal():
     start_time=end_time-datetime.timedelta(seconds=900)#10分钟跑一次,一次取10分钟数据
     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'
@@ -259,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 = ['MGMLXN750N218N004'] #SNnums_6040
+    #SNnums = ['MGMLXN750N218N004'] #SNnums_6040
     
     mylog=log.Mylog('log_diag.txt','error')
     mylog.logcfg()