| | |
| | | (select (@row_number := @row_number + 1) as id,process_id as process_id from (select process_id from pp.optimize_detail tt where project_no =#{projectNo} group by process_id) tt,(select @row_number := 0) as t) a |
| | | on a.process_id=opd.process_id |
| | | where opd.project_no = #{projectNo} |
| | | order by opd.stock_id |
| | | order by opd.stock_id,opd.polys_id |
| | | </select> |
| | | |
| | | <select id="getPrintLabel2"> |
| | |
| | | '文本' as custom2, |
| | | '文本' as custom3, |
| | | '文本' as custom4, |
| | | '文本' as custom5 |
| | | '文本' as custom5, |
| | | od.quantity |
| | | from sd.order as o |
| | | left join sd.order_detail as od on o.order_id = od.order_id |
| | | left join flow_card as fc on o.order_id = fc.order_id and |
| | |
| | | |
| | | <select id="remakList"> |
| | | SELECT |
| | | JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S01')) AS S01, |
| | | JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S04')) AS S02, |
| | | JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S05')) AS S03, |
| | | JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S06')) AS S04, |
| | | JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S07')) AS S05 |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S01')),'') AS S01, |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S04')),'') AS S02, |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S05')),'') AS S03, |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S06')),'') AS S04, |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S07')),'') AS S05 |
| | | FROM flow_card as fc left join sd.order_detail as od on fc.order_id = od.order_id |
| | | and fc.order_number = od.order_number |
| | | WHERE fc.process_id=#{processId} |
| | |
| | | </select> |
| | | |
| | | <update id="updateFlowCardMerge"> |
| | | update pp.flow_card fc set fc.merge=1 |
| | | update pp.flow_card fc set fc.merge=#{index} |
| | | where fc.process_id = #{processId} and fc.technology_number in |
| | | <foreach item="technologyNumber" collection="technologyNumbers" open="(" separator="," close=")"> |
| | | #{technologyNumber} |