From bcdcebacdd2b58397c5f00f28983ad36e67ce9fe Mon Sep 17 00:00:00 2001 From: LSH Date: 星期一, 25 三月 2024 13:18:27 +0800 Subject: [PATCH] #for循环异常处理 --- src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java index cfe070e..22c5437 100644 --- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java @@ -243,7 +243,7 @@ } List<String> orderBoxNoList = new ArrayList<>(); for (OrderDetl orderDetl: orderDetls){ - if (orderDetl.getWorkQty()==0){ + if (orderDetl.getWorkQty().equals(0.0)){ orderBoxNoList.add(orderDetl.getBatch()); } } @@ -255,7 +255,7 @@ if (!orderBoxNoList.contains(matList.getBatch())){ throw new CoolException("鍗曞彿锛�"+param.getOrderNo()+" 绠卞彿锛�"+matList.getBatch()+"涓嶅睘浜庢璁㈠崟鎴栬�呭凡缁忓叆搴�"); }else { - matListBoxNoList.add(matList.getBoxNo()); + matListBoxNoList.add(matList.getBatch()); } } List<OrderDetl> orderDetlList = new ArrayList<>(); @@ -467,8 +467,6 @@ throw new CoolException("瑙勬牸锛�"+matList.getMatnr()+"銆佸弬鏁帮細姣涢噸 roughWeight涓虹┖"); }else if (Cools.isEmpty(matList.getRollExtent()) || matList.getRollExtent().equals(0D)){ throw new CoolException("瑙勬牸锛�"+matList.getMatnr()+"銆佸弬鏁帮細鍗烽暱搴� rollExtent涓虹┖"); - }else if (Cools.isEmpty(matList.getJoint()) || matList.getJoint()==0){ - throw new CoolException("瑙勬牸锛�"+matList.getMatnr()+"銆佸弬鏁帮細鎺ュご joint涓虹┖"); } if (matList.getPosition().equals("1")){//1銆佸乏 2銆佸彸 -- Gitblit v1.9.1