( SELECT COUNT( 1 ) FROM t_dsa_analysis_batch_unit_device_transfinite WHERE analysis_batch_unit_device_id = t1.id AND is_work = 1 LIMIT 1 ) AS is_work,
( SELECT COUNT( 1 ) FROM t_dsa_analysis_batch_unit_device_transfinite WHERE analysis_batch_unit_device_id = t1.id LIMIT 1 ) AS is_transfinite,
( SELECT COUNT( 1 ) FROM t_mw_work_batch_detail WHERE analysis_batch_unit_device_id = t1.id LIMIT 1 ) AS work_status
( 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
...
...
@@ -69,6 +69,12 @@
<iftest="dto.unitDeviceCode != null and dto.unitDeviceCode != ''">
AND analysis.unit_device_code like concat('%',#{dto.unitDeviceCode},'%')
</if>
<iftest="dto.unitDeviceCode != null and dto.unitDeviceCode != ''">
AND analysis.unit_device_code like concat('%',#{dto.unitDeviceCode},'%')