自动化立体仓库 - WMS系统
#1
lsh
2024-05-31 c22edcc5e29212dfa3e7b629c45ba00c30f310f8
src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java
@@ -394,10 +394,14 @@
            }
        } else {
            if (agvLocMast.getFloor() != floor) {
                if (agvLocMast.getFloor() == 1) {
                    throw new CoolException("当前库位请选择调拨单调拨!");
                } else {
                    ioType = 12;
                if (floor==1 && agvLocMast.getFloor()!=1){
                    ioType = 121;
                }else {
                    if (agvLocMast.getFloor() == 1) {
                        throw new CoolException("当前库位请选择调拨单调拨!");
                    } else {
                        ioType = 12;
                    }
                }
            } else {
                ioType = 11;
@@ -417,7 +421,11 @@
        //生成工作档
        AgvWrkMast mast = new AgvWrkMast();
        //工作状态
        mast.setWrkSts(201L);
        if (ioType==121) {
            mast.setWrkSts(11L);
        }else {
            mast.setWrkSts(201L);
        }
        //入出库类型
        mast.setIoType(ioType);
        mast.setIoTime(now);
@@ -458,6 +466,7 @@
                }
            });
        }
        // 如果当前任务是箱壳二三楼回退一楼的 回滚调拨单
        if (ioType == 12 && locMast.getFloor() == 1) {
            List<AgvLocDetl> agvLocDetls = agvLocDetlService.selectList(new EntityWrapper<AgvLocDetl>().eq("loc_no", agvLocMast.getLocNo()));
@@ -525,6 +534,9 @@
    public String allocationIn(AgvMobileStartPakin param, Long userId) {
        Date now = new Date();
        AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("barcode", param.getBarcode()));
        if (agvWrkMast.getIoType() != 111) {
            throw new CoolException("非手动调拨任务,不支持次功能");
        }
        AgvBasDevp agvBasDevp = agvBasDevpService.selectByDevNo(param.getDevNo());
        if (Cools.isEmpty(agvWrkMast)) {
            throw new CoolException("工作档中没有此货架任务");
@@ -543,8 +555,10 @@
        if (!agvWrkMastService.update(agvWrkMast,new EntityWrapper<AgvWrkMast>().eq("wrk_no",agvWrkMast.getWrkNo()))) {
            throw new CoolException("更新工作档失败");
        }
        //
        agvLocMastService.updateLocStsByLocNo(locNo.getLocNo(),"S",agvWrkMast.getBarcode(),agvWrkMast.getWhsType().shortValue());
        // 更新源库位状态
        agvBasDevpService.updateLocStsAndBarcodeByDevNo(param.getDevNo(),"F",agvWrkMast.getBarcode(),agvWrkMast.getWhsType().shortValue());
        agvBasDevpService.updateLocStsAndBarcodeByDevNo(param.getDevNo(),"R",agvWrkMast.getBarcode(),agvWrkMast.getWhsType().shortValue());
        //删除AGV工作档
        return "ok";
    }