<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.fbsAbnormalWorkingHours.mapper.FbsAbnormalWorkingHoursDescribeMapper">
    <select id="getMonthExceptionByCategory" resultType="org.jeecg.modules.fbsAbnormalWorkingHours.entity.FbsAbnormalWorkingHoursDescribe">
        SELECT
            count( fawh.id ) AS total,
            fawhd.type_name
        FROM
            fbs_abnormal_working_hours_describe fawhd
            LEFT JOIN fbs_abnormal_working_hours fawh ON fawhd.abnormal_working_hours_id = fawh.id
        WHERE
            fawhd.del_flag = '0'
            AND fawhd.del_flag = '0'
            AND date_format( fawh.date, '%Y-%m' ) = DATE_FORMAT( now( ), '%Y-%m' )
        GROUP BY
            fawhd.type_name
    </select>
</mapper>