inspect-server/src/main/resources/mapper/InsOrderMapper.xml
@@ -136,13 +136,13 @@
        (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
@@ -181,6 +181,8 @@
        type,
        entrust_code,
        company,
        sample,
        sample_view,
        remark,
        create_time,
        state
@@ -279,6 +281,23 @@
        from standard_method
        where id = #{id}
    </select>
    <select id="getStandardMethodReportText" resultType="java.lang.String">
        select case
                   when name is null or trim(name) = '' then code
                   else concat(code, '《', name, '》')
               end
        from standard_method
        where id = #{id}
    </select>
    <select id="getStandardMethodReportTextByCode" resultType="java.lang.String">
        select case
                   when name is null or trim(name) = '' then code
                   else concat(code, '《', name, '》')
               end
        from standard_method
        where code = #{code}
        limit 1
    </select>
    <select id="selLaboratoryCode" resultType="java.lang.String">
        select laboratory_code
        from laboratory