| | |
| | | package com.whyc.task; |
| | | |
| | | import com.whyc.constant.UserOperation; |
| | | import com.whyc.service.HeiHeStationService; |
| | | import com.whyc.service.UserLogService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | @Resource |
| | | private HeiHeStationService stationService; |
| | | |
| | | @Autowired |
| | | private UserLogService userLogService; |
| | | |
| | | @Override |
| | | public void run() { |
| | | //站点信息 接入 |
| | | stationService.getAndSaveStationInf(); |
| | | try { |
| | | //站点信息 接入 |
| | | stationService.getAndSaveStationInf(); |
| | | |
| | | //获取所有的厂站的点表信息 |
| | | stationService.getAndSaveRealtimeData(); |
| | | |
| | | //获取所有的厂站的点表信息 |
| | | stationService.getAndSaveRealtimeData(); |
| | | }catch (Exception e){ |
| | | //记录问题 |
| | | userLogService.record(1, UserOperation.TYPE_EXCEPTION.getType(), "黑河市获取数据任务异常,异常信息:" + e.toString(), null); |
| | | } |
| | | } |
| | | } |