select 
detail.pname as goodsName, 
dic.typename as unit, 
detail.quantity as amount, 
price_info.set_price1 as price, 
(price_info.set_price1 * detail.quantity) as money,
detail.spec_type as specification,
detail.goods_id  as goodsId,
orders.handler_person as handlePerson,
orders.id as orderID,
orders.order_date as orderDate,
detail.remark as description,
warehouse.warehouse_name as warehouseName,
warehouse.warehouse_address as warehouseAddress,
warehouse.shoujianren as shoujianren,
warehouse.shoujianrenPhone as shoujianrenPhone,
warehouse.id as warehouseID,
baseuser.realname as contacts,
suser.mobilePhone as mobilePhone,
orders.create_name as creater,
supplier.id as supplierId,
supplier.unit_name as supplierName
from t_b_porder_details detail
left join t_b_porders orders on detail.fk_id = orders.id 
left join t_b_goods_info goods on detail.goods_id = goods.id
left join  t_b_related_units supplier on goods.default_provider = supplier.id
left join t_b_warehouse warehouse on warehouse.id = orders.warehouse_id
left join t_s_user suser on suser.id = warehouse.responsible_person
left join t_s_base_user baseuser on baseuser.id = warehouse.responsible_person
left join t_s_type dic on dic.typecode = detail.measure_unit and typegroupid in (select id from t_s_typegroup where typegroupcode = 'metering_calcu_unit')
left join t_b_price_info price_info on price_info.goods_id = detail.goods_id and price_info.metering_unit = detail.measure_unit
where detail.fk_id = :orderid