( SELECT IF(COUNT( 1 )>0,1,0) FROM t_dsa_analysis_batch_unit_device_transfinite WHERE analysis_batch_unit_device_id = t1.id AND is_work = 1 ) AS is_work,
( SELECT IF(COUNT( 1 )>0,1,0) FROM t_dsa_analysis_batch_unit_device_transfinite WHERE analysis_batch_unit_device_id = t1.id ) AS is_transfinite,
( SELECT IF(COUNT( 1 )>0,1,0) FROM t_mw_work_batch_detail WHERE analysis_batch_unit_device_id = t1.id LIMIT 1 ) AS work_status
FROM
t_dsa_analysis_batch_unit_device t1
WHERE
t1.analysis_batch_id = #{dto.analysisBatchId}
) analysis
WHERE
1 =1
<iftest="dto.unitTypeList!=null and dto.unitTypeList.size()>0">