| | |
| | | } |
| | | 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); |
| | | } |
| | | } |
| | | } |