自动化立体仓库 - WMS系统
src/main/java/com/zy/asrs/task/AgvWrkMastScheduler.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.plugins.Page;
import com.core.common.Cools;
import com.zy.asrs.entity.AgvWrkMast;
import com.zy.asrs.service.AgvBasDevpService;
import com.zy.asrs.service.AgvWrkMastService;
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.task.handler.AgvWrkMastHandler;
@@ -31,6 +32,8 @@
    AgvWrkMastHandler agvWrkMastHandler;
    @Autowired
    AgvWrkMastService agvWrkMastService;
    @Autowired
    AgvBasDevpService agvBasDevpService;
    /*
@@ -100,6 +103,7 @@
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectPage(new Page<>(1, 50)
                ,new EntityWrapper<AgvWrkMast>()
                        .eq("wrk_sts", 21)
                        .like("loc_no","@")
                        .andNew().eq("io_type", 101)
                        .or().eq("io_type", 103)
                        .or().eq("io_type", 11)
@@ -114,4 +118,19 @@
            }
        }
    }
    /*
    定时处理等待执行的任务 工作状态为21.生成出库任务 且目标库位中不含@字符
     */
    @Scheduled(cron = "0/10 * * * * ? ")
    public void dealWatiWrk(){
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectReadyAgvWrkMast();
        if(!Cools.isEmpty(agvWrkMastList)){
            try {
                ReturnT<String> returnT = agvWrkMastHandler.dealWatiWrk(agvWrkMastList);
            } catch (IOException e) {
                log.error(e.getMessage());
            }
        }
    }
}