|
@@ -194,9 +194,11 @@
|
|
|
aps_process_operation_process_equ a1
|
|
|
LEFT JOIN aps_process_operation a2 ON a1.PROCESSID = a2.ID
|
|
|
LEFT JOIN aps_blank_order a3 ON a3.ID = a2.BLANKID
|
|
|
- LEFT JOIN aps_process_output_product a4 ON a3.ID = a4.BLANKID
|
|
|
+ LEFT JOIN (select GROUP_CONCAT(PRODUCTNAME)as PRODUCTNAME,GROUP_CONCAT(PRODUCTID) AS PRODUCTID,BLANKID from
|
|
|
+ aps_process_output_product where DELETED='0' group by BLANKID) a4 ON a3.ID = a4.BLANKID
|
|
|
LEFT JOIN aps_production_order a6 ON a6.ID = a3.PRODUCTIONORDERID
|
|
|
- LEFT JOIN aps_product_detail a5 ON a6.ID = a5.MAINID and a4.PRODUCTID=a5.ID
|
|
|
+ LEFT JOIN (select MAINID,GROUP_CONCAT(DISTINCT MERGEORDERNUMBER) MERGEORDERNUMBER from aps_product_detail WHERE
|
|
|
+ DELETED='0' group by MAINID) a5 ON a6.ID = a5.MAINID
|
|
|
LEFT JOIN aps_customer_management a7 on a6.CUSTOMID= a7.ID
|
|
|
left join asp_check_items b on a1.PROCESSDEVICEID =b.ID
|
|
|
left join sys_dict c on c.DICTTYPE='asp_check_item_type' AND b.CHECKITEMTYPE =c.VALUE
|
|
@@ -208,8 +210,8 @@
|
|
|
a1.DELETED ='0'
|
|
|
AND a2.DELETED = '0'
|
|
|
AND a3.DELETED = '0'
|
|
|
- AND a4.DELETED = '0'
|
|
|
- AND a5.DELETED = '0'
|
|
|
+ -- AND a4.DELETED = '0'
|
|
|
+ -- AND a5.DELETED = '0'
|
|
|
AND a6.DELETED='0'
|
|
|
<if test="ids != null and ids.size()>0">
|
|
|
and a1.ID in
|