|
@@ -8,7 +8,7 @@ import com.yunfeiyun.agmp.common.framework.manager.RedisCacheManager;
|
|
|
import com.yunfeiyun.agmp.common.utils.DateUtils;
|
|
import com.yunfeiyun.agmp.common.utils.DateUtils;
|
|
|
import com.yunfeiyun.agmp.common.utils.StringUtils;
|
|
import com.yunfeiyun.agmp.common.utils.StringUtils;
|
|
|
import com.yunfeiyun.agmp.iot.common.domain.*;
|
|
import com.yunfeiyun.agmp.iot.common.domain.*;
|
|
|
-import com.yunfeiyun.agmp.iot.common.service.IotWeatherService;
|
|
|
|
|
|
|
+import com.yunfeiyun.agmp.common.service.WeatherService;
|
|
|
import com.yunfeiyun.agmp.iot.common.service.MongoService;
|
|
import com.yunfeiyun.agmp.iot.common.service.MongoService;
|
|
|
import com.yunfeiyun.agmp.iots.device.service.IIotSporeService;
|
|
import com.yunfeiyun.agmp.iots.device.service.IIotSporeService;
|
|
|
import lombok.Data;
|
|
import lombok.Data;
|
|
@@ -33,7 +33,7 @@ public class IotBzyPestRecogService {
|
|
|
private MongoService mongoService;
|
|
private MongoService mongoService;
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- private IotWeatherService iotWeatherService;
|
|
|
|
|
|
|
+ private WeatherService weatherService;
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private RedisCacheManager redisCacheManager;
|
|
private RedisCacheManager redisCacheManager;
|
|
@@ -80,7 +80,7 @@ public class IotBzyPestRecogService {
|
|
|
}
|
|
}
|
|
|
// 25 和30 代表损坏
|
|
// 25 和30 代表损坏
|
|
|
if (StringUtils.isEmpty(atStr) || (Objects.equals(atStr, "25") && Objects.equals(ahStr, "30"))) {
|
|
if (StringUtils.isEmpty(atStr) || (Objects.equals(atStr, "25") && Objects.equals(ahStr, "30"))) {
|
|
|
- JSONObject weatherInfo = iotWeatherService.getWeatherByAddress(
|
|
|
|
|
|
|
+ JSONObject weatherInfo = weatherService.getWeatherByAddress(
|
|
|
iotDevice.getDevProvince(), iotDevice.getDevCity(), iotDevice.getDevDistrict());
|
|
iotDevice.getDevProvince(), iotDevice.getDevCity(), iotDevice.getDevDistrict());
|
|
|
if (weatherInfo != null) {
|
|
if (weatherInfo != null) {
|
|
|
atStr = weatherInfo.getString("tem");
|
|
atStr = weatherInfo.getString("tem");
|