1
skyouc
昨天 10a43f2d14a1a161bc624b9fe2f70febc9776ac8
rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/AutoRunSchedules.java
@@ -104,10 +104,10 @@
    @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)));
@@ -123,7 +123,8 @@
                        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);
@@ -131,7 +132,8 @@
                            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);
@@ -150,6 +152,7 @@
     * @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) {