| | |
| | | <resultMap id="LaboratoryDto" type="com.ruoyi.basic.dto.LaboratoryDto"> |
| | | <result property="label" column="laboratory"/> |
| | | <result property="value" column="laboratory"/> |
| | | <collection property="children" resultMap="ObjectTypeDto"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="ObjectTypeDto" type="com.ruoyi.basic.dto.ObjectTypeDto"> |
| | | <result property="label" column="object_type"/> |
| | | <result property="value" column="object_type"/> |
| | | <collection property="children" resultMap="workShopNameDto"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="workShopNameDto" type="com.ruoyi.basic.dto.WorkShopNameDto"> |
| | | <result property="label" column="workShopName"/> |
| | | <result property="value" column="workShopName"/> |
| | | <collection property="children" resultMap="SampleTypeDto"/> |
| | | </resultMap> |
| | | |
| | |
| | | <result property="sort" column="sort"/> |
| | | <result property="partNo" column="part_no"/> |
| | | <result property="sampleTypeEn" column="sample_type_en"/> |
| | | <result property="workShopName" column="workShopName"/> |
| | | <result property="workShopId" column="workShopId"/> |
| | | <collection property="children" resultMap="SampleDto"/> |
| | | </resultMap> |
| | | |
| | |
| | | </sql> |
| | | |
| | | <select id="selectStandardTreeList" resultMap="FactoryDto"> |
| | | select '中天科技检测中心' factory, |
| | | select '中天科技' factory, |
| | | l.laboratory_name laboratory, |
| | | sto.object_type object_type, |
| | | ws.`name` workShopName, |
| | | sto.specimen_name sample_type, |
| | | p.name sample, |
| | | st.model, |
| | |
| | | sto.id sample_type_id, |
| | | sto.sort, |
| | | sto.specimen_name_en sample_type_en, |
| | | p.name_en sample_en |
| | | p.name_en sample_en, |
| | | ws.id workShopId |
| | | 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 |
| | | left join standard_tree st on st.sample_type = sto.specimen_name |
| | | and st.sample = p.name |
| | | LEFT JOIN work_shop ws ON ws.id = sto.work_shop_id |
| | | order by l.id, CAST(sto.code AS DECIMAL), p.id, ISNULL(st.id), st.id |
| | | </select> |
| | | |
| | |
| | | </if> |
| | | </select> |
| | | <select id="selectStandardTreeList2" resultType="com.ruoyi.basic.pojo.StandardTree"> |
| | | select '中天科技检测中心' factory, |
| | | select '中天科技' factory, |
| | | l.laboratory_name laboratory, |
| | | sto.specimen_name sample_type, |
| | | p.name sample |
| | |
| | | and st.sample = p.name |
| | | </select> |
| | | |
| | | <select id="getStandardTree3" resultType="com.ruoyi.basic.dto.SampleDto"> |
| | | select model label, |
| | | model value |
| | | from standard_tree |
| | | where sample_type = #{sampleType} |
| | | and sample is null |
| | | </select> |
| | | |
| | | <select id="getLaboratory" resultType="java.lang.String"> |
| | | select l.laboratory_name |
| | | from structure_test_object sto |
| | |
| | | where name = #{name} |
| | | </select> |
| | | <select id="selectStandardTreeListByPartNo" resultMap="FactoryDto"> |
| | | select '中天科技检测中心' factory, |
| | | select '中天科技' factory, |
| | | l.laboratory_name laboratory, |
| | | sto.object_type object_type, |
| | | ws.`name` workShopName, |
| | | sto.specimen_name sample_type, |
| | | p.name sample, |
| | | st.model, |
| | | m.model_name model, |
| | | ws.`name` workShopName, |
| | | ws.id workShopId, |
| | | CASE |
| | | WHEN p.id = (SELECT pp.product_id |
| | | FROM product_part pp |
| | |
| | | left join product p on p.object_id = sto.id |
| | | left join standard_tree st on st.sample_type = sto.specimen_name |
| | | and st.sample = p.name |
| | | LEFT JOIN model m ON m.product_id = p.id |
| | | LEFT JOIN work_shop ws ON ws.id = sto.work_shop_id |
| | | where (p.id = (select pp.product_id |
| | | from product_part pp |
| | | where pp.part_no = #{partNo}) |
| | |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | order by send_time desc |
| | | </select> |
| | | |
| | | <select id="selectIfsPage" resultType="com.ruoyi.basic.pojo.IfsInventoryQuantity"> |
| | |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | ORDER BY declare_date DESC |
| | | </select> |
| | | <select id="selectIfsInventoryQuantity" resultType="com.ruoyi.basic.dto.IfsInventoryQuantityCheckDto"> |
| | | SELECT * from ifs_inventory_quantity ifs |
| | |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | order by send_time desc |
| | | </select> |
| | | <select id="getIfsByOverList" resultType="com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto"> |
| | | select * from (<include refid="getIfsOrder"/> |
| | |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getStandardTree3Batch" resultType="com.ruoyi.basic.dto.SampleDto"> |
| | | select model label, |
| | | model value |
| | | from standard_tree |
| | | where sample is null |
| | | <if test="sampleTypeValues != null and sampleTypeValues.size() > 0"> |
| | | and sample_type in |
| | | <foreach item="item" collection="sampleTypeValues" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getStandardTree3" resultType="com.ruoyi.basic.dto.SampleDto"> |
| | | select model label, |
| | | model value |
| | | from standard_tree |
| | | where sample_type = #{sampleType} |
| | | and sample is null |
| | | </select> |
| | | </mapper> |