| | |
| | | public String loc() { |
| | | List<Loc> list = locService.list(new LambdaQueryWrapper<Loc>().orderByAsc(Loc::getRow).orderByAsc(Loc::getBay).orderByAsc(Loc::getLev)); |
| | | for (Loc loc : list) { |
| | | // if (loc.getBay() <= 24) { |
| | | // Integer i = starts.get((loc.getRow() - 1) / 2); |
| | | // Code cacheByData = codeService.getCacheByData(Utils.zeroFill((loc.getBay()%8 -1+ i + loc.getBay() / 8 * 10) + "", 8)); |
| | | // loc.setCode(cacheByData.getId()); |
| | | // locService.updateById(loc); |
| | | // } |
| | | if (loc.getBay() == 24||loc.getBay() == 8||loc.getBay() == 16) { |
| | | Integer i = starts.get((loc.getRow() - 1) / 2); |
| | | Code cacheByData = codeService.getCacheByData(Utils.zeroFill(((loc.getBay()-1)%8 + i + (loc.getBay()-1) / 8 * 10) + "", 8)); |
| | | loc.setCode(cacheByData.getId()); |
| | | locService.updateById(loc); |
| | | } |
| | | // if (loc.getBay() > 24 && loc.getBay() <= 32) { |
| | | // Integer i = starts.get((loc.getRow() - 1) / 2) + 30; |
| | | // Code cacheByData = codeService.getCacheByData(Utils.zeroFill(((loc.getBay() - 24)%4-1 + i + (loc.getBay() - 24) / 4 * 6) + "", 8)); |
| | | // loc.setCode(cacheByData.getId()); |
| | | // locService.updateById(loc); |
| | | // } |
| | | if (loc.getBay() > 32) { |
| | | Integer i = starts2.get((loc.getRow() - 13) / 2); |
| | | if (i==656){ |
| | | Code cacheByData = codeService.getCacheByData(Utils.zeroFill((Utils.zeroFill((((loc.getBay()-1) % 8) + i + (((loc.getBay()-1) / 8) - 4) * 10) + "", 8)) + "", 8)); |
| | | loc.setCode(cacheByData.getId()); |
| | | locService.updateById(loc); |
| | | } |
| | | } |
| | | // if (loc.getBay() > 32) { |
| | | // Integer i = starts2.get((loc.getRow() - 13) / 2); |
| | | // if (i==656){ |
| | | // Code cacheByData = codeService.getCacheByData(Utils.zeroFill((Utils.zeroFill((((loc.getBay()-1) % 8) + i + (((loc.getBay()-1) / 8) - 4) * 10) + "", 8)) + "", 8)); |
| | | // loc.setCode(cacheByData.getId()); |
| | | // locService.updateById(loc); |
| | | // } |
| | | // } |
| | | } |
| | | return "success"; |
| | | } |