自动化立体仓库 - WMS系统
zhangc
2025-03-24 cfc4421af2ba05a786300e70e21c779ddbd39836
src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java
@@ -227,7 +227,9 @@
            updateAgvLocMast(agvLocMastService.selectById(sourceLocNo), locSts);
            //更新目标站点状态
            //locSts = ioType == 101 ? "S" : "Q";
            updateAgvBasDevp(agvBasDevpService.selectById(targetLocNo), "S");
            AgvBasDevp agvBasDevp = agvBasDevpService.selectById(targetLocNo);
            agvBasDevp.setBarcode("");
            updateAgvBasDevp(agvBasDevp, "S");
        });
    }
@@ -903,7 +905,7 @@
                    }
                }
            }
            if (agvLocMast==null){
            if (agvLocMast == null) {
                throw new CoolException("没有该类型的空库位了");
            }
@@ -959,18 +961,23 @@
        if (!Cools.isEmpty(agvWrkMast)) {
            throw new CoolException("有货架在往站点搬运" + agvBasDevp.getDevNo() + ",无法进行空板出库");
        }
        AgvLocMast agvLocMast = null;
        if (station.startsWith("XI") && station.endsWith("F4") && containerType == 30) {
            agvLocMast = agvLocMastService.select30EmptyZpallet();
        } else {
            //寻找相应类型的空货架
            Integer floor = agvBasDevp.getFloor();
            if (floor == 4) {
                floor = 1;
            }
            agvLocMast = agvLocMastService.selectEmptyZpallet(containerType, floor);
            if (containerType == 0) {
                //空板自动出库,根据站点类型选择
                agvLocMastService.selectEmptyZpalletByLocType1(agvBasDevp.getLocType1());
        //寻找相应类型的空货架
        Integer floor = agvBasDevp.getFloor();
        if (floor == 4) {
            floor = 1;
            }
        }
        AgvLocMast agvLocMast = agvLocMastService.selectEmptyZpallet(containerType, floor);
        if (containerType == 0) {
            //空板自动出库,根据站点类型选择
            agvLocMastService.selectEmptyZpalletByLocType1(agvBasDevp.getLocType1());
        }
        if (Cools.isEmpty(agvLocMast)) {
            throw new CoolException("暂无当前出库站点类型的空货架!");
@@ -1345,6 +1352,9 @@
                if (wrkMast.getIoType() == 112) {
                    throw new CoolException("当前作业不能取消!");
                }
                if (wrkMast.getIoType() == 108 && wrkMast.getWrkSts() >= 204) {
                    throw new CoolException("源库位已经释放,当前作业不能取消!");
                }
                // 源库位
                String locNo = wrkMast.getSourceLocNo();
                // 目标库位
@@ -1407,6 +1417,9 @@
                // 回流单取消
            } else if (wrkMast.getIoType() == 114) {
                if (wrkMast.getWrkSts() >= 204) {
                    throw new CoolException("源库位已经释放,当前作业不能取消!");
                }
                //源库位
                String locNo = wrkMast.getSourceLocNo();
                // 目标库位
@@ -1578,7 +1591,10 @@
        }
        OrderDetl orderDetl = orderDetlService.selectItem(orderNo, mat.getMatnr(), batch, csocode);
        if (orderDetl == null) {
            throw new CoolException("订单明细不存在");
            orderDetl = orderDetlService.selectItem(orderNo, mat.getMatnr(), null, csocode);
            if (orderDetl == null) {
                throw new CoolException("订单明细不存在");
            }
        }
        AgvWrkDetl wrkDetl = new AgvWrkDetl();
        wrkDetl.sync(mat);