自动化立体仓库 - WMS系统
lty
1 天以前 14129e42408efdd6c1678f44304c0585273d7e85
#手动出库agv库位锁定
1个文件已修改
29 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -311,6 +311,15 @@
                dtos.add(new OutLocDto(locNo, locDetlDto));
            }
        }
        Config config = configService.selectConfigByCode("AutoMPArea");
        List<LocMast> list = locMastMapper.selectList(
                new EntityWrapper<LocMast>()
                        .eq("whs_type", 5)
                        .eq("loc_sts", "O")
        );
        LocMast locMastRgv = list.isEmpty() ? null : list.get(0);
        Integer ioType = null;
        // 生成工作档
        for (OutLocDto dto : dtos) {
@@ -351,6 +360,10 @@
            wrkMast.setEmptyMk("N"); // 空板
            wrkMast.setLinkMis("N");
            wrkMast.setBarcode(locMast.getBarcode());
            if (Boolean.parseBoolean(config.getValue()) && locMastRgv.getLocNo() != null) {  //若有空库位且配置允许则绑定其备料库位号
                wrkMast.setLocNo(locMastRgv.getLocNo());
                wrkMast.setTakeNone("0");  //0rgv未取,1rgv已取货
            }
            wrkMast.setAppeUser(userId); // 操作人员数据
            wrkMast.setAppeTime(now);
            wrkMast.setModiUser(userId);
@@ -375,6 +388,18 @@
                if (!wrkDetlService.insert(wrkDetl)) {
                    throw new CoolException("保存工作档明细失败");
                }
            }
            //修改agv备料区状态
            if(locMastRgv.getLocSts().equals("O")){
                locMastRgv.setLocSts("S");
                locMastRgv.setModiUser(userId);
                locMastRgv.setModiTime(now);
                if (!locMastService.updateById(locMastRgv)) {
                    throw new CoolException("预约agv备料区库位状态失败,库位号:"+locMastRgv.getLocNo());
                }
            }else{
                throw new CoolException(locMastRgv.getLocNo() + "备料区不是空库位状态");
            }
            // 修改库位状态:   F.在库 ====>>> R.出库预约/P.拣料/盘点/并板出库中
            locMast = locMastService.selectById(dto.getLocNo());
@@ -493,10 +518,10 @@
            locMastRgv.setModiUser(userId);
            locMastRgv.setModiTime(now);
            if (!locMastService.updateById(locMastRgv)) {
                throw new CoolException("预约agv备料区库位状态失败,库位号:"+taskDto.getLocNo());
                throw new CoolException("预约agv备料区库位状态失败,库位号:"+locMastRgv.getLocNo());
            }
        }else{
            throw new CoolException(taskDto.getLocNo() + "备料区不是空库位状态");
            throw new CoolException(locMastRgv.getLocNo() + "备料区不是空库位状态");
        }
        // 修改库位状态:   F.在库 ====>>> R.出库预约/P.拣料/盘点/并板出库中