| | |
| | | c.project_no, |
| | | d.child_width as 'width', |
| | | d.child_height as 'height', |
| | | (d.child_width + d.child_height) * 2 as 'perimeter', |
| | | c.quantity, |
| | | od.shape, |
| | | concat( c.process_id, '-', c.technology_number ) AS 'process_id', |
| | | c.process_id AS processId, |
| | | c.technology_number as layer, |
| | | c.layers_number as totalLayer, |
| | | d.glass_child, |
| | | od.price, |
| | | od.remarks, |
| | | round( d.area * c.quantity, 4 ) as 'area', |
| | | c.order_number, |
| | | d.icon AS markIcon, |
| | | op.project_name, |
| | | 0 as patchState, |
| | | c.rack AS rackNo, |
| | | 0 as heatLayoutId, |
| | | d.process, |
| | | o.order_id AS orderNo, |
| | | o.customer_name AS customerName, |
| | |
| | | c.project_no, |
| | | d.child_width as 'width', |
| | | d.child_height as 'height', |
| | | (d.child_width + d.child_height) * 2 as 'perimeter', |
| | | c.patch_num as quantity, |
| | | od.shape, |
| | | concat( c.process_id, '-', c.technology_number ) AS 'process_id', |
| | | c.process_id AS 'process_ids', |
| | | c.technology_number as layer, |
| | | fc.layers_number as total_layer, |
| | | d.glass_child, |
| | | od.price, |
| | | od.remarks, |
| | | round( d.area * c.patch_num, 4 ) as 'area', |
| | | c.order_sort as order_number, |
| | | d.icon, |
| | | op.project_name, |
| | | 1 as patch_state, |
| | | a.id as rackNo, |
| | | 0 as heatLayoutId, |
| | | d.process, |
| | | o.order_id AS orderNo, |
| | | o.customer_name AS customerName, |
| | |
| | | <!--优化查询--> |
| | | <select id="computeAndOptimization"> |
| | | SELECT |
| | | c.project_no, |
| | | c.rack AS rackNo, |
| | | h.layout_id as heatLayoutId, |
| | | # h.layout_id as heatLayoutId, |
| | | h.width AS width, |
| | | h.height AS height, |
| | | (h.width + h.height) * 2 as 'perimeter', |
| | | od.shape, |
| | | count( 1 ) AS quantity, |
| | | concat( h.process_id, '-', h.layer ) AS processId, |
| | | concat( h.process_id, '-', h.layer ) AS process_id, |
| | | c.process_id AS processId, |
| | | h.process_id as process_ids, |
| | | h.layer, |
| | | c.layers_number as totalLayer, |
| | | d.glass_child, |
| | | od.price, |
| | | od.remarks, |
| | | round( d.area * count( 1 ), 4 ) AS 'area', |
| | | c.order_number, |
| | | h.order_sort AS orderSort, |
| | |
| | | WHERE |
| | | h.project_no = #{projectNo} |
| | | GROUP BY |
| | | h.layout_id, |
| | | # h.layout_id, |
| | | h.width, |
| | | h.height, |
| | | h.process_id, |