| | |
| | | where fc.process_id = #{processId} |
| | | and position(fc.technology_number in #{technologyNumber}) |
| | | group by fc.process_id, fc.order_number |
| | | order by IF(fcs.sort != NULL or fcs.sort != '', fcs.sort, fc.order_number) |
| | | <choose> |
| | | <!-- flashback = 1 时正序 --> |
| | | <when test="flashback == 1"> |
| | | ORDER BY |
| | | CASE |
| | | WHEN fcs.sort IS NOT NULL AND fcs.sort <> '' THEN fcs.sort |
| | | ELSE fc.order_number |
| | | END ASC |
| | | </when> |
| | | <!-- flashback != 1 时倒序 --> |
| | | <otherwise> |
| | | ORDER BY |
| | | CASE |
| | | WHEN fcs.sort IS NOT NULL AND fcs.sort <> '' THEN fcs.sort |
| | | ELSE fc.order_number |
| | | END DESC |
| | | </otherwise> |
| | | </choose> |
| | | </select> |
| | | |
| | | <select id="getDetailLists"> |
| | |
| | | where fc.process_id = #{processId} |
| | | and position(fc.technology_number in #{technologyNumber}) |
| | | group by fc.process_id, fc.order_number, fc.technology_number |
| | | order by IF(fcs.sort != NULL or fcs.sort != '', fcs.sort, fc.order_number) |
| | | <choose> |
| | | <!-- flashback = 1 时正序 --> |
| | | <when test="flashback == 1"> |
| | | ORDER BY |
| | | CASE |
| | | WHEN fcs.sort IS NOT NULL AND fcs.sort <> '' THEN fcs.sort |
| | | ELSE fc.order_number |
| | | END ASC |
| | | </when> |
| | | <!-- flashback != 1 时倒序 --> |
| | | <otherwise> |
| | | ORDER BY |
| | | CASE |
| | | WHEN fcs.sort IS NOT NULL AND fcs.sort <> '' THEN fcs.sort |
| | | ELSE fc.order_number |
| | | END DESC |
| | | </otherwise> |
| | | </choose> |
| | | </select> |
| | | |
| | | <select id="getDetailListMerge"> |
| | |
| | | and fcs.process = #{process} |
| | | where fc.process_id = #{processId} and fc.`merge`=1 |
| | | group by fc.process_id, fc.order_number |
| | | order by IF(fcs.sort != NULL or fcs.sort != '', fcs.sort, fc.order_number) |
| | | <choose> |
| | | <!-- flashback = 1 时正序 --> |
| | | <when test="flashback == 1"> |
| | | ORDER BY |
| | | CASE |
| | | WHEN fcs.sort IS NOT NULL AND fcs.sort <> '' THEN fcs.sort |
| | | ELSE fc.order_number |
| | | END ASC |
| | | </when> |
| | | <!-- flashback != 1 时倒序 --> |
| | | <otherwise> |
| | | ORDER BY |
| | | CASE |
| | | WHEN fcs.sort IS NOT NULL AND fcs.sort <> '' THEN fcs.sort |
| | | ELSE fc.order_number |
| | | END DESC |
| | | </otherwise> |
| | | </choose> |
| | | </select> |
| | | |
| | | <select id="getDetailListLikes"> |