| | |
| | | (SELECT ins_sample.ins_order_id, COUNT(*) AS total_count |
| | | FROM ins_product |
| | | JOIN ins_sample ON ins_product.ins_sample_id = ins_sample.id |
| | | WHERE ins_product.state = 1 |
| | | WHERE ins_product.state = 1 and is_binding !=1 |
| | | GROUP BY ins_sample.ins_order_id) total_product_counts ON io.id = total_product_counts.ins_order_id |
| | | LEFT JOIN |
| | | (SELECT ins_sample.ins_order_id, COUNT(*) AS approved_count |
| | | FROM ins_product |
| | | JOIN ins_sample ON ins_product.ins_sample_id = ins_sample.id |
| | | WHERE ins_product.state = 1 AND ins_product.ins_result IS NOT NULL |
| | | WHERE ins_product.state = 1 and is_binding !=1 AND ins_product.ins_result IS NOT NULL |
| | | GROUP BY ins_sample.ins_order_id) approved_product_counts ON io.id = approved_product_counts.ins_order_id |
| | | LEFT JOIN (SELECT ins_sample_id, GROUP_CONCAT(DISTINCT uu.name SEPARATOR ',') AS testing_name |
| | | FROM ins_sample_user u |
| | |
| | | ) labelBarCode |
| | | from ins_order io2 |
| | | LEFT JOIN ins_sample isa ON io2.id = isa.ins_order_id |
| | | where type_source = 0 |
| | | where type_source = -1 |
| | | GROUP BY io2.id) a |
| | | where insOrderId in |
| | | <foreach collection="ids" index="index" open="(" separator="," close=")" item="val"> |