select
IFNULL(Qty*ItemNetWeight,0) Weight,
IFNULL(ItemUomCode,0) code
FROM t_oc_transferorderline
where HeadID in(
select id FROM t_oc_transferorderheader where OrderType in ('ZR08')
)
and DATE_FORMAT(CreateTime,'%Y-%m-%d')=DATE_FORMAT('2016-11-08','%Y-%m-%d')
select ifnull(orderNO,0) from t_oc_transferorderheader;
相关分类