自动化立体仓库 - WMS系统
whycq
2024-07-05 010dc23827d3b1020356b6741ec47f7ce81497ab
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -201,6 +201,8 @@
                ioType = dto.isAll() ? 101 : 103;
            } else if (ioWorkType.equals(IoWorkType.CHECK_OUT)) {
                ioType = 107;
            } else if (ioWorkType.equals(IoWorkType.MERGE_OUT)) {
                ioType = 104;
            }
            assert ioType != null;
            // 获取库位
@@ -559,6 +561,27 @@
    @Override
    @Transactional
    public void locMergeOut(StockOutParam param, Long userId) {
        // 目标站点状态检测
        BasDevp staNo = basDevpService.checkSiteStatus(param.getOutSite());
        // 获取库位明细
        List<LocDetlDto> locDetlDtos = new ArrayList<>();
        for (StockOutParam.LocDetl paramLocDetl : param.getLocDetls()) {
            if (!Cools.isEmpty(paramLocDetl.getLocNo(), paramLocDetl.getMatnr(), paramLocDetl.getCount())) {
                LocDetl one = locDetlService.selectItem(paramLocDetl.getLocNo(), paramLocDetl.getMatnr(), paramLocDetl.getBatch());
                if (null != one) locDetlDtos.add(new LocDetlDto(one, paramLocDetl.getCount()));
            }
        }
        if (!locDetlDtos.isEmpty()) {
            // 启动出库开始 107.盘点出库
            stockOut(staNo, locDetlDtos, IoWorkType.MERGE_OUT, userId);
        } else {
            throw new CoolException("库位物料不存在");
        }
    }
    @Override
    @Transactional
    public void locMove(String sourceLocNo, String locNo, Long userId) {
        LocMast sourceLoc = locMastService.selectById(sourceLocNo);
        List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", sourceLocNo));
@@ -763,6 +786,13 @@
        Date now = new Date();
        List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", param.getLocNo()));
        String zpallet = "";
        for (LocDetl locDetl : locDetls) {
            if (!Cools.isEmpty(locDetl.getZpallet())) {
                zpallet = locDetl.getZpallet();
            }
        }
        List<LocDetlAdjustParam.LocDetlAdjust> list = param.getList();
        // 修改数量
@@ -826,8 +856,8 @@
            Mat mat = matService.selectByMatnr(adjust.getMatnr());
            LocDetl locDetl = new LocDetl();
            locDetl.sync(mat);
            locDetl.setZpallet(zpallet);
            locDetl.setBatch(adjust.getBatch());
            locDetl.setBarcode(locDetls.get(0).getBarcode());
            locDetl.setLocNo(locMast.getLocNo());
            locDetl.setAnfme(adjust.getCount()); // 数量
            locDetl.setModiUser(userId); // 操作人员信息