| | |
| | | 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); |
| | | int shallowRow = remainder == 1 ? (row - 1) : (row + 1); |
| | | return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2); |
| | | } |
| | | |
| | |
| | | int row = getRow(shallowLoc); |
| | | int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount()); |
| | | int targetRow; |
| | | if (remainder == 0 ) { |
| | | targetRow = row + 1; |
| | | } else if (remainder == 3) { |
| | | if (remainder == 2) { |
| | | targetRow = row - 1; |
| | | } else if (remainder == 3) { |
| | | targetRow = row + 1; |
| | | } else { |
| | | throw new RuntimeException(shallowLoc + "不是浅库位,系统繁忙"); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | //堆垛机库位从14排开始 |
| | | necessaryParameters[1] = necessaryParameters[1]+13; //curRow 最深库位排 |
| | | necessaryParameters[3] = necessaryParameters[3]+13; //nearRow 最浅库位排 |
| | | return necessaryParameters; |
| | | } |
| | | |
| | |
| | | //满板正常入库 |
| | | switch (curRow){ |
| | | case 1: |
| | | necessaryParameters[1] = 4; //curRow 最深库位排 |
| | | necessaryParameters[1] = 6; //curRow 最深库位排 |
| | | necessaryParameters[2] = sCrnNo; //crnNo 堆垛机号 |
| | | necessaryParameters[3] = 3; //nearRow 最浅库位排 |
| | | break; |
| | | case 4: |
| | | necessaryParameters[1] = 5; //curRow 最深库位排 |
| | | necessaryParameters[2] = sCrnNo; //crnNo 堆垛机号 |
| | | necessaryParameters[3] = 6; //nearRow 最浅库位排 |
| | | break; |
| | | case 5: |
| | | case 6: |
| | | necessaryParameters[1] = 8; //curRow 最深库位排 |
| | | necessaryParameters[2] = sCrnNo; //crnNo 堆垛机号 |
| | | necessaryParameters[3] = 8; //nearRow 最浅库位排 |