From d8400d3a9d6d5da8abf1fad1740f64d5dc2bb73c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A7=A6=E9=B8=BF=E5=B1=95?= <18031053041@163.com>
Date: Tue, 10 Feb 2026 17:29:58 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=85=A5=E5=BA=93=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E3=80=91=E5=88=97=E8=A1=A8=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5?=
=?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=E8=AE=A1=E5=88=92=E5=85=A5=E5=BA=93?=
=?UTF-8?q?=E6=95=B0=E9=87=8F=E3=80=81=E6=94=B6=E8=B4=A7=E6=95=B0=E9=87=8F?=
=?UTF-8?q?=E3=80=81=E4=B8=8A=E6=9E=B6=E6=95=B0=E9=87=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../repository/po/StockInOrderPO.java | 25 +++++++++++++++++--
.../stockInOrder/StockInOrderMapper.xml | 25 ++++++++++++++++++-
2 files changed, 47 insertions(+), 3 deletions(-)
diff --git a/mhd_wms/src/main/java/com/mhd/wms/domain/stockInOrder/repository/po/StockInOrderPO.java b/mhd_wms/src/main/java/com/mhd/wms/domain/stockInOrder/repository/po/StockInOrderPO.java
index b50bce6f6..ab1ce0335 100644
--- a/mhd_wms/src/main/java/com/mhd/wms/domain/stockInOrder/repository/po/StockInOrderPO.java
+++ b/mhd_wms/src/main/java/com/mhd/wms/domain/stockInOrder/repository/po/StockInOrderPO.java
@@ -149,10 +149,31 @@ public class StockInOrderPO extends BaseVOEntity {
@Excel(name = "物料种数")
private Integer materialQuantity;
- @ApiModelProperty("计划数量")
- @Excel(name = "计划数量")
+ @ApiModelProperty("计划数量(原字段)")
+ @Excel(name = "计划数量(原字段)")
private BigDecimal quantity;
+ /**
+ * 计划入库数量:取入库单明细中的入库数量汇总
+ */
+ @ApiModelProperty("计划入库数量")
+ @Excel(name = "计划入库数量")
+ private BigDecimal planInQuantity;
+
+ /**
+ * 收货数量:入库单对应的收货单实际收货数量汇总
+ */
+ @ApiModelProperty("收货数量")
+ @Excel(name = "收货数量")
+ private BigDecimal receiptQuantity;
+
+ /**
+ * 上架数量:入库单对应的上架单实际上架数量汇总
+ */
+ @ApiModelProperty("上架数量")
+ @Excel(name = "上架数量")
+ private BigDecimal shelvesQuantity;
+
@ApiModelProperty("净重 单位:千克")
@Excel(name = "净重 单位:千克")
private BigDecimal weightLimit;
diff --git a/mhd_wms/src/main/resources/mapper/stockInOrder/StockInOrderMapper.xml b/mhd_wms/src/main/resources/mapper/stockInOrder/StockInOrderMapper.xml
index f65eacbca..13c75df64 100644
--- a/mhd_wms/src/main/resources/mapper/stockInOrder/StockInOrderMapper.xml
+++ b/mhd_wms/src/main/resources/mapper/stockInOrder/StockInOrderMapper.xml
@@ -33,6 +33,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
+
+
@@ -84,7 +87,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.in_order_id, a.organization_id, a.organization_name, a.top_organization_id, a.notice_number, a.in_order_number, a.status,
a.audit_status, a.audit_remark, a.audit_by, a.audit_by_name, a.audit_time, a.warehouse_id, a.warehouse_code, a.warehouse_name, a.shipper_id, a.shipper_code,
a.shipper_name, a.order_type_code, a.order_type_name, a.supplier_id, a.supplier_code, a.supplier_name, a.expect_time, a.supply_chain_number,
- a.priority_level_code, a.priority_level_name, a.direct_warehouse, a.annex_url, a.material_quantity, a.quantity, a.weight_limit, a.volume_limit, a.cancel_order, a.cancel_remark, a.cancel_by,
+ a.priority_level_code, a.priority_level_name, a.direct_warehouse, a.annex_url, a.material_quantity, a.quantity,
+ -- 计划入库数量:入库明细表 in_material_detail 的 quantity 汇总
+ (select ifnull(sum(imd.quantity), 0)
+ from in_material_detail imd
+ where imd.in_order_number = a.in_order_number
+ and imd.del_flag = 1
+ and (imd.level is null or imd.level = 1)
+ ) as plan_in_quantity,
+ -- 收货数量:收货单表 stock_receipt_order 的 receipt_quantity 汇总
+ (select ifnull(sum(sro.receipt_quantity), 0)
+ from stock_receipt_order sro
+ where sro.in_order_number = a.in_order_number
+ and sro.del_flag = 1
+ ) as receipt_quantity,
+ -- 上架数量:上架单表 stock_shelf_order 的 shelves_quantity 汇总
+ (select ifnull(sum(sso.shelves_quantity), 0)
+ from stock_shelf_order sso
+ where sso.in_order_number = a.in_order_number
+ and sso.del_flag = 1
+ ) as shelves_quantity,
+ a.weight_limit, a.volume_limit, a.cancel_order, a.cancel_remark, a.cancel_by,
a.cancel_by_name, a.cancel_time, a.close_order, a.close_remark, a.close_by, a.close_by_name, a.close_time, a.remark, a.create_time, a.create_by,
a.create_by_name, a.update_time, a.update_by, a.update_by_name, a.del_flag, over_stock_id, over_stock_status, over_stock_type,
a."TO", a.CONTACT_PERSON, a.VEHICLE_INFO, a.CONSIGNMENT_NO, a.TEL, a.DRIVER_SIGNATURE, a.FAX, a.DECLARATION_AREA, a.MANUFACTURER,