import CBMSBatUniform import datetime import pandas as pd import datetime from USER.alibaba.Common import DBDownload from USER.alibaba.Common import log if __name__ == "__main__": SNnums= ['HUATING01'] end_time=datetime.datetime.now()-datetime.timedelta(seconds=10) start_time=end_time-datetime.timedelta(seconds=12000) start_time=start_time.strftime('%Y-%m-%d %H:%M:%S') end_time=end_time.strftime('%Y-%m-%d %H:%M:%S') #log信息配置............................................................................................................................................................................ mylog=log.Mylog('log_uniform.txt','error') mylog.logcfg() for sn in SNnums: try: # if 'PK500' in sn: # celltype=1 #6040三元电芯 # elif 'PK502' in sn: # celltype=2 #4840三元电芯 # elif 'PK504' in sn: # celltype=99 #60ah林磷酸铁锂电芯 # elif 'MGMLXN750' in sn: # celltype=3 #力信50ah三元电芯 # elif 'MGMCLN750' in sn: # celltype=4 #CATL 50ah三元电芯 # else: # print('未找到对应电池编号!!!\n',sn) # # sys.exit() celltype=2 #............................................................读取原始数据库数据........................................................................... df_bms= pd.read_excel(r'D:\00WorkSpace\01Python\data_analyze_platform\USER\alibaba\98Download\18650-SOH原始数据.xlsx') #..............................................................计算一致性.............................................................................. BatUniform=CBMSBatUniform.BatUniform(sn,celltype,df_bms) df_res=BatUniform.batuniform() df_res.to_excel(r'D:\00WorkSpace\01Python\data_analyze_platform\USER\alibaba\99Result\\'+'CBMS_Uniform'+sn+'_1.xlsx') # print('done!!!') except IndexError as e: print(repr(e)) mylog.logopt(sn,e) pass