| | |
| | | for (SyncLocsDto dto : dtos) { |
| | | Loc loc = new Loc(); |
| | | String string = new Random().nextInt(10000000) + ""; |
| | | Loc one = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, string)); |
| | | Loc one = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, dto.getLocNo())); |
| | | if (!Objects.isNull(one)) { |
| | | string = new Random().nextInt(10000000) + ""; |
| | | } |
| | |
| | | .setRow(dto.getRow()) |
| | | .setLev(dto.getLev()) |
| | | .setId(null) |
| | | .setAreaId(41L) |
| | | .setWarehouseId(27L) |
| | | .setAreaId(42L) |
| | | .setWarehouseId(29L) |
| | | .setBarcode(string) |
| | | .setCol(dto.getBay()) |
| | | .setType(dto.getLocType()) |
| | | .setType(dto.getLocType().equals("16") ? "17" : "15") |
| | | .setStatus(dto.getStatusBool()) |
| | | .setUseStatus(LocStsType.getLocSts(dto.getLocSts())); |
| | | if (!locService.save(loc)) { |