瀏覽代碼

更新DBDownload,log路径,删除df_file文档

Eric412V 3 年之前
父節點
當前提交
38a40d4ee1
共有 3 個文件被更改,包括 3 次插入1 次删除
  1. 1 1
      LIB/MIDDLE/CellStateEstimation/Common/V1_0_1/log.py
  2. 2 0
      LIB/MIDDLE/SaftyCenter/Common/DBDownload.py
  3. 二進制
      df_file.xlsx

+ 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:\Work\Code_write\data_analyze_platform\USER\lzx\SaftyCenter_CODE_V1_1_DIDI\\'+self.name, level=Level,format='%(asctime)s - %(levelname)s - %(message)s')
+        logging.basicConfig(filename=r'D:\ZLWORK\code\data_analyze_platform\USER\liuzhongxiao\diagfault\\'+self.name, level=Level,format='%(asctime)s - %(levelname)s - %(message)s')
 
     def logopt(self,*info):
         logging.error(info)

+ 2 - 0
LIB/MIDDLE/SaftyCenter/Common/DBDownload.py

@@ -51,6 +51,8 @@ class DBDownload:
             self.cursor.execute("select %s from %s where factory='%s'" %(str,tablename,factory))
         elif self.mode==3:
             self.cursor.execute("select %s from %s" %(str,tablename))
+        elif self.mode==4:
+            self.cursor.execute("select %s from %s where qrcode='%s' order by id desc limit 1" %(str,tablename,sn))
         res = self.cursor.fetchall()
         df_res = pd.DataFrame(res, columns=param)
         df_res = df_res.reset_index(drop=True)

二進制
df_file.xlsx