| | |
| | | from structure_item_parameter |
| | | where sample like concat('%', #{sample}, '%') |
| | | </delete> |
| | | <select id="selectItemParameterList" resultType="com.ruoyi.inspect.pojo.StructureItemParameter"> |
| | | <select id="selectItemParameterList" resultType="com.ruoyi.basic.pojo.StructureItemParameter"> |
| | | select * from (select A.id, |
| | | st.name as template_name, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_subclass, |
| | |
| | | ask_tell, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | code, |
| | | radius_list, |
| | | rates |
| | | code |
| | | from (select *, |
| | | CASE |
| | | WHEN INSTR(sample, ',') > 0 THEN |
| | |
| | | END AS samples |
| | | from structure_item_parameter) A |
| | | left join structure_test_object sto on samples = specimen_name |
| | | LEFT JOIN standard_template st ON template_id = st.id |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if>)B |
| | |
| | | left join product p on p.object_id = sto.id |
| | | </select> |
| | | |
| | | <resultMap id="itemDto" type="com.ruoyi.inspect.dto.TestItemDto"> |
| | | <select id="selectItemParameterList1" resultType="com.ruoyi.basic.pojo.StructureItemParameter"> |
| | | select A.id, |
| | | inspection_item, |
| | | inspection_item_subclass, |
| | | samples |
| | | from (select *, |
| | | CASE |
| | | WHEN INSTR(sample, ',') > 0 THEN |
| | | SUBSTRING_INDEX(SUBSTRING_INDEX(sample, '","', 1), '"', -1) |
| | | when sample = '[""]' then null |
| | | when sample = '[]' then null |
| | | ELSE |
| | | TRIM(BOTH '["]' FROM SUBSTRING_INDEX(REPLACE(sample, '[["', ''), '"]]', 1)) |
| | | END AS samples |
| | | from structure_item_parameter) A |
| | | left join structure_test_object sto on samples = specimen_name |
| | | <where> |
| | | <if test="specimenName != null and specimenName !=''"> |
| | | and A.sample like concat('%',#{specimenName},'%') |
| | | </if> |
| | | </where> |
| | | GROUP BY inspection_item |
| | | </select> |
| | | <select id="selectItemParameterList2" resultType="com.ruoyi.basic.pojo.StructureItemParameter"> |
| | | SELECT sp.id,sp.inspection_item_subclass FROM structure_item_parameter sp |
| | | <where> |
| | | <if test="inspectionItemSubclass != null and inspectionItemSubclass !=''"> |
| | | and sp.inspection_item like concat('%',#{inspectionItemSubclass},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <resultMap id="itemDto" type="com.ruoyi.basic.dto.TestItemDto"> |
| | | <result column="sId" property="id"/> |
| | | <result column="sName" property="name"/> |
| | | <collection property="children" resultMap="productDto"/> |
| | | </resultMap> |
| | | <resultMap id="productDto" type="com.ruoyi.inspect.dto.ProductDto"> |
| | | <resultMap id="productDto" type="com.ruoyi.basic.dto.ProductDto"> |
| | | <result column="pId" property="id"/> |
| | | <result column="pName" property="name"/> |
| | | </resultMap> |