| | |
| | | <insert id="insert"> |
| | | insert into healthcode(<include refid="key"/>) values(<include refid="value"/>) |
| | | </insert> |
| | | |
| | | <!-- <select id="selectCountr" resultType="java.util.HashMap">--> |
| | | <!-- SELECT COUNT( * ) AS num,type--> |
| | | <!-- FROM--> |
| | | <!-- healthcode--> |
| | | <!-- WHERE--> |
| | | <!-- DATE_FORMAT(dtime,'%Y-%m-%d')=#{time} GROUP BY type--> |
| | | <!-- </select>--> |
| | | |
| | | <!--查询当天的健康码统计数据 2021-03-13 arsn修改--> |
| | | <select id="selectCountr" resultType="java.util.HashMap"> |
| | | SELECT |
| | | COUNT( * ) AS num, |
| | | type |
| | | FROM |
| | | healthcode |
| | | WHERE |
| | | DATE_FORMAT(dtime,'%Y-%m-%d')=#{time} GROUP BY type |
| | | SELECT COUNT( * ) AS num,1 as type FROM healthcode WHERE |
| | | TO_DAYS(dtime)=TO_DAYS(NOW()) and type=1 |
| | | union all |
| | | SELECT COUNT( * ) AS num,2 as type FROM healthcode WHERE |
| | | TO_DAYS(dtime)=TO_DAYS(NOW()) and type=2 |
| | | union all |
| | | SELECT COUNT( * ) AS num,3 as type FROM healthcode WHERE |
| | | TO_DAYS(dtime)=TO_DAYS(NOW()) and type=3 |
| | | </select> |
| | | |
| | | <select id="selectCountz" resultType="java.util.HashMap"> |