园历展示增加幼儿考勤人数统计

This commit is contained in:
zhanglipeng
2020-12-17 17:06:48 +08:00
parent ebe4d92d1f
commit 56fd60a4cf
6 changed files with 93 additions and 21 deletions

View File

@ -13,6 +13,7 @@
<result property="type" column="type"/>
<result property="createuserid" column="createuserid"/>
<result property="createTime" column="create_time"/>
<result property="count" column="count"/>
</resultMap>
<sql id="selectByChildCheckinDetailVo">
@ -33,6 +34,17 @@
</where>
</select>
<select id="selectByChildCheckinGroupDaysList" parameterType="ByChildCheckinDetail"
resultMap="ByChildCheckinDetailResult">
select count(*) as count, t.create_time from (select id, schoolid, classid, childid, childname, type, createuserid, DATE_FORMAT(create_time,'%Y-%m-%d') as create_time
from by_child_checkin_detail
where type='01'
<if test="schoolid != null ">and schoolid = #{schoolid}</if>
<if test="classid != null and classid != ''">and classid = #{classid}</if>
) t
group by t.create_time
</select>
<select id="selectByChildCheckinDetailById" parameterType="Long" resultMap="ByChildCheckinDetailResult">
<include refid="selectByChildCheckinDetailVo"/>
where id = #{id}