| | |
| | | @Scheduled(cron = "0/35 * * * * ?") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void autoCheckComplete() { |
| | | Boolean autoRunArea = configService.getVal("AUTO_RUN_CHECK_ORDERS", Boolean.class); |
| | | if (!autoRunArea) { |
| | | return; |
| | | } |
| | | // Boolean autoRunArea = configService.getVal("AUTO_RUN_CHECK_ORDERS", Boolean.class); |
| | | // if (!autoRunArea) { |
| | | // return; |
| | | // } |
| | | //获取任务列表中,为盘点出库的任务 |
| | | List<Task> tasks = taskService.list(new LambdaQueryWrapper<Task>() |
| | | .in(Task::getTaskType, Arrays.asList(TaskType.TASK_TYPE_CHECK_OUT.type, TaskType.TASK_TYPE_CHECK_IN.type))); |
| | |
| | | if (!stationService.update(new LambdaUpdateWrapper<BasStation>() |
| | | .eq(BasStation::getStationName, task.getTargSite()) |
| | | .set(BasStation::getUseStatus, LocStsType.LOC_STS_TYPE_F.type))) { |
| | | throw new CoolException("站点状态修改失败!!"); |
| | | log.error("站点状态修改完成失败,当前任务状态:", task.getTaskStatus()); |
| | | // throw new CoolException("站点状态修改失败!!"); |
| | | } |
| | | try { |
| | | taskService.pickOrCheckTask(task.getId(), Constants.TASK_TYPE_OUT_CHECK); |
| | |
| | | if (!stationService.update(new LambdaUpdateWrapper<BasStation>() |
| | | .eq(BasStation::getStationName, task.getTargSite()) |
| | | .set(BasStation::getUseStatus, LocStsType.LOC_STS_TYPE_R.type))) { |
| | | throw new CoolException("站点状态修改失败!!"); |
| | | log.error("站点状态修改完成失败,当前任务状态:", task.getTaskStatus()); |
| | | // throw new CoolException("站点状态修改失败!!"); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("error====>", e); |
| | |
| | | * @version 1.0 |
| | | */ |
| | | @Scheduled(cron = "0/25 * * * * ?") |
| | | // @Scheduled(cron = "0 0/05 * * * ? ") |
| | | public void genRun() { |
| | | Boolean flagAuto = configService.getVal("AUTO_RUN_CHECK_ORDERS", Boolean.class); |
| | | if (!flagAuto) { |