package com.zy.asrs.task; import com.zy.asrs.task.core.ReturnT; import com.zy.asrs.task.handler.RailwayPlatformHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; /** * Created by Monkey D. Luffy on 2023.09.17 * 徐工汉云..............以下.............上饶江铜.............自动补空板 */ @Component public class RailwayPlatformScheduler { @Autowired private RailwayPlatformHandler railwayPlatformHandler; @Scheduled(cron = "0/3 * * * * ? ") private void execute(){//上报月台 int[] staNos =new int[]{144}; for (int staNo : staNos){ ReturnT result = railwayPlatformHandler.start(staNo); if (result.getCode()==200){ break; } } } }