| | |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_order_id = #{id} |
| | | and ( |
| | | (ip.state = 1 and ip.son_laboratory = #{laboratory}) |
| | | or ( |
| | | ip.id is null |
| | | and #{laboratory} = '新聚' |
| | | and exists ( |
| | | select 1 |
| | | from ins_order_standard_template iost |
| | | where iost.ins_order_id = isa.ins_order_id |
| | | ) |
| | | ) |
| | | ) |
| | | <if test="laboratory != null and laboratory != ''"> |
| | | and ( |
| | | (ip.state = 1 and ip.son_laboratory = #{laboratory}) |
| | | or ( |
| | | ip.id is null |
| | | and #{laboratory} = '新聚' |
| | | and exists ( |
| | | select 1 |
| | | from ins_order_standard_template iost |
| | | where iost.ins_order_id = isa.ins_order_id |
| | | ) |
| | | ) |
| | | ) |
| | | </if> |
| | | </select> |
| | | <select id="getSampleEn" resultType="java.lang.String"> |
| | | select name_en |
| | |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_sample_id = #{id} |
| | | and state = 1 |
| | | <if test="laboratory != null and laboratory != ''"> |
| | | and ip.son_laboratory = #{laboratory} |
| | | </if> |
| | | and ins_fiber_id is null |
| | | and ins_fibers_id is null |
| | | and (standard_method_list_id is not null or template_row_index is not null) |
| | | and template_id is not null |
| | | /* 电缆配置标识 */ |
| | | <if test="cableTag == null or cableTag == ''"> |
| | | and ip.cable_tag is null |
| | |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_sample_id = #{id} |
| | | and state = 1 |
| | | <if test="laboratory != null and laboratory != ''"> |
| | | and ip.son_laboratory = #{laboratory} |
| | | </if> |
| | | and ins_fiber_id is null |
| | | and ins_fibers_id is null |
| | | and (standard_method_list_id is not null or template_row_index is not null) |
| | | and template_id is not null |
| | | and ip.raw_material_tag = #{rawMaterialTag} |
| | | order by sort asc |
| | | </select> |