skyouc
3 天以前 0d692433815cd80bab48091829c427e22d4663d0
rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/TaskSchedules.java
@@ -138,25 +138,25 @@
    /**
     * 每五秒校验深库位是否为空,如果浅库位有货,将浅库位移至深库位
     */
    @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);
//        }
//    }
    /**