|
|
@@ -20,7 +20,6 @@ import com.yunfeiyun.agmp.iot.common.service.YfCbdRecogeService;
|
|
|
import com.yunfeiyun.agmp.iot.common.util.tmn.cbd.CbdInsectIdentifyUtil;
|
|
|
import com.yunfeiyun.agmp.iots.service.IIotDeviceService;
|
|
|
import com.yunfeiyun.agmp.iots.service.IIotPestService;
|
|
|
-import com.yunfeiyun.agmp.iots.warn.service.WarnService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -50,23 +49,6 @@ public class IotCbdImgService {
|
|
|
@Autowired
|
|
|
private YfCbdRecogeService yfCbdRecogeService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private WarnService warnService;
|
|
|
-
|
|
|
- private void sendWarn(IotDevice iotDevice, IotCbdrecog warnCbdrecog){
|
|
|
- List<IotCbdPestrecog> warnCbdPestrecogList = null;
|
|
|
- if (warnCbdrecog != null) {
|
|
|
- warnCbdPestrecogList = warnCbdrecog.getPestrecog().get(EnumCbdMarkType.AUTO.getCode());
|
|
|
- if(warnCbdPestrecogList != null && !warnCbdPestrecogList.isEmpty()){
|
|
|
- // 预警
|
|
|
- JSONObject extInfo = new JSONObject();
|
|
|
- extInfo.put("data", warnCbdPestrecogList);
|
|
|
-
|
|
|
-// warnService.processWarningReportData(iotDevice, extInfo);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
private String getJsonData(String k, JSONObject jsonObject){
|
|
|
String v = jsonObject.getString(k);
|
|
|
return StringUtils.isNotEmpty(v) && !v.equals("0") ? v : "";
|
|
|
@@ -189,13 +171,6 @@ public class IotCbdImgService {
|
|
|
iotCbdimg.setCbdrecog(cbdrecog);
|
|
|
mongoService.saveOne(iotCbdimg);
|
|
|
|
|
|
- // 发送预警消息
|
|
|
- IotCbdrecog warnCbdrecog = iotCbdrecogB;
|
|
|
- if(Objects.equals(iotDevice.getDevCbdrecogtype(), EnumCbdRecogType.A.getCode())){
|
|
|
- warnCbdrecog = iotCbdrecogA;
|
|
|
- }
|
|
|
- sendWarn(iotDevice, warnCbdrecog);
|
|
|
-
|
|
|
return iotCbdimg;
|
|
|
}
|
|
|
|