| | |
| | | |
| | | @Override |
| | | public Boolean isOutMost(String locNo, Boolean pakin) { |
| | | return Integer.parseInt(locNo.substring(0, 2)) == Utils.getGroupRow(locNo, true); |
| | | return Integer.parseInt(locNo.substring(0, 2)) == Utils.getOutermostRow(locNo, true); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | } |
| | | |
| | | public static Integer getGroupRow(String locNo, Boolean pakin){ |
| | | public static Integer getOutermostRow(String locNo, Boolean pakin){ |
| | | int row = getRow(locNo); |
| | | switch (row) { |
| | | case 1: |
| | |
| | | } |
| | | } |
| | | |
| | | public static List<Integer> getGroupLoc(Integer row){ |
| | | switch (row) { |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | return new ArrayList<Integer>() {{ |
| | | add(1); |
| | | add(2); |
| | | add(3); |
| | | }}; |
| | | case 4: |
| | | case 5: |
| | | case 6: |
| | | case 7: |
| | | return new ArrayList<Integer>() {{ |
| | | add(4); |
| | | add(5); |
| | | add(6); |
| | | add(7); |
| | | }}; |
| | | case 8: |
| | | case 9: |
| | | case 10: |
| | | case 11: |
| | | return new ArrayList<Integer>() {{ |
| | | add(8); |
| | | add(9); |
| | | add(10); |
| | | add(11); |
| | | }}; |
| | | case 12: |
| | | case 13: |
| | | case 14: |
| | | return new ArrayList<Integer>() {{ |
| | | add(12); |
| | | add(13); |
| | | add(14); |
| | | }}; |
| | | case 15: |
| | | case 16: |
| | | case 17: |
| | | case 18: |
| | | return new ArrayList<Integer>() {{ |
| | | add(15); |
| | | add(16); |
| | | add(17); |
| | | add(18); |
| | | }}; |
| | | case 19: |
| | | case 20: |
| | | case 21: |
| | | return new ArrayList<Integer>() {{ |
| | | add(19); |
| | | add(20); |
| | | add(21); |
| | | }}; |
| | | default: |
| | | throw new RuntimeException("库位解析异常"); |
| | | } |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | SlaveProperties slaveProperties = new SlaveProperties(); |
| | | slaveProperties.setDoubleDeep(true); |
| | |
| | | |
| | | // 1.当检索库排为浅库位排时,优先寻找当前库排的深库位排 |
| | | if (locMast == null) { |
| | | List<Integer> rows; |
| | | if (whsType == 2) { |
| | | rows = FIRST_GROUP_ROW_LIST; |
| | | } else if (whsType == 3) { |
| | | rows = SECOND_GROUP_ROW_LIST; |
| | | } else { |
| | | switch (curRow) { |
| | | case 1: |
| | | rows = FIRST_GROUP_ROW_LIST; |
| | | break; |
| | | case 2: |
| | | rows = SECOND_GROUP_ROW_LIST; |
| | | break; |
| | | default: |
| | | throw new CoolException("入库逻辑故障【" + curRow + "】"); |
| | | } |
| | | } |
| | | List<Integer> rows = Utils.getGroupLoc(curRow); |
| | | |
| | | locMast = locMastService.queryFreeLocMast(null, rows, locTypeDto.getLocType1()); |
| | | // 因库位移转、需预留空库位 |