| | |
| | | LEFT JOIN user ON isu.user_id = user.id |
| | | WHERE |
| | | io.state = 1 |
| | | # AND io.ins_state != 5 |
| | | -- # AND io.ins_state != 5 |
| | | and send_time is not null |
| | | <if test="userId !=null and userId!=''"> |
| | | and (isu.user_id = #{userId} OR isu.user_id is NULL ) |
| | |
| | | isu2.ins_sample_id = a.id |
| | | where ins_state is not null |
| | | <if test="laboratory != null and laboratory != ''"> |
| | | and laboratory=#{laboratory} |
| | | and a.laboratory=#{laboratory} |
| | | </if> |
| | | ORDER BY |
| | | <!--a.user_id DESC,--> |
| | |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_order_id = #{id} |
| | | and state = 1 |
| | | and ins_fiber_id is null |
| | | and ins_fibers_id is null |
| | | -- and ins_fiber_id is null |
| | | -- and ins_fibers_id is null |
| | | and <!--isa.sample_code NOT REGEXP '/'--> |
| | | isa.id in(select id1 from (select is2.id id1 ,ip.id from ins_sample is2 left join ins_product ip on is2.id = ip.ins_sample_id where ip.id is not null)s ) |
| | | order by case when man_hour_group is NULL then 1 |