<?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="com.ruoyi.api.mapper.BroadApiMapper">



    <select id="selectCountNumber" resultType="com.ruoyi.manage.domain.ResultBeen">
        select count(inspection_id) as t, '巡检次数' as name
        from record_inspection
        where DATE(inspection_time) = CURDATE()
        union
        select count(DISTINCT location_code) as t, '巡检机位' as name
        from record_inspection_info
        where DATE(create_time) = CURDATE()
        union
        select count(inspection_state) as t, '巡检结果' as name
        from record_inspection_info
        where DATE(create_time) = CURDATE() and inspection_state !='正常'
    </select>

</mapper>