From b859aa99d3d27b36be8014816c927801fb8b1953 Mon Sep 17 00:00:00 2001 From: rcx <3084692334@qq.com> Date: Wed, 19 Aug 2026 17:59:19 +0800 Subject: [PATCH] =?UTF-8?q?fix(oms):=E5=85=A5=E5=BA=93=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E5=8D=95=E5=AF=BC=E5=85=A5=E4=BB=B6=E6=95=B0=E6=9C=AA=E5=9B=9E?= =?UTF-8?q?=E6=98=BE=E8=AE=A1=E5=88=92=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 导入模版去掉Qty(cases)列(5列布局),饮用日期列位前移 - 明细计划数量由Qty箱数改为"件数"取值,件数同步落库PIECE_COUNT用于列表回显 - 物料在当前登录组织下不存在时返回明确提示,替代货主列表取值越界导致的500 --- .../listener/StockInExcelListener.java | 8 +++----- .../persistence/ReservationStockInOrderImpl.java | 14 +++++++++++--- .../repository/vo/StockInProductDetail.java | 16 +++------------- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/listener/StockInExcelListener.java b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/listener/StockInExcelListener.java index e88ff7fc9..9d711ac98 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/listener/StockInExcelListener.java +++ b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/listener/StockInExcelListener.java @@ -102,7 +102,7 @@ public class StockInExcelListener extends AnalysisEventListener data) { StockInProductDetail detail = new StockInProductDetail(); @@ -115,10 +115,8 @@ public class StockInExcelListener extends AnalysisEventListener processedShipperIds = new HashSet<>(); for (StockInProductDetail productDetail : productDetailList) { MaterialBaseInfoPO materialBaseInfoPO = stockInOrderMapper.getByCode(productDetail.getProductCode(),loginUser.getUserPo().getOrganizationId()); - if (materialBaseInfoPO != null && materialBaseInfoPO.getShipperId() != null) { + // 物料在当前登录组织下不存在时给出明确提示,避免后续货主取值越界导致500 + if (materialBaseInfoPO == null) { + throw new ServiceException("产品编号[" + productDetail.getProductCode() + "]在当前组织下不存在,请核对产品编号或使用物料所属组织的账号导入"); + } + if (materialBaseInfoPO.getShipperId() != null) { Long shipperId = materialBaseInfoPO.getShipperId(); if (processedShipperIds.add(shipperId)) { Map shipper = new HashMap<>(); @@ -410,6 +414,9 @@ public class ReservationStockInOrderImpl extends ServiceImpl