| | |
| | | if (Cools.isEmpty(locMast) || null==locMast.getLocNo()){ |
| | | return R.error(); |
| | | } |
| | | if (!Cools.isEmpty(locMast.getContainerCode())){ |
| | | locMast.setBarcode(locMast.getContainerCode()); |
| | | } |
| | | |
| | | if (locMast.getEmptyContainer$().equals("N") ){ |
| | | if (locMast.getContainerCode().isEmpty() || locMast.getContainerTypeCode().isEmpty()){ |
| | | return R.error("容器编码或容器类型有误"); |
| | | } |
| | | } |
| | | if (locMast.getLocSts().equals("K")){ |
| | | locMast.setBarcode(null); |
| | | } |
| | | locMast.setModiUser(getUserId()); |
| | | locMast.setModiTime(new Date()); |
| | | locMastService.updateById(locMast); |
| | | locMastService.toWmsLocStatus(locMast); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | String locNo = String.format("%02d", r) + String.format("%03d", b) + String.format("%02d", l); |
| | | // 获取堆垛机号 |
| | | int crnNo = 0; |
| | | Shelves shelves = new Shelves(param.getEndRow() - param.getStartRow() + 1, param.getCrnAmount()); |
| | | for (List<Integer> node : shelves.nodes){ |
| | | if (node.contains(r)) { |
| | | crnNo = shelves.nodes.indexOf(node) + 1; |
| | | break; |
| | | } |
| | | } |
| | | // Shelves shelves = new Shelves(param.getEndRow() - param.getStartRow() + 1, param.getCrnAmount()); |
| | | // for (List<Integer> node : shelves.nodes){ |
| | | // if (node.contains(r)) { |
| | | // crnNo = shelves.nodes.indexOf(node) + 1; |
| | | // break; |
| | | // } |
| | | // } |
| | | Date now = new Date(); |
| | | LocMast locMast = new LocMast(); |
| | | locMast.setLocNo(locNo); |
| | | locMast.setLocSts("O"); |
| | | locMast.setLocSts("K"); |
| | | locMast.setRow1(r); // 排 |
| | | locMast.setBay1(b); // 列 |
| | | locMast.setLev1(l); // 层 |