| | |
| | | |
| | | public void initBasDevp(){ |
| | | |
| | | //初始化1楼缓存货架站点 2排5列3层 |
| | | this.insertBatch(getCacheBasDevpList(1,2,1,5,1,3,1)); |
| | | //初始化3楼缓存货架站点 3排5列3层 |
| | | this.insertBatch(getCacheBasDevpList(5,9,1,5,1,3,3)); |
| | | //初始化3楼输送线工作站点 4个站点 |
| | | this.insertBatch(getLineBasDevpList()); |
| | | // //初始化1楼缓存货架站点 2排5列3层 |
| | | // this.insertBatch(getCacheBasDevpList(1,2,1,5,1,3,1)); |
| | | // //初始化3楼缓存货架站点 3排5列3层 |
| | | // this.insertBatch(getCacheBasDevpList(5,9,1,5,1,3,3)); |
| | | // //初始化3楼输送线工作站点 4个站点 |
| | | // this.insertBatch(getLineBasDevpList()); |
| | | |
| | | //待包装成品存储区入库接驳位 |
| | | this.insertBatch(getConnectionBasDevpList("DI",12,2,true,(short)1)); |
| | | //待包装成品存储区出库接驳位 |
| | | this.insertBatch(getConnectionBasDevpList("DO",8,2,false,(short)1)); |
| | | //原材料入库接驳位 |
| | | this.insertBatch(getConnectionBasDevpList("YI",14,2,true,(short)2)); |
| | | //原材料出库接驳位 |
| | | this.insertBatch(getConnectionBasDevpList("YO",18,2,false,(short)2)); |
| | | //箱壳入库接驳位 |
| | | this.insertBatch(getConnectionBasDevpList("XI",5,2,true,(short)3)); |
| | | //箱壳出库接驳位 |
| | | this.insertBatch(getConnectionBasDevpList("XO",12,2,false,(short)3)); |
| | | } |
| | | |
| | | private List<AgvBasDevp> getLineBasDevpList(){ |
| | | // private List<AgvBasDevp> getLineBasDevpList(){ |
| | | // List<AgvBasDevp> agvBasDevpList = new ArrayList<>(); |
| | | // Date now = new Date(); |
| | | // for(int row=1; row<=4; row++){ |
| | | // agvBasDevpList.add(getAgvBasDevp(row,1,1,3,"N",now)); |
| | | // } |
| | | // return agvBasDevpList; |
| | | // } |
| | | |
| | | private List<AgvBasDevp> getConnectionBasDevpList(String type, int num, int floor, boolean inEnable, Short locType){ |
| | | List<AgvBasDevp> agvBasDevpList = new ArrayList<>(); |
| | | Date now = new Date(); |
| | | for(int row=1; row<=4; row++){ |
| | | agvBasDevpList.add(getAgvBasDevp(row,1,1,3,"N",now)); |
| | | for(int index=1; index<=num; index++){ |
| | | agvBasDevpList.add(getAgvBasDevp(type,index,floor,inEnable,locType,now)); |
| | | } |
| | | return agvBasDevpList; |
| | | } |
| | | |
| | | //根据排列层获取AGV缓存货架站点列表 |
| | | private List<AgvBasDevp> getCacheBasDevpList(int rowIndex, int rowMax, int bayIndex, int bayMax, int levIndex, int levMax, int floor){ |
| | | List<AgvBasDevp> agvBasDevpList = new ArrayList<>(); |
| | | Date now = new Date(); |
| | | for(int row=rowIndex; row<=rowMax; row++){ |
| | | for(int bay=bayIndex; bay<=bayMax; bay++){ |
| | | for(int lev=levIndex; lev<=levMax; lev++){ |
| | | agvBasDevpList.add(getAgvBasDevp(row,bay,lev,floor,"Y",now)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return agvBasDevpList; |
| | | } |
| | | // //根据排列层获取AGV缓存货架站点列表 |
| | | // private List<AgvBasDevp> getCacheBasDevpList(int rowIndex, int rowMax, int bayIndex, int bayMax, int levIndex, int levMax, int floor){ |
| | | // List<AgvBasDevp> agvBasDevpList = new ArrayList<>(); |
| | | // Date now = new Date(); |
| | | // for(int row=rowIndex; row<=rowMax; row++){ |
| | | // for(int bay=bayIndex; bay<=bayMax; bay++){ |
| | | // for(int lev=levIndex; lev<=levMax; lev++){ |
| | | // agvBasDevpList.add(getAgvBasDevp(row,bay,lev,floor,"Y",now)); |
| | | // } |
| | | // } |
| | | // } |
| | | // return agvBasDevpList; |
| | | // } |
| | | |
| | | private AgvBasDevp getAgvBasDevp(int row, int bay, int lev, int floor, String cacheShelves, Date now){ |
| | | AgvBasDevp agvBasDevp = new AgvBasDevp(); |
| | |
| | | agvBasDevp.setLocSts("O"); |
| | | agvBasDevp.setCacheShelves(cacheShelves); |
| | | agvBasDevp.setFloor(floor); |
| | | agvBasDevp.setModiTime(now); |
| | | agvBasDevp.setAppeTime(now); |
| | | return agvBasDevp; |
| | | } |
| | | |
| | | private AgvBasDevp getAgvBasDevp(String type, int index, int floor, boolean inEnable, Short locType, Date now){ |
| | | AgvBasDevp agvBasDevp = new AgvBasDevp(); |
| | | String no = index >= 10 ? index + "" : "0" + index; |
| | | String devNo = type + "_" + no + "F" + floor; |
| | | agvBasDevp.setDevNo(devNo); |
| | | agvBasDevp.setLocSts("O"); |
| | | agvBasDevp.setInEnable(inEnable ? "Y" : "N"); |
| | | agvBasDevp.setOutEnable(inEnable ? "N" : "Y"); |
| | | agvBasDevp.setFloor(floor); |
| | | agvBasDevp.setLocType1(locType); |
| | | agvBasDevp.setModiTime(now); |
| | | agvBasDevp.setAppeTime(now); |
| | | return agvBasDevp; |
| | |
| | | } |
| | | |
| | | private void setFlagForAgvBasDevpDto(AgvWrkMast agvWrkMast, AgvBasDevpDto agvBasDevpDto){ |
| | | //当工作档类型为101.出库 并且 工作位状态为F.在库时,显示容器离场按钮 |
| | | //当工作档类型为101.出库 并且 工作位状态为F.在库时,显示货架离场按钮 |
| | | if(agvWrkMast.getIoType() == 101 && "F".equals(agvBasDevpDto.getLocSts())){ |
| | | agvBasDevpDto.setContainerMoveOutFlag(true); |
| | | } |
| | | |
| | | //当工作档类型为101.出库 并且 工作位状态为F.在库时,显示容器离场按钮 |
| | | //当工作档类型为101.出库 并且 工作位状态为F.在库时,显示货架离场按钮 |
| | | if(agvWrkMast.getIoType() == 110 && "D".equals(agvBasDevpDto.getLocSts())){ |
| | | agvBasDevpDto.setContainerMoveOutFlag(true); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<String> selectCacheShelvesStationCodeByLocType(short locType, int floor) { |
| | | return this.baseMapper.selectCacheShelvesStationCodeByLocType(locType,floor); |
| | | } |
| | | |
| | | @Override |
| | | public List<String> selectCacheShelvesStationCodeByLocType(short locType) { |
| | | return this.baseMapper.selectCacheShelvesStationCodeByLocType(locType); |
| | | return this.baseMapper.selectCacheShelvesStationCodeByLocTypeV2(locType); |
| | | } |
| | | |
| | | @Override |
| | | public List<String> selectCacheShelvesStationCodeByLocType2(short locType, int floor) { |
| | | return this.baseMapper.selectCacheShelvesStationCodeByLocType2(locType,floor); |
| | | } |
| | | |
| | | public List<Map<String,Object>> selectDevNoAndNumBystationCode(String stationCode){ |