| | |
| | | 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 ){ |
| | | shallowRow = row + 1; |
| | | }else if(row==12 || row==18 ){ |
| | | shallowRow = row - 1; |
| | | }else { |
| | | return null; |
| | | } |
| | | return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2); |
| | | } |
| | | |
| | |
| | | */ |
| | | public static String getDeepLoc(SlaveProperties slaveProperties, String shallowLoc) { |
| | | int row = getRow(shallowLoc); |
| | | // int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount()); |
| | | int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount()); |
| | | int targetRow; |
| | | switch (row){ |
| | | case 10: |
| | | targetRow = 9; |
| | | break; |
| | | case 11: |
| | | targetRow = 12; |
| | | break; |
| | | case 16: |
| | | targetRow = 15; |
| | | break; |
| | | case 17: |
| | | targetRow = 18; |
| | | break; |
| | | default: |
| | | throw new RuntimeException(shallowLoc + "不是浅库位,系统繁忙"); |
| | | if (remainder == 2) { |
| | | targetRow = row - 1; |
| | | } else if (remainder == 3) { |
| | | targetRow = row + 1; |
| | | } else { |
| | | 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); |
| | | } |
| | | |
| | |
| | | public static void main(String[] args) { |
| | | SlaveProperties slaveProperties = new SlaveProperties(); |
| | | slaveProperties.setDoubleDeep(true); |
| | | |
| | | String aa = getDeepLoc(slaveProperties,"1604402"); |
| | | |
| | | List<Integer> list = new ArrayList<>(); |
| | | list.add(1);list.add(4);list.add(5);list.add(8);list.add(9);list.add(12); |
| | | slaveProperties.setDoubleLocs(list); |
| | |
| | | }], |
| | | "rackDescs": [{ |
| | | "type": "rackDescs", |
| | | "id": "lb_desc1", |
| | | "text": "#1", |
| | | "top": 125, |
| | | "left": 348, |
| | | "width": 30, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc2", |
| | | "text": "#2", |
| | | "top": 146, |
| | | "left": 348, |
| | | "width": 30, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc3", |
| | | "text": "#3", |
| | | "top": 194, |
| | | "left": 348, |
| | | "width": 30, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc4", |
| | | "text": "#4", |
| | | "top": 215, |
| | |
| | | "width": 33, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc1", |
| | | "text": "#1", |
| | | "top": 125, |
| | | "left": 348, |
| | | "width": 30, |
| | | "height": 23 |
| | | },{ |
| | | "type": "rackDescs", |
| | | "id": "lb_desc14", |
| | | "text": "#14", |
| | |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc12", |
| | | "text": "#12", |
| | | "top": 296, |
| | | "left": 348, |
| | | "width": 30, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc13", |
| | | "text": "#13", |
| | | "top": 344, |
| | | "left": 348, |
| | | "width": 30, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc11", |
| | | "text": "#11", |
| | | "top": 275, |
| | | "left": 348, |
| | | "width": 30, |
| | | "height": 23 |
| | | },{ |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc24", |
| | | "text": "#24", |
| | | "top": 515, |
| | | "left": 348, |
| | | "width": 33, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc22", |
| | | "text": "#22", |
| | | "top": 446, |
| | | "left": 348, |
| | | "width": 30, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | | "id": "lb_desc23", |
| | | "text": "#23", |
| | | "top": 494, |
| | | "left": 348, |
| | | "width": 30, |
| | | "height": 23 |
| | | }, { |
| | | "type": "rackDescs", |
| | |
| | | "text": "", |
| | | "top": 184, |
| | | "left": 340, |
| | | "width": 1200, |
| | | "width": 1300, |
| | | "height": 2 |
| | | }, { |
| | | "type": "crane", |
| | |
| | | "text": "", |
| | | "top": 334, |
| | | "left": 340, |
| | | "width": 1200, |
| | | "width": 1300, |
| | | "height": 2 |
| | | }, { |
| | | "type": "crane", |
| | |
| | | "text": "", |
| | | "top": 484, |
| | | "left": 340, |
| | | "width": 1200, |
| | | "width": 1300, |
| | | "height": 2 |
| | | }, { |
| | | "type": "crane", |