| | |
| | | o.project, |
| | | od.building_number, |
| | | od.processing_note, |
| | | ogd.child_width as width, |
| | | ogd.child_height as height, |
| | | opd.o_width as width, |
| | | opd.o_height as height, |
| | | ogd.glass_child, |
| | | ogd.process, |
| | | e.type_name, |
| | | opd.stock_id, |
| | | opd.polys_id, |
| | | od.quantity, |
| | | IFNULL(od.quantity,1) as quantity, |
| | | od.other_columns, |
| | | od.bend_radius, |
| | | od.order_number as heat_layout_id, |
| | | a.id as heat_layout_sort, |
| | | ifnull(od.order_number,0) as heat_layout_id, |
| | | ifnull(a.id,0) as heat_layout_sort, |
| | | od.product_name |
| | | from pp.optimize_detail opd |
| | | left join sd.`order` o on SUBSTR(opd.process_id, 1, 10) = o.order_id |
| | |
| | | left join sd.product p on od.product_id = p.id |
| | | left join sd.basic_glass_type e on e.type_id = p.type_id |
| | | left join sd.customer c on c.id = o.customer_id |
| | | where opd.project_no = #{projectNo} |
| | | where opd.project_no = #{projectNo} and o.order_id is not null |
| | | order by opd.heat_layout_id, opd.heat_layout_sort desc |
| | | </select> |
| | | |
| | |
| | | left join |
| | | (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} |
| | | where opd.project_no = #{projectNo} and o.order_id is not null |
| | | group by order_id,od.order_number |
| | | order by ogd.child_width desc,ogd.child_height desc |
| | | </select> |