| | |
| | | <if test="otherParam.laboratory!=null and otherParam.laboratory!=''"> |
| | | AND io.laboratory=#{otherParam.laboratory} |
| | | </if> |
| | | <if test="otherParam.checkUserFlag != null and otherParam.checkUserFlag and otherParam.checkUserId != null "> |
| | | AND io.id IN ( |
| | | SELECT DISTINCT |
| | | ins_sample_id AS orderId |
| | | FROM |
| | | ins_sample_user |
| | | WHERE |
| | | user_id = #{otherParam.checkUserId} UNION |
| | | SELECT |
| | | T2.ins_order_id AS orderId |
| | | FROM |
| | | ins_product T1 |
| | | JOIN ins_sample T2 ON T1.ins_sample_id = T2.id |
| | | WHERE |
| | | T1.check_user_id = #{otherParam.checkUserId} |
| | | ) |
| | | </if> |
| | | GROUP BY io.id,type |
| | | order by type desc,io.id desc |
| | | ) a |