From 3c2450c66d792b2e020ab954e902df9706f1cd7d Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期一, 10 三月 2025 14:12:27 +0800
Subject: [PATCH] *
---
src/main/java/com/zy/asrs/utils/Utils.java | 36 +++++++++++-------------------------
1 files changed, 11 insertions(+), 25 deletions(-)
diff --git a/src/main/java/com/zy/asrs/utils/Utils.java b/src/main/java/com/zy/asrs/utils/Utils.java
index fa440ef..b5cf43c 100644
--- a/src/main/java/com/zy/asrs/utils/Utils.java
+++ b/src/main/java/com/zy/asrs/utils/Utils.java
@@ -87,11 +87,11 @@
*/
public static String getShallowLoc(SlaveProperties slaveProperties, String deepLoc) {
int row = getRow(deepLoc);
- int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount());
- int shallowRow = remainder == 1 ? (row + 1) : (row - 1);
- if(row==9 || row==15 ){
+// int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount());
+ int shallowRow ;
+ if(row==31){
shallowRow = row + 1;
- }else if(row==12 || row==18 ){
+ }else if(row==34){
shallowRow = row - 1;
}else {
return null;
@@ -112,31 +112,17 @@
*/
public static String getDeepLoc(SlaveProperties slaveProperties, String shallowLoc) {
int row = getRow(shallowLoc);
-// int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount());
int targetRow;
switch (row){
- case 10:
- targetRow = 9;
+ case 32:
+ targetRow = 31;
break;
- case 11:
- targetRow = 12;
- break;
- case 16:
- targetRow = 15;
- break;
- case 17:
- targetRow = 18;
+ case 33:
+ targetRow = 34;
break;
default:
throw new RuntimeException(shallowLoc + "涓嶆槸娴呭簱浣嶏紝绯荤粺绻佸繖");
}
-// if (remainder == 2) {
-// targetRow = row - 1;
-// } else if (remainder == 3) {
-// targetRow = row + 1;
-// } else {
-// throw new RuntimeException(shallowLoc + "涓嶆槸娴呭簱浣嶏紝绯荤粺绻佸繖");
-// }
return zerofill(String.valueOf(targetRow), 2) + shallowLoc.substring(2);
}
@@ -144,11 +130,11 @@
* 鑾峰彇 娴呭簱浣嶆帓瀵瑰簲鐨勬繁搴撲綅鎺�
*/
public static Integer getDeepRow(SlaveProperties slaveProperties, Integer shallowRow) {
- int remainder = (int) Arith.remainder(shallowRow, slaveProperties.getGroupCount());
+// int remainder = (int) Arith.remainder(shallowRow, slaveProperties.getGroupCount());
int targetRow;
- if (remainder == 2) {
+ if (shallowRow == 32) {
targetRow = shallowRow - 1;
- } else if (remainder == 3) {
+ } else if (shallowRow == 33) {
targetRow = shallowRow + 1;
} else {
throw new RuntimeException(shallowRow + "涓嶆槸娴呭簱浣嶆帓锛岀郴缁熺箒蹇�");
--
Gitblit v1.9.1