package com.zy.asrs.task; import com.zy.asrs.task.core.ReturnT; import com.zy.asrs.task.handler.ScaleEscalationHandler; import com.zy.asrs.task.handler.StaEscalationHandler; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; /** * Created by Monkey D. Luffy on 2024.07.11 * 亳州煜星..............以下.............亳州煜星.............2楼翻转倒料信息上传处理失败 */ @Slf4j @Component public class ScaleEscalationScheduler { @Autowired private ScaleEscalationHandler scaleEscalationHandler; @Scheduled(cron = "0/3 * * * * ? ") private void execute(){//2楼翻转倒料信息上传 int[] staNos =new int[]{460,453}; for (int staNo : staNos){ try{ ReturnT result = scaleEscalationHandler.start(staNo); if (result.getCode()==200){ break; } }catch (Exception e){ log.error("站点"+staNo+"2楼翻转倒料信息上传处理失败,异常信息:"+e); } } } }