SELECT
t1.id,index_value as indexValue, t1.time_range AS timeRange,t3.irrigate_name as address,t3.id as siteName,
t3.lon,t3.lat,t1.time_type as timeType
FROM
grid_index_pai_value_primary t1
LEFT JOIN grid_setting t2 on t1.grid_setting_id = t2.id
LEFT JOIN hq_point t3 on t2.grid_id = t3.grid_id
WHERE t3.grid_id is not null and t1.time_type = #{timeType}
and #{endDate} >= index_date and index_date >= #{startDate}