From 93a5853a6956d39b2f6fa940c3b9a5701f9498d8 Mon Sep 17 00:00:00 2001
From: 18516761980 <tqsxp@163.com>
Date: 星期日, 05 三月 2023 15:17:16 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/common/service/CommonService.java | 89 +++++++++++---------------------------------
1 files changed, 23 insertions(+), 66 deletions(-)
diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java
index 8b9b04d..e209893 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -168,21 +168,20 @@
// 濡傛灉娌℃湁鐩歌繎鐗╂枡锛屽垯鎸夎鍒欒疆璇㈣揣鏋�
if (null == locMast) {
- if (whsType == 1) {
- if (curRow == 2) {
- curRow = 30;
- } else if (curRow == 30) {
- curRow = 2;
- }
+ if (curRow == 1) {
+ curRow = 11;
+ } else {
+ curRow = 1;
}
- if (basCrnpService.checkSiteError(dualCrnNo, true)) {
- crnNo = dualCrnNo;
+ if (basCrnpService.checkSiteError(1, true)) {
+ crnNo = 1;
}
}
if (crnNo == 0) {
throw new CoolException("娌℃湁鍙敤鐨勫爢鍨涙満");
}
+
// 鑾峰彇鐩爣绔�
Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>()
.eq("type_no", staDescId)
@@ -208,63 +207,21 @@
// 1.褰撴绱㈠簱鎺掍负娴呭簱浣嶆帓鏃讹紝浼樺厛瀵绘壘褰撳墠搴撴帓鐨勬繁搴撲綅鎺�
if (locMast == null) {
- if (whsType == 1) {
- List<Integer> rows = Utils.getGroupLoc(curRow);
+ List<Integer> rows = Utils.getGroupLoc(curRow);
-// Iterator<Integer> iterator = rows.iterator();
-// while (iterator.hasNext()) {
-// Integer next = iterator.next();
-// if (next.equals(17) || next.equals(18)) {
-// iterator.remove();
-// }
-// }
-
- List<LocMast> locMasts = locMastService.queryFreeLocMast(rows, rows.size(), locTypeDto.getLocType1());
- if (!Cools.isEmpty(locMasts)) {
- Integer innermostRow = Utils.getOutLayerRow(locMasts.get(0).getLocNo(), false);
- for (LocMast one : locMasts) {
- if (one.getRow1().equals(innermostRow)) {
- locMast = one;
- break;
- }
+ List<LocMast> locMasts = locMastService.queryFreeLocMast(rows, rows.size(), locTypeDto.getLocType1());
+ if (!Cools.isEmpty(locMasts)) {
+ Integer innermostRow = Utils.getInnermostRow(locMasts.get(0).getLocNo());
+ for (LocMast one : locMasts) {
+ if (one.getRow1().equals(innermostRow)) {
+ locMast = one;
+ break;
}
}
- // 鍥犲簱浣嶇Щ杞�侀渶棰勭暀绌哄簱浣� todo:luxiaotao
-// if (!locMastService.checkEmptyCount(locMast)) {
-// locMast = null;
-// }
- } else {
- if (Utils.isShallowLoc(slaveProperties, curRow)) {
- Integer deepRow = Utils.getDeepRow(slaveProperties, curRow);
- locMast = locMastService.queryFreeLocMast0(deepRow, locTypeDto.getLocType1());
- // 鍥犲簱浣嶇Щ杞�侀渶棰勭暀绌哄簱浣�
- if (locMast !=null && !locMastService.checkEmptyCount(locMast)) {
- locMast = null;
- }
- }
-
- if (Cools.isEmpty(locMast)) {
- locMast = locMastService.queryFreeLocMast0(curRow, locTypeDto.getLocType1());
- // 鍥犲簱浣嶇Щ杞�侀渶棰勭暀绌哄簱浣�
- if (!locMastService.checkEmptyCount(locMast)) {
- locMast = null;
- }
-
- // 鐩爣搴撲綅 ===>> 娴呭簱浣嶏紝 鍒欐牎楠屽叾娣卞簱浣嶆槸鍚︿负 F D X
- if (null != locMast && Utils.isShallowLoc(slaveProperties, locMast.getLocNo())) {
- LocMast deepLoc = locMastService.selectById(Utils.getDeepLoc(slaveProperties, locMast.getLocNo()));
- if (!deepLoc.getLocSts().equals("F") && !deepLoc.getLocSts().equals("D") && !deepLoc.getLocSts().equals("X")) {
- locMast = null;
- }
- }
- // 鐩爣搴撲綅 ===>> 娣卞簱浣嶏紝 鍒欐牎楠屽叾娴呭簱浣嶆槸鍚︿负 O
- if (null != locMast && Utils.isDeepLoc(slaveProperties, locMast.getLocNo())) {
- LocMast shallowLoc = locMastService.selectById(Utils.getShallowLoc(slaveProperties, locMast.getLocNo()));
- if (!shallowLoc.getLocSts().equals("O")) {
- locMast = null;
- }
- }
- }
+ }
+ // 鍥犲簱浣嶇Щ杞�侀渶棰勭暀绌哄簱浣�
+ if (!locMastService.checkEmptyCount(locMast, 10)) {
+ locMast = null;
}
}
@@ -278,10 +235,10 @@
times = 0;
}
// 璐х墿妫�绱綆搴撲綅浠撳け璐ワ紝鍏煎楂樺簱浣嶄粨鍚庣户缁墽琛�
- if (locTypeDto.getLocType1() == 1) {
- locTypeDto.setLocType1((short) 2);
- return getLocNo(1, staDescId, sourceStaNo, matNos, locTypeDto, oldLocType, times);
- }
+// if (locTypeDto.getLocType1() == 1) {
+// locTypeDto.setLocType1((short) 2);
+// return getLocNo(1, staDescId, sourceStaNo, matNos, locTypeDto, oldLocType, times);
+// }
log.error("绯荤粺娌℃湁绌哄簱浣嶏紒锛侊紒 灏哄瑙勬牸锛� {}锛� 杞娆℃暟锛歿}", JSON.toJSONString(locTypeDto), times);
throw new CoolException("娌℃湁绌哄簱浣�");
}
--
Gitblit v1.9.1