#
luxiaotao1123
2021-08-08 4f1abba02bec2a86e4a34d6ffbd65f7a92c3f659
#
1个文件已修改
73 ■■■■ 已修改文件
src/main/java/zy/cloud/wms/manager/controller/OpenController.java 73 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/zy/cloud/wms/manager/controller/OpenController.java
@@ -63,44 +63,11 @@
        for (ReplenishDto param : params.getList()) {
            Mat mat = matService.selectByMatnr(param.getMatnr());
            List<Prior> priors = priorService.selectList(new EntityWrapper<Prior>().eq("matnr", param.getMatnr()));
            Node node;
            // 有推荐货位
            if (!Cools.isEmpty(priors)) {
                Prior prior = priors.get(0);
                Node node = nodeService.selectById(prior.getNodeId());
                // 保存入库记录
                Pakin pakin = new Pakin(
                        "BC" + String.valueOf(snowflakeIdWorker.nextId()),    // 任务号[非空]
                        null,    // 工作状态
                        null,    // 托盘号
                        param.getCount(),    // 入库数量
                        node.getId(),    // 关联货位[非空]
                        node.getUuid(),    // 货位[非空]
                        mat.getMatnr(),    // 商品编码[非空]
                        null,    // 商品名称
                        null,    // 名称
                        null,    // 尺码
                        null,    // 型号
                        null,    // 批号
                        null,    // 单位
                        null,    // SKC
                        null,    // 单据类型
                        null,    // 单据编号
                        null,    // 客户名称
                        null,    // 品项数
                        null,    // 数量
                        null,    // 重量
                        1,    // 状态
                        9527L,    // 添加人员
                        now,    // 添加时间
                        9527L,    // 修改人员
                        now,    // 修改时间
                        null    // 备注
                );
                VersionUtils.setPakin(pakin, mat);
                if (!pakinService.insert(pakin)) {
                    throw new CoolException("保存入库记录失败");
                }
                node = nodeService.selectById(prior.getNodeId());
                LocDetl locDetl = locDetlService.getLocDetl(node.getId(), param.getMatnr());
                if (locDetl == null) {
@@ -126,7 +93,7 @@
            // 没有推荐货物
            } else {
                Node node = nodeService.selectByUuid(Parameter.get().getUniNode());
                node = nodeService.selectByUuid(Parameter.get().getUniNode());
                LocDetl locDetl = locDetlService.getLocDetl(node.getId(), param.getMatnr());
                if (locDetl == null) {
@@ -150,6 +117,40 @@
                    }
                }
            }
            // 保存入库记录
            Pakin pakin = new Pakin(
                    "BC" + String.valueOf(snowflakeIdWorker.nextId()),    // 任务号[非空]
                    null,    // 工作状态
                    null,    // 托盘号
                    param.getCount(),    // 入库数量
                    node.getId(),    // 关联货位[非空]
                    node.getUuid(),    // 货位[非空]
                    mat.getMatnr(),    // 商品编码[非空]
                    null,    // 商品名称
                    null,    // 名称
                    null,    // 尺码
                    null,    // 型号
                    null,    // 批号
                    null,    // 单位
                    null,    // SKC
                    null,    // 单据类型
                    null,    // 单据编号
                    null,    // 客户名称
                    null,    // 品项数
                    null,    // 数量
                    null,    // 重量
                    1,    // 状态
                    9527L,    // 添加人员
                    now,    // 添加时间
                    9527L,    // 修改人员
                    now,    // 修改时间
                    "补仓入库"    // 备注
            );
            VersionUtils.setPakin(pakin, mat);
            if (!pakinService.insert(pakin)) {
                throw new CoolException("保存入库记录失败");
            }
        }
        return R.ok();
    }