From 6a2c853e8e45d276c39ec9417eed98352abdb8e8 Mon Sep 17 00:00:00 2001 From: liuxy Date: Thu, 16 Mar 2023 11:15:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ProductInstorServiceImpl.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/ProductInstorServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/ProductInstorServiceImpl.java index 4b3b33d2a..c94030965 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/ProductInstorServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/st/service/impl/ProductInstorServiceImpl.java @@ -162,11 +162,24 @@ public class ProductInstorServiceImpl implements ProductInstorService { // 木箱尺寸长度低于950的不入立体库,长度大于1385的立体库无法入库 String length_up = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("box_length_up").getValue(); String length_down = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("box_length_down").getValue(); - Double box_length_up = Double.valueOf(length_up); - Double box_length_down = Double.valueOf(length_down); + String with_up = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("box_with_up").getValue(); + String high_up = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("box_high_up").getValue(); + + Double box_length_up = Double.valueOf(length_up); // 木箱长度上限 + Double box_length_down = Double.valueOf(length_down); // 木箱长度下限 + Double box_with_up = Double.valueOf(with_up); // 木箱宽度上限 + Double box_high_up = Double.valueOf(high_up); // 木箱高度上限 if (!(box_length_down <= box_length && box_length <= box_length_up)) { - throw new BadRequestException("无法入立体,木箱长度为:"+box_length); + throw new BadRequestException("无法入立体库,木箱超长;当前木箱长度为:"+box_length); + } + + if (!(box_width <= box_with_up)) { + throw new BadRequestException("无法入立体库,木箱超宽;当前木箱宽度为:"+box_width); + } + + if (!(box_high <= box_high_up)) { + throw new BadRequestException("无法入立体库,木箱超高;当前木箱高度为:"+box_high); } JSONObject point_jo = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + point_code + "'").uniqueResult(0);