|
|
|
@ -82,5 +82,20 @@
|
|
|
|
|
<select id="countInsertRecordNumber" resultType="integer">
|
|
|
|
|
select count(inspection_id) from record_inspection where date(inspection_time)= date(now())
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectListByids" resultMap="RecordInspectionResult">
|
|
|
|
|
select ri.inspection_id,
|
|
|
|
|
inspection_time,
|
|
|
|
|
inspection_user,
|
|
|
|
|
count(rii.inspection_id) as total_number,
|
|
|
|
|
count(if(inspection_state = '正常', true, null)) as normal_number,
|
|
|
|
|
count(if(inspection_state = '异常', true, null)) as abnormal_number,
|
|
|
|
|
count(if(inspection_state = '跳过', true, null)) as skip_number
|
|
|
|
|
from record_inspection ri
|
|
|
|
|
left join record_inspection_info rii on ri.inspection_id = rii.inspection_id
|
|
|
|
|
where ri.inspection_id in
|
|
|
|
|
<foreach item="inspectionId" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{inspectionId}
|
|
|
|
|
</foreach>
|
|
|
|
|
group by ri.inspection_id
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|