SignReportMapper.xml
971 Bytes
<?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.mapper.SignReportMappper">
<select id="querySignReport" resultType="com.ruoyi.domain.dss.app.vo.SignReportVo">
select (
select count(jobCode)checkNum from(
select si.jobCode jobCode from sign_in si where si.create_time like CONCAT(#{dateStr},'%') GROUP by si.jobCode
)t)checkNum
,(
select count(jobCode)exceptionNum from(
select si.jobCode from sign_in si where si.create_time like CONCAT(#{dateStr},'%') and si.ex_type <![CDATA[ <> ]]>0 GROUP by si.jobCode
)t1)exceptionNum
,(
select count(jobCode)exceptionNum from(
select si.jobCode from sign_in si where si.create_time like CONCAT(#{dateStr},'%') and si.ex_type =3 GROUP by si.jobCode
)t1)alcoholNum
</select>
</mapper>