select
a.order_Id,
a.process_Id,
c.product_id,
c.product_name,
b.project,
a.binning_quantity,
c.compute_gross_area,
a.founder,
c.processing_note
from flow_card as a left join sd.`order` as b on a.order_Id=b.order_id
left join sd.order_detail as c on a.order_Id=c.order_id and a.order_Number=c.order_number
where a.create_time between #{selectTime1} and #{selectTime2}
group by a.process_Id;
select o.order_id,
o.customer_name,
o.project,
o.batch,
o.other_remarks,
o.icon,
o.order_type,
o.salesman,
o.processing_note,
o.delivery_address
from sd.`order` as o
where o.production_order=2 and o.create_time between #{selectTime1} and #{selectTime2}
;
select od.order_id,
ogd.production_id,
od.product_id,
od.product_name,
od.quantity,
od.compute_gross_area,
od.perimeter
from sd.order_detail as od
left join sd.order_glass_detail as ogd
on od.order_id = ogd.order_id
where od.order_id = #{orderId}
group by od.order_id, ogd.production_id
update 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
set ogd.production_id=null,
ogd.production_time=null,
ogd.founder=null
where od.order_id = #{orderId}
and od.product_name = #{productName}
select
od.order_number AS 'orderNumber',
od.width,
od.height,
od.shape,
od.quantity,
od.quantity as baiscQuantity,
od.compute_gross_area as 'computeGrossArea',
p.total_thickness AS 'totalThickness',
p.thickness,
od.weight
from
sd.order_detail as od
left join sd.order_glass_detail as ogd on od.order_id=ogd.order_id
left join sd.product as p on od.product_name=p.product_name
where od.order_id=#{orderId}and ogd.production_id=#{productionId}
and od.order_number regexp #{flowCard.orderDetail.orderNumber}
and od.width regexp #{flowCard.orderDetail.width}
and od.height regexp #{flowCard.orderDetail.height}
and od.shape regexp #{flowCard.orderDetail.shape}
GROUP BY od.order_number;