<?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.mes.bigstoragetask.mapper.BigStorageCageFeedTaskMapper">
|
|
<select id="querySitToUpGlass" resultType="java.lang.String">
|
select t.line
|
from (
|
select line,
|
COUNT(glass_id) as total_count,
|
SUM(case task_state when 2 then 1 else 0 end) as real_count
|
from big_storage_cage_feed_task
|
where task_state in (1, 2)
|
group by line
|
) t
|
where t.total_count = t.real_count
|
</select>
|
|
</mapper>
|