gongchunyi
10 小时以前 bb80ead86615da40c73ed60a04944461e52929e7
src/main/resources/mapper/production/ProcessRouteMapper.xml
@@ -26,25 +26,31 @@
        <if test="c.dictCode != null">
            and ps.dict_code = #{c.dictCode}
        </if>
        <if test="c.status != null">
            and ps.status = #{c.status}
        </if>
        order by ps.id
    </select>
    <select id="latestTypeDate" resultType="com.ruoyi.production.pojo.ProcessRoute">
        SELECT *
        FROM process_route pr
        WHERE pr.dict_code = (SELECT d.dict_code
                              FROM sys_dict_data d
                              WHERE d.dict_label =
                                <choose>
                                    <when test="strength != null and strength != ''">
                                        CONCAT(#{productName}, '-', #{strength})
                                    </when>
                                    <otherwise>
                                        #{productName}
                                    </otherwise>
                                </choose>
                                AND d.dict_type = 'product_type'
                              LIMIT 1)
        WHERE
        pr.status = 1
        and
        pr.dict_code = (SELECT d.dict_code
        FROM sys_dict_data d
        WHERE d.dict_label =
        <choose>
            <when test="strength != null and strength != ''">
                CONCAT(#{productName}, '-', #{strength})
            </when>
            <otherwise>
                #{productName}
            </otherwise>
        </choose>
        AND d.dict_type = 'product_type'
        LIMIT 1)
        ORDER BY pr.create_time DESC
        LIMIT 1
    </select>