left join (select meet_id,count(id) num from ajh_meeting_send where send_status = 1 GROUP BY meet_id) s1 on s1.meet_id = m.id
left join (select meet_id,count(id) num from ajh_meeting_send GROUP BY meet_id) s2 on s2.meet_id = m.id
left join (select DISTINCT sa.meet_id,ma.num from ajh_meeting_send sa left join (select meets_id,count(id) num from ajh_meeting_attend GROUP BY meets_id) ma on ma.meets_id = sa.id) a on a.meet_id = s2.meet_id
WHERE 1 = 1
<iftest="ajhMeeting.departId !=null and ajhMeeting.departId!=''">
AND depart_id = #{ajhMeeting.departId}
AND m.depart_id = #{ajhMeeting.departId}
</if>
<iftest="ajhMeeting.sendStatus !=null and ajhMeeting.sendStatus!=''">
AND send_status = #{ajhMeeting.sendStatus}
AND m.send_status = #{ajhMeeting.sendStatus}
</if>
<iftest="ajhMeeting.meetTitile !=null and ajhMeeting.meetTitile!=''">
AND meet_titile LIKE CONCAT(CONCAT('%', #{ajhMeeting.meetTitile}),'%')
AND m.meet_titile LIKE CONCAT(CONCAT('%', #{ajhMeeting.meetTitile}),'%')
</if>
<iftest="ajhMeeting.startTime !=null and ajhMeeting.endTime!=''">
AND start_time between #{ajhMeeting.startTime} and #{ajhMeeting.endTime}
AND m.start_time between #{ajhMeeting.startTime} and #{ajhMeeting.endTime}
</if>
<iftest="ajhMeeting.meetCategory !=null and ajhMeeting.meetCategory!=''">