自动化立体仓库 - WMS系统
zyx
2023-08-25 9b2838fd5b53ae5ef4aa7e082e2718cc0ccc4466
src/main/java/com/zy/asrs/service/impl/AgvBasDevpServiceImpl.java
@@ -109,16 +109,11 @@
                AgvBasDevpDto agvBasDevpDto = new AgvBasDevpDto();
                BeanUtils.copyProperties(agvBasDevp, agvBasDevpDto);
//                if (Cools.isEmpty(agvBasDevpDto.getBarcode())) {
//                    return agvBasDevpDto;
//                }
                //如果工作位状态为0.空库位,则直接返回
                if("O".equals(agvBasDevpDto.getLocSts())){
                    return agvBasDevpDto;
                }
//              AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>()
//                        .eq("barcode", agvBasDevpDto.getBarcode()));
                AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>()
                        .eq("loc_no", agvBasDevpDto.getDevNo())
                        .or().eq("source_loc_no",agvBasDevpDto.getDevNo()));
@@ -139,6 +134,8 @@
                    }
                }
                setFlagForAgvBasDevpDto(agvWrkMast,agvBasDevpDto);
                return agvBasDevpDto;
            }).collect(Collectors.toList());
@@ -153,4 +150,29 @@
        return result;
    }
    private void setFlagForAgvBasDevpDto(AgvWrkMast agvWrkMast, AgvBasDevpDto agvBasDevpDto){
        //当工作档类型为101.出库 并且 工作位状态为F.在库时,显示容器离场按钮
        if(agvWrkMast.getIoType() == 101 && "F".equals(agvBasDevpDto.getLocSts())){
            agvBasDevpDto.setContainerMoveOutFlag(true);
        }
        //当工作档类型为101.出库 并且 工作位状态为F.在库时,显示容器离场按钮
        if(agvWrkMast.getIoType() == 110 && "D".equals(agvBasDevpDto.getLocSts())){
            agvBasDevpDto.setContainerMoveOutFlag(true);
        }
        //当工作档类型为103.拣料出库 并且 工作位状态为F.在库时,显示拣料/盘点入库按钮
        if(agvWrkMast.getIoType() == 103 && "F".equals(agvBasDevpDto.getLocSts())){
            agvBasDevpDto.setPickInFlag(true);
        }
        //当工作档类型为107.盘点出库 并且 工作位状态为F.在库时,显示拣料/盘点入库按钮
        if(agvWrkMast.getIoType() == 107 && "F".equals(agvBasDevpDto.getLocSts())){
            agvBasDevpDto.setPickInFlag(true);
        }
    }
    public List<String> getAvailableEmptyInSite() {
        return this.baseMapper.getAvailableEmptyInSite();
    }
}