|
|
@ -678,13 +678,16 @@ |
|
|
C.QtyToIssue AS qtyToIssue, |
|
|
C.QtyToIssue AS qtyToIssue, |
|
|
ISNULL(C.actual_out_qty, 0) AS actualOutQty, |
|
|
ISNULL(C.actual_out_qty, 0) AS actualOutQty, |
|
|
A.work_center_no AS workCenterNo, |
|
|
A.work_center_no AS workCenterNo, |
|
|
so.out_batchNo as outBatchNo |
|
|
|
|
|
|
|
|
so.out_batchNo AS outBatchNo, |
|
|
|
|
|
W.WareHouseName AS warehouseName, |
|
|
|
|
|
C.warehouse_id |
|
|
FROM SOIssueNotifyHeader A |
|
|
FROM SOIssueNotifyHeader A |
|
|
INNER JOIN SOIssueNotifyOrderList B ON A.Site = B.Site AND A.NotifyNo = B.NotifyNo |
|
|
INNER JOIN SOIssueNotifyOrderList B ON A.Site = B.Site AND A.NotifyNo = B.NotifyNo |
|
|
left join ShopOrder as so on B.site = so.site and B.SOOrderNo = so.OrderNo |
|
|
|
|
|
|
|
|
LEFT JOIN ShopOrder so ON B.Site = so.Site AND B.SOOrderNo = so.OrderNo |
|
|
INNER JOIN SOIssueNotifyOrderMaterialList C ON B.Site = C.Site AND B.NotifyNo = C.NotifyNo AND B.ItemNo = C.ItemNo |
|
|
INNER JOIN SOIssueNotifyOrderMaterialList C ON B.Site = C.Site AND B.NotifyNo = C.NotifyNo AND B.ItemNo = C.ItemNo |
|
|
INNER JOIN Part P ON C.Site = P.Site AND C.ComponentPartNo = P.PartNo |
|
|
INNER JOIN Part P ON C.Site = P.Site AND C.ComponentPartNo = P.PartNo |
|
|
INNER JOIN UM U ON U.Site = P.Site AND U.UMID = P.UMID |
|
|
INNER JOIN UM U ON U.Site = P.Site AND U.UMID = P.UMID |
|
|
|
|
|
LEFT JOIN WareHouse W ON C.Site = W.Site AND C.warehouse_id = W.WareHouseID |
|
|
<where> |
|
|
<where> |
|
|
A.site IN (SELECT site FROM AccessSite WHERE userID = #{query.userName}) |
|
|
A.site IN (SELECT site FROM AccessSite WHERE userID = #{query.userName}) |
|
|
<if test="query.notifyNo != null and query.notifyNo != ''"> |
|
|
<if test="query.notifyNo != null and query.notifyNo != ''"> |
|
|
@ -720,6 +723,12 @@ |
|
|
#{item} |
|
|
#{item} |
|
|
</foreach> |
|
|
</foreach> |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
<if test="query.warehouseIdList != null and query.warehouseIdList.size() > 0"> |
|
|
|
|
|
AND C.warehouse_id IN |
|
|
|
|
|
<foreach collection="query.warehouseIdList" item="item" open="(" separator="," close=")"> |
|
|
|
|
|
#{item} |
|
|
|
|
|
</foreach> |
|
|
|
|
|
</if> |
|
|
</where> |
|
|
</where> |
|
|
ORDER BY A.NotifyNo, B.SOOrderNo, C.BOMItemNo |
|
|
ORDER BY A.NotifyNo, B.SOOrderNo, C.BOMItemNo |
|
|
</select> |
|
|
</select> |