From bf45dc5169e867cb6cdbdfa609d2e29bdcbc0390 Mon Sep 17 00:00:00 2001 From: liuxy Date: Thu, 29 Aug 2024 09:39:59 +0800 Subject: [PATCH] =?UTF-8?q?rev=EF=BC=9B=E4=B8=80=E6=9C=9F=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E9=87=8D=E9=87=8F=E6=A0=A1=E9=AA=8C=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ProductInstorServiceImpl.java | 3 +++ .../service/impl/StorPublicServiceImpl.java | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 9 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 7d0f36597..f6b8d138f 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 @@ -662,6 +662,9 @@ public class ProductInstorServiceImpl implements ProductInstorService { JSONObject data = jsonObject.getJSONArray("data").getJSONObject(0); double weight_now = NumberUtil.div(data.getDoubleValue("weight"), 10); + if (data.getDoubleValue("weight") <= 0) { + throw new BadRequestException("当前称重重量有误,请检查!当前称重重量为【"+weight_now+"】"); + } // 获取系统参数1 double weight_sys = Double.parseDouble(SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("weight_sys").getValue()); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/st/inbill/service/impl/StorPublicServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/st/inbill/service/impl/StorPublicServiceImpl.java index a6d0ecf38..504ae460e 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/st/inbill/service/impl/StorPublicServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/st/inbill/service/impl/StorPublicServiceImpl.java @@ -464,7 +464,8 @@ public class StorPublicServiceImpl implements StorPublicService { throw new BadRequestException("点位仓位更新未查询到符合条件的点位仓位!"); } HashMap map = new HashMap<>(); - if ("1".equals(lock_type)) {//解锁 + if ("1".equals(lock_type)) { + //解锁 map.put("lock_type", lock_type); map.put("task_code", ""); map.put("inv_type", ""); @@ -488,10 +489,8 @@ public class StorPublicServiceImpl implements StorPublicService { map.put("storagevehicle_code", storagevehicle_code); } } - - wo_Struct.update(map, "struct_id = '" + jo.getString("struct_id") + "'"); - wo_Point.update(map, "point_id = '" + jo.getString("point_id") + "'"); - } else {//锁定 + } else { + //锁定 map.put("lock_type", lock_type); map.put("taskdtl_type", from.getString("task_type")); map.put("taskdtl_id", from.getString("task_id")); @@ -506,6 +505,7 @@ public class StorPublicServiceImpl implements StorPublicService { map.put("point_status", "01"); } } + // 更新点位仓位对应的字段属性 wo_Struct.update(map, "struct_id = '" + jo.getString("struct_id") + "'"); wo_Point.update(map, "point_id = '" + jo.getString("point_id") + "'"); } @@ -539,16 +539,16 @@ public class StorPublicServiceImpl implements StorPublicService { throw new BadRequestException("点位仓位更新未查询到符合条件的点位仓位!"); } HashMap map = new HashMap<>(); - if ("1".equals(lock_type)) {//解锁 + if ("1".equals(lock_type)) { + //解锁 map.put("lock_type", lock_type); map.put("task_code", ""); map.put("inv_type", ""); map.put("inv_id", ""); map.put("inv_code", ""); map.put("point_status", "1"); - wo_Struct.update(map, "struct_id = '" + jo.getString("struct_id") + "'"); - wo_Point.update(map, "point_id = '" + jo.getString("point_id") + "'"); - } else {//锁定 + } else { + //锁定 map.put("lock_type", lock_type); map.put("taskdtl_type", from.getString("task_type")); map.put("taskdtl_id", from.getString("task_id")); @@ -563,6 +563,7 @@ public class StorPublicServiceImpl implements StorPublicService { map.put("point_status", "01"); } } + // 更新点位仓位对应的字段属性 wo_Struct.update(map, "struct_id = '" + jo.getString("struct_id") + "'"); wo_Point.update(map, "point_id = '" + jo.getString("point_id") + "'"); }