| | |
| | | ods.S02, |
| | | ods.S03, |
| | | ods.S04, |
| | | ods.S05 |
| | | ods.S05, |
| | | od.building_number |
| | | from sd.order_detail as od |
| | | left join sd.order_glass_detail as ogd |
| | | on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | |
| | | </select> |
| | | |
| | | <select id="selectPrintFlowCard"> |
| | | select * |
| | | select project_no,glass_total,glass_total_area |
| | | from pp.optimize_project |
| | | where date(create_time)>=#{selectTime1} and date(create_time) <= #{selectTime2} |
| | | and state >= 20 |
| | |
| | | round(ogd.child_width) as width, |
| | | round(ogd.child_height) as height, |
| | | pd.separation, |
| | | fc.technology_number |
| | | fc.technology_number, |
| | | IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber, |
| | | od.building_number |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | round(ogd.child_width) as width, |
| | | round(ogd.child_height) as height, |
| | | pd.separation, |
| | | fc.technology_number |
| | | fc.technology_number, |
| | | IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber, |
| | | od.building_number |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | /*ogd.technology_number,*/ |
| | | ogd.glass_address, |
| | | (fc.quantity) as quantity, |
| | | (fc.quantity) as printQuantity, |
| | | round((ogd.child_width * ogd.child_height * fc.quantity / 1000000), 2) as total_area, |
| | | od.product_name, |
| | | ogd.glass_child, |
| | |
| | | ogd.technology_number, |
| | | ogd.glass_address, |
| | | (fc.quantity) as quantity, |
| | | (fc.quantity) as printQuantity, |
| | | round((ogd.child_width * ogd.child_height * fc.quantity / 1000000), 2) as total_area, |
| | | od.product_name, |
| | | ogd.glass_child, |
| | |
| | | od.processing_note as processingNote, |
| | | width, |
| | | height, |
| | | fc.quantity, |
| | | #{printQuantity} as quantity, |
| | | od.order_number as orderNumber, |
| | | fc.technology_number as technologyNumber, |
| | | od.building_number as buildingNumber, |
| | |
| | | od.processing_note as processingNote, |
| | | od.width, |
| | | od.height, |
| | | fc.quantity, |
| | | fc.quantity as flowQuantity, |
| | | od.order_number as orderNumber, |
| | | fc.technology_number as technologyNumber, |
| | | od.building_number as buildingNumber, |
| | |
| | | '文本' as custom2, |
| | | '文本' as custom3, |
| | | '文本' as custom4, |
| | | '文本' as custom5 |
| | | '文本' as custom5, |
| | | od.quantity |
| | | from optimize_detail as opt |
| | | left join flow_card as fc on opt.project_no=fc.project_no and opt.process_id=fc.process_id and opt.layer=fc.technology_number and opt.order_sort=fc.order_number |
| | | left join sd.order as o on o.order_id=fc.order_id |
| | |
| | | od.processing_note as processingNote, |
| | | od.width, |
| | | od.height, |
| | | fc.quantity, |
| | | fc.quantity as flowQuantity, |
| | | od.order_number as orderNumber, |
| | | fc.technology_number as technologyNumber, |
| | | od.building_number as buildingNumber, |
| | |
| | | '文本' as custom2, |
| | | '文本' as custom3, |
| | | '文本' as custom4, |
| | | '文本' as custom5 |
| | | '文本' as custom5, |
| | | od.quantity |
| | | from optimize_detail as opt |
| | | left join flow_card as fc on opt.project_no=fc.project_no and opt.process_id=fc.process_id and opt.layer=fc.technology_number and opt.order_sort=fc.order_number |
| | | left join sd.order as o on o.order_id=fc.order_id |
| | |
| | | order by opt.stock_id,opt.polys_id |
| | | </select> |
| | | |
| | | <select id="getPrintCustomDataProject"> |
| | | select |
| | | o.order_id as orderId, |
| | | project, |
| | | customer_id as customerId, |
| | | o.customer_name as customerName, |
| | | order_type as orderType, |
| | | order_classify as orderClassify, |
| | | batch, |
| | | o.icon, |
| | | pack_type as packType, |
| | | delivery_date as deliveryDate, |
| | | al_type as alType, |
| | | money, |
| | | contract_id as contractId, |
| | | customer_batch customerBatch, |
| | | contacts, |
| | | delivery_address as deliveryAddress, |
| | | od.processing_note as processingNote, |
| | | od.width, |
| | | od.height, |
| | | fc.quantity as flowQuantity, |
| | | od.order_number as orderNumber, |
| | | fc.technology_number as technologyNumber, |
| | | od.building_number as buildingNumber, |
| | | od.product_name as productName, |
| | | od.edging_type as edgingType, |
| | | od.remarks, |
| | | c.customer_abbreviation as customerAbbreviation, |
| | | p.product_abbreviation as productAbbreviation, |
| | | fc.process_id as processId, |
| | | o.create_time as createTime, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')) AS figureNumber, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S03')) AS colourCeramicGlaze, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')) AS remarks1, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S05')) AS remarks2, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S06')) AS remarks3, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S07')) AS remarks4, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S08')) AS remarks5, |
| | | p.remarks as filmNumber, |
| | | od.bend_radius as bendRadius, |
| | | od.other_columns, |
| | | JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.color')) AS color, |
| | | '文本' as custom1, |
| | | '文本' as custom2, |
| | | '文本' as custom3, |
| | | '文本' as custom4, |
| | | '文本' as custom5, |
| | | od.quantity, |
| | | o.order_id, |
| | | c.customer_abbreviation as customer_name, |
| | | od.building_number, |
| | | od.processing_note, |
| | | ogd.child_width as childWidth, |
| | | ogd.child_height as childHeight, |
| | | ogd.glass_child as glassChild, |
| | | ogd.process, |
| | | e.type_name, |
| | | opt.stock_id, |
| | | od.bend_radius, |
| | | a.id as flow_card_sort, |
| | | concat(opt.heat_layout_id,'') as heat_layout_id , |
| | | opt.heat_layout_sort |
| | | from optimize_detail as opt |
| | | left join flow_card as fc on opt.project_no=fc.project_no and opt.process_id=fc.process_id and opt.layer=fc.technology_number and opt.order_sort=fc.order_number |
| | | left join sd.order as o on o.order_id=fc.order_id |
| | | left join sd.order_detail as od on fc.order_id = od.order_id and od.order_number = fc.order_number |
| | | left join sd.order_glass_detail as ogd on ogd.order_id=o.order_id and ogd.order_number=od.order_number and ogd.technology_number=fc.technology_number |
| | | left join sd.product as p on p.id = od.product_id |
| | | left join sd.basic_glass_type e on e.type_id = p.type_id |
| | | left join sd.customer as c on c.id = o.customer_id |
| | | left join sd.product_detail as pd on pd.prod_id = p.id and pd.sort_num = od.order_number and |
| | | pd.glass_sort = fc.technology_number |
| | | 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=opt.process_id |
| | | where opt.project_no=#{projectNo} |
| | | order by opt.heat_layout_id, opt.heat_layout_sort desc |
| | | </select> |
| | | |
| | | </mapper> |