| | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | 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; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private IoCompleteLogHandler ioCompleteLogHandler; |
| | | |
| | | @Autowired |
| | | private IoCompleteService ioCompleteService; |
| | | |
| | | /** |
| | | * ERP接口是否启用 |
| | | */ |
| | | @Value("${erp.enabled}") |
| | | private Boolean erpEnabled; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | @Scheduled(cron = "0/10 * * * * ? ") |
| | | private void execute(){ |
| | | if(!erpEnabled) return; |
| | | List<IoComplete> ioCompletes = ioCompleteService.selectIoCompleteBySts(); |
| | | for (IoComplete ioComplete : ioCompletes) { |
| | | ReturnT<String> result = ioCompleteLogHandler.start(ioComplete); |