自动化立体仓库 - WMS系统
zyx
2023-11-14 65219d7a58424495f10b1e3b1d20fd483622f883
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); // 库位号, 堆垛机,目标站
    }
@@ -347,12 +349,20 @@
        if(Cools.isEmpty(agvBasDevp) || !"O".equals(agvBasDevp.getLocSts())){
            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);
        //生成工作档
        List<AgvBasDevp> agvBasDevpList = agvBasDevpService.selectList(new EntityWrapper<AgvBasDevp>().eq("dev_no", param.getDevNo()));
        agvWorkService.createWaitPainWrkMastStart(agvBasDevpList, null);
        agvWorkService.createWaitPainWrkMastStart(agvBasDevpList, null, true);
        return R.ok();