From 664124d1ecd64bea4a060ed23a8e2c468c6136f0 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期二, 06 九月 2022 16:57:06 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java | 26 +++++++++++++++----------- 1 files changed, 15 insertions(+), 11 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 61f29bc..8bf8696 100644 --- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java @@ -196,6 +196,7 @@ } } Integer ioType = null; + List<String> excludeLocNos = dtos.stream().map(OutLocDto::getLocNo).distinct().collect(Collectors.toList()); // 鐢熸垚宸ヤ綔妗� for (OutLocDto dto : dtos) { // 濡傛灉涓烘繁搴撲綅锛屼笖瀵瑰簲娴呭簱浣嶄负X.绂佺敤锛屽垯鐣ヨ繃姝ゅ簱浣� @@ -213,6 +214,7 @@ ioType = 107; } assert ioType != null; + locMastService.breakUp(dto.getLocNo(), excludeLocNos); // 鑾峰彇搴撲綅 LocMast locMast = locMastService.selectById(dto.getLocNo()); // 鑾峰彇璺緞 @@ -525,14 +527,15 @@ throw new CoolException("鏈壘鍒板簱浣�"); } if (!sourceLoc.getCrnNo().equals(loc.getCrnNo())) { - throw new CoolException("绉昏浆搴撲綅灞炰簬涓嶅悓鍫嗗灈鏈�"); +// throw new CoolException("绉昏浆搴撲綅灞炰簬涓嶅悓鍫嗗灈鏈�"); todo:luxiaotao } + Date now = new Date(); // 鑾峰彇宸ヤ綔鍙� int workNo = commonService.getWorkNo(WorkNoType.PICK.type); // 淇濆瓨宸ヤ綔妗� WrkMast wrkMast = new WrkMast(); wrkMast.setWrkNo(workNo); - wrkMast.setIoTime(new Date()); + wrkMast.setIoTime(now); wrkMast.setWrkSts(11L); // 宸ヤ綔鐘舵�侊細11.鐢熸垚鍑哄簱ID wrkMast.setIoType(11); // 鍏ュ嚭搴撶姸鎬侊細 11.搴撴牸绉昏浇 wrkMast.setIoPri(10D); @@ -547,9 +550,9 @@ wrkMast.setBarcode(sourceLoc.getBarcode()); // 鎵樼洏鐮� wrkMast.setLinkMis("N"); wrkMast.setAppeUser(userId); - wrkMast.setAppeTime(new Date()); + wrkMast.setAppeTime(now); wrkMast.setModiUser(userId); - wrkMast.setModiTime(new Date()); + wrkMast.setModiTime(now); boolean res = wrkMastService.insert(wrkMast); if (!res) { throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐�"); @@ -559,11 +562,11 @@ WrkDetl wrkDetl = new WrkDetl(); wrkDetl.sync(locDetl); wrkDetl.setWrkNo(workNo); - wrkDetl.setIoTime(new Date()); + wrkDetl.setIoTime(now); wrkDetl.setAnfme(locDetl.getAnfme()); - wrkDetl.setAppeTime(new Date()); + wrkDetl.setAppeTime(now); wrkDetl.setAppeUser(userId); - wrkDetl.setModiTime(new Date()); + wrkDetl.setModiTime(now); wrkDetl.setModiUser(userId); if (!wrkDetlService.insert(wrkDetl)) { throw new CoolException("淇濆瓨宸ヤ綔妗f槑缁嗗け璐�"); @@ -573,7 +576,7 @@ if (sourceLoc.getLocSts().equals("D") || sourceLoc.getLocSts().equals("F")) { sourceLoc.setLocSts("R"); // R.鍑哄簱棰勭害 sourceLoc.setModiUser(userId); - sourceLoc.setModiTime(new Date()); + sourceLoc.setModiTime(now); if (!locMastService.updateById(sourceLoc)){ throw new CoolException("鏇存柊婧愬簱浣嶇姸鎬佸け璐�"); } @@ -583,7 +586,7 @@ // 淇敼鐩爣搴撲綅鐘舵�� if (loc.getLocSts().equals("O")) { loc.setLocSts("S"); // S.鍏ュ簱棰勭害 - loc.setModiTime(new Date()); + loc.setModiTime(now); loc.setModiUser(userId); if (!locMastService.updateById(loc)) { throw new CoolException("鏇存柊鐩爣搴撲綅鐘舵�佸け璐�"); @@ -951,8 +954,9 @@ } Date now = new Date(); // 鐢熸垚绉诲簱宸ヤ綔妗� + Iterator<LocMast> iterator = locMasts.iterator(); for (String sourceLocNo : locNos) { - Iterator<LocMast> iterator = locMasts.iterator(); + while (iterator.hasNext()) { LocMast sourceLoc = locMastService.selectById(sourceLocNo); List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", sourceLocNo)); @@ -964,7 +968,7 @@ throw new CoolException("鏈壘鍒板簱浣�"); } if (!sourceLoc.getCrnNo().equals(loc.getCrnNo())) { - throw new CoolException("绉昏浆搴撲綅灞炰簬涓嶅悓鍫嗗灈鏈�"); +// throw new CoolException("绉昏浆搴撲綅灞炰簬涓嶅悓鍫嗗灈鏈�"); todo:luxiaotao } // 鑾峰彇宸ヤ綔鍙� int workNo = commonService.getWorkNo(WorkNoType.PICK.type); -- Gitblit v1.9.1