| | |
| | | public static String getShallowLoc(SlaveProperties slaveProperties, String deepLoc) { |
| | | int row = getRow(deepLoc); |
| | | int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount()); |
| | | int shallowRow; |
| | | if (row==9 || row==15){ |
| | | shallowRow=row+1; |
| | | }else if (row==12 || row==18){ |
| | | shallowRow=row-1; |
| | | }else { |
| | | throw new RuntimeException(row + "不是深库位,系统繁忙"); |
| | | int shallowRow ; |
| | | if (row == 15 || row == 9) { |
| | | shallowRow = row + 1; |
| | | } else if (row == 12 || row==18) { |
| | | shallowRow = row - 1; |
| | | } else { |
| | | throw new RuntimeException(row + "不是浅库位,系统繁忙"); |
| | | } |
| | | return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2); |
| | | } |
| | |
| | | } else if (row == 11 || row == 17) { |
| | | targetRow = row + 1; |
| | | } else { |
| | | throw new RuntimeException(shallowLoc + "不是浅库位,系统繁忙"); |
| | | throw new RuntimeException(row + "不是浅库位排,系统繁忙"); |
| | | } |
| | | return zerofill(String.valueOf(targetRow), 2) + shallowLoc.substring(2); |
| | | } |
| | |
| | | public static Integer getDeepRow(SlaveProperties slaveProperties, Integer shallowRow) { |
| | | int remainder = (int) Arith.remainder(shallowRow, slaveProperties.getGroupCount()); |
| | | int targetRow; |
| | | if (remainder == 2) { |
| | | targetRow = shallowRow - 1; |
| | | } else if (remainder == 3) { |
| | | targetRow = shallowRow + 1; |
| | | } else if (shallowRow == 10 || shallowRow == 16) { |
| | | if (shallowRow == 10 || shallowRow == 16) { |
| | | targetRow = shallowRow - 1; |
| | | } else if (shallowRow == 11 || shallowRow == 17) { |
| | | targetRow = shallowRow + 1; |