自动化立体仓库 - WMS系统
#
mrzhssss
2022-09-12 63fd84ee4ad4a9e39d875fb8000f2ddd12864248
src/main/java/com/zy/asrs/service/impl/NodeServiceImpl.java
@@ -144,4 +144,22 @@
        }
        return R.ok("出库成功");
    }
    @Transactional
    @Override
    public void locMove(String sourceLocNo, String targetLocNo, Long userId) {
        List<ManLocDetl> targets = manLocDetlService.selectList(new EntityWrapper<ManLocDetl>()
                .like("loc_no", sourceLocNo));
        for (ManLocDetl target : targets) {
            Node uuid = nodeService.selectOne(new EntityWrapper<Node>()
                    .eq("uuid", targetLocNo));
            if (uuid == null || uuid.equals("")) {
                throw new RuntimeException("无法查询到移库的目标库位");
            }
            manLocDetlService.deleteById(target);
            target.setLocNo(uuid.getUuid());
            target.setNodeId(uuid.getId());
            manLocDetlService.insert(target);
        }
    }
}