From a811a95b1f30abb8c49bfe379642666d2b956f22 Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期三, 09 七月 2025 16:48:19 +0800 Subject: [PATCH] 1 --- src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java | 97 +++++++++++++++++++++++++++++------------------- 1 files changed, 59 insertions(+), 38 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java index ea66af4..6b3d16b 100644 --- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java @@ -538,30 +538,26 @@ LocMast locMast = locMastService.selectById(taskDto.getLocNo()); List<LocMast> locMasts = new ArrayList<>(); - if ((locMast.getBay1() >= 1 && locMast.getBay1() <= 2) || (locMast.getBay1() >= 6 && locMast.getBay1() <= 7 && locMast.getRow1() != 36 && locMast.getRow1() != 29) || (locMast.getBay1() >= 11 && locMast.getBay1() <= 12)) { + if ((locMast.getBay1() >= 3 && locMast.getBay1() <= 6) ) { locMasts = locMastService.selectList(new EntityWrapper<LocMast>() - .eq("gro1", locMast.getGro1()) - .eq("crn_no", 7) - .eq("loc_type1", locMast.getLocType1()) - .orderBy("bay1", false)); - } else { - locMasts = locMastService.selectList(new EntityWrapper<LocMast>() - .eq("gro1", locMast.getGro1()) + .eq("row1", locMast.getBay1()) + .in("bay1", 3,4,5,6) .eq("crn_no", 7) .eq("loc_type1", locMast.getLocType1()) .orderBy("bay1", true)); - } - for (LocMast locMast1 : locMasts) { - if (locMast1.getLocNo().equals(taskDto.getLocNo())) { - break; - } - if (locMast1.getLocSts().equals("X")) { - throw new CoolException(taskDto.getLocNo() + "搴撲綅鍓嶆柟鏈夐攣瀹氬簱浣嶏紝绂佹鍑哄簱"); - } - if (locMast1.getLocSts().equals("F")) { - moveLocForDeepLoc(locMast1); + for (LocMast locMast1 : locMasts) { + if (locMast1.getLocNo().equals(taskDto.getLocNo())) { + break; + } + if (locMast1.getLocSts().equals("X")) { + throw new CoolException(taskDto.getLocNo() + "搴撲綅鍓嶆柟鏈夐攣瀹氬簱浣嶏紝绂佹鍑哄簱"); + } + if (locMast1.getLocSts().equals("F")) { + locMast = locMast1; + } } } + // 鑾峰彇璺緞 int ioType = taskDto.isAll() ? 101 : 103; @@ -1230,7 +1226,7 @@ if (Cools.isEmpty(locMast)) { throw new CoolException("搴撲綅涓嶅瓨鍦�"); } - if (!(locMast.getLocSts().equals("F") || locMast.getLocSts().equals("D") || locMast.getLocSts().equals("O"))) { + if (!(locMast.getLocSts().equals("P") ||locMast.getLocSts().equals("F") || locMast.getLocSts().equals("D") || locMast.getLocSts().equals("O"))) { throw new CoolException("褰撳墠搴撲綅涓嶅彲璋冩暣锛佸簱浣嶇姸鎬侊細" + locMast.getLocSts$()); } @@ -1341,6 +1337,9 @@ } locMast.setModiUser(userId); locMast.setModiTime(now); + if (locMast.getLocSts().equals("O")){ + locMast.setBarcode(""); + } if (!locMastService.updateById(locMast)) { throw new CoolException("鏇存柊搴撲綅鐘舵�佸け璐�"); } @@ -1533,7 +1532,7 @@ // 鑾峰彇鐩爣绔� Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() .eq("type_no", wrkMast.getIoType() - 50) - .eq("stn_no", wrkMast.getStaNo()) // 浣滀笟绔欑偣 = 鎷f枡鍑哄簱鐨勭洰鏍囩珯 + .eq("stn_no", wrkMast.getSourceStaNo()) // 浣滀笟绔欑偣 = 鎷f枡鍑哄簱鐨勭洰鏍囩珯 .eq("crn_no", wrkMast.getCrnNo()); // 鍫嗗灈鏈哄彿 StaDesc staDesc = staDescService.selectOne(wrapper); if (Cools.isEmpty(staDesc)) { @@ -1775,30 +1774,50 @@ LocMast locMast = locMastService.selectById(dto.getLocNo()); List<LocMast> locMasts = new ArrayList<>(); - if ((locMast.getBay1() >= 1 && locMast.getBay1() <= 2) || (locMast.getBay1() >= 6 && locMast.getBay1() <= 7 && locMast.getRow1() != 36 && locMast.getRow1() != 29) || (locMast.getBay1() >= 11 && locMast.getBay1() <= 12)) { +// if ((locMast.getBay1() >= 1 && locMast.getBay1() <= 2) || (locMast.getBay1() >= 6 && locMast.getBay1() <= 7 && locMast.getRow1() != 36 && locMast.getRow1() != 29) || (locMast.getBay1() >= 11 && locMast.getBay1() <= 12)) { +// locMasts = locMastService.selectList(new EntityWrapper<LocMast>() +// .eq("gro1", locMast.getGro1()) +// .eq("crn_no", 7) +// .eq("loc_type1", locMast.getLocType1()) +// .orderBy("bay1", false)); +// } else { +// locMasts = locMastService.selectList(new EntityWrapper<LocMast>() +// .eq("gro1", locMast.getGro1()) +// .eq("crn_no", 7) +// .eq("loc_type1", locMast.getLocType1()) +// .orderBy("bay1", true)); +// } +// for (LocMast locMast1 : locMasts) { +// if (locMast1.getLocNo().equals(dto.getLocNo())) { +// break; +// } +// if (locMast1.getLocSts().equals("X")) { +// throw new CoolException(dto.getLocNo() + "搴撲綅鍓嶆柟鏈夐攣瀹氬簱浣嶏紝绂佹鍑哄簱"); +// } +// if (locMast1.getLocSts().equals("F")) { +// moveLocForDeepLoc(locMast1); +// } +// } + if ((locMast.getBay1() >= 3 && locMast.getBay1() <= 6) ) { locMasts = locMastService.selectList(new EntityWrapper<LocMast>() - .eq("gro1", locMast.getGro1()) - .eq("crn_no", 7) - .eq("loc_type1", locMast.getLocType1()) - .orderBy("bay1", false)); - } else { - locMasts = locMastService.selectList(new EntityWrapper<LocMast>() - .eq("gro1", locMast.getGro1()) + .eq("row1", locMast.getBay1()) + .in("bay1", 3,4,5,6) .eq("crn_no", 7) .eq("loc_type1", locMast.getLocType1()) .orderBy("bay1", true)); - } - for (LocMast locMast1 : locMasts) { - if (locMast1.getLocNo().equals(dto.getLocNo())) { - break; - } - if (locMast1.getLocSts().equals("X")) { - throw new CoolException(dto.getLocNo() + "搴撲綅鍓嶆柟鏈夐攣瀹氬簱浣嶏紝绂佹鍑哄簱"); - } - if (locMast1.getLocSts().equals("F")) { - moveLocForDeepLoc(locMast1); + for (LocMast locMast1 : locMasts) { + if (locMast1.getLocNo().equals(locMast.getLocNo())) { + break; + } + if (locMast1.getLocSts().equals("X")) { + throw new CoolException(locMast.getLocNo() + "搴撲綅鍓嶆柟鏈夐攣瀹氬簱浣嶏紝绂佹鍑哄簱"); + } + if (locMast1.getLocSts().equals("F")) { + locMast = locMast1; + } } } + Integer outSta = staNo.getDevNo(); // //2鍙峰爢鍨涙満鍏ㄦ澘鍑哄簱绔欐寚瀹氫负204绔欙紝鎷f枡绔欐寚瀹氫负202 @@ -1901,6 +1920,7 @@ wrkMast.setEmptyMk("Y"); // 绌烘澘 wrkMast.setBarcode(wrkMastold.getBarcode()); // 鎵樼洏鐮� wrkMast.setLinkMis("N"); + wrkMast.setPltType(wrkMastold.getWrkNo()); wrkMast.setAppeTime(new Date()); wrkMast.setModiTime(new Date()); boolean res = wrkMastService.insert(wrkMast); @@ -1963,6 +1983,7 @@ wrkMast.setEmptyMk(wrkDetls != null ? "N" : "Y"); // 绌烘澘 wrkMast.setBarcode(wrkMastold.getBarcode()); // 鎵樼洏鐮� wrkMast.setLinkMis("N"); + wrkMast.setPltType(wrkMastold.getWrkNo()); wrkMast.setAppeTime(new Date()); wrkMast.setModiTime(new Date()); boolean res = wrkMastService.insert(wrkMast); -- Gitblit v1.9.1