package com.zy.asrs.task; import com.zy.asrs.service.LocMastService; import com.zy.asrs.task.core.ReturnT; import com.zy.asrs.task.handler.FireOutHandler; import com.zy.asrs.task.handler.MoveLocHandler; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @Component @Slf4j public class MoveLocScheduler { @Value("${wcs-slave.doubleDeep}") private boolean confirmDeep; @Autowired private MoveLocHandler moveLocHandler; @Autowired private LocMastService locMastService; /** * */ @Scheduled(cron = "0/3 * * * * ? ") private void execute() { if (confirmDeep) return; ReturnT result = moveLocHandler.start(); if (!result.isSuccess()) { log.error("测试完成移库失败"); } } }