From f9e742b17c47d9f0df3a56caa09f18c8f99aa3f8 Mon Sep 17 00:00:00 2001
From: whycq <123456>
Date: 星期四, 03 七月 2025 17:44:37 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/common/service/CommonService.java | 43 ++++++++++++++++++++++++++++++++-----------
1 files changed, 32 insertions(+), 11 deletions(-)
diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java
index 703e347..dbf44dd 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -123,20 +123,40 @@
if (null == locMast) {
Shelves shelves = new Shelves(rowCount, crn_qty);
int divides = (int) Arith.divides(1, curRow - 1, 2);
- curRow = (int) Arith.remainder(curRow, 2);
+ //curRow = (int) Arith.remainder(curRow, 2);
if (curRow == 0) {
- curRow = 2;
+ curRow = 6;
+ } else if (curRow == 7) {
+ curRow = 1;
}
for (int i = 0; i < shelves.group; i ++) {
- curRow = shelves.start(curRow);
+ //curRow = shelves.start(curRow);
if (curRow < 0) {
throw new CoolException("妫�绱㈠簱浣嶅け璐ワ紝璇疯仈绯荤鐞嗗憳");
}
- Integer crnNo1 = shelves.get(curRow);
- crnNo1 = crnNo1 + divides*1;
+ //Integer crnNo1 = shelves.get(curRow);
+ Integer crnNo1 = 0;
+ switch (curRow) {
+ case 1:
+ case 2:
+ crnNo1 = 1;
+ break;
+ case 3:
+ case 4:
+ crnNo1 = 2;
+ break;
+ case 5:
+ case 6:
+ crnNo1 = 3;
+ break;
+ }
+ //crnNo1 = crnNo1 + divides*1;
if (basCrnpService.checkSiteError(crnNo1, true)) {
crnNo = crnNo1;
- curRow = curRow + divides*2;
+ //curRow = curRow + divides*2;
+ // 鏇存柊搴撲綅鎺掑彿
+ rowLastno.setCurrentRow(curRow + 1);
+ rowLastnoService.updateById(rowLastno);
break;
}
}
@@ -161,8 +181,8 @@
}
// 鏇存柊搴撲綅鎺掑彿
- rowLastno.setCurrentRow(curRow);
- rowLastnoService.updateById(rowLastno);
+ //rowLastno.setCurrentRow(curRow);
+ //rowLastnoService.updateById(rowLastno);
// 寮�濮嬫煡鎵惧簱浣� ==============================>>
@@ -178,6 +198,7 @@
}
}
if (Cools.isEmpty(locMast)) {
+ // sql涓婂幓鎺塺ow鎺掓潯浠�
locMast = locMastService.queryFreeLocMast(curRow, locTypeDto.getLocType1());
// 鍥犲簱浣嶇Щ杞�侀渶棰勭暀绌哄簱浣�
if (!locMastService.checkEmptyCount(locMast)) {
@@ -203,14 +224,14 @@
// 2.搴撲綅褰撳墠鎵�灞炲昂瀵告棤绌哄簱浣嶆椂锛岃皟鏁村昂瀵稿弬鏁帮紝鍚戜笂鍏煎妫�绱㈠簱浣�
if (Cools.isEmpty(locMast)) {
// 褰撳墠宸烽亾鏃犵┖搴撲綅鏃讹紝閫掑綊璋冩暣鑷充笅涓�宸烽亾锛屾绱㈠叏閮ㄥ贩閬撴棤鏋滃悗锛岃烦鍑洪�掑綊
- if (times < rowCount) {
+ if (times < 6) {
times = times + 1;
return getLocNo(1, staDescId, sourceStaNo, matNos, locTypeDto, times);
}
// 杞昏揣鐗╂壘杞诲簱浣嶄负绌烘椂锛屽彲浠ュ幓鎵鹃噸搴撲綅浠�
- if (locTypeDto.getLocType1() == 1) {
- locTypeDto.setLocType1((short) 2);
+ if (locTypeDto.getLocType1() == 2) {
+ locTypeDto.setLocType1((short) 1);
return getLocNo(1, staDescId, sourceStaNo, matNos, locTypeDto, times);
}
log.error("绯荤粺娌℃湁绌哄簱浣嶏紒锛侊紒 灏哄瑙勬牸锛� {}锛� 杞娆℃暟锛歿}", JSON.toJSONString(locTypeDto), times);
--
Gitblit v1.9.1