|
@@ -370,11 +370,11 @@
|
|
|
join aps_process_operation_out_mater apoom on apo.id=apoom.MAINID-- 作业输出物料
|
|
|
join aps_blank_order abo on apo.BLANKID = abo.id
|
|
|
join aps_production_order apro on apro.ID = abo.PRODUCTIONORDERID
|
|
|
- left join aps_product_detail apd on apoom.ORDERDETAILID = apd.id and apo.DELETED='0' -- 订单产品明细
|
|
|
+ left join aps_product_detail apd on apoom.ORDERDETAILID = apd.id and apd.DELETED='0' -- 订单产品明细
|
|
|
left join aps_production_merge_order apmd on apmd.ORDERNO = apd.MERGEORDERNUMBER and apmd.DELETED='0'
|
|
|
where
|
|
|
apope.deleted='0' and abo.DELETED='0' and apro.deleted='0'
|
|
|
- and apd.DELETED='0' and apoom.DELETED='0'
|
|
|
+ and apo.DELETED='0' and apoom.DELETED='0'
|
|
|
and ifnull(apmd.ORDERTYPE, apro.ORDERTYPE) = '客户订单' -- 订单类型为空默认为客户订单
|
|
|
and abo.PRODUCTSTATUS in ('30','40','50')
|
|
|
and (apope.PLANPROCESSRALL-apope.CANCELROLL)>0
|