本周 YEARWEEK()
//checkDate检查时间在本周的,此条
select IFNULL(count(0),0) as week
from check_event where projectId = #{projectId}
<if test="bidsectionId != null and bidsectionId != 0">
and bidSectionId = #{bidsectionId}
</if>
and YEARWEEK(DATE_FORMAT(checkDate,'%Y-%m-%d'),1)=YEARWEEK(NOW(),1)
本日 TO_DAYS()
select IFNULL(count(0),0) as today
from check_event where projectId = #{projectId}
<if test="bidsectionId != null and bidsectionId != 0">
and bidSectionId = #{bidsectionId}
</if>
and TO_DAYS(checkDate)=TO_DAYS(NOW())
group by proSiteId