自动化立体仓库 - WMS系统
#
whycq
2024-05-20 0213556a2ec8d77bb012dca635e4581e0791cb2b
src/main/java/com/zy/asrs/task/AutoMoveScheduler.java
@@ -3,7 +3,9 @@
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.zy.asrs.entity.AgvLocMast;
import com.zy.asrs.entity.AgvWrkMast;
import com.zy.asrs.service.AgvLocMastService;
import com.zy.asrs.service.AgvWrkMastService;
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.task.handler.AutoMoveHandler;
import org.springframework.beans.factory.annotation.Autowired;
@@ -21,6 +23,8 @@
    private AgvLocMastService agvLocMastService;
    @Autowired
    private AutoMoveHandler autoMoveHandler;
    @Autowired
    private AgvWrkMastService agvWrkMastService;
    // 调拨出库
    @Scheduled(cron = "0/2 * * * * ? ")
@@ -40,6 +44,38 @@
    }
    // 调拨出库
    @Scheduled(cron = "0/2 * * * * ? ")
    private void execute2(){
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
                .eq("wrk_sts", 22)
                .andNew().eq("io_type",108)
                );
        if (agvWrkMastList.isEmpty()) {
            return;
        }
        for (AgvWrkMast agvWrkMast : agvWrkMastList) {
            ReturnT<String> returnT = autoMoveHandler.start2(agvWrkMast);
        }
    }
    // 调拨出库
    @Scheduled(cron = "0/2 * * * * ? ")
    private void execute3(){
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
                .eq("wrk_sts", 22)
                .andNew().eq("io_type",111)
        );
        if (agvWrkMastList.isEmpty()) {
            return;
        }
        for (AgvWrkMast agvWrkMast : agvWrkMastList) {
            ReturnT<String> returnT = autoMoveHandler.start3(agvWrkMast);
        }
    }
    // 空板自动回库
    @Scheduled(cron = "0/2 * * * * ? ")
    private void autoEmptyBack(){