package com.zy.asrs.task;
|
|
import com.zy.asrs.service.StationCycleCapacityService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.stereotype.Component;
|
|
@Component
|
public class StationCycleCapacityScheduler {
|
|
@Autowired
|
private StationCycleCapacityService stationCycleCapacityService;
|
|
// 每秒刷新一次循环圈承载量
|
@Scheduled(cron = "0/1 * * * * ? ")
|
public void refreshStationCycleCapacity() {
|
stationCycleCapacityService.refreshSnapshot();
|
}
|
}
|