From 57ed714152f6783ad5fd638237b33a9e2e4b302b Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期四, 20 二月 2025 13:47:32 +0800 Subject: [PATCH] #四向库入出库修改 --- src/main/java/com/zy/common/service/CommonService.java | 80 ++++++++++++++++++++++++---------------- 1 files changed, 48 insertions(+), 32 deletions(-) diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java index 09ce68b..f9678da 100644 --- a/src/main/java/com/zy/common/service/CommonService.java +++ b/src/main/java/com/zy/common/service/CommonService.java @@ -570,46 +570,62 @@ if (Cools.isEmpty(locMast) && crnNo != 0) { List<LocMast> locMasts = new ArrayList<>(); int floor = 0; - if (locTypeDto.getLocType1() == 1){ - int F1count = locMastService.selectCount(new EntityWrapper<LocMast>() - .in("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()) - .eq("crn_no", 7) - .eq("loc_type1", locTypeDto.getLocType1()) - .eq("lev1", 1)); - if (F1count <= 10) { - int F2count = locMastService.selectCount(new EntityWrapper<LocMast>() + if (locTypeDto.getLev1() == null){ + if (locTypeDto.getLocType1() == 1){ + int F1count = locMastService.selectCount(new EntityWrapper<LocMast>() .in("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()) .eq("crn_no", 7) .eq("loc_type1", locTypeDto.getLocType1()) - .eq("lev1", 2)); - if (F2count <= 10) { - throw new CoolException("搴撲綅涓嶈冻"); + .eq("lev1", 1)); + if (F1count <= 10) { + int F2count = locMastService.selectCount(new EntityWrapper<LocMast>() + .in("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()) + .eq("crn_no", 7) + .eq("loc_type1", locTypeDto.getLocType1()) + .eq("lev1", 2)); + if (F2count <= 10) { + throw new CoolException("搴撲綅涓嶈冻"); + }else { + floor = 2; + } }else { - floor = 2; + floor = 1; } - }else { - floor = 1; - } - }else if (locTypeDto.getLocType1() == 2){ - int F3count = locMastService.selectCount(new EntityWrapper<LocMast>() - .in("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()) - .eq("crn_no", 7) - .eq("loc_type1", locTypeDto.getLocType1()) - .eq("lev1", 3)); - if (F3count <= 10) { - throw new CoolException("搴撲綅涓嶈冻"); + }else if (locTypeDto.getLocType1() == 2){ + int F3count = locMastService.selectCount(new EntityWrapper<LocMast>() + .in("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()) + .eq("crn_no", 7) + .eq("loc_type1", locTypeDto.getLocType1()) + .eq("lev1", 3)); + if (F3count <= 10) { + throw new CoolException("搴撲綅涓嶈冻"); + } + floor = 3; + }else { + throw new CoolException("搴撲綅楂樺害鏁版嵁寮傚父"); } - floor = 3; - }else { - throw new CoolException("搴撲綅楂樺害鏁版嵁寮傚父"); } - locMasts = locMastService.selectList(new EntityWrapper<LocMast>() - .eq("bay1", nearRow) - .in("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue()) - .eq("crn_no",7) - .eq("loc_type1",locTypeDto.getLocType1()) - .eq("lev1",floor).orderBy("row1",false));//鏈�娴呭簱浣� + + if (locTypeDto.getLev1() != null){ + locMasts = locMastService.selectList(new EntityWrapper<LocMast>() + .eq("bay1", nearRow) + .in("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue()) + .eq("crn_no",7) + .eq("loc_type1",locTypeDto.getLocType1()) + .eq("lev1",locTypeDto.getLev1()).orderBy("row1",false));//鏈�娴呭簱浣� + }else { + if (floor == 0){ + throw new CoolException("搴撲綅宸叉弧"); + } + locMasts = locMastService.selectList(new EntityWrapper<LocMast>() + .eq("bay1", nearRow) + .in("loc_sts", "O").eq("whs_type",rowLastnoType.getType().longValue()) + .eq("crn_no",7) + .eq("loc_type1",locTypeDto.getLocType1()) + .eq("lev1",floor).orderBy("row1",false));//鏈�娴呭簱浣� + } + for (LocMast locMast1 : locMasts) { if (locMast != null){ -- Gitblit v1.9.1