public WeatherDeviceSyncJob() { DisplayName = "农气物联网--农田小气候仪数据同步插件"; //JobInterval = 5 * 60; JobInterval = 10; //_connName ="CAWSAnyWhereServer"; _connName = "Server= wlw.smartiot.cc,4000;Database=CAWSAnyWhereServer;uid=sa;pwd=*************"; //"Server = wlw.smartiot.cc,4000; Database = CAWSAnyWhereServer; uid = sa; pwd = 1qaz @WSX providerName=System.Data.SqlClient"; //_connName = "AWIOT-WeatherDevice"; try { //_dal = XCode.DataAccessLayer.DAL.Create(_connName); } catch (Exception ex) { LogHelper.Error(ex.ToString()); //抛出异常 //_dal = XCode.DataAccessLayer.DAL.Create(_connName); } _areaStationService = AhnqIotContainer.Container.Resolve <IAreaStationService>(); _weatherStationOnlineStatisticsService = AhnqIotContainer.Container.Resolve <IWeatherStationOnlineStatisticsService>(); _weatherStationService = AhnqIotContainer.Container.Resolve <IWeatherStationService>(); _areaStationDataInfoService = AhnqIotContainer.Container.Resolve <IAreaStationDataInfoService>(); _weatherDeviceService = AhnqIotContainer.Container.Resolve <IWeatherDeviceService>(); _weatherDeviceTypeService = AhnqIotContainer.Container.Resolve <IWeatherDeviceTypeService>(); var sqlHelper = new SqlHelper(); _tableNameSqlCmd = sqlHelper.GetTableNames; //获取所有表名 }
public AreaStationJob() { DisplayName = "区域气象站数据工作组件"; JobInterval = 30 * 60; _areaStationService = AhnqIotContainer.Container.Resolve <IAreaStationService>(); _areaStationDataInfoService = AhnqIotContainer.Container.Resolve <IAreaStationDataInfoService>(); }