| | |
| | | <resultMap id="ModelDto" type="com.ruoyi.basic.dto.ModelDto"> |
| | | <result property="label" column="model"/> |
| | | <result property="value" column="model"/> |
| | | <result property="standardTreeId" column="standard_tree_id"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectStandardTree"> |
| | |
| | | sto.id sample_type_id, |
| | | sto.sort, |
| | | sto.specimen_name_en sample_type_en, |
| | | p.name_en sample_en |
| | | p.name_en sample_en, |
| | | st.id AS standard_tree_id |
| | | from laboratory l |
| | | left join structure_test_object sto on sto.laboratory_id = l.id |
| | | left join product p on p.object_id = sto.id |
| | |
| | | |
| | | <select id="getStandardTree3" resultType="com.ruoyi.basic.dto.SampleDto"> |
| | | select model label, |
| | | model value |
| | | model value, |
| | | id AS standard_tree_id |
| | | from standard_tree |
| | | where sample_type = #{sampleType} |
| | | and sample is null |
| | |
| | | #{id} |
| | | </foreach> |
| | | </select> |
| | | <select id="selectStandardTreeById" resultType="com.ruoyi.basic.vo.StandardTreeVO"> |
| | | select |
| | | st.id, |
| | | st.factory, |
| | | st.laboratory, |
| | | st.sample_type, |
| | | st.sample, |
| | | st.model, |
| | | st.create_user, |
| | | st.create_time, |
| | | st.update_user, |
| | | st.update_time, |
| | | u1.name AS create_user_name, |
| | | u2.name AS update_user_name |
| | | from standard_tree st |
| | | left join user u1 on st.create_user = u1.id |
| | | left join user u2 on st.update_user = u2.id |
| | | where st.id = #{standardTreeId} |
| | | </select> |
| | | </mapper> |