Browse Source

2026-01-23

生产领料增加合约号码
master
fengyuan_yang 1 month ago
parent
commit
a64e0e5d0f
  1. 13
      src/main/resources/mapper/productionPicking/ProductionPickingMapper.xml

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

@ -49,14 +49,17 @@
0 as availableQty ,
b.NotifyDate as required_outbound_date,
0 AS pickedLabels,
0 AS pickedQty
0 AS pickedQty,
so.out_batchNo as outBatchNo
from SOIssueNotifyHeader B
inner join SOIssueNotifyOrderList as d on b.site = d.site and b.NotifyNo = d.NotifyNo
inner join ShopOrder as so on d.site = so.site and d.SOOrderNo = so.OrderNo
INNER JOIN SOIssueNotifyOrderMaterialList a ON A.SITE = B.SITE AND A.NotifyNo = B.NotifyNo
WHERE b.site = #{site}
AND b.bu = #{buNo}
AND b.NotifyNo = #{outboundNo}
AND a.warehouse_id = #{warehouseId}
GROUP BY b.site, b.NotifyNo, b.bu ,b.NotifyDate
GROUP BY b.site, b.NotifyNo, b.bu ,b.NotifyDate, so.out_batchNo
</select>
<!-- 验证标签与出库单是否匹配 -->
@ -136,13 +139,15 @@
A.IssureQty as requiredQty, -- 需求数量
b.UMID AS umId, -- 计量单位
SUM (C.QtyToIssue) as pickedQty, --
SUM (ISNULL(D.roll_qty, 0)) as totalQty
SUM (ISNULL(D.roll_qty, 0)) as totalQty,
so.out_batchNo as outBatchNo
FROM SOIssueNotifyOrderList A
inner join ShopOrder as so on a.site = so.site and a.SOOrderNo = so.OrderNo
INNER JOIN PART B ON A.SITE = B.SITE AND A.FGPartNo = B.PartNo
INNER JOIN SOIssueNotifyOrderMaterialList C ON A.SITE = B.SITE AND A.NotifyNo = C.NotifyNo AND A.ItemNo = C.ItemNo
LEFT JOIN StockTransactionLog D ON C.SITE = D.SITE AND C.NotifyNo = D.document_no AND A.SOOrderNo = D.order_line_no
WHERE A.site = #{site} AND a.NotifyNo = #{outboundNo}
GROUP BY A.Site, A.NotifyNo, A.FGPartNo, B.PartDescription, A.IssureQty, b.UMID, A.SOOrderNo
GROUP BY A.Site, A.NotifyNo, A.FGPartNo, B.PartDescription, A.IssureQty, b.UMID, A.SOOrderNo,so.out_batchNo
</select>
<select id="getByRollNo" resultType="com.gaotao.modules.inventoryStock.entity.InventoryStock">

Loading…
Cancel
Save