自动化立体仓库 - WMS系统
zyx
2023-12-04 20a1449f65a9d577c2c9c0af62f3c4af3dd8d172
src/main/java/com/zy/common/web/WcsController.java
@@ -53,6 +53,8 @@
    private AgvWorkService agvWorkService;
    @Autowired
    private AgvBasDevpService agvBasDevpService;
    @Autowired
    private AgvWrkMastService agvWrkMastService;
//    @Autowired
//    private ErpService erpService;
@@ -299,7 +301,7 @@
            throw new CoolException(CodeRes.NONE_DETL_900);
        }
        // 检索库位
        List<String> matnrList = wrkDetls.stream().map(WrkDetl::getMaktx).distinct().collect(Collectors.toList());
        List<String> matnrList = wrkDetls.stream().map(WrkDetl::getMatnr).distinct().collect(Collectors.toList());
        return commonService.getLocNo(1, ioType - 50, devpNo, matnrList, locTypeDto,0); // 库位号, 堆垛机,目标站
    }
@@ -345,9 +347,16 @@
        AgvBasDevp agvBasDevp = agvBasDevpService.getByDevNo(param.getDevNo());
        if(Cools.isEmpty(agvBasDevp) || !"O".equals(agvBasDevp.getLocSts())){
            //去找agv工作档任务
            throw new CoolException("当前站点不存在或者站点不为空");
        }
        if(Cools.isEmpty(agvWaitPakinService.selectByContainerCode(containerCode))){
            throw new CoolException("该料箱位组托");
        }
        //去找agv工作档任务
        if(!Cools.isEmpty(agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("barcode",containerCode)))){
            throw new CoolException("该料箱正在入库中");
        }
        //绑定站点
        agvBasDevpService.updateLocStsAndBarcodeByDevNo(param.getDevNo(),"F",containerCode);