package com.zy.asrs.timer;
|
|
import com.zy.asrs.service.WcsCrnSyncService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.stereotype.Component;
|
import org.slf4j.Logger;
|
import org.slf4j.LoggerFactory;
|
|
@Component
|
public class WcsCrnTimer {
|
|
private static final Logger log = LoggerFactory.getLogger(WcsCrnTimer.class);
|
|
@Autowired
|
private WcsCrnSyncService wcsCrnSyncService;
|
|
@Scheduled(cron = "0/3 * * * * ? ")
|
public void execute() {
|
try {
|
wcsCrnSyncService.sync();
|
} catch (Exception e) {
|
log.error("堆垛机状态定时同步失败", e);
|
}
|
}
|
}
|