`id`,`tenant_id`,`parent_tenant_id`,`meter_id`,`box_id`,`address`,`total_power`,`device_time`,`create_time`,`used_power`,`last_device_time`,`last_total_power` where 1 = 1 and `id` = #{id} and `tenant_id` = #{tenantId} and `parent_tenant_id` = #{parentTenantId} and `box_id` = #{boxId} and `meter_id` = #{meterId} and `address` = #{address} and `total_power` is not null and id in #{idItem} order by ${sortColumns} where 1 = 1 and `tenant_id` = #{tenantId} and `parent_tenant_id` = #{parentTenantId} and `box_id` = #{boxId} and `meter_id` = #{meterId} and `address` = #{address} and `create_time` between #{startTime} and #{endTime} and date_format(`create_time`, '%Y-%m-%d %H:00') = #{reportTime} and date_format(`create_time`, '%Y-%m-%d') = #{reportTime} and date_format(`create_time`, '%Y-%m') = #{reportTime} and date_format(`create_time`, '%Y') = #{reportTime} and date_format(`create_time`, '%Y-%m') = #{reportTime}