qingfeng 2 years ago
parent
commit
d671e4f33a

+ 2 - 1
LIB/FRONTEND/CellStateEstimation/BatSafetyWarning/deploy.py → LIB/FRONTEND/CellStateEstimation/BatSafetyWarning/deploy_saftywarning.py

@@ -124,6 +124,7 @@ def saftywarning_cal():
                 df_warning_ram_sn1.reset_index(inplace=True,drop=True)     #重置索引
                 df_warning_ram_sn2.reset_index(inplace=True,drop=True)     #重置索引
                 df_warning_ram_sn3.reset_index(inplace=True,drop=True)     #重置索引
+                df_chrgvolt_ram_sn.reset_index(inplace=True,drop=True)
                 if not df_lfp_ram.empty:
                     df_lfp_ram_sn=df_lfp_ram[df_lfp_ram['sn']==sn]
                     df_lfp_ram_sn.reset_index(inplace=True,drop=True)     #重置索引
@@ -203,7 +204,7 @@ def saftywarning_cal():
             if not df_res_chg.empty:
                 df_res_chg['Batpos']=1
                 cursor_platform.execute('''
-                        update all_fault_info set update_time='{}',end_time='{}', Batpos={} where product_id='{}' and code={} and end_time='0000-00-00 00:00:00'
+                        update all_fault_info set update_time='{}',end_time='{}', Batpos={} where product_id='{}' and code='{}' and end_time='0000-00-00 00:00:00'
                         '''.format(datetime.datetime.now(), df_res_chg.iloc[-1]['end_time'], df_res_chg.iloc[-1]['Batpos'],sn, 'C490'))
                 conn_platform.commit()
         except Exception as e:

+ 1 - 1
LIB/FRONTEND/CellStateEstimation/BatSafetyWarning/run.bat

@@ -1,3 +1,3 @@
 cd /d D:\deploy\python_platform\data_analyze_platform\LIB\FRONTEND\CellStateEstimation\BatSafetyWarning
 title cal_batsafetywarning
-D:\env\py_pro\python.exe D:\deploy\python_platform\data_analyze_platform\LIB\FRONTEND\CellStateEstimation\BatSafetyWarning\deploy.py
+D:\env\py_pro\python.exe D:\deploy\python_platform\data_analyze_platform\LIB\FRONTEND\CellStateEstimation\BatSafetyWarning\deploy_saftywarning.py