|  |  |  | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.stereotype.Component; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.moral.api.service.CityAqiDailyService; | 
|---|
|  |  |  | import com.moral.api.service.CityAqiMonthlyService; | 
|---|
|  |  |  | import com.moral.api.service.CityAqiService; | 
|---|
|  |  |  | import com.moral.api.service.CityAqiYearlyService; | 
|---|
|  |  |  | import com.moral.api.service.HistoryAqiService; | 
|---|
|  |  |  | import com.xxl.job.core.biz.model.ReturnT; | 
|---|
|  |  |  | import com.xxl.job.core.context.XxlJobHelper; | 
|---|
|  |  |  | 
|---|
|  |  |  | private HistoryAqiService historyAqiService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private CityAqiDailyService cityAqiDailyService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private CityAqiService cityAqiService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //aqi数据按国控站接入 | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private CityAqiMonthlyService cityAqiMonthlyService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private CityAqiYearlyService cityAqiYearlyService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //国控站aqi小时数据接入 | 
|---|
|  |  |  | @XxlJob("insertHistoryAqi") | 
|---|
|  |  |  | public ReturnT insertHistoryAqi() { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | 
|---|
|  |  |  | return ReturnT.SUCCESS; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //aqi数据按城市接入 | 
|---|
|  |  |  | //城市aqi小时数据接入 | 
|---|
|  |  |  | @XxlJob("insertCityAqi") | 
|---|
|  |  |  | public ReturnT insertCityAqi() { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return ReturnT.SUCCESS; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //城市aqi日数据统计 | 
|---|
|  |  |  | @XxlJob("insertCityAqiDaily") | 
|---|
|  |  |  | public ReturnT insertCityAqiDaily() { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | cityAqiDailyService.insertCityAqiDaily(); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | XxlJobHelper.log(e.getMessage()); | 
|---|
|  |  |  | return new ReturnT(ReturnT.FAIL_CODE, e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return ReturnT.SUCCESS; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //城市aqi月数据统计 | 
|---|
|  |  |  | @XxlJob("insertCityAqiMonthly") | 
|---|
|  |  |  | public ReturnT insertCityAqiMonthly() { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | cityAqiMonthlyService.insertCityAqiMonthly(); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | XxlJobHelper.log(e.getMessage()); | 
|---|
|  |  |  | return new ReturnT(ReturnT.FAIL_CODE, e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return ReturnT.SUCCESS; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //城市aqi年数据统计 | 
|---|
|  |  |  | @XxlJob("insertCityAqiYearly") | 
|---|
|  |  |  | public ReturnT insertCityAqiYearly() { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | cityAqiYearlyService.insertCityAqiYearly(); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | XxlJobHelper.log(e.getMessage()); | 
|---|
|  |  |  | return new ReturnT(ReturnT.FAIL_CODE, e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return ReturnT.SUCCESS; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|