| | |
| | | <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> |