| | |
| | | when 'stepA' then 3 |
| | | when 'stepD' then 4 |
| | | when 'stepB' then 4 |
| | | end as sort |
| | | else 1 |
| | | end as sort, |
| | | b.sort as 'sort2' |
| | | |
| | | |
| | | from order_process_detail |
| | | left join (select DISTINCT basic_name,nickname from basic_data where basic_category = 'process') as b |
| | | left join (select DISTINCT basic_name,nickname,sort from basic_data where basic_category = 'process') as b |
| | | on b.basic_name = process |
| | | where order_id = #{orderId} |
| | | group by process) as a |
| | |
| | | group by opd.id) as a |
| | | GROUP BY process) as sort1 |
| | | on sort1.process = a.process |
| | | order by sort,sort1.count,id |
| | | order by sort,sort2,sort1.count,id |
| | | |
| | | </select> |
| | | |