fix(oms,wms): 出库反审补全——重新下发自愈/仓库信息本地兜底/运输链路反审联动/归档查询修复
- 反审后 issueStatus 置 3-已驳回(与入库侧同口径), 清空执行单号/货源单号 - 反审/取消下发软删执行明细时置空 uniqueId, 修复重新下发撞唯一约束 - 新增 WarehouseInfoApplicationService(Feign优先+本地跨库兜底), 出库侧8处调用点接入 - 反审联动软删运输链路: 运输业务单/执行单本地软删 + TMS deleteChainByExecuteOrderNumber - WMS归档查询修复: 交接归档详情丢行/拣货归档数量恒0/复核列表归档汇总/OMS执行单已反审tab
This commit is contained in:
+15
@@ -248,6 +248,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND b.DEL_FLAG = 1
|
||||
</select>
|
||||
|
||||
<!-- 归档汇总(已反审): 反审时拣货明细已软删(del_flag=2), 按 del_flag=1 统计恒为0会丢行, 供交接单归档详情使用 -->
|
||||
<select id="queryTotalsByOutNumberAndBaseIdReverse" resultType="com.mhd.wms.domain.pickingMaterialDetail.repository.po.PickingMaterialDetailPO">
|
||||
SELECT
|
||||
COALESCE(SUM(b.PICKING_QUANTITY), 0) AS picking_quantity,
|
||||
COALESCE(SUM(b.TOTAL_AREA), 0) AS total_area,
|
||||
COALESCE(SUM(b.TOTAL_VOLUME), 0) AS total_volume,
|
||||
COALESCE(SUM(b.TOTAL_NET_WEIGHT), 0) AS total_net_weight,
|
||||
COALESCE(SUM(b.TOTAL_GROSS_WEIGHT), 0) AS total_gross_weight
|
||||
FROM
|
||||
PICKING_MATERIAL_DETAIL b
|
||||
WHERE
|
||||
b.OUT_UNIQUE_ID = #{outUniqueId}
|
||||
AND b.DEL_FLAG = 2
|
||||
</select>
|
||||
|
||||
<select id="sumPickingQuantityByOutOrderNumber" resultType="java.math.BigDecimal">
|
||||
SELECT COALESCE(SUM(pmd.PICKING_QUANTITY), 0)
|
||||
FROM picking_material_detail pmd
|
||||
|
||||
@@ -46,13 +46,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<sql id="selectPickingOrderPo">
|
||||
a.picking_order_id, a.organization_id, a.organization_name, a.top_organization_id, a.order_number, a.picking_order_number,
|
||||
a.status, a.type, a.warehouse_id, a.warehouse_code, a.warehouse_name, a.shipper_id, a.shipper_name, a.quantity, a.weight_limit, a.volume_limit, a.material_quantity,
|
||||
IFNULL((SELECT SUM(b.picking_quantity) FROM picking_material_detail b WHERE b.picking_order_number = a.picking_order_number AND b.del_flag = 1), 0) AS picking_quantity,
|
||||
<!-- 拣货数量/货物类型按行自身生命周期聚合(del_flag=a.del_flag): 活动行统计活动明细, 已反审归档行(del_flag=2)统计归档明细;
|
||||
固定 del_flag=1 会导致【已反审】tab 及归档详情(queryOutOrderByIdReverse 复用本片段)拣货数量恒为0 -->
|
||||
IFNULL((SELECT SUM(b.picking_quantity) FROM picking_material_detail b WHERE b.picking_order_number = a.picking_order_number AND b.del_flag = a.del_flag), 0) AS picking_quantity,
|
||||
a.picking_material_quantity, a.abnormal, a.task_distribution, a.remark, a.create_time, a.create_by, a.create_by_name, a.update_time,b.out_order_id,
|
||||
a.update_by, a.update_by_name, a.del_flag, a.reverse_flag, a.out_order_number, a.business_order_no, a.order_type_code, a.order_type_name, a.priority_level_code, a.priority_level_name
|
||||
,a.push_status,a.push_time,a.push_by,a.push_by_name,
|
||||
(SELECT m.goods_type FROM PICKING_MATERIAL_DETAIL d
|
||||
JOIN material_base_info m ON d.material_base_info_id = m.material_base_info_id
|
||||
WHERE d.PICKING_ORDER_NUMBER = a.PICKING_ORDER_NUMBER and d.del_flag = 1
|
||||
WHERE d.PICKING_ORDER_NUMBER = a.PICKING_ORDER_NUMBER and d.del_flag = a.del_flag
|
||||
LIMIT 1) AS goods_type
|
||||
</sql>
|
||||
|
||||
|
||||
@@ -204,7 +204,8 @@
|
||||
sum(ifnull(d.material_plan_qty, ifnull(d.pending_review_qty, 0) + ifnull(d.reviewed_qty, 0))) as total_plan_qty,
|
||||
sum(ifnull(d.reviewed_qty, 0)) as total_reviewed_qty
|
||||
from review_material_detail d
|
||||
where d.del_flag = 1
|
||||
<!-- 不滤 del_flag: 复核明细仅随整单反审统一软删(全库唯一软删路径), 不滤才能让【已反审】tab 行汇总到归档明细;
|
||||
活动单明细恒为 del_flag=1, 汇总口径不变 -->
|
||||
group by d.review_order_id
|
||||
) agg on a.review_order_id = agg.review_order_id
|
||||
<where>
|
||||
|
||||
Reference in New Issue
Block a user