| | |
| | | } |
| | | |
| | | public void initLocFloor1() { |
| | | //1楼 13排 86列 12层 |
| | | List<AgvLocMast> agvLocMastList = getLocMastList(1,45,1,33,1,1,1); |
| | | this.insertBatch(agvLocMastList); |
| | | this.insertBatch(getLocMastList(1, 22, 1, 39, 2, 2, 1)); |
| | | } |
| | | |
| | | |
| | |
| | | for (int bay = bayIndex; bay <= bayMax; bay++) { |
| | | for (int lev = levIndex; lev <= levMax; lev++) { |
| | | |
| | | if(!checkLocExistFloor3(row,bay)){ |
| | | if(!checkLocExistFloor1_2(row,bay)){ |
| | | continue; |
| | | } |
| | | |
| | |
| | | loc.setModiTime(now); |
| | | loc.setFirstTime(now); |
| | | loc.setAppeTime(now); |
| | | loc.setLocType1(initLocMastSts3(row,bay)); |
| | | loc.setLocType1((short)3); |
| | | // loc.setLocType1(initLocMastSts3(row,bay)); |
| | | agvLocMastList.add(loc); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return agvLocMastList; |
| | | } |
| | | |
| | | private boolean checkLocExistFloor1_2(int row, int bay){ |
| | | if(row == 4 && bay == 19){ |
| | | return false; |
| | | } |
| | | |
| | | if(row == 5 && (bay == 3 || bay == 8 || bay == 13 || bay == 18 || bay == 19 || bay == 24 || bay == 29)){ |
| | | return false; |
| | | } |
| | | |
| | | if((row == 6 || row == 7) && bay == 39){ |
| | | return false; |
| | | } |
| | | |
| | | if((row == 9 || row == 10 || row == 14 || row == 18) && (bay == 3 || bay == 8 || bay == 13 || bay == 14 || bay == 19 || bay == 24 || bay == 29 || bay == 30)){ |
| | | return false; |
| | | } |
| | | if ((row == 10 || row == 11) && (bay == 7 || bay == 12 || bay == 23 || bay == 28 )) { |
| | | return false; |
| | | } |
| | | if ((row == 9 || row == 13) && bay == 35 ) { |
| | | return false; |
| | | } |
| | | if(row == 13 && (bay == 18 || bay == 19 || bay == 20)){ |
| | | return false; |
| | | } |
| | | if(row == 9 && bay == 18){ |
| | | return false; |
| | | } |
| | | if((row == 14 || row == 15) && bay > 37){ |
| | | return false; |
| | | } |
| | | if(row >= 16 && bay >= 35){ |
| | | return false; |
| | | } |
| | | if((row >= 2 && row <= 21) && bay == 17){ |
| | | return false; |
| | | } |
| | | |
| | | if(bay >= 33 && bay <= 34){ |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | private boolean checkLocExistFloor1_1(int row, int bay){ |
| | | if(row <= 2 && bay >= 20){ |
| | | return false; |
| | | } |
| | | if ((row == 4 || row == 9 || row == 14 || row == 20 || row == 25 || row == 30) && (bay == 7 || bay == 11 || bay == 12 || bay == 16 )) { |
| | | return false; |
| | | } |
| | | if ((row == 7 || row == 13 || row == 21 || row == 26) && (bay == 12 || bay == 13 )) { |
| | | return false; |
| | | } |
| | | if (row >= 10 && bay == 1) { |
| | | return false; |
| | | } |
| | | if (row == 18 && bay <= 19) { |
| | | return false; |
| | | } |
| | | if (row == 25 && bay == 20) { |
| | | return false; |
| | | } |
| | | if ((row >= 26 && row <=27) && (bay >=18 && bay <= 19)) { |
| | | return false; |
| | | } |
| | | if (row >= 28 && bay == 20) { |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | private boolean checkLocExistFloor2(int row, int bay){ |
| | |
| | | agvLocMast.setLocSts(locSts); |
| | | agvLocMast.setBarcode(barcode); |
| | | agvLocMast.setLocType2(containerType); |
| | | agvLocMast.setModiTime(new Date()); |
| | | this.updateById(agvLocMast); |
| | | } |
| | | public void updateLocStsByLocNo(String locNo, String locSts, String barcode,Short containerType,String locType,Short locType3) { |
| | | AgvLocMast agvLocMast = this.selectById(locNo); |
| | | agvLocMast.setLocSts(locSts); |
| | | agvLocMast.setBarcode(barcode); |
| | | agvLocMast.setLocType2(containerType); |
| | | agvLocMast.setLocType(locType); |
| | | agvLocMast.setLocType3(locType3); |
| | | agvLocMast.setModiTime(new Date()); |
| | | this.updateById(agvLocMast); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public AgvLocMast selectEmptyZpallet(int type) { |
| | | public AgvLocMast selectEmptyZpallet(int type, int floor) { |
| | | |
| | | return this.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_sts","D").eq("loc_type2",type)); |
| | | return this.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_sts","D").eq("loc_type2",type).eq("floor",floor)); |
| | | |
| | | } |
| | | |
| | |
| | | return this.baseMapper.queryContainerTypeByLocType1(locType1); |
| | | } |
| | | |
| | | @Override |
| | | public List<AgvLocMast> selectDistinctLocByLevAndFloor(int lev, int floor) { |
| | | |
| | | return this.agvLocMastMapper.selectDistinctLocByLevAndFloor(lev,floor); |
| | | } |
| | | |
| | | } |