|
|
|
@ -76,26 +76,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
<select id="iRecordInspectionTaskService" resultMap="RecordInspectionTaskResult">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
select rit.objid,
|
|
|
|
|
rit.inspection_id,
|
|
|
|
|
area_id,
|
|
|
|
|
area_name,
|
|
|
|
|
plane_position,
|
|
|
|
|
count(info.inspection_id) as sanQty,
|
|
|
|
|
sanQty,
|
|
|
|
|
task_state,
|
|
|
|
|
rii.img_path
|
|
|
|
|
from record_inspection_task rit
|
|
|
|
|
left join record_inspection_img rii on rit.objid = rii.task_id
|
|
|
|
|
left join record_inspection_info as info on info.inspection_id=rit.inspection_id and
|
|
|
|
|
info.location_code=plane_position
|
|
|
|
|
left join (select count(inspection_id) as sanQty, location_code, inspection_id
|
|
|
|
|
from record_inspection_info
|
|
|
|
|
where inspection_id in
|
|
|
|
|
<foreach item="objid" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{objid}
|
|
|
|
|
</foreach>
|
|
|
|
|
group by location_code, inspection_id) as info
|
|
|
|
|
on info.inspection_id = rit.inspection_id and info.location_code = plane_position
|
|
|
|
|
|
|
|
|
|
where rit.inspection_id in
|
|
|
|
|
<foreach item="objid" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{objid}
|
|
|
|
|
</foreach>
|
|
|
|
|
group by info. location_code, rit.inspection_id;
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|