自动化立体仓库 - WMS系统
Junjie
2023-12-22 61d3494e33ecc0bcf617bca92e500ecc68b390fd
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,12 +32,14 @@
    AgvWrkMastHandler agvWrkMastHandler;
    @Autowired
    AgvWrkMastService agvWrkMastService;
    @Autowired
    AgvBasDevpService agvBasDevpService;
    /*
    定时处理AGV工作档中工作状态为205.工作完成 且 (1.入库 || 53,拣料入库 || 57.盘点入库 || 10.空板入库 || 11.库格移载)的数据
     */
    @Scheduled(cron = "0/5 * * * * ? ")
    @Scheduled(cron = "0/10 * * * * ? ")
    public void excutePutwayWrk(){
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
                .eq("wrk_sts", 205)
@@ -55,7 +58,7 @@
    /*
    定时处理AGV工作档中工作状态为206.容器离场完成 且 (101.出库 || 110.空板出库)
     */
    @Scheduled(cron = "0/5 * * * * ? ")
    @Scheduled(cron = "0/10 * * * * ? ")
    public void excuteCarryWrk(){
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
                .eq("wrk_sts", 206)
@@ -72,7 +75,7 @@
    putaway:上架
    定时处理AGV工作档中工作状态为201.生成入库任务ID 且(出库类型为 53.拣料再入库 || 1.入库 || 10.空板入库栽 || 57.盘点再入库)的数据
     */
    @Scheduled(cron = "0/5 * * * * ? ")
    @Scheduled(cron = "0/10 * * * * ? ")
    public void startPutwayWrk(){
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectPage(new Page<>(1, 50)
                ,new EntityWrapper<AgvWrkMast>()
@@ -95,11 +98,12 @@
    carry:搬运,统指出库、移库、点到点搬运等
    定时处理AGV工作档中工作状态为21.生成出库任务 且(出库类型为 101.出库 || 103.拣料出库 || 11.库格移栽 || 110.空板出库 || 107.盘点出库)的数据
     */
    @Scheduled(cron = "0/5 * * * * ? ")
    @Scheduled(cron = "0/10 * * * * ? ")
    public void startCarryWrk(){
        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());
            }
        }
    }
}