Browse Source

Merge remote-tracking branch 'origin/dev' into pro

lmstack 3 years ago
parent
commit
530f28ea89

+ 28 - 0
LIB/MIDDLE/SaftyCenter/CellValueDiag/V1_0_0/status_sta.py

@@ -0,0 +1,28 @@
+# 获取数据
+import pandas as pd
+from LIB.BACKEND import DataPreProcess
+
+
+def status_sta(df_bms, df_gps, start_time, charge_count, drive_count, stand_count):
+    dataPrePro = DataPreProcess.DataPreProcess()
+    if not df_bms.empty:
+    # 时间完全相同的数据仅保留一行
+        df_bms_pro, df_gps_pro = dataPrePro.time_filter(df_bms, df_gps)
+
+        # bms数据按照电流和状态分段, 然后在状态分段内部,根据时间跳变继续分段(解决段内数据丢失)
+
+        df_bms_pro = dataPrePro.data_split_by_status(df_bms_pro)
+        df_bms_pro = dataPrePro.data_split_by_time(df_bms_pro)
+
+        if 'charge' in df_bms_pro['data_status'].tolist():
+            charge_count = charge_count + 1
+        elif 'drive' in df_bms_pro['data_status'].tolist():
+            drive_count = drive_count + 1
+        else:
+            stand_count = stand_count + 1
+    else:
+        stand_count = stand_count + 1
+
+    return charge_count, drive_count, stand_count
+    
+    

+ 950 - 0
LIB/MIDDLE/SaftyCenter/CellValueDiag/main.ipynb

@@ -0,0 +1,950 @@
+{
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "### start to get data PK504B10100004341 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 8, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004342 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004344 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004345 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 204, gps_count is 88, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004346 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004347 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 4, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004349 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 7, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004350 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 2, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004351 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004352 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 328, gps_count is 163, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004353 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004354 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004355 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 188, gps_count is 93, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004356 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004357 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 60, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004358 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004359 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 45, gps_count is 12, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004360 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 2, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004361 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 182, gps_count is 89, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004362 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004363 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 339, gps_count is 166, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004364 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 130, gps_count is 62, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004365 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004366 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 323, gps_count is 158, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004367 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004368 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004369 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004370 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 60, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004371 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004372 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004373 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004374 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004376 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 75, gps_count is 34, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004377 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 77, gps_count is 17, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004378 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004379 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 114, gps_count is 54, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004380 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004381 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 60, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004383 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004384 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004385 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004386 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004387 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 9, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004390 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 4, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004391 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004392 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004393 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 268, gps_count is 134, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004394 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004395 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 166, gps_count is 83, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004396 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 173, gps_count is 85, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004397 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 4, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004398 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004399 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004400 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004401 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004402 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004403 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004404 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 150, gps_count is 70, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004405 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 60, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMLXN750N2189031 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004406 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004407 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004408 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 9, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004409 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 84, gps_count is 40, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004410 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 3, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004411 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004412 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004413 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 7, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004414 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004415 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 14, gps_count is 6, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004416 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 2, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004417 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 80, gps_count is 40, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004418 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004419 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004420 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 147, gps_count is 61, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMLXN750N218B019 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 120, gps_count is 122, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004421 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 66, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004422 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004423 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 55, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004424 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004425 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 353, gps_count is 77, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004426 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 9, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004427 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004428 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004429 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 139, gps_count is 68, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004430 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004431 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004432 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004433 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 341, gps_count is 167, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004434 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 239, gps_count is 109, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004435 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 2, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004436 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 134, gps_count is 62, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004437 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data K504B10100004438 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004439 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004441 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004442 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004443 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004444 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004445 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004446 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004447 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004448 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004449 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 8, gps_count is 3, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004450 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004451 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 9, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004452 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004453 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 5, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004454 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 8, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004455 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004456 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004457 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 339, gps_count is 169, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004458 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 60, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004459 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 60, gps_count is 19, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004460 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 60, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004461 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 319, gps_count is 40, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004462 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 262, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004463 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 3, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004464 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004465 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 352, gps_count is 176, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004468 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 58, gps_count is 27, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004469 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 52, gps_count is 14, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004470 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004471 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 3, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004472 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004473 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004474 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 63, gps_count is 29, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004475 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 59, gps_count is 29, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004476 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004477 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 4, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004478 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 4, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004479 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004480 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 85, gps_count is 41, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004481 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 53, gps_count is 25, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004482 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004483 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 229, gps_count is 73, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004484 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004485 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004486 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 58, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004487 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004488 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 214, gps_count is 29, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004489 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004490 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 304, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004491 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 4, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004492 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 227, gps_count is 4, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004493 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 4, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004494 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004495 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004496 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 93, gps_count is 47, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004497 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 4, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004498 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 88, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004499 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 60, gps_count is 7, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK504B10100004500 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 323, gps_count is 158, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK505B00100004166 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK50301A000001018 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data PK50301A000001029 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMLXN750N218C011 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 36, gps_count is 32, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMLXN750N2189029 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 361, gps_count is 121, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMLXN750N21AC017 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 111, gps_count is 101, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data UD02030118B4C0001 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 178, gps_count is 178, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data UD02030118B4C0012 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 6, gps_count is 6, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I034 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 75, gps_count is 75, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I035 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 12, gps_count is 12, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I036 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 7, gps_count is 7, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I037 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 6, gps_count is 6, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I038 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 6, gps_count is 6, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMLXN750N21AC029 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 119, gps_count is 119, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I039 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 190, gps_count is 190, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I040 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 6, gps_count is 6, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I041 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 315, gps_count is 315, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I042 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 6, gps_count is 6, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I043 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 7, gps_count is 7, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data UD02030118B4C0013 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 346, gps_count is 346, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I044 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 12, gps_count is 12, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I045 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 173, gps_count is 173, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I046 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 6, gps_count is 6, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I047 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 10, gps_count is 10, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I048 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 360, gps_count is 360, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I049 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 360, gps_count is 360, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I050 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 6, gps_count is 6, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I051 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 6, gps_count is 6, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I052 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 8, gps_count is 8, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I053 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 8, gps_count is 8, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data UD02030118B4C0014 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 239, gps_count is 239, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I054 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 131, gps_count is 131, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I055 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 12, gps_count is 12, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I056 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 360, gps_count is 360, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I057 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 316, gps_count is 316, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I058 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 8, gps_count is 8, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I059 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 361, gps_count is 361, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I060 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 6, gps_count is 6, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I061 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 9, gps_count is 9, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I062 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 12, gps_count is 12, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I063 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 6, gps_count is 6, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data UD02030118B4C0015 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I064 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 171, gps_count is 171, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I065 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 12, gps_count is 12, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I066 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I067 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 6, gps_count is 6, system_count is 0, accum_count is 0 \n",
+      "\n",
+      "### start to get data MGMCLN750N215I068 from 2021-11-07 22:00:00 to 2021-11-07 23:00:00\n",
+      "# get data from 2021-11-07 22:00:00 to 2021-11-07 23:00:00......... \n",
+      "all data-getting done, bms_count is 0, gps_count is 0, system_count is 0, accum_count is 0 \n",
+      "\n"
+     ]
+    }
+   ],
+   "source": [
+    "# 获取数据\n",
+    "import sys\n",
+    "from LIB.BACKEND import DBManager\n",
+    "import pymysql\n",
+    "import time, datetime\n",
+    "import dateutil.relativedelta\n",
+    "import pandas as pd\n",
+    "from LIB.BACKEND import DataPreProcess\n",
+    "import V1_0_0.status_sta as status_sta\n",
+    "dataPrePro = DataPreProcess.DataPreProcess()\n",
+    "\n",
+    "host='rm-bp10j10qy42bzy0q7.mysql.rds.aliyuncs.com'\n",
+    "port=3306\n",
+    "db='qixiang_oss'\n",
+    "user='qixiang_oss'\n",
+    "password='Qixiang2021'\n",
+    "conn = pymysql.connect(host=host, port=port, user=user, password=password, database=db)\n",
+    "cursor = conn.cursor()\n",
+    "cursor.execute(\"select sn, imei, add_time from app_device\")\n",
+    "res = cursor.fetchall()\n",
+    "df_sn = pd.DataFrame(res, columns=['sn', 'imei', 'add_time'])\n",
+    "df_sn = df_sn.reset_index(drop=True)\n",
+    "\n",
+    "now_time = datetime.datetime.now()\n",
+    "pre_time = now_time + dateutil.relativedelta.relativedelta(hours=-1)#上个月时间\n",
+    "end_time=datetime.datetime.strftime(now_time,\"%Y-%m-%d %H:00:00\")\n",
+    "start_time=datetime.datetime.strftime(pre_time,\"%Y-%m-%d %H:00:00\")\n",
+    "\n",
+    "dbManager = DBManager.DBManager()\n",
+    "charge_count = 0\n",
+    "drive_count = 0\n",
+    "stand_count = 0\n",
+    "for sn in df_sn['sn'].tolist()[0:200]:\n",
+    "\n",
+    "    df_data = dbManager.get_data(sn=sn, start_time=start_time, end_time=end_time, data_groups=['bms', 'gps'])\n",
+    "    # \n",
+    "    df_bms = df_data['bms']\n",
+    "    df_gps = df_data['gps']\n",
+    "    df_result = status_sta.status_sta(df_bms, df_gps, start_time)\n",
+    "    "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 8,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/html": [
+       "<div>\n",
+       "<style scoped>\n",
+       "    .dataframe tbody tr th:only-of-type {\n",
+       "        vertical-align: middle;\n",
+       "    }\n",
+       "\n",
+       "    .dataframe tbody tr th {\n",
+       "        vertical-align: top;\n",
+       "    }\n",
+       "\n",
+       "    .dataframe thead th {\n",
+       "        text-align: right;\n",
+       "    }\n",
+       "</style>\n",
+       "<table border=\"1\" class=\"dataframe\">\n",
+       "  <thead>\n",
+       "    <tr style=\"text-align: right;\">\n",
+       "      <th></th>\n",
+       "      <th>factory</th>\n",
+       "      <th>time</th>\n",
+       "      <th>charge_count</th>\n",
+       "      <th>drive_count</th>\n",
+       "      <th>stand_count</th>\n",
+       "    </tr>\n",
+       "  </thead>\n",
+       "  <tbody>\n",
+       "    <tr>\n",
+       "      <th>0</th>\n",
+       "      <td>骑享</td>\n",
+       "      <td>2021-11-07 22:00:00</td>\n",
+       "      <td>19</td>\n",
+       "      <td>18</td>\n",
+       "      <td>stand_count</td>\n",
+       "    </tr>\n",
+       "  </tbody>\n",
+       "</table>\n",
+       "</div>"
+      ],
+      "text/plain": [
+       "  factory                 time  charge_count  drive_count  stand_count\n",
+       "0      骑享  2021-11-07 22:00:00            19           18  stand_count"
+      ]
+     },
+     "execution_count": 8,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "df_result"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "interpreter": {
+   "hash": "b3ba2566441a7c06988d0923437866b63cedc61552a5af99d1f4fb67d367b25f"
+  },
+  "kernelspec": {
+   "display_name": "Python 3.8.8 64-bit ('base': conda)",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.8.8"
+  },
+  "orig_nbformat": 4
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}

+ 123 - 0
LIB/MIDDLE/WinterCharging/V1_0_1/Data_Analyse2.py

@@ -0,0 +1,123 @@
+from LIB.BACKEND import DBManager
+from LIB.MIDDLE.CellStateEstimation.Common import log
+import datetime
+import pandas as pd
+import numpy as np
+import os   
+from DataPreProcessMGMC import DataPreProcess
+from scipy import stats
+
+#log信息配置
+mylog=log.Mylog('log.txt','error')
+mylog.logcfg()
+
+dbManager = DBManager.DBManager()
+dataSOH = pd.read_excel('sn-20210903.xlsx',sheet_name='MGMC')
+fileNames = dataSOH['sn']
+fileNames = list(fileNames)
+
+data_GMGC=[]
+for k in range(len(fileNames)):
+
+    try:    
+        sn = fileNames[k]
+        df_data = dbManager.get_data(sn=sn, start_time='2021-10-15 00:00:00', end_time='2021-11-06 00:00:00', data_groups='bms')
+        data_bms = df_data['bms']
+        data_bms['sn'] = sn
+        df_sheetCat = DataPreProcess.data_split_by_status(DataPreProcess,data_bms, drive_interval_threshold=120, charge_interval_threshold=300, drive_stand_threshold=120, charge_stand_threshold=300)
+        unique_status_idx = np.unique(df_sheetCat.data_split_by_status.values)
+        data_result = pd.DataFrame()
+        list_result = []
+        for n in unique_status_idx:
+            list_result.append(df_sheetCat[df_sheetCat.data_split_by_status==n]) 
+        
+        maxI=[]
+        modI=[]
+        lenI=[]
+        temp1_start=[]
+        temp2_start=[]
+        temp1_fin=[]
+        temp2_fin=[]
+        time_start=[]
+        time_fin=[]
+        time_drivefin=[]
+        temp1_drivefin=[]
+        temp2_drivefin=[]
+        sn=[]
+        
+        for i in range(1,len(list_result)):
+            if list_result[i]['data_status'].values[0]=='charge':
+            
+                maxI.append(max(list_result[i]['总电流[A]'].values[:10]))
+                modI.append(stats.mode(list_result[i]['总电流[A]'].values[:10])[0][0])
+                lenI.append(len(list_result[i]['总电流[A]'].values))
+                temp1_start.append(list_result[i]['单体温度1'].values[0])
+                temp2_start.append(list_result[i]['单体温度2'].values[0])
+                temp1_fin.append(list_result[i]['单体温度1'].values[-1])
+                temp2_fin.append(list_result[i]['单体温度2'].values[-1])
+                time_start.append(list_result[i]['时间戳'].values[0])
+                time_fin.append(list_result[i]['时间戳'].values[-1])
+                time_drivefin.append(list_result[i-1]['时间戳'].values[0])
+                temp1_drivefin.append(list_result[i-1]['单体温度1'].values[0])
+                temp2_drivefin.append(list_result[i-1]['单体温度2'].values[0])           
+                sn.append(list_result[i]['sn'].values[0])
+        dic={"初始充电电流max":maxI,"初始充电电流mod":modI,"电流长度":lenI,"初始充电温度1":temp1_start,"初始充电温度2":temp2_start,
+            "结束充电温度1":temp1_fin,"结束充电温度2":temp2_fin,"初始充电时间":time_start,
+            "结束充电时间":time_fin,"行驶结束时间":time_drivefin,"行驶结束温度1":temp1_drivefin,
+            "行驶结束温度2":temp2_drivefin,"sn":sn}
+        df_analyse=pd.DataFrame(dic)
+
+        data_analyse=df_analyse[df_analyse['电流长度'].values>5]
+
+        mean_temp1=[]
+        mean_temp2=[]
+        mean_temp3=[]
+        time_diff_stand=[]
+        time_diff_charge=[]
+
+        for i in range(len(data_analyse)):
+            meantemp1=(data_analyse['初始充电温度1'].values[i]+data_analyse['初始充电温度2'].values[i])/2
+            mean_temp1.append(meantemp1)
+            meantemp2=(data_analyse['结束充电温度1'].values[i]+data_analyse['结束充电温度2'].values[i])/2
+            mean_temp2.append(meantemp2)
+            meantemp3=(data_analyse['行驶结束温度1'].values[i]+data_analyse['行驶结束温度2'].values[i])/2
+            mean_temp3.append(meantemp3)
+            td_charge=float(np.diff([data_analyse['初始充电时间'].values[i],data_analyse['结束充电时间'].values[i]])/np.timedelta64(1, 'm'))
+            time_diff_charge.append(td_charge)
+            td_stand=float(np.diff([data_analyse['行驶结束时间'].values[i],data_analyse['初始充电时间'].values[i]])/np.timedelta64(1, 'm'))
+            time_diff_stand.append(td_stand) 
+   
+        data_analyse['初始充电温度']=mean_temp1
+        data_analyse['结束充电温度']=mean_temp2
+        data_analyse['行驶结束温度']=mean_temp3
+        data_analyse['闲置时长']=time_diff_stand
+        data_analyse['充电时长']=time_diff_charge
+
+        diff_temp=[]
+        for i in range(len(data_analyse)):
+            difftemp=data_analyse['结束充电温度'].values[i]-data_analyse['初始充电温度'].values[i]
+            diff_temp.append(difftemp)
+        data_analyse['充电温差']=diff_temp
+
+        data_select=data_analyse[data_analyse['充电时长'].values>5]
+
+        data_select.to_csv('data'+sn+'.csv')
+
+    data_GMGC.append(data_select)
+    data_GMGC.to_csv('dataGMGC.csv')
+
+
+    except Exception as e:
+        print(repr(e))
+        mylog.logopt(sn,e)
+        pass  
+
+
+
+
+
+
+
+
+
+