package com.zy.asrs.task; import com.zy.asrs.task.handler.GhlnHandler; import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import javax.annotation.Resource; /** * @author pang.jiabao * @description 冠鸿龙南专用定时任务 * @createDate 2024/7/10 9:20 */ @Slf4j @Component public class GhlnScheduler { @Resource private GhlnHandler ghlnHandler; // 货物到达出库口,呼叫agv @Scheduled(cron = "0/5 * * * * ?") private void OutboundCallAGV() { ghlnHandler.OutboundCallAGV(); } // 调用金蝶同步物料接口,增量同步每小时产生的新物料 // @Scheduled(cron = "0 0 0/1 * * ? ") // @Scheduled(cron = "0/30 * * * * ?") private void syncMat() { ghlnHandler.syncMat(); } @Scheduled(cron = "0 0 1 * * ? ") private void execute2() { ghlnHandler.start(); } }