feat(oms,wms): 入库/出库业务单执行单与WMS出入库各页面列表返回计划数量与实际数量总和(全量不分页合计)

- OMS入库业务单/执行单: list/list1返回totalPlanQuantity/totalInQuantity(与行quantity/in_quantity列同源)
- WMS入库/收货/上架: 返回totalPlanQuantity/totalInQuantity(上架计划数量=明细应上架量; 入库数量=收货/上架数量, 与行列同口径)
- WMS出库/拣货/复核/交接: 返回totalPlanQuantity/totalOutboundQuantity(各页实际量列同口径; 复核明细聚合不滤del_flag兼容已反审tab)
- 合计SQL与queryList同条件片段/同JOIN结构, 分页查询后同一DO查询, 响应与total同层级追加字段, 前端纯增量兼容
This commit is contained in:
rcx
2026-09-14 18:02:57 +08:00
parent e59173b3f9
commit 50423b4e4b
69 changed files with 1033 additions and 41 deletions
@@ -189,4 +189,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
ORDER BY a.create_time DESC
</select>
<!-- 列表合计:与queryList完全同构(FROM/JOIN/WHERE一致, 含反审归档del_flag切换与最新入库单去重关联), 仅SELECT换成全量聚合;
计划数量与行的quantity列同源, 入库数量与行的receipt_quantity列(收货单实收)同源, 底部总和与列值之和一致 -->
<select id="queryListTotal" parameterType="com.mhd.wms.domain.stockReceiptOrder.repository.todo.StockReceiptOrderDO" resultType="com.mhd.wms.domain.stockReceiptOrder.repository.po.StockReceiptOrderTotalPO">
select
coalesce(sum(a.quantity), 0) as totalPlanQuantity,
coalesce(sum(a.receipt_quantity), 0) as totalInQuantity
from stock_receipt_order a
LEFT JOIN stock_in_order b ON a.in_order_number = b.in_order_number
<choose>
<when test="reverseAuditStatus != null">
and a.DEL_FLAG = 2 and b.DEL_FLAG = 2
and b.IN_ORDER_ID = (select max(c.IN_ORDER_ID) from stock_in_order c
where c.IN_ORDER_NUMBER = a.in_order_number and c.DEL_FLAG = 2)
</when>
<otherwise>
and a.DEL_FLAG = 1 and b.DEL_FLAG = 1
and b.IN_ORDER_ID = (select max(c.IN_ORDER_ID) from stock_in_order c
where c.IN_ORDER_NUMBER = a.in_order_number and c.DEL_FLAG = 1)
</otherwise>
</choose>
<where>
<include refid="selectStockReceiptOrderPo1"/>
<include refid="com.mhd.wms.domain.stockInOrder.repository.mapper.StockInOrderMapper.joinStockInOrderPoWhere"/>
</where>
</select>
</mapper>