Browse Source

2025-11-11

pda生产领料 - 物料清单sql修改
master
fengyuan_yang 2 months ago
parent
commit
0ddfee9b7b
  1. 8
      src/main/resources/mapper/productionPicking/ProductionPickingMapper.xml

8
src/main/resources/mapper/productionPicking/ProductionPickingMapper.xml

@ -104,13 +104,15 @@
b.NotifyNo as outboundNo, b.NotifyNo as outboundNo,
b.bu AS buNo, b.bu AS buNo,
a.ComponentPartNo AS partNo, a.ComponentPartNo AS partNo,
P.PartDescription AS part_desc,
P.PartDescription AS partDesc,
SUM(CAST(a.QtyToIssue AS float)) as requiredQty, SUM(CAST(a.QtyToIssue AS float)) as requiredQty,
dbo.Get_InboundQty(a.site, B.bu, a.NotifyNo, SOOrderNo,SeqNo, 'soi') as pickedQty
sum(ISNULL(a.actual_out_qty,0)) as pickedQty ,
SUM(ISNULL(S.RollQty,0)) as scansQty --本次扫描数量
from SOIssueNotifyHeader B from SOIssueNotifyHeader B
INNER JOIN SOIssueNotifyOrderList C ON B.SITE = C.SITE AND B.NotifyNo = C.NotifyNo INNER JOIN SOIssueNotifyOrderList C ON B.SITE = C.SITE AND B.NotifyNo = C.NotifyNo
INNER JOIN SOIssueNotifyOrderMaterialList a ON A.SITE = C.SITE AND A.NotifyNo = C.NotifyNo AND C.ItemNo = A.ItemNo INNER JOIN SOIssueNotifyOrderMaterialList a ON A.SITE = C.SITE AND A.NotifyNo = C.NotifyNo AND C.ItemNo = A.ItemNo
INNER JOIN PART P ON A.SITE = P.SITE AND A.ComponentPartNo = P.PARTNO INNER JOIN PART P ON A.SITE = P.SITE AND A.ComponentPartNo = P.PARTNO
LEFT JOIN ScannedRollTempTable S ON A.Site = S.site AND A.ComponentPartNo = S.part_no AND C.SOOrderNo = S.OrderNo
where a.site = #{site} where a.site = #{site}
<if test="buNo != null and buNo != ''"> <if test="buNo != null and buNo != ''">
AND b.bu = #{buNo} AND b.bu = #{buNo}
@ -119,7 +121,7 @@
AND a.warehouse_id = #{warehouseId} AND a.warehouse_id = #{warehouseId}
AND B.NotifyNo = #{outboundNo} AND B.NotifyNo = #{outboundNo}
AND C.SOOrderNo = #{relatedNo} AND C.SOOrderNo = #{relatedNo}
GROUP BY b.site, b.NotifyNo, b.bu ,b.NotifyDate, a.ComponentPartNo, P.PartDescription,SOOrderNo,SeqNo
GROUP BY b.site, b.NotifyNo, b.bu , a.ComponentPartNo, P.PartDescription
</select> </select>
<!-- 获取出库单物料明细列表 --> <!-- 获取出库单物料明细列表 -->

Loading…
Cancel
Save