| | |
| | | int shallowRow = remainder == 1 ? (row + 1) : (row - 1); |
| | | return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2); |
| | | } |
| | | /** |
| | | * 获取 深库位对应的浅库位号 双伸+单双伸 煜星定制 |
| | | */ |
| | | public static String getShallowLoc5(SlaveProperties slaveProperties, String deepLoc,Integer whsType) { |
| | | if (whsType==9){ |
| | | int row = getRow(deepLoc); |
| | | int shallowRow; |
| | | if (row == 21) { |
| | | shallowRow = row + 1; |
| | | } else if (row == 24) { |
| | | shallowRow = row - 1; |
| | | } else if (row == 25) { |
| | | shallowRow = row; |
| | | } else if (row == 27) { |
| | | shallowRow = row - 1; |
| | | } else { |
| | | throw new RuntimeException(row + "不是深库位,系统繁忙"); |
| | | } |
| | | return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2); |
| | | }else { |
| | | int row = getRow(deepLoc); |
| | | int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount()); |
| | | int shallowRow = remainder == 1 ? (row + 1) : (row - 1); |
| | | return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取 深库位排对应的浅库位排 |
| | |
| | | throw new RuntimeException(shallowLoc + "不是浅库位,系统繁忙"); |
| | | } |
| | | return zerofill(String.valueOf(targetRow), 2) + shallowLoc.substring(2); |
| | | } |
| | | |
| | | /** |
| | | * 获取 浅库位对应的深库位号 双伸+单双伸 煜星定制 |
| | | */ |
| | | public static String getDeepLoc5(SlaveProperties slaveProperties, String shallowLoc,Integer whsType) { |
| | | if (whsType==9){ |
| | | int row = getRow(shallowLoc); |
| | | int targetRow; |
| | | if (row == 22) { |
| | | targetRow = row - 1; |
| | | } else if (row == 23) { |
| | | targetRow = row + 1; |
| | | } else if (row == 25) { |
| | | targetRow = row; |
| | | } else if (row == 26) { |
| | | targetRow = row + 1; |
| | | } else { |
| | | throw new RuntimeException(shallowLoc + "不是浅库位,系统繁忙"); |
| | | } |
| | | return zerofill(String.valueOf(targetRow), 2) + shallowLoc.substring(2); |
| | | } else { |
| | | int row = getRow(shallowLoc); |
| | | int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount()); |
| | | int targetRow; |
| | | 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); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | return 0; |
| | | } |
| | | |
| | | public static boolean BooleanWhsTypeStaIoType(Integer whsType) { //查询相似物料开关 |
| | | public static boolean BooleanWhsTypeStaIoType(Integer whsType) { //查询相似物料开关 //是否深浅库位开关 |
| | | if (whsType == 1 || whsType==3 || whsType==4 || whsType == 9) { |
| | | return true; |
| | | } |