From 0762865778e5d8ba02f23c76d31ef57b7a91ab8d Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期四, 20 十月 2022 09:31:20 +0800 Subject: [PATCH] # --- src/main/java/com/zy/common/service/CommonService.java | 72 ++++++++---------------------------- 1 files changed, 16 insertions(+), 56 deletions(-) diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java index d1705b5..db1539e 100644 --- a/src/main/java/com/zy/common/service/CommonService.java +++ b/src/main/java/com/zy/common/service/CommonService.java @@ -111,21 +111,20 @@ */ public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, List<String> matNos, LocTypeDto locTypeDto, LocTypeDto oldLocType, int times) { StartupDto startupDto = new StartupDto(); - int start; - int end; + int start = 2; + int end = 30; switch (sourceStaNo) { - case 103: - whsType = 1; - start = 1; - end = 14; - break; - case 203: + case 107: whsType = 2; - start = 8; - end = 21; + end = 17; + break; + case 118: + whsType = 3; + start = 18; break; default: - throw new CoolException("妫�绱㈠簱浣嶅け璐ワ紝璇疯仈绯荤鐞嗗憳"); + whsType = 1; + break; } // 鐢熸垚宸ヤ綔鍙� int workNo = getWorkNo(0); @@ -144,7 +143,7 @@ LocMast locMast = null; // 闈犺繎鎽嗘斁瑙勫垯 --- 鍚屽ぉ鍚岃鏍肩墿鏂� - if (!Cools.isEmpty(matNos)) { + if (!Cools.isEmpty(matNos) && matNos.size() == 1) { List<String> locNos = locDetlService.getSameDetl(matNos.get(0), start, end); for (String locNo : locNos) { List<String> groupLoc = Utils.getGroupLoc(locNo); @@ -187,55 +186,16 @@ } // 濡傛灉娌℃湁鐩歌繎鐗╂枡锛屽垯鎸夎鍒欒疆璇㈣揣鏋� - - int currentRow = 1; if (null == locMast) { Shelves shelves = new Shelves(rowCount, crn_qty); for (int i = 0; i < shelves.group; i ++) { - if (i > 0) { - curRow = currentRow; - } curRow = shelves.start(curRow); if (curRow < 0) { throw new CoolException("妫�绱㈠簱浣嶅け璐ワ紝璇疯仈绯荤鐞嗗憳"); } - currentRow = curRow; - int crnNo1 = shelves.get(curRow); - if (whsType == 1) { - switch (curRow) { - case 1: - curRow = 1; - break; - case 2: - curRow = 7; - break; - case 3: - curRow = 8; - break; - case 4: - curRow = 14; - break; - default: - throw new CoolException("妫�绱㈠簱浣嶅け璐ワ紝璇疯仈绯荤鐞嗗憳"); - } - } else { - switch (curRow) { - case 1: - curRow = 8; - break; - case 2: - curRow = 14; - break; - case 3: - curRow = 15; - break; - case 4: - curRow = 21; - break; - default: - throw new CoolException("妫�绱㈠簱浣嶅け璐ワ紝璇疯仈绯荤鐞嗗憳"); - } - crnNo1 = crnNo1 + 1; + Integer crnNo1 = shelves.get(curRow) + 1; + if (whsType != 1) { + crnNo1 = whsType; } if (basCrnpService.checkSiteError(crnNo1, true)) { crnNo = crnNo1; @@ -265,7 +225,7 @@ } // 鏇存柊搴撲綅鎺掑彿 - rowLastno.setCurrentRow(currentRow); + rowLastno.setCurrentRow(curRow); rowLastnoService.updateById(rowLastno); // 寮�濮嬫煡鎵惧簱浣� ==============================>> @@ -284,7 +244,7 @@ } } } - // 鍥犲簱浣嶇Щ杞�侀渶棰勭暀绌哄簱浣� + // 鍥犲簱浣嶇Щ杞�侀渶棰勭暀绌哄簱浣� todo:luxiaotao // if (!locMastService.checkEmptyCount(locMast)) { // locMast = null; // } -- Gitblit v1.9.1