123456789101112131415 |
- <?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.zhgd.scs.mapper.TraceHelmetHistoryRecordMapper">
- <select id="getTraceHelmetOnLineDayCount" resultType="com.zhgd.scs.domain.vo.NameCountDate">
- select thd.project_id `name`, count(DISTINCT thd.device_code) count
- from trace_helmet_history_record thhr
- left join trace_helmet_device thd on thhr.device_code = thd.device_code and thd.in_out_state = 1
- where thhr.device_state = 1
- and date(thhr.test_time) = date(#{date})
- group by thd.project_id
- </select>
- </mapper>
|