| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.AgvLocMast; |
| | | import com.zy.asrs.entity.AgvLocRule; |
| | |
| | | public class AgvLocMastServiceImpl extends ServiceImpl<AgvLocMastMapper, AgvLocMast> implements AgvLocMastService { |
| | | |
| | | @Autowired |
| | | AgvLocMastMapper agvLockMastMapper; |
| | | AgvLocMastMapper agvLocMastMapper; |
| | | |
| | | public void clearLoc(){ |
| | | agvLockMastMapper.deleteAll(); |
| | | agvLocMastMapper.deleteAll(); |
| | | } |
| | | |
| | | public void initLocFloor1() { |
| | |
| | | for(int row=rowIndex; row<=rowMax; row++) { |
| | | for (int bay = bayIndex; bay <= bayMax; bay++) { |
| | | for (int lev = levIndex; lev <= levMax; lev++) { |
| | | if(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; |
| | | String locBay = bay < 10 ? "-00" + bay : "-0" + bay; |
| | |
| | | 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) { |
| | | AgvLocMast agvLocMast = this.selectById(locNo); |
| | | agvLocMast.setLocSts(locSts); |
| | | this.updateById(agvLocMast); |
| | | } |
| | | |
| | | public List<String> queryGroupEmptyStock(int floor) { |
| | | return this.baseMapper.queryGroupEmptyStock(floor); |
| | | } |
| | | |
| | | public List<AgvLocMast> selectLocByLevAndFloor(int lev, int floor) { |
| | | |
| | | List<AgvLocMast> agvLocMastList = this.selectList(new EntityWrapper<AgvLocMast>().eq("lev1", lev).eq("floor", floor)); |
| | | return agvLocMastList; |
| | | //return this.agvLocMastMapper.selectLocByLevAndFloor(lev,floor); |
| | | } |
| | | |
| | | } |