From a588264849a049eb1620f264ae957d4bb6e0c0bd Mon Sep 17 00:00:00 2001 From: rcx <3084692334@qq.com> Date: Tue, 1 Sep 2026 09:24:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(wms,oms)=EF=BC=9A=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E6=8E=92=E5=90=8D=E7=BB=9F=E8=AE=A1=E6=9F=A5=E8=AF=A2=E6=81=92?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E4=BF=AE=E5=A4=8D=EF=BC=9AOMS=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E5=85=A5=E5=BA=93=E5=8D=95=E7=8A=B6=E6=80=81=E4=B8=8D?= =?UTF-8?q?=E5=9B=9E=E4=BC=A0(=E5=85=A8=E5=81=9Cstatus=3D1)=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=8C=89=E5=B7=B2=E5=85=A5=E5=BA=93=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=EF=BC=8C=E6=94=B9=E4=B8=BA=E4=BB=85=E6=8E=92=E9=99=A4=E5=B7=B2?= =?UTF-8?q?=E5=8F=96=E6=B6=88(6)/=E5=B7=B2=E5=85=B3=E9=97=AD(7)(=E4=B8=8E?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E6=98=8E=E7=BB=86=E6=9F=A5=E8=AF=A2=E9=A1=B5?= =?UTF-8?q?=E5=8F=A3=E5=BE=84=E4=B8=80=E8=87=B4)=EF=BC=9B=E5=85=A5?= =?UTF-8?q?=E4=BB=93=E6=97=A5=E6=9C=9F=E4=B8=BA=E7=A9=BA=E7=9A=84=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E5=8D=95=E7=AD=9B=E9=80=89=E4=B8=8E=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E5=9D=87=E5=85=9C=E5=BA=95=E5=BB=BA=E6=A1=A3=E6=97=B6=E9=97=B4?= =?UTF-8?q?create=5Ftime(=E4=B8=8E=E5=87=BA=E5=BA=93=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=8F=A3=E5=BE=84=E4=B8=80=E8=87=B4)?= =?UTF-8?q?=EF=BC=9BWMS=E4=BB=8D=E4=BF=9D=E6=8C=81=E4=BB=85=E5=B7=B2?= =?UTF-8?q?=E5=85=A5=E5=BA=93(5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../facade/inboundRank/ExecutionInboundRankApi.java | 5 +++-- .../inboundRank/ExecutionInboundRankMapper.xml | 13 +++++++------ .../facadeApi/inboundRank/InboundRankApi.java | 2 +- .../mapper/inboundRank/InboundRankMapper.xml | 8 ++++---- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/inboundRank/ExecutionInboundRankApi.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/inboundRank/ExecutionInboundRankApi.java index 9ff29be10..b7cfd6391 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/inboundRank/ExecutionInboundRankApi.java +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/inboundRank/ExecutionInboundRankApi.java @@ -26,8 +26,9 @@ import java.util.List; /** * 入库排名统计Api * - *

按入仓日期区间筛选商品入库量统计排名。统计口径:入仓日期 + 仅已入库状态(5), - * 明细仅取 level=1 主行;一行 = 某仓单内某货品的合计,按件数降序排名。 + *

按入仓日期区间筛选商品入库量统计排名。统计口径:入仓日期(为空的历史单按建档时间兜底); + * OMS 执行入库单状态不回传(长期停留已创建),不按"已入库"过滤,仅排除已取消(6)/已关闭(7), + * 与入库明细查询页面口径一致;明细仅取 level=1 主行;一行 = 某仓单内某货品的合计,按件数降序排名。 * 字段:入仓日期/仓单编号/客户编号/存货人/货名/件数/毛重(吨)/投保总额/体积(CBM)。 * 与出库排名(/executionOutboundRankApi)配对,前端用 tab 页区分

* diff --git a/mhd_oms/src/main/resources/mapper/inboundRank/ExecutionInboundRankMapper.xml b/mhd_oms/src/main/resources/mapper/inboundRank/ExecutionInboundRankMapper.xml index 46c335671..0401cc603 100644 --- a/mhd_oms/src/main/resources/mapper/inboundRank/ExecutionInboundRankMapper.xml +++ b/mhd_oms/src/main/resources/mapper/inboundRank/ExecutionInboundRankMapper.xml @@ -8,15 +8,16 @@ 入库排名统计公共查询条件(OMS 执行入库链路) 数据源:执行入库明细 execution_in_material_detail(a,仅 level=1 主行防重复) join 执行入仓单 execution_stock_in_order(b) left join NGWL_TEST_WMS.material_base_info(c,跨库取货品档案保额作投保总额) - 口径:b.status = 5已入库(OMS 入库状态枚举 1~7,排除已取消(6)/已关闭(7)及未完成单据); - 日期筛选按执行入仓单入仓日期 b.warehouse_date(与列表"入仓日期"列同源); + 口径:b.status not in (6已取消,7已关闭)(OMS 执行入库单状态不回传,实际数据长期停留 status=1已创建, + 无法按"已入库5"过滤,与入库明细查询页面口径一致不按状态筛选,仅排除已取消/已关闭); + 日期筛选按执行入仓单入仓日期 b.warehouse_date(与列表"入仓日期"列同源,为空的历史单按建档时间兜底); 一行 = 某仓单(b.in_order_number)内某货品(a.material_code)的合计,按件数降序排名 --> a.del_flag = 1 and a.level = 1 and b.del_flag = 1 - and b.status = 5 + and b.status not in (6, 7) and b.top_organization_id = #{topOrganizationId} @@ -39,10 +40,10 @@ and a.material_name like concat('%', #{materialName}, '%') - and date_format(b.warehouse_date,'%Y-%m-%d') >= #{warehouseDateStart} + and date_format(IFNULL(b.warehouse_date, b.create_time),'%Y-%m-%d') >= #{warehouseDateStart} - and date_format(b.warehouse_date,'%Y-%m-%d') <= #{warehouseDateEnd} + and date_format(IFNULL(b.warehouse_date, b.create_time),'%Y-%m-%d') <= #{warehouseDateEnd} @@ -56,7 +57,7 @@ select - MAX(b.warehouse_date) AS warehouseDate, + IFNULL(MAX(b.warehouse_date), MAX(b.create_time)) AS warehouseDate, b.in_order_number AS inOrderNumber, MAX(b.shipper_code) AS shipperCode, MAX(b.shipper_name) AS shipperName,