自动化立体仓库 - WMS系统
zyx
2024-04-01 2d836c8b6a270b7007e1a2e1e9962cb9dcd8b6f6
src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java
@@ -316,27 +316,19 @@
    入库
     */
    @Transactional
    public String emptyPlateIn(String station,String containerCode,Short containerType, Long userId) {
    public String emptyPlateIn(String station,String containerCode,Short containerType, Long userId, boolean emptyAutoIn) {
        Date now = new Date();
        // 源站点状态检测
        //AgvBasDevp agvBasDevp = agvBasDevpService.selectByDevNo(station);
        AgvBasDevp agvBasDevp = agvBasDevpService.selectById(station);
        //初始定义为空板入库类型
        int ioType = 10;
//        if(Cools.isEmpty(agvBasDevp.getBarcode())){
//            agvBasDevp.setBarcode(containerCode);
//        }
        if(!Cools.eq(agvBasDevp.getBarcode(),containerCode) && !agvBasDevp.getLocSts().equals("O")){
        if(!Cools.eq(agvBasDevp.getBarcode(),containerCode) && !agvBasDevp.getLocSts().equals("O") && !emptyAutoIn){
            throw new CoolException("当前工作位状态为" + agvBasDevp.getLocSts()+",无法进行空板入库");
        }
        //查询工作档
        AgvWrkMast agvWrkMast = agvWrkMastService.selectByContainerCode(containerCode);
        if(!Cools.isEmpty(agvWrkMast)){
        if(!Cools.isEmpty(agvWrkMast) && !emptyAutoIn){
            throw new CoolException("当前容器已有入库任务,无法进行入库");
        }
@@ -388,6 +380,12 @@
        //寻找相应类型的空托盘
        AgvLocMast agvLocMast = agvLocMastService.selectEmptyZpallet(containerType);
        if(containerType == 0){
            //空板自动出库,根据站点类型选择
            agvLocMastService.selectEmptyZpalletByLocType1(agvBasDevp.getLocType1());
        }
        if (Cools.isEmpty(agvLocMast)) {
            throw new CoolException("暂无当前出库站点类型的空托盘!");
        }