| | |
| | | import com.ld.igds.grain.service.CoreGrainService; |
| | | import com.ld.igds.models.WeatherConf; |
| | | import com.ld.igds.models.WeatherInfo; |
| | | import com.ld.igds.timer.WeatherScheduled; |
| | | import com.ld.igds.timer.WeatherTimerService; |
| | | import com.ld.igds.util.RedisUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | @Autowired |
| | | private WeatherScheduled weatherScheduled; |
| | | private WeatherTimerService weatherTimerService; |
| | | |
| | | @Override |
| | | public String getUrl() { |
| | |
| | | } |
| | | |
| | | if (t.equals("weather11")) { |
| | | weatherScheduled.scheduled(); |
| | | weatherTimerService.doExe(); |
| | | } |
| | | } |
| | | |
| | |
| | | log.info("-----测试调用气象----deptId={},cityId={}", deptId, cityId); |
| | | |
| | | Date date = new Date(); |
| | | WeatherInfo info = weatherScheduled.getWeatherByWeb(date, conf); |
| | | WeatherInfo info = weatherTimerService.getWeatherByWeb(date, conf); |
| | | if (null == info) { |
| | | response.getWriter().print("MSG:ERROR"); |
| | | } else { |