自动化立体仓库 - WMS系统
#
whycq
2024-06-12 93674068e900b95726ef1ab9fd4dd61b50a1cb2f
src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java
@@ -237,7 +237,7 @@
                checkOrderQty(order,combMat);
            }
            DetlDto detlDto = new DetlDto(combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme(), combMat.getCsocode(), combMat.getIsoseq(),combMat.getContainerCode(),param.getLocType());
            DetlDto detlDto = new DetlDto(combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme(), combMat.getCsocode(), combMat.getIsoseq(),combMat.getContainerCode(),param.getLocType(),combMat.getProcessSts());
            //同一货架下相同物料信息和批号转为一个入库通知档
            if (DetlDto.has(detlDtos, detlDto)) {
                DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(), detlDto.getCsocode(), detlDto.getIsoseq(),detlDto.getContainerCode());
@@ -293,6 +293,8 @@
        waitPakin.setDeadTime(detlDto.getIsoseq());
        waitPakin.setLocType(detlDto.getLocType());
        waitPakin.setProcessSts(detlDto.getProcessSts());
        waitPakin.setAppeUser(userId);
@@ -423,7 +425,7 @@
            throw new CoolException("当前"+agvLocMast.getBarcode()+"货架码已在工作档中");
        }
        //检索库位,选择合适的库位
        AgvLocMast locMast = agvCommonService.getLocNo(agvLocMast.getLocType1(),floor);
        AgvLocMast locMast = agvCommonService.getLocNo(agvLocMast.getLocType1(),floor,false,true);
        if (Cools.isEmpty(locMast)) {
            throw new CoolException("当前楼层没有空库位");
        }
@@ -501,10 +503,16 @@
    @Synchronized
    public String allocationOut(AgvMobileStartPakin param, Long userId) {
        Date now = new Date();
        if(Cools.isEmpty(param.getBarcode())) {
            throw new CoolException("请输入货架码");
        }
        AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("loc_no", param.getDevNo()));
        Integer oldWrkNo = agvWrkMast.getWrkNo();
        if (Cools.isEmpty(agvWrkMast)) {
            throw new CoolException("工作档中没有此站点任务");
        }
        if (!agvWrkMast.getBarcode().equals(param.getBarcode())) {
            throw new CoolException("当前货架码与任务不匹配");
        }
        if (!agvWrkMast.getWrkSts().equals(207L)) {
            throw new CoolException("工作状态不符合离场条件");
@@ -546,8 +554,14 @@
    public String allocationIn(AgvMobileStartPakin param, Long userId) {
        Date now = new Date();
        AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("barcode", param.getBarcode()));
        if (Cools.isEmpty(agvWrkMast)) {
            throw new CoolException("暂无当前货架码的任务");
        }
        if (agvWrkMast.getIoType() != 111) {
            throw new CoolException("非手动调拨任务,不支持次功能");
        }
        if (!Cools.isEmpty(agvWrkMast.getSourceLocNo())) {
            throw new CoolException("当前货架码任有源库位,请确认");
        }
        AgvBasDevp agvBasDevp = agvBasDevpService.selectByDevNo(param.getDevNo());
        if (Cools.isEmpty(agvWrkMast)) {
@@ -556,7 +570,7 @@
        if (agvWrkMast.getCrnNo() != agvBasDevp.getFloor()) {
            throw new CoolException("请移动到->" + agvWrkMast.getCrnNo() + "楼入库点入库");
        }
        AgvLocMast locNo = agvCommonService.getLocNo(3, 1);
        AgvLocMast locNo = agvCommonService.getLocNo(3, 1,false,true);
        //工作状态
        agvWrkMast.setWrkSts(211L);
        //入出库类型
@@ -582,10 +596,16 @@
    @Synchronized
    public String empOut(AgvMobileStartPakin param, Long userId) {
        Date now = new Date();
        if (Cools.isEmpty(param.getBarcode())) {
            throw new CoolException("请输入货架码");
        }
        AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("source_loc_no", param.getDevNo()));
        Integer oldWrkNo = agvWrkMast.getWrkNo();
        if (Cools.isEmpty(agvWrkMast)) {
            throw new CoolException("工作档中没有此站点任务");
        }
        if (!agvWrkMast.getBarcode().equals(param.getBarcode())) {
            throw new CoolException("当前货架码与任务不匹配");
        }
        agvWrkMast.setWrkSts(213L);
        agvWrkMast.setSourceLocNo("");
@@ -608,6 +628,12 @@
        if (Cools.isEmpty(agvWrkMast)) {
            throw new CoolException("工作档中没有此站点任务");
        }
        if (agvWrkMast.getIoType() != 113) {
            throw new CoolException("当前工作类型不能空架进场");
        }
        if (agvWrkMast.getWrkSts() != 213) {
            throw new CoolException("当前工作类型不能空架进场");
        }
        agvWrkMast.setWrkSts(214L);
        agvWrkMast.setSourceLocNo(param.getDevNo());
        if (!agvWrkMastService.update(agvWrkMast,new EntityWrapper<AgvWrkMast>().eq("wrk_no",agvWrkMast.getWrkNo()))) {