| | |
| | | } |
| | | |
| | | |
| | | public void initLocFloor3() { |
| | | //3楼 1-33排 1-14列 8层 ------> 1-33排 1-17列 8层 |
| | | // this.insertBatch(getLocMastList(1, 33, 1, 17, 1, 8, 3)); |
| | | // |
| | | // //3楼 1-27排 15-34列 8层 ------> 1-26排 18-25列 8层 |
| | | // this.insertBatch(getLocMastList(1, 27, 18, 25, 1, 8, 3)); |
| | | // |
| | | // //3楼 1-25排 35-46列 8层 ------> 1-25排 26-35列 8层 |
| | | // this.insertBatch(getLocMastList(1, 25, 26, 35, 1, 8, 3)); |
| | | // |
| | | // //3楼 3-25排 47-60列 8层 ------> 1-23排 36-70列 8层 |
| | | // this.insertBatch(getLocMastList(1, 23, 36, 70, 1, 8, 3)); |
| | | |
| | | //3楼 3-23排 71-72列 8层 |
| | | this.insertBatch(getLocMastList(3, 23, 71, 72, 1, 8, 3)); |
| | | |
| | | public void initLocFloor2() { |
| | | //2楼 1-25排 1-33列 1层 |
| | | this.insertBatch(getLocMastList(1, 25, 1, 33, 1, 1, 2)); |
| | | } |
| | | |
| | | //根据排列层获取AGV库位列表 |
| | |
| | | for (int bay = bayIndex; bay <= bayMax; bay++) { |
| | | for (int lev = levIndex; lev <= levMax; lev++) { |
| | | |
| | | if(!checkLocExist(row,bay,floor)){ |
| | | if(!checkLocExistFloor2(row,bay)){ |
| | | continue; |
| | | } |
| | | |
| | | // if(floor == 1 && (row == 8 || row == 9)){ |
| | | // if((bay >=8 && bay <=11) |
| | | // || (bay >= 20 && bay <=23) |
| | | // || (bay>=37 && bay <=39) |
| | | // || (bay>=50 && bay <=52) |
| | | // || (bay>=63 && bay <=64) |
| | | // || (bay>=79 && bay <=80)){ |
| | | // continue; |
| | | // } |
| | | // } |
| | | |
| | | AgvLocMast loc = new AgvLocMast(); |
| | | String locRow = row < 10 ? "-00" + row : "-0" + row; |
| | |
| | | loc.setModiTime(now); |
| | | loc.setFirstTime(now); |
| | | loc.setAppeTime(now); |
| | | loc.setLocType1(initLocMastSts(row,bay)); |
| | | agvLocMastList.add(loc); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return agvLocMastList; |
| | | } |
| | | |
| | | private boolean checkLocExistFloor2(int row, int bay){ |
| | | if(row <= 4 && bay >= 17){ |
| | | return false; |
| | | } |
| | | |
| | | if(row <= 7 && bay >= 26){ |
| | | return false; |
| | | } |
| | | |
| | | if(row >= 24 && bay >= 29){ |
| | | return false; |
| | | } |
| | | |
| | | if((row != 20 && row != 25) && (bay ==8 || bay ==22)){ |
| | | return false; |
| | | } |
| | | |
| | | if((row == 3 || row == 12 || row == 16 || row == 21) && (bay ==4 || bay ==9 || bay == 14 || bay == 20 || bay == 25 || bay ==30 || bay == 31)){ |
| | | return false; |
| | | } |
| | | |
| | | if(row == 21 && bay == 15){ |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | private short initLocMastSts(int row, int bay){ |
| | | |
| | | if(row <= 11 && bay <= 14){ |
| | | return 1; |
| | | } |
| | | |
| | | if(row <= 7){ |
| | | return 1; |
| | | } |
| | | |
| | | if(row >= 21){ |
| | | return 3; |
| | | } |
| | | |
| | | return 2; |
| | | } |
| | | |
| | | private boolean checkLocExist(int row, int bay, int floor){ |
| | |
| | | this.baseMapper.updateLocType2(locType2,locRule.getRowBeg(),locRule.getRowEnd(),locRule.getBayBeg(),locRule.getBayEnd(),locRule.getLevBeg(),locRule.getLevEnd(),locRule.getFloor()); |
| | | } |
| | | |
| | | public void updateLocStsByLocNo(String locNo, String locSts, String barcode) { |
| | | public void updateLocStsByLocNo(String locNo, String locSts, String barcode,Short containerType) { |
| | | AgvLocMast agvLocMast = this.selectById(locNo); |
| | | agvLocMast.setLocSts(locSts); |
| | | agvLocMast.setBarcode(barcode); |
| | | agvLocMast.setLocType2(containerType); |
| | | this.updateById(agvLocMast); |
| | | } |
| | | |