From 881f28d05eb1800920556054504cdc65937d7eac Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <xltys1995> Date: 星期五, 28 八月 2020 15:42:36 +0800 Subject: [PATCH] #v2.0 --- src/main/java/com/zy/common/service/CommonService.java | 37 +++++++++++++++++++++++++------------ 1 files changed, 25 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java index 8f9dec7..0f01346 100644 --- a/src/main/java/com/zy/common/service/CommonService.java +++ b/src/main/java/com/zy/common/service/CommonService.java @@ -89,12 +89,19 @@ * @return locNo 妫�绱㈠埌鐨勫簱浣嶅彿 */ public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, List<String> matNos) { + if (sourceStaNo == 3) { + whsType = 1; + } else if (sourceStaNo == 7) { + whsType = 2; + } else { + throw new CoolException("鏃犳晥鍏ュ簱绔�"); + } StartupDto startupDto = new StartupDto(); RowLastno rowLastno = rowLastnoService.selectById(whsType); if (Cools.isEmpty(rowLastno)) { throw new CoolException("鏁版嵁寮傚父锛岃鑱旂郴绠$悊鍛�"); } - if (rowLastno.getWhsType() == 1){ + if (whsType == 1 || whsType == 2){ int curRow = rowLastno.getCurrentRow(); int sRow = rowLastno.getsRow(); int eRow = rowLastno.geteRow(); @@ -136,18 +143,24 @@ // 濡傛灉娌℃湁鐩歌繎鐗╂枡锛屽垯鎸夎鍒欒疆璇㈣揣鏋� if (null == locMast) { - // 鑾峰彇鐩爣绔欐墍鍦ㄨ揣鏋舵帓鍙� - Shelves shelves = new Shelves(rowCount, crn_qty); - curRow = shelves.start(curRow); - if (curRow < 0) { - throw new CoolException("妫�绱㈠簱浣嶅け璐ワ紝璇疯仈绯荤鐞嗗憳"); + // 鑾峰彇鐩爣绔欐墍鍦ㄨ揣鏋舵帓鍙� todo:luxiaotao + if (curRow == sRow) { + curRow = eRow; + } else { + curRow = sRow; } - for (List<Integer> node : shelves.nodes){ - if (node.contains(curRow)) { - crnNo = shelves.nodes.indexOf(node) + 1; - break; - } - } + crnNo = whsType; +// Shelves shelves = new Shelves(rowCount, crn_qty); +// curRow = shelves.start(curRow); +// if (curRow < 0) { +// throw new CoolException("妫�绱㈠簱浣嶅け璐ワ紝璇疯仈绯荤鐞嗗憳"); +// } +// for (List<Integer> node : shelves.nodes){ +// if (node.contains(curRow)) { +// crnNo = shelves.nodes.indexOf(node) + 1; +// break; +// } +// } } basCrnpService.checkSiteStatus(crnNo); -- Gitblit v1.9.1