| | |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | |
| | | @Value("${mes.getTokenPath}") |
| | | private String getTokenPath; |
| | | |
| | | @Value("${mes.stock}") |
| | | private String stock; |
| | | |
| | | |
| | | @Scheduled(fixedDelay = 5000) |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | public void executeStock() { |
| | | log.info("Stock定时任务开始执行"); |
| | | if (!flag) { |
| | | return; |
| | | } |
| | | Map<String, Object> mesTokenInfo = getMesTokenInfo(); |
| | | reportDataHandler.stock(mesTokenInfo); |
| | | log.info("Stock定时任务结束执行"); |
| | | } |
| | | } |