不可爱小羊(提问者) 回复 Z4u3z1select t1.code,t1.ref_code,t1.product_barcode,t1.product_name,t1.figure_number,t1.shop_code,t1.plan_quantity,t1.order_date,t1.start_date,t1.status,sum(t2.quantity) as boxquantity
from mes_product_order t1
left join mes_pass_box_item t2 on t1.Code = t2.order_code
where t1.code in (\'${id}\')
group by t1.code,t1.ref_code,t1.product_name,t1.figure_number,t1.shop_code,t1.plan_quantity,t1.order_date,t1.start_date,t1.status ,t1.product_barcode