gongchunyi
5 小时以前 78286a5422d2180df5cd66a85570a7a3cd2f4d71
src/main/resources/mapper/production/ProcessRouteMapper.xml
@@ -4,25 +4,29 @@
    <resultMap id="basicMap" type="com.ruoyi.production.pojo.ProcessRoute">
            <id property="id" column="id"/>
            <result property="productModelId" column="product_model_id"/>
            <result property="description" column="description"/>
            <result property="tenantId" column="tenant_id"/>
            <result property="createTime" column="create_time"/>
            <result property="updateTime" column="update_time"/>
        <id property="id" column="id"/>
        <result property="productModelId" column="product_model_id"/>
        <result property="description" column="description"/>
        <result property="tenantId" column="tenant_id"/>
        <result property="createTime" column="create_time"/>
        <result property="updateTime" column="update_time"/>
        <result property="status" column="status"/>
    </resultMap>
    <select id="pageProcessRouteDto" resultType="com.ruoyi.production.dto.ProcessRouteDto">
        select ps.*, p.product_name,pm.product_id,pm.model,pb.bom_no
        select
        ps.*,
        pb.bom_no,
        sdd.dict_label AS dictLabel
        from process_route ps
        left join product_bom pb on ps.bom_id = pb.id
        left join product_model pm on ps.product_model_id = pm.id
        left join product p on pm.product_id = p.id
        <where>
            <if test="c.model != null and c.model != ''">
                and pm.model like concat('%',#{c.model},'%')
            </if>
        </where>
        order by ps.id asc
        left join sys_dict_data sdd on sdd.dict_code = ps.dict_code
        where 1= 1
        <if test="c.dictCode != null">
            and ps.dict_code = #{c.dictCode}
        </if>
        order by ps.id
    </select>
</mapper>