{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "ename": "", "evalue": "", "output_type": "error", "traceback": [ "\u001b[1;31m运行具有“py3916”的单元格需要ipykernel包。\n", "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n", "\u001b[1;31mCommand: 'conda install -n py3916 ipykernel --update-deps --force-reinstall'" ] } ], "source": [ "from ZlwlAlgosCommon.service.iotp.IotpAlgoService import IotpAlgoService\n", "from ZlwlAlgosCommon.service.iotp.Beans import packageInfo,batteryInfo, gpsInfo\n", "from LIB.BACKEND.ProUtils import SysUtils\n", "sys=SysUtils()\n", "\n", "#-------------------------\n", "cur_env = 'test'# 环境配置 \n", "sn_list=['662CC700048','662CC700015','662CC700019','662CC700040','662CC700041','662CC700050','662CC700053','662CC700060','667CC900002','667CC900001']\n", "start_time='2023-03-13 00:00:00'\n", "end_time='2023-03-14 00:00:00'\n", "#-------------------------\n", "hbase_url,hbase_port=sys.get_hbase(cur_env)\n", "hbase_param = {'host':hbase_url, 'port':hbase_port}\n", "iotp_service = IotpAlgoService(hbase_params=hbase_param)\n", "\n", "columns = [batteryInfo.faultLvl, batteryInfo.faultCode, batteryInfo.packCrnt, batteryInfo.packVolt,\n", " batteryInfo.bmsSta, batteryInfo.cellVoltageCount, batteryInfo.cellTempCount, batteryInfo.cellVoltage, batteryInfo.cellTemp, \n", " batteryInfo.packSoc, batteryInfo.otherTempValue, batteryInfo.balCell,\n", " batteryInfo.packSoh, batteryInfo.chargeSta]\n", "df_data = iotp_service.get_data(sn_list=sn_list, columns=columns, start_time=start_time, end_time=end_time)" ] } ], "metadata": { "kernelspec": { "display_name": "base", "language": "python", "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.9.16" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }