| | |
| | | #{projectId}, |
| | | #{glass.stockCode}, |
| | | 1, |
| | | #{glass.width}, |
| | | #{glass.height}, |
| | | #{glass.width}+#{glass.leftTrim}+#{glass.rightTrim}, |
| | | #{glass.height}+#{glass.downTrim}+#{glass.upTrim}, |
| | | #{glass.count}, |
| | | #{glass.count}, |
| | | 1, |
| | |
| | | WHERE |
| | | project_no = #{projectId} |
| | | </select> |
| | | <select id="getReportDataProcessIdSv" resultType="java.util.Map" parameterType="java.lang.String"> |
| | | SELECT |
| | | op.project_no as projectId, |
| | | op.glass_total as rectangleQuantity, |
| | | '0' as otherShapeQuantity, |
| | | op.glass_total_area as rectangleArea, |
| | | '0' as otherShapeArea, |
| | | '0' as otherShapePerimeter |
| | | FROM |
| | | pp.optimize_project as op |
| | | WHERE |
| | | op.project_no = #{processId} |
| | | </select> |
| | | <select id="getPeriMeterDataSv" resultType="java.util.Map" parameterType="java.lang.String"> |
| | | SELECT |
| | | od.id, |
| | | od.project_no, |
| | | od.p_width, |
| | | od.p_height, |
| | | (od.p_width + od.p_height)*2 AS perimeter |
| | | FROM |
| | | pp.optimize_detail as od |
| | | WHERE |
| | | od.project_no = #{processId} |
| | | </select> |
| | | <select id="getMaterialInfoSv" resultType="java.util.Map" parameterType="java.lang.String"> |
| | | SELECT |
| | | ou.raw_stock_code AS code, |
| | | ou.use_count AS quantity, |
| | | ou.width, |
| | | ou.height, |
| | | ou.width*ou.height*ou.use_count/1000000.0 as useArea |
| | | FROM |
| | | pp.optimize_use ou |
| | | WHERE |
| | | ou.project_no = #{processId} and ou.state=1 |
| | | </select> |
| | | <select id="getProductListSv" resultType="java.util.Map" parameterType="java.lang.String"> |
| | | |
| | | </select> |
| | | <select id="selectProjectList" resultType="java.util.Map" parameterType="java.lang.String"> |
| | | ( SELECT |
| | | c.project_no, |
| | | c.quantity AS quantity, |
| | | d.child_width AS width, |
| | | d.child_height AS height, |
| | | concat( c.process_id, '-', c.technology_number ) AS processCard, |
| | | round( d.area * c.quantity, 4 ) AS Area, |
| | | c.order_number |
| | | FROM |
| | | pp.flow_card c |
| | | LEFT JOIN sd.order_glass_detail d ON c.order_id = d.order_id |
| | | AND c.order_number = d.order_number |
| | | AND c.technology_number = d.technology_number |
| | | WHERE |
| | | c.project_no IS NOT NULL |
| | | AND c.project_no = #{processId} |
| | | |
| | | ORDER BY |
| | | c.process_id, |
| | | c.order_number |
| | | ) UNION |
| | | ( |
| | | SELECT |
| | | c.project_no, |
| | | c.patch_num AS quantity, |
| | | d.child_width AS width, |
| | | d.child_height AS height, |
| | | concat( c.process_id, '-', c.technology_number ) AS processCard, |
| | | round( d.area * c.patch_num, 4 ) AS Area, |
| | | c.order_sort |
| | | FROM |
| | | pp.patch_log c |
| | | LEFT JOIN sd.order_glass_detail d ON c.order_id = d.order_id |
| | | AND c.order_sort = d.order_number |
| | | AND c.technology_number = d.technology_number |
| | | WHERE |
| | | c.project_no IS NOT NULL |
| | | AND c.project_no = #{processId} |
| | | |
| | | ORDER BY |
| | | c.process_id, |
| | | c.order_sort) |
| | | </select> |
| | | <select id="materialOptimizeUse" resultType="java.util.Map"> |
| | | select ou.raw_stock_code AS id, |
| | | ou.use_count AS processingQuantity, |
| | | ou.width, |
| | | ou.height, |
| | | ou.left_trim as leftTrim, |
| | | ou.down_trim as downTrim, |
| | | ou.up_trim as upTrim, |
| | | ou.right_trim as rightTrim, |
| | | JSON_UNQUOTE(JSON_EXTRACT(ms.json, '$.thickness')) AS thickness, |
| | | JSON_UNQUOTE(JSON_EXTRACT(ms.json, '$.name')) AS name, |
| | | JSON_UNQUOTE(JSON_EXTRACT(ms.json, '$.model')) AS model |
| | | from pp.optimize_use ou |
| | | left join mm.material_store ms on ou.raw_stock_code=ms.id where project_no=#{projectNumber} and state=1 |
| | | </select> |
| | | <select id="getLayoutSetSv" resultType="java.util.Map"> |
| | | SELECT |
| | | project_no, |
| | | width,height, |
| | | usage_rate, |
| | | stock_code |
| | | FROM |
| | | pp.optimize_layout |
| | | WHERE |
| | | project_no = #{processId} |
| | | </select> |
| | | |
| | | |
| | | </mapper> |