| | |
| | | |
| | | /** |
| | | * 每五秒校验深库位是否为空,如果浅库位有货,将浅库位移至深库位 |
| | | */ |
| | | @Scheduled(cron = "0/35 * * * * ? ") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void shallocToDeep() throws Exception { |
| | | List<Loc> locs = locService.list(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type) |
| | | .in(Loc::getRow, rows)); |
| | | if (locs.isEmpty()) { |
| | | return; |
| | | } |
| | | for (Loc loc : locs) { |
| | | String shallowLoc = LocUtils.getShallowLoc(loc.getCode()); |
| | | Loc one = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, shallowLoc)); |
| | | if (Objects.isNull(one) || !one.getUseStatus().equals(LocStsType.LOC_STS_TYPE_F.type)) { |
| | | continue; |
| | | } |
| | | taskService.moveToDeep(SystemAuthUtils.getLoginUserId(), shallowLoc); |
| | | } |
| | | } |
| | | *///TODO 生成移库任务前,需要检查是否有任务前往当前托盘 |
| | | // @Scheduled(cron = "0/35 * * * * ? ") |
| | | // @Transactional(rollbackFor = Exception.class) |
| | | // public void shallocToDeep() throws Exception { |
| | | // List<Loc> locs = locService.list(new LambdaQueryWrapper<Loc>() |
| | | // .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type) |
| | | // .in(Loc::getRow, rows)); |
| | | // if (locs.isEmpty()) { |
| | | // return; |
| | | // } |
| | | // for (Loc loc : locs) { |
| | | // String shallowLoc = LocUtils.getShallowLoc(loc.getCode()); |
| | | // Loc one = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, shallowLoc)); |
| | | // if (Objects.isNull(one) || !one.getUseStatus().equals(LocStsType.LOC_STS_TYPE_F.type)) { |
| | | // continue; |
| | | // } |
| | | // taskService.moveToDeep(SystemAuthUtils.getLoginUserId(), shallowLoc); |
| | | // } |
| | | // } |
| | | |
| | | |
| | | /** |