test.py 526 B

1234567891011121314151617181920
  1. # 获取数据
  2. import sys
  3. from LIB.BACKEND import DBManager
  4. from LIB.BACKEND import DataPreProcess
  5. dataPrePro = DataPreProcess.DataPreProcess()
  6. sn = "MGMCLN750N215N097"
  7. st = '2022-01-01 00:00:00'
  8. et = '2022-03-01 00:00:00'
  9. dbManager = DBManager.DBManager()
  10. df_data = dbManager.get_data(sn=sn, start_time=st, end_time=et, data_groups=['bms', 'gps', 'accum', 'system'])
  11. #
  12. df_bms = df_data['bms']
  13. df_gps = df_data['gps']
  14. df_accum = df_data['accum']
  15. df_system = df_data['system']
  16. df_bms = dataPrePro.data_fault_tag(sn,df_bms)