chenrui
2025-04-02 b835dcf59ce2b06720dbdb972f10a13d1d3712e4
basic-server/src/main/resources/mapper/StructureItemParameterMapper.xml
@@ -3,6 +3,40 @@
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.basic.mapper.StructureItemParameterMapper">
    <sql id="selectStandardTree">
        sample    sample2,
               inspection_item,
               inspection_item_en,
               inspection_item_subclass,
               inspection_item_subclass_en,
               inspection_item_class,
               inspection_item_class_en,
               method,
               son_laboratory,
               unit,
               ask_tell  tell,
               ask,
               price,
               man_hour,
               man_hour_group,
               man_day,
               inspection_item_type,
               inspection_value_type,
               bsm,
               template_id,
               laboratory,
               checkout_number,
               section,
               dic,
               0         state,
        #{trees}
        tree,
        id
        structure_item_parameter_id,
        radius_list,
        rates
    </sql>
    <delete id="removeNoSample">
        delete
        from structure_item_parameter
@@ -118,4 +152,23 @@
        <result column="pId" property="id"/>
        <result column="pName" property="name"/>
    </resultMap>
    <select id="selectItemParameterBySample" resultType="com.ruoyi.basic.pojo.StructureItemParameter">
        select *
        from structure_item_parameter
        where (
        sample is NULL
        OR sample = ''
        or sample = '[]'
        OR sample LIKE CONCAT('%', #{sample}, '%')
        )
        order by id asc
    </select>
    <select id="getItemTreeProduct" resultMap="itemDto">
        select sto.id sId, sto.specimen_name sName, p.id pId, p.name pName
        from structure_test_object sto
                 left join product p on p.object_id = sto.id
        WHERE sto.object_type = #{objectType}
    </select>
</mapper>