| | |
| | | sm.code, |
| | | sm.name, |
| | | sm.structure_test_object_id, |
| | | sto.specimen_name sample_type, |
| | | sm.remark, |
| | | u1.name create_user_name, |
| | | sm.create_time, |
| | |
| | | sm.field, |
| | | sm.name_en, |
| | | sm.is_use, |
| | | sm.qualification_id |
| | | sm.qualification_id, |
| | | COALESCE((SELECT GROUP_CONCAT(l.laboratory_name ORDER BY COALESCE(l.sort, 0), l.id SEPARATOR '、') |
| | | FROM standard_method_industry smi JOIN laboratory l ON l.id = smi.industry_id |
| | | WHERE smi.standard_method_id = sm.id), '') industry_names, |
| | | (SELECT COUNT(*) FROM standard_method_attachment sma WHERE sma.standard_method_id = sm.id) attachment_count |
| | | from standard_method sm |
| | | left join user u1 on sm.create_user = u1.id |
| | | left join user u2 on sm.update_user = u2.id |
| | | left join structure_test_object sto on sm.structure_test_object_id = sto.id |
| | | where sm.code != '技术要求' |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | |
| | | left join structure_test_object sto on sm.structure_test_object_id = sto.id |
| | | where sm.id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectStandardMethodLists" resultType="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | select id, code, name, remark |
| | | from standard_method |
| | | where is_use = 1 |
| | | and is_product = 1 |
| | | and structure_test_object_id LIKE CONCAT('%[', #{tree}, ']%') |
| | | </select> |
| | | |
| | | <select id="selectStandardMethodLists3" resultType="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | select id, code, name, remark |
| | | from standard_method |
| | | where is_use = 1 |
| | | and is_product = 1 |
| | | and structure_test_object_id LIKE CONCAT('%', #{tree}, '%') |
| | | </select> |
| | | <select id="selectStandardMethodListsByIndustry" resultType="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | select sm.id, sm.code, sm.name, sm.remark |
| | | from standard_method sm |
| | | inner join standard_method_industry smi on smi.standard_method_id = sm.id |
| | | inner join laboratory l on l.id = smi.industry_id |
| | | where sm.is_use = 1 |
| | | and sm.is_product = 1 |
| | | and l.laboratory_name = #{industry} |
| | | order by sm.id |
| | | </select> |
| | | <select id="selectListEnum" resultType="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | select id,code,name from standard_method |
| | | where is_product = 1 |
| | | and is_use = 1 |
| | | </select> |
| | | <select id="selectStandardMethodListsByNull" resultType="com.ruoyi.basic.pojo.StandardMethodList"> |
| | | select id, code, name, remark |
| | | from standard_method |
| | | where is_use = 1 |
| | | and is_product = 1 |
| | | and ( |
| | | structure_test_object_id is null |
| | | OR structure_test_object_id = '' |
| | | OR structure_test_object_id = '[]' |
| | | ) |
| | | </select> |
| | | <select id="getStandardMethodId" resultType="java.lang.Integer"> |
| | | select id from standard_method where code = #{code} |
| | | </select> |
| | | </mapper> |