From f47cfbb7eaadc881970ddeb77a42c1bcde713bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Fri, 23 Sep 2022 00:00:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E7=9B=98=E7=82=B9=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=95=86=E5=93=81=E9=80=89=E6=8B=A9=E7=9A=84=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/jsh/erp/constants/BusinessConstants.java | 1 + .../main/java/com/jsh/erp/constants/ExceptionConstants.java | 5 ++++- .../com/jsh/erp/service/depotItem/DepotItemService.java | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/jshERP-boot/src/main/java/com/jsh/erp/constants/BusinessConstants.java b/jshERP-boot/src/main/java/com/jsh/erp/constants/BusinessConstants.java index 7215ac70..5fa4ad64 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/constants/BusinessConstants.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/constants/BusinessConstants.java @@ -92,6 +92,7 @@ public class BusinessConstants { public static final String SUB_TYPE_SALES = "销售"; public static final String SUB_TYPE_SALES_RETURN = "销售退货"; public static final String SUB_TYPE_TRANSFER = "调拨"; + public static final String SUB_TYPE_CHECK_ENTER = "盘点录入"; public static final String SUB_TYPE_REPLAY = "盘点复盘"; public static final String SUB_TYPE_ASSEMBLE = "组装单"; public static final String SUB_TYPE_DISASSEMBLE = "拆卸单"; diff --git a/jshERP-boot/src/main/java/com/jsh/erp/constants/ExceptionConstants.java b/jshERP-boot/src/main/java/com/jsh/erp/constants/ExceptionConstants.java index f180bec2..7ad46d3a 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/constants/ExceptionConstants.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/constants/ExceptionConstants.java @@ -331,7 +331,10 @@ public class ExceptionConstants { public static final String MATERIAL_ASSEMBLE_SELECT_ERROR_MSG = "抱歉,组装拆卸单不能选择批号或序列号商品:%s"; //调拨单不能选择批号或序列号商品 public static final int MATERIAL_TRANSFER_SELECT_ERROR_CODE = 80000018; - public static final String MATERIAL_TRANSFER_SELECT_ERROR_MSG = "抱歉,调拨单不能选择批号或序列号商品:%s"; + public static final String MATERIAL_TRANSFER_SELECT_ERROR_MSG = "抱歉,调拨单不能选择批号或序列号商品:%s,建议走其它入库和出库单"; + //盘点业务不能选择批号或序列号商品 + public static final int MATERIAL_STOCK_CHECK_ERROR_CODE = 80000019; + public static final String MATERIAL_STOCK_CHECK_ERROR_MSG = "抱歉,盘点业务不能选择批号或序列号商品:%s,建议走其它入库和出库单"; /** * 单据信息 diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java index ad2a8a5b..e8a96f01 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java @@ -419,6 +419,12 @@ public class DepotItemService { throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_TRANSFER_SELECT_ERROR_CODE, String.format(ExceptionConstants.MATERIAL_TRANSFER_SELECT_ERROR_MSG, barCode)); } + //盘点业务不能选择批号或序列号商品(该场景走出库和入库单) + if(BusinessConstants.SUB_TYPE_CHECK_ENTER.equals(depotHead.getSubType()) + ||BusinessConstants.SUB_TYPE_REPLAY.equals(depotHead.getSubType())) { + throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_STOCK_CHECK_ERROR_CODE, + String.format(ExceptionConstants.MATERIAL_STOCK_CHECK_ERROR_MSG, barCode)); + } } if (StringUtil.isExist(rowObj.get("snList"))) { depotItem.setSnList(rowObj.getString("snList"));