updated metertracking report by adding point type condition to meter point query string

pull/41/head
13621160019@163.com 2021-05-03 18:33:08 +08:00
parent 2ae9fca00f
commit cefeef57db
1 changed files with 3 additions and 2 deletions

View File

@ -150,8 +150,9 @@ class Reporting:
################################################################################################################ ################################################################################################################
for meter_id in meter_dict: for meter_id in meter_dict:
cursor_system_db.execute(" SELECT point_id " cursor_system_db.execute(" SELECT point_id "
" FROM tbl_meters_points " " FROM tbl_meters_points mp, tbl_points p"
" WHERE meter_id = %s ", (meter_id, )) " WHERE p.id = mp.point_id AND p.object_type = 'ENERGY_VALUE' "
" AND meter_id = %s ", (meter_id, ))
rows_points_id = cursor_system_db.fetchall() rows_points_id = cursor_system_db.fetchall()