liding
9 小时以前 51786b723d0a91d11476776d9ce50af7994dc4bd
inspect-server/src/main/resources/mapper/InsSampleMapper.xml
@@ -491,18 +491,20 @@
                 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
@@ -608,10 +610,12 @@
                 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
@@ -635,10 +639,12 @@
        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>